/*! 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={645:function(t,n){n.read=function(t,n,i,r,e){var o,s,a=8*e-r-1,u=(1<>1,c=-7,f=i?e-1:0,l=i?-1:1,v=t[n+f];for(f+=l,o=v&(1<<-c)-1,v>>=-c,c+=a;c>0;o=256*o+t[n+f],f+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[n+f],f+=l,c-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=h}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,i,r,e,o){var s,a,u,h=8*o-e-1,c=(1<>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=c):(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>=c?(a=0,s=c):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<0;t[i+v]=255&s,v+=d,s/=256,h-=8);t[i+v-d]|=128*p}},138: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,h="normal",c=[],f=0,l=t.length;f>>0):4294967296*(n>>>0)+(t>>>0)}function c(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>>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>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=b(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=b(this.buf,this.pos)+b(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=b(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 h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<3,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<10,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<17,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<24,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(1&e)<<31,e<128)return h(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(;e239?4:u>223?3:u>191?2:1;if(e+c>i)break;1===c?u<128&&(h=u):2===c?128==(192&(o=t[e+1]))&&(h=(31&u)<<6|63&o)<=127&&(h=null):3===c?(o=t[e+1],s=t[e+2],128==(192&o)&&128==(192&s)&&((h=(15&u)<<12|(63&o)<<6|63&s)<=2047||h>=55296&&h<=57343)&&(h=null)):4===c&&(o=t[e+1],s=t[e+2],a=t[e+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,c=1):h>65535&&(h-=65536,r+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),r+=String.fromCharCode(h),e+=c}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.pos127;);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;n268435455||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;o55295&&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&&c(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=128&&c(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,m,n)},writePackedSFixed32:function(t,n){n.length&&this.writeMessage(t,y,n)},writePackedFixed64:function(t,n){n.length&&this.writeMessage(t,g,n)},writePackedSFixed64:function(t,n){n.length&&this.writeMessage(t,w,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))}}},582:function(t){t.exports=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,h=Math.log(a),c=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*c*(a-c)/a)*(u-a/2<0?-1:1);t(i,r,Math.max(e,Math.floor(r-u*c/a+f)),Math.min(o,Math.floor(r+(a-u)*c/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);v0;)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 tn?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=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=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,h,f,l=1/0,v=1/0,d=n;d<=i-n;d++){var p=s(t,0,d,this.toBBox),m=s(t,d,i,this.toBBox),y=(e=p,o=m,a=void 0,u=void 0,h=void 0,f=void 0,a=Math.max(e.minX,o.minX),u=Math.max(e.minY,o.minY),h=Math.min(e.maxX,o.maxX),f=Math.min(e.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,f-u)),g=c(p)+c(m);y=n;v--){var d=t.children[v];a(u,t.leaf?e(d):d),h+=f(u)}return h},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}()},975: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)}},n={};function i(r){var e=n[r];if(void 0!==e)return e.exports;var o=n[r]={exports:{}};return t[r].call(o.exports,o,o.exports,i),o.exports}i.d=function(t,n){for(var r in n)i.o(n,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)};var r={};return function(){"use strict";function t(){return function(){throw new Error("Unimplemented abstract method.")}()}i.d(r,{default:function(){return pP}});var n=0;function e(t){return t.ol_uid||(t.ol_uid=String(++n))}var o,s="6.6.0",a=(o=function(t,n){return(o=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}o(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),u=function(t){function n(n){var i=this,r="Assertion failed. See https://openlayers.org/en/"+("v"+s.split("-")[0])+"/doc/errors/#"+n+" for details.";return(i=t.call(this,r)||this).code=n,i.name="AssertionError",i.message=r,i}return a(n,t),n}(Error);function h(t){t.stopPropagation()}var c=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}(),f="propertychange",l=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function v(t,n,i){for(var r,e,o=i||d,s=0,a=t.length,u=!1;s>1)],n))<0?s=r+1:(a=r,u=!e);return u?s:~s}function d(t,n){return t>n?1:t=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;e0?e-1:e:t[e-1]-n>>0,e=0;e0||i&&0===o)}))}function M(){return!0}function S(){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&&b(o,i)||(e=!0,r=this,i=o,n=t.apply(this,arguments)),n}}var k="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;r0)},n.prototype.removeEventListener=function(t,n){var i=this.v&&this.v[t];if(i){var r=i.indexOf(n);-1!==r&&(this.i&&t in this.i?(i[r]=_,++this.i[t]):(i.splice(r,1),0===i.length&&delete this.v[t]))}},n}(l),N="change",z="error",I="clear",R="contextmenu",L="click",F="dblclick",G="dragenter",q="dragover",D="drop",B="keydown",U="keypress",W="load",V="resize",J="touchmove",X="wheel";function H(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 Y(t,n,i,r){return H(t,n,i,r,!0)}function Z(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),T(t))}var $=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)}}(),K=function(t){function n(){var n=t.call(this)||this;return n.on=n.onInternal,n.once=n.onceInternal,n.un=n.unInternal,n.p=0,n}return $(n,t),n.prototype.changed=function(){++this.p,this.dispatchEvent(N)},n.prototype.getRevision=function(){return this.p},n.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),e=0;e0;)this.pop()},n.prototype.extend=function(t){for(var n=0,i=t.length;ne&&(u|=tn),ao&&(u|=Qt),u===$t&&(u=Kt),u}function ln(){return[1/0,1/0,-1/0,-1/0]}function vn(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 dn(t){return vn(1/0,1/0,-1/0,-1/0,t)}function pn(t,n){var i=t[0],r=t[1];return vn(i,r,i,r,n)}function mn(t,n,i,r,e){return jn(dn(e),t,n,i,r)}function yn(t,n){return t[0]==n[0]&&t[2]==n[2]&&t[1]==n[1]&&t[3]==n[3]}function gn(t,n,i){return Math.abs(t[0]-n[0])t[2]&&(t[2]=n[2]),n[1]t[3]&&(t[3]=n[3]),t}function bn(t,n){n[0]t[2]&&(t[2]=n[0]),n[1]t[3]&&(t[3]=n[1])}function xn(t,n){for(var i=0,r=n.length;in[0]?r[0]=t[0]:r[0]=n[0],t[1]>n[1]?r[1]=t[1]:r[1]=n[1],t[2]=n[0]&&t[1]<=n[3]&&t[3]>=n[1]}function Fn(t){return t[2]=s&&p<=u),r||!(o&tn)||e&tn||(r=(m=v-(l-u)*d)>=a&&m<=h),r||!(o&nn)||e&nn||(r=(p=l-(v-a)/d)>=s&&p<=u),r||!(o&rn)||e&rn||(r=(m=v-(l-s)*d)>=a&&m<=h)}return r}function Bn(t,n,i,r){var e=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a=i[2])){var e=Rn(i),o=Math.floor((r[0]-i[0])/e)*e;t[0]-=o,t[2]-=o}return t}var Wn=function(){function t(t){this.q=t.code,this.D=t.units,this.B=void 0!==t.extent?t.extent:null,this.U=void 0!==t.worldExtent?t.worldExtent:null,this.W=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.V=void 0!==t.global&&t.global,this.H=!(!this.V||!this.B),this.K=t.getPointResolution,this.tt=null,this.nt=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.H},t.prototype.getCode=function(){return this.q},t.prototype.getExtent=function(){return this.B},t.prototype.getUnits=function(){return this.D},t.prototype.getMetersPerUnit=function(){return this.nt||bt[this.D]},t.prototype.getWorldExtent=function(){return this.U},t.prototype.getAxisOrientation=function(){return this.W},t.prototype.isGlobal=function(){return this.V},t.prototype.setGlobal=function(t){this.V=t,this.H=!(!t||!this.B)},t.prototype.getDefaultTileGrid=function(){return this.tt},t.prototype.setDefaultTileGrid=function(t){this.tt=t},t.prototype.setExtent=function(t){this.B=t,this.H=!(!this.V||!t)},t.prototype.setWorldExtent=function(t){this.U=t},t.prototype.setGetPointResolution=function(t){this.K=t},t.prototype.getPointResolutionFunc=function(){return this.K},t}();function Vn(t,n,i){return Math.min(Math.max(t,n),i)}var Jn="cosh"in Math?Math.cosh:function(t){var n=Math.exp(t);return(n+1/n)/2},Xn="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Hn(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 Yn(t,n,i,r)}function Yn(t,n,i,r){var e=i-t,o=r-n;return e*e+o*o}function Zn(t){for(var n=t.length,i=0;ie&&(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=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 $n(t){return 180*t/Math.PI}function Kn(t){return t*Math.PI/180}function Qn(t,n){var i=t%n;return i*n<0?i+n:i}function ti(t,n,i){return t+i*(n-t)}var 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)}}(),ii=6378137,ri=Math.PI*ii,ei=[-ri,-ri,ri,ri],oi=[-180,-85,180,85],si=ii*Math.log(Math.tan(Math.PI/2)),ai=function(t){function n(n){return t.call(this,{code:n,units:jt.METERS,extent:ei,global:!0,worldExtent:oi,getPointResolution:function(t,n){return t/Jn(n[1]/ii)}})||this}return ni(n,t),n}(Wn),ui=[new ai("EPSG:3857"),new ai("EPSG:102100"),new ai("EPSG:102113"),new ai("EPSG:900913"),new ai("http://www.opengis.net/gml/srs/epsg.xml#3857")];function hi(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;ssi?a=si:a<-si&&(a=-si),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;sn?r:new Array(1+n-e).join("0")+r}function Ci(t,n){for(var i=(""+t).split("."),r=(""+n).split("."),e=0;es)return 1;if(s>o)return-1}return 0}function Pi(t,n){return t[0]+=+n[0],t[1]+=+n[1],t}function Ni(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 zi(t,n){var i,r,e=t[0],o=t[1],s=n[0],a=n[1],u=s[0],h=s[1],c=a[0],f=a[1],l=c-u,v=f-h,d=0===l&&0===v?0:(l*(e-u)+v*(o-h))/(l*l+v*v||0);return d<=0?(i=u,r=h):d>=1?(i=c,r=f):(i=u+d*l,r=h+d*v),[i,r]}function Ii(t,n,i){var r=Qn(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),h=e-3600*a-60*u;return(h=Math.ceil(h*s)/s)>=60&&(h=0,u+=1),u>=60&&(u=0,a+=1),a+"° "+Ei(u,2)+"′ "+Ei(h,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function Ri(t,n,i){return t?n.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Li(t,n){for(var i=!0,r=t.length-1;r>=0;--r)if(t[r]!=n[r]){i=!1;break}return i}function Fi(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 Gi(t,n){return t[0]*=n,t[1]*=n,t}function qi(t,n){var i=t[0]-n[0],r=t[1]-n[1];return i*i+r*r}function Di(t,n){return Math.sqrt(qi(t,n))}function Bi(t,n){return qi(t,zi(t,n))}function Ui(t,n){return Ri(t,"{x}, {y}",n)}function Wi(t,n){if(n.canWrapX()){var i=Rn(n.getExtent()),r=Vi(t,n,i);r&&(t[0]-=r*i)}return t}function Vi(t,n,i){var r=n.getExtent(),e=0;if(n.canWrapX()&&(t[0]r[2])){var o=i||Rn(r);e=Math.floor((t[0]-r[0])/o)}return e}function Ji(t,n,i){var r;if(void 0!==n){for(var e=0,o=t.length;e=2;--h)s[a+h]=n[a+h]}return s}}function ir(t,n,i,r){var e=Zi(t),o=Zi(n);Mi(e,o,nr(i)),Mi(o,e,nr(r))}function rr(t,n){if(t===n)return!0;var i=t.getUnits()===n.getUnits();return(t.getCode()===n.getCode()||er(t,n)===Ji)&&i}function er(t,n){var i=Si(t.getCode(),n.getCode());return i||(i=Xi),i}function or(t,n){return er(Zi(t),Zi(n))}function sr(t,n,i){return or(n,i)(t,void 0,t.length)}function ar(t,n,i,r){return Bn(t,or(n,i),void 0,r)}var ur=null;function hr(t){ur=Zi(t)}function cr(){return ur}function fr(t,n){return ur?sr(t,n,ur):t}function lr(t,n){return ur?sr(t,ur,n):t}function vr(t,n){return ur?ar(t,n,ur):t}function dr(t,n){return ur?ar(t,ur,n):t}function pr(t,n,i){return function(r){var e,o,s=r[0],a=r[1];if(t.canWrapX()){var u=t.getExtent(),h=Rn(u);(o=Vi(r,t,h))&&(s-=o*h),s=Vn(s,u[0],u[2]),a=Vn(a,u[1],u[3]),e=i([s,a])}else e=i(r);return o&&n.canWrapX()&&(e[0]+=o*Rn(n.getExtent())),e}}function mr(){Ki(ui),Ki(mi),Qi(mi,ui,hi,ci)}function yr(t,n,i,r,e,o){for(var s=o||[],a=0,u=n;u1)a=i;else{if(l>0){for(var v=0;ve&&(e=h),o=a,s=u}return e}function Er(t,n,i,r,e){for(var o=0,s=i.length;o0;){for(var f=h.pop(),l=h.pop(),v=0,d=t[l],p=t[l+1],m=t[f],y=t[f+1],g=l+r;gv&&(c=g,v=w)}v>e&&(u[(c-n)/r]=1,l+re&&(o[s++]=h,o[s++]=c,a=h,u=c);return h==a&&c==u||(o[s++]=h,o[s++]=c),s}function Br(t,n){return n*Math.round(t/n)}function Ur(t,n,i,r,e,o,s){if(n==i)return s;var a,u,h=Br(t[n],e),c=Br(t[n+1],e);n+=r,o[s++]=h,o[s++]=c;do{if(a=Br(t[n],e),u=Br(t[n+1],e),(n+=r)==i)return o[s++]=a,o[s++]=u,s}while(a==h&&u==c);for(;n0&&p>v)&&(d<0&&m0&&m>d)?(a=f,u=l):(o[s++]=a,o[s++]=u,h=a,c=u,a=f,u=l)}}return o[s++]=a,o[s++]=u,s}function Wr(t,n,i,r,e,o,s,a){for(var u=0,h=i.length;uo&&(h-a)*(o-u)-(e-a)*(c-u)>0&&s++:c<=o&&(h-a)*(o-u)-(e-a)*(c-u)<0&&s--,a=h,u=c}return 0!==s}function ee(t,n,i,r,e,o){if(0===i.length)return!1;if(!re(t,n,i[0],r,e,o))return!1;for(var s=1,a=i.length;sx&&ee(t,n,i,r,h=(c+f)/2,p)&&(b=h,x=j),c=f}return isNaN(b)&&(b=e[o]),s?(s.push(b,p,x),s):[b,p,x]}function ae(t,n,i,r,e){for(var o=[],s=0,a=i.length;s=e[0]&&o[2]<=e[2]||(o[1]>=e[1]&&o[3]<=e[3]||ue(t,n,i,r,(function(t,n){return Dn(e,t,n)})))))}function ce(t,n,i,r,e){for(var o=0,s=i.length;o0}function me(t,n,i,r,e){for(var o=void 0!==e&&e,s=0,a=i.length;st)throw new Error("Tile load sequence violation");this.state=t,this.changed()},i.prototype.load=function(){t()},i.prototype.getAlpha=function(t,n){if(!this.Pt)return 1;var i=this.Nt[t];if(i){if(-1===i)return 1}else i=n,this.Nt[t]=i;var r=n-i+1e3/60;return r>=this.Pt?1:ro(r/this.Pt)},i.prototype.inTransition=function(t){return!!this.Pt&&-1!==this.Nt[t]},i.prototype.endTransition=function(t){this.Pt&&(this.Nt[t]=-1)},i}(P);function ho(t,n,i,r){var e=i&&i.length?i.shift():At?new OffscreenCanvas(t||300,n||300):document.createElement("canvas");return t&&(e.width=t),n&&(e.height=n),e.getContext("2d",r)}function co(t){var n=t.offsetWidth,i=getComputedStyle(t);return n+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}function fo(t){var n=t.offsetHeight,i=getComputedStyle(t);return n+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}function lo(t,n){var i=n.parentNode;i&&i.replaceChild(t,n)}function vo(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function po(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function mo(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 yo=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 go=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i,s)||this;return a.zt=e,a.xt=r,a.key=r,a.jt=new Image,null!==e&&(a.jt.crossOrigin=e),a.Mt=null,a.It=o,a}return yo(n,t),n.prototype.getImage=function(){return this.jt},n.prototype.setImage=function(t){this.jt=t,this.state=to,this.Ot(),this.changed()},n.prototype._t=function(){var t;this.state=no,this.Ot(),this.jt=((t=ho(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},n.prototype.kt=function(){var t=this.jt;t.naturalWidth&&t.naturalHeight?this.state=to:this.state=io,this.Ot(),this.changed()},n.prototype.load=function(){this.state==no&&(this.state=Ke,this.jt=new Image,null!==this.zt&&(this.jt.crossOrigin=this.zt)),this.state==Ke&&(this.state=Qe,this.changed(),this.It(this,this.xt),this.Mt=He(this.jt,this.kt.bind(this),this._t.bind(this)))},n.prototype.Ot=function(){this.Mt&&(this.Mt(),this.Mt=null)},n}(uo),wo=function(){function t(t,n,i){this.Rt=t,this.Lt=n,this.Ft=i,this.Gt=[],this.qt=0,this.Dt=0}return t.prototype.begin=function(){this.Gt.length=0,this.qt=0,this.Dt=0},t.prototype.update=function(t,n){this.Gt.push(t,n,Date.now())},t.prototype.end=function(){if(this.Gt.length<6)return!1;var t=Date.now()-this.Ft,n=this.Gt.length-3;if(this.Gt[n+2]0&&this.Gt[i+2]>t;)i-=3;var r=this.Gt[n+2]-this.Gt[i+2];if(r<1e3/60)return!1;var e=this.Gt[n]-this.Gt[i],o=this.Gt[n+1]-this.Gt[i+1];return this.qt=Math.atan2(o,e),this.Dt=Math.sqrt(e*e+o*o)/r,this.Dt>this.Lt},t.prototype.getDistance=function(){return(this.Lt-this.Dt)/this.Rt},t.prototype.getAngle=function(){return this.qt},t}(),bo=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,xo=/^([a-z]*)$|^hsla?\(.*\)$/i;function jo(t){return"string"==typeof t?t:ko(t)}function Mo(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 So=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;xo.exec(t)&&(t=Mo(t));if(bo.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(")?Oo(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Oo(o)):ct(!1,14);return o}(i),t[i]=r,++n}return r}}();function _o(t){return Array.isArray(t)?t:So(t)}function Oo(t){return t[0]=Vn(t[0]+.5|0,0,255),t[1]=Vn(t[1]+.5|0,0,255),t[2]=Vn(t[2]+.5|0,0,255),t[3]=Vn(t[3],0,1),t}function ko(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:t[3])+")"}function To(t){return xo.test(t)&&(t=Mo(t)),bo.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}var Ao=function(){function t(){this.Bt={},this.Ut=0,this.Wt=32}return t.prototype.clear=function(){this.Bt={},this.Ut=0},t.prototype.canExpireCache=function(){return this.Ut>this.Wt},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var n in this.Bt){var i=this.Bt[n];0!=(3&t++)||i.hasListener()||(delete this.Bt[n],--this.Ut)}}},t.prototype.get=function(t,n,i){var r=Eo(t,n,i);return r in this.Bt?this.Bt[r]:null},t.prototype.set=function(t,n,i,r){var e=Eo(t,n,i);this.Bt[e]=r,++this.Ut},t.prototype.setSize=function(t){this.Wt=t,this.expire()},t}();function Eo(t,n,i){return n+":"+t+":"+(i?jo(i):"null")}var Co=Ao,Po=new Ao,No="opacity",zo="visible",Io="extent",Ro="zIndex",Lo="maxResolution",Fo="minResolution",Go="maxZoom",qo="minZoom",Do="source",Bo=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)}}(),Uo=function(n){function i(t){var i=n.call(this)||this;i.on,i.once,i.un;var r=k({},t);return"object"==typeof t.properties&&(delete r.properties,k(r,t.properties)),r[No]=void 0!==t.opacity?t.opacity:1,ct("number"==typeof r[No],64),r[zo]=void 0===t.visible||t.visible,r[Ro]=t.zIndex,r[Lo]=void 0!==t.maxResolution?t.maxResolution:1/0,r[Fo]=void 0!==t.minResolution?t.minResolution:0,r[qo]=void 0!==t.minZoom?t.minZoom:-1/0,r[Go]=void 0!==t.maxZoom?t.maxZoom:1/0,i.Vt=void 0!==r.className?t.className:"ol-layer",delete r.className,i.setProperties(r),i.Jt=null,i}return Bo(i,n),i.prototype.getClassName=function(){return this.Vt},i.prototype.getLayerState=function(t){var n=this.Jt||{layer:this,managed:void 0===t||t},i=this.getZIndex();return n.opacity=Vn(Math.round(100*this.getOpacity())/100,0,1),n.sourceState=this.getSourceState(),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.Jt=n,n},i.prototype.getLayersArray=function(n){return t()},i.prototype.getLayerStatesArray=function(n){return t()},i.prototype.getExtent=function(){return this.get(Io)},i.prototype.getMaxResolution=function(){return this.get(Lo)},i.prototype.getMinResolution=function(){return this.get(Fo)},i.prototype.getMinZoom=function(){return this.get(qo)},i.prototype.getMaxZoom=function(){return this.get(Go)},i.prototype.getOpacity=function(){return this.get(No)},i.prototype.getSourceState=function(){return t()},i.prototype.getVisible=function(){return this.get(zo)},i.prototype.getZIndex=function(){return this.get(Ro)},i.prototype.setExtent=function(t){this.set(Io,t)},i.prototype.setMaxResolution=function(t){this.set(Lo,t)},i.prototype.setMinResolution=function(t){this.set(Fo,t)},i.prototype.setMaxZoom=function(t){this.set(Go,t)},i.prototype.setMinZoom=function(t){this.set(qo,t)},i.prototype.setOpacity=function(t){ct("number"==typeof t,64),this.set(No,t)},i.prototype.setVisible=function(t){this.set(zo,t)},i.prototype.setZIndex=function(t){this.set(Ro,t)},i.prototype.disposeInternal=function(){this.Jt&&(this.Jt.layer=null,this.Jt=null),n.prototype.disposeInternal.call(this)},i}(rt),Wo="prerender",Vo="postrender",Jo="precompose",Xo="postcompose",Ho="rendercomplete",Yo="undefined",Zo="loading",$o="ready",Ko="error",Qo=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 ts(t,n){if(!t.visible)return!1;var i=n.resolution;if(i=t.maxResolution)return!1;var r=n.zoom;return r>t.minZoom&&r<=t.maxZoom}var ns=function(t){function n(n){var i=this,r=k({},n);delete r.source,(i=t.call(this,r)||this).on,i.once,i.un,i.Xt=null,i.Ht=null,i.Yt=null,i.Zt=null,n.render&&(i.render=n.render),n.map&&i.setMap(n.map),i.addChangeListener(Do,i.$t);var e=n.source?n.source:null;return i.setSource(e),i}return Qo(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(Do)||null},n.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Yo},n.prototype.Kt=function(){this.changed()},n.prototype.$t=function(){this.Yt&&(Z(this.Yt),this.Yt=null);var t=this.getSource();t&&(this.Yt=H(t,N,this.Kt,this)),this.changed()},n.prototype.getFeatures=function(t){return this.Zt?this.Zt.getFeatures(t):new Promise((function(t){return t([])}))},n.prototype.render=function(t,n){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,n)},n.prototype.setMap=function(t){this.Xt&&(Z(this.Xt),this.Xt=null),t||this.changed(),this.Ht&&(Z(this.Ht),this.Ht=null),t&&(this.Xt=H(t,Jo,(function(t){var n=t.frameState.layerStatesArray,i=this.getLayerState(!1);ct(!n.some((function(t){return t.layer===i.layer})),67),n.push(i)}),this),this.Ht=H(this,N,t.render,t),this.changed())},n.prototype.setSource=function(t){this.set(Do,t)},n.prototype.getRenderer=function(){return this.Zt||(this.Zt=this.createRenderer()),this.Zt},n.prototype.hasRenderer=function(){return!!this.Zt},n.prototype.createRenderer=function(){return null},n.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},n}(Uo),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)}}();function rs(t,n){Po.expire()}var es=function(n){function i(t){var i=n.call(this)||this;return i.Qt=t,i}return is(i,n),i.prototype.dispatchRenderEvent=function(n,i){t()},i.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Ut(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),Wt(r,i)},i.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e,o,s,a){var u,h=n.viewState;function c(t,n,i,r){return e.call(o,n,t?i:null,r)}var f=h.projection,l=Wi(t.slice(),f),v=[[0,0]];if(f.canWrapX()&&r){var d=Rn(f.getExtent());v.push([-d,0],[d,0])}for(var p=n.layerStatesArray,m=p.length,y=[],g=[],w=0;w=0;--b){var x=p[b],j=x.layer;if(j.hasRenderer()&&ts(x,h)&&s.call(a,j)){var M=j.getRenderer(),S=j.getSource();if(M&&S){var _=S.getWrapX()?l:t,O=c.bind(null,x.managed);g[0]=_[0]+v[w][0],g[1]=_[1]+v[w][1],u=M.forEachFeatureAtCoordinate(g,n,i,O,y)}if(u)return u}}if(0!==y.length){var k=1/y.length;return y.forEach((function(t,n){return t.distanceSq+=n*k})),y.sort((function(t,n){return t.distanceSq-n.distanceSq})),y.some((function(t){return u=t.callback(t.feature,t.layer,t.geometry)})),u}},i.prototype.forEachLayerAtPixel=function(n,i,r,e,o){return t()},i.prototype.hasFeatureAtCoordinate=function(t,n,i,r,e,o){return void 0!==this.forEachFeatureAtCoordinate(t,n,i,r,M,this,e,o)},i.prototype.getMap=function(){return this.Qt},i.prototype.renderFrame=function(n){t()},i.prototype.scheduleExpireIconCache=function(t){Po.canExpireCache()&&t.postRenderFunctions.push(rs)},i}(l),os=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)}}(),ss=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 os(n,t),n}(c),as="ol-hidden",us="ol-selectable",hs="ol-unselectable",cs="ol-unsupported",fs="ol-control",ls="ol-collapsed",vs=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"),ds=["style","variant","weight","size","lineHeight","family"],ps=function(t){var n=t.match(vs);if(!n)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,e=ds.length;r=0;--o)r[o].renderDeclutter(t);mo(this.nn,this.rn),this.dispatchRenderEvent(Xo,t),this.en||(this.nn.style.display="",this.en=!0),this.scheduleExpireIconCache(t)}else this.en&&(this.nn.style.display="none",this.en=!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],h=u.layer;if(h.hasRenderer()&&ts(u,o)&&e(h)){var c=h.getRenderer().getDataAtPixel(t,n,i);if(c){var f=r(h,c);if(f)return f}}}},n}(es),Ds=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)}}(),Bs="layers",Us=function(t){function n(n){var i=this,r=n||{},e=k({},r);delete e.layers;var o=r.layers;return(i=t.call(this,e)||this).sn=[],i.an={},i.addChangeListener(Bs,i.hn),o?Array.isArray(o)?o=new ht(o.slice(),{unique:!0}):ct("function"==typeof o.getArray,43):o=new ht(void 0,{unique:!0}),i.setLayers(o),i}return Ds(n,t),n.prototype.cn=function(){this.changed()},n.prototype.hn=function(){this.sn.forEach(Z),this.sn.length=0;var t=this.getLayers();for(var n in this.sn.push(H(t,et,this.fn,this),H(t,ot,this.vn,this)),this.an)this.an[n].forEach(Z);T(this.an);for(var i=t.getArray(),r=0,o=i.length;rthis.bn||Math.abs(t.clientY-this.xn.clientY)>this.bn},n.prototype.disposeInternal=function(){this.kn&&(Z(this.kn),this.kn=null),this.nn.removeEventListener(J,this.An),this.Sn&&(Z(this.Sn),this.Sn=null),this.wn.forEach(Z),this.wn.length=0,this.nn=null,t.prototype.disposeInternal.call(this)},n}(P),na="postrender",ia="movestart",ra="moveend",ea="layergroup",oa="size",sa="target",aa="view",ua=1/0,ha=function(){function t(t,n){this.Ln=t,this.Fn=n,this.Gn=[],this.qn=[],this.Dn={}}return t.prototype.clear=function(){this.Gn.length=0,this.qn.length=0,T(this.Dn)},t.prototype.dequeue=function(){var t=this.Gn,n=this.qn,i=t[0];1==t.length?(t.length=0,n.length=0):(t[0]=t.pop(),n[0]=n.pop(),this.Bn(0));var r=this.Fn(i);return delete this.Dn[r],i},t.prototype.enqueue=function(t){ct(!(this.Fn(t)in this.Dn),31);var n=this.Ln(t);return n!=ua&&(this.Gn.push(t),this.qn.push(n),this.Dn[this.Fn(t)]=!0,this.Un(0,this.Gn.length-1),!0)},t.prototype.getCount=function(){return this.Gn.length},t.prototype.Wn=function(t){return 2*t+1},t.prototype.Vn=function(t){return 2*t+2},t.prototype.Jn=function(t){return t-1>>1},t.prototype.Xn=function(){var t;for(t=(this.Gn.length>>1)-1;t>=0;t--)this.Bn(t)},t.prototype.isEmpty=function(){return 0===this.Gn.length},t.prototype.isKeyQueued=function(t){return t in this.Dn},t.prototype.isQueued=function(t){return this.isKeyQueued(this.Fn(t))},t.prototype.Bn=function(t){for(var n=this.Gn,i=this.qn,r=n.length,e=n[t],o=i[t],s=t;t>1;){var a=this.Wn(t),u=this.Vn(t),h=ut;){var s=this.Jn(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.Ln,e=this.Gn,o=this.qn,s=0,a=e.length;for(n=0;n0;)r=(i=this.dequeue()[0]).getKey(),i.getState()!==Ke||r in this.$n||(this.$n[r]=!0,++this.Zn,++e,i.load())},n}(ha);function la(t,n,i,r,e){if(!t||!(i in t.wantedTiles))return ua;if(!t.wantedTiles[i][n.getKey()])return ua;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 va=0,da=1,pa="center",ma="resolution",ya="rotation",ga=256;function wa(t,n,i){return function(r,e,o,s,a){if(r){var u=n?0:o[0]*e,h=n?0:o[1]*e,c=a?a[0]:0,f=a?a[1]:0,l=t[0]+u/2+c,v=t[2]-u/2+c,d=t[1]+h/2+f,p=t[3]-h/2+f;l>v&&(v=l=(v+l)/2),d>p&&(p=d=(p+d)/2);var m=Vn(r[0],l,v),y=Vn(r[1],d,p),g=30*e;return s&&i&&(m+=-g*Math.log(1+Math.max(0,l-r[0])/g)+g*Math.log(1+Math.max(0,r[0]-v)/g),y+=-g*Math.log(1+Math.max(0,d-r[1])/g)+g*Math.log(1+Math.max(0,r[1]-p)/g)),[m,y]}}}function ba(t){return t}function xa(t,n,i,r){var e=Rn(n)/i[0],o=Pn(n)/i[1];return r?Math.min(t,Math.max(e,o)):Math.min(t,Math.min(e,o))}function ja(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),Vn(r,i/2,2*n)}function Ma(t,n,i,r){return function(e,o,s,a){if(void 0!==e){var u=t[0],h=t[t.length-1],c=i?xa(u,i,s,r):u;if(a)return void 0===n||n?ja(e,c,h):Vn(e,h,c);var f=Math.min(c,e),l=Math.floor(m(t,f,o));return t[l]>c&&l1&&"function"==typeof arguments[i-1]&&(n=arguments[i-1],--i),!this.isDef()){var r=arguments[i-1];return r.center&&this.setCenterInternal(r.center),void 0!==r.zoom&&this.setZoom(r.zoom),void 0!==r.rotation&&this.setRotation(r.rotation),void(n&&Ca(n,!0))}for(var e=Date.now(),o=this.ri.slice(),s=this.ei,a=this.oi,u=[],h=0;h0},n.prototype.getInteracting=function(){return this.Kn[da]>0},n.prototype.cancelAnimations=function(){var t;this.setHint(va,-this.Kn[va]);for(var n=0,i=this.Qn.length;n=0;--i){for(var r=this.Qn[i],e=!0,o=0,s=r.length;o0?u/a.duration:1;h>=1?(a.complete=!0,h=1):e=!1;var c=a.easing(h);if(a.sourceCenter){var f=a.sourceCenter[0],l=a.sourceCenter[1],v=f+c*(a.targetCenter[0]-f),d=l+c*(a.targetCenter[1]-l);this.ri=[v,d]}if(a.sourceResolution&&a.targetResolution){var p=1===c?a.targetResolution:a.sourceResolution+c*(a.targetResolution-a.sourceResolution);if(a.anchor){var m=this.wi(this.getRotation()),y=this.di.resolution(p,0,m,!0);this.ri=this.calculateCenterZoom(y,a.anchor)}this.ei=p,this.bi(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===c?Qn(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+c*(a.targetRotation-a.sourceRotation);if(a.anchor){var w=this.di.rotation(g,!0);this.ri=this.calculateCenterRotate(w,a.anchor)}this.oi=g}if(this.bi(!0),n=!0,!a.complete)break}}if(e){this.Qn[i]=null,this.setHint(va,-1);var b=r[0].callback;b&&Ca(b,!0)}}this.Qn=this.Qn.filter(Boolean),n&&void 0===this.ti&&(this.ti=requestAnimationFrame(this.gi.bind(this)))}},n.prototype.calculateCenterRotate=function(t,n){var i,r=this.getCenterInternal();return void 0!==r&&(Fi(i=[r[0]-n[0],r[1]-n[1]],t-this.getRotation()),Pi(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.wi=function(t){var n=this.ii;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.ii=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},n.prototype.getCenter=function(){var t=this.getCenterInternal();return t?fr(t,this.getProjection()):t},n.prototype.getCenterInternal=function(){return this.get(pa)},n.prototype.getConstraints=function(){return this.di},n.prototype.getConstrainResolution=function(){return this.mi.constrainResolution},n.prototype.getHints=function(t){return void 0!==t?(t[0]=this.Kn[0],t[1]=this.Kn[1],t):this.Kn.slice()},n.prototype.calculateExtent=function(t){return vr(this.calculateExtentInternal(t),this.getProjection())},n.prototype.calculateExtentInternal=function(t){var n=t||this.xi(),i=this.getCenterInternal();ct(i,1);var r=this.getResolution();ct(void 0!==r,2);var e=this.getRotation();return ct(void 0!==e,3),Cn(i,r,e,n)},n.prototype.getMaxResolution=function(){return this.ui},n.prototype.getMinResolution=function(){return this.hi},n.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.hi)},n.prototype.setMaxZoom=function(t){this.ai(this.yi({maxZoom:t}))},n.prototype.getMinZoom=function(){return this.getZoomForResolution(this.ui)},n.prototype.setMinZoom=function(t){this.ai(this.yi({minZoom:t}))},n.prototype.setConstrainResolution=function(t){this.ai(this.yi({constrainResolution:t}))},n.prototype.getProjection=function(){return this.ni},n.prototype.getResolution=function(){return this.get(ma)},n.prototype.getResolutions=function(){return this.fi},n.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(dr(t,this.getProjection()),n)},n.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.xi(),r=Rn(t)/i[0],e=Pn(t)/i[1];return Math.max(r,e)},n.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.ui),r=this.hi,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(ya)},n.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.ui),r=this.hi,e=Math.log(i/r)/n;return function(t){return Math.log(i/t)/n/e}},n.prototype.xi=function(t){var n=this.wi(t),i=this.li;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.li;if(e){var o=this.xi();r=Ra(r,this.wi(),[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,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.vi||0;if(this.fi){var e=m(this.fi,t,1);r=e,n=this.fi[e],i=e==this.fi.length-1?2:n/this.fi[e+1]}else n=this.ui,i=this.ci;return r+Math.log(n/t)/Math.log(i)},n.prototype.getResolutionForZoom=function(t){if(this.fi){if(this.fi.length<=1)return 0;var n=Vn(Math.floor(t),0,this.fi.length-2),i=this.fi[n]/this.fi[n+1];return this.fi[n]/Math.pow(i,Vn(t-n,0,1))}return this.ui/Math.pow(this.ci,t-this.vi)},n.prototype.fit=function(t,n){var i;if(ct(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))ct(!Fn(t),25),i=Se(r=dr(t,this.getProjection()));else if(t.getType()===gt.CIRCLE){var r;(i=Se(r=dr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),An(r))}else{var e=cr();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,h=-1/0,c=0,f=e.length;c0&&t[1]>0}function qa(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 Da(t,n){return Array.isArray(t)?t:(void 0===n?n=[t,t]:(n[0]=t,n[1]=t),n)}var 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)}}();var Ua=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 Us({layers:t.layers});o[ea]=s,o[sa]=t.target,o[aa]=void 0!==t.view?t.view:new La,void 0!==t.controls&&(Array.isArray(t.controls)?i=new ht(t.controls.slice()):(ct("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new ht(t.interactions.slice()):(ct("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?e=new ht(t.overlays.slice()):(ct("function"==typeof t.overlays.getArray,49),e=t.overlays):e=new ht;return{controls:i,interactions:r,keyboardEventTarget:n,overlays:e,values:o}}(n);return i.ji=i.handleBrowserEvent.bind(i),i.Mi=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,i.bt=void 0!==n.pixelRatio?n.pixelRatio:Tt,i.Si,i._i,i.Oi=function(){this._i=void 0,this.ki(Date.now())}.bind(i),i.Ti=[1,0,0,1,0,0],i.Ai=[1,0,0,1,0,0],i.Ei=0,i.Ci=null,i.Pi=null,i.Ni=null,i.zi=null,i.Ii=null,i.Ri=document.createElement("div"),i.Ri.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.Ri.style.position="relative",i.Ri.style.overflow="hidden",i.Ri.style.width="100%",i.Ri.style.height="100%",i.Li=document.createElement("div"),i.Li.style.position="absolute",i.Li.style.zIndex="0",i.Li.style.width="100%",i.Li.style.height="100%",i.Li.style.pointerEvents="none",i.Li.className="ol-overlaycontainer",i.Ri.appendChild(i.Li),i.Fi=document.createElement("div"),i.Fi.style.position="absolute",i.Fi.style.zIndex="0",i.Fi.style.width="100%",i.Fi.style.height="100%",i.Fi.style.pointerEvents="none",i.Fi.className="ol-overlaycontainer-stopevent",i.Ri.appendChild(i.Fi),i.Gi=null,i.bn=n.moveTolerance,i.qi=r.keyboardEventTarget,i.Di=null,i.controls=r.controls||new ht,i.interactions=r.interactions||new ht,i.Bi=r.overlays,i.Ui={},i.Zt=null,i.Wi,i.Vi=[],i.Ji=new fa(i.getTilePriority.bind(i),i.Xi.bind(i)),i.addChangeListener(ea,i.Hi),i.addChangeListener(aa,i.Yi),i.addChangeListener(oa,i.Zi),i.addChangeListener(sa,i.$i),i.setProperties(r.values),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.controls.addEventListener(et,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener(ot,function(t){t.element.setMap(null)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.addEventListener(et,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener(ot,function(t){t.element.setMap(null)}.bind(i)),i.Bi.forEach(i.Ki.bind(i)),i.Bi.addEventListener(et,function(t){this.Ki(t.element)}.bind(i)),i.Bi.addEventListener(ot,function(t){var n=t.element.getId();void 0!==n&&delete this.Ui[n.toString()],t.element.setMap(null)}.bind(i)),i}return Ba(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.addOverlay=function(t){this.getOverlays().push(t)},n.prototype.Ki=function(t){var n=t.getId();void 0!==n&&(this.Ui[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.Ci){var r=this.getCoordinateFromPixelInternal(t),e=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:M,s=!1!==i.checkWrapped;return this.Zt.forEachFeatureAtCoordinate(r,this.Ci,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.forEachLayerAtPixel=function(t,n,i){if(this.Ci){var r=i||{},e=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||M;return this.Zt.forEachLayerAtPixel(t,this.Ci,e,n,o)}},n.prototype.hasFeatureAtPixel=function(t,n){if(!this.Ci)return!1;var i=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).layerFilter?n.layerFilter:M,e=void 0!==n.hitTolerance?n.hitTolerance:0,o=!1!==n.checkWrapped;return this.Zt.hasFeatureAtCoordinate(i,this.Ci,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.Ri.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(sa)},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 fr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},n.prototype.getCoordinateFromPixelInternal=function(t){var n=this.Ci;return n?Ft(n.pixelToCoordinateTransform,t.slice()):null},n.prototype.getControls=function(){return this.controls},n.prototype.getOverlays=function(){return this.Bi},n.prototype.getOverlayById=function(t){var n=this.Ui[t.toString()];return void 0!==n?n:null},n.prototype.getInteractions=function(){return this.interactions},n.prototype.getLayerGroup=function(){return this.get(ea)},n.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},n.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n=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.Ci,n=this.Ji;if(!n.isEmpty()){var i=this.Mi,r=i;if(t){var e=t.viewHints;if(e[va]||e[da]){var o=Date.now()-t.time>8;i=o?0:8,r=o?0:2}}n.getTilesLoading()0;if(this.en!=i&&(this.element.style.display=i?"":"none",this.en=i),!b(n,this.vr)){po(this.ir);for(var r=0,e=n.length;r0&&n%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.gr,easing:eo}):t.setRotation(0))}},n.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.br){var r="rotate("+i+"rad)";if(this.wr){var e=this.element.classList.contains(as);e||0!==i?e&&0!==i&&this.element.classList.remove(as):this.element.classList.add(as)}this.hr.style.transform=r}this.br=i}},n}(Va),Za=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=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:"+",h=void 0!==r.zoomOutLabel?r.zoomOutLabel:"−",c=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=c,l.appendChild("string"==typeof u?document.createTextNode(u):u),l.addEventListener(L,i.lr.bind(i,o),!1);var v=document.createElement("button");v.className=a,v.setAttribute("type","button"),v.title=f,v.appendChild("string"==typeof h?document.createTextNode(h):h),v.addEventListener(L,i.lr.bind(i,-o),!1);var d=e+" "+"ol-unselectable "+fs,p=i.element;return p.className=d,p.appendChild(l),p.appendChild(v),i.gr=void 0!==r.duration?r.duration:250,i}return Za(n,t),n.prototype.lr=function(t,n){n.preventDefault(),this.Mr(t)},n.prototype.Mr=function(t){var n=this.getMap().getView();if(n){var i=n.getZoom();if(void 0!==i){var r=n.getConstrainedZoom(i+t);this.gr>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.gr,easing:eo})):n.setZoom(r)}}},n}(Va);function Ka(t){var n=t||{},i=new ht;return(void 0===n.zoom||n.zoom)&&i.push(new $a(n.zoomOptions)),(void 0===n.rotate||n.rotate)&&i.push(new Ya(n.rotateOptions)),(void 0===n.attribution||n.attribution)&&i.push(new Xa(n.attributionOptions)),i}var Qa="active",tu=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 nu(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:so,center:t.getConstrainedCenter(e)})}}function iu(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:eo})}}var ru=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.Qt=null,i.setActive(!0),i}return tu(n,t),n.prototype.getActive=function(){return this.get(Qa)},n.prototype.getMap=function(){return this.Qt},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(Qa,t)},n.prototype.setMap=function(t){this.Qt=t},n}(rt),eu=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)}}(),ou=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Sr=r.delta?r.delta:1,i.gr=void 0!==r.duration?r.duration:250,i}return eu(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==Hs.DBLCLICK){var i=t.originalEvent,r=t.map,e=t.coordinate,o=i.shiftKey?-this.Sr:this.Sr;iu(r.getView(),o,e,this.gr),i.preventDefault(),n=!0}return!n},n}(ru),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){for(var n=t.length,i=0,r=0,e=0;e0}}else if(t.type==Hs.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==Hs.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.kr=function(t){if(function(t){var n=t.type;return n===Hs.POINTERDOWN||n===Hs.POINTERDRAG||n===Hs.POINTERUP}(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==Hs.POINTERUP?delete this._r[i]:(t.type==Hs.POINTERDOWN||i in this._r)&&(this._r[i]=n),this.targetPointers=A(this._r)}},n}(ru);function hu(t){var n=arguments;return function(t){for(var i=!0,r=0,e=n.length;r0&&this.Cr(t)){var n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.Tr&&this.Tr.begin(),this.Pr=this.targetPointers.length>1,!0}return!1},n}(uu),_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)}}(),Ou=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{stopDown:S})||this).Cr=r.condition?r.condition:fu,i.Nr=void 0,i.gr=void 0!==r.duration?r.duration:250,i}return _u(n,t),n.prototype.handleDragEvent=function(t){if(xu(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==Oa){var r=n.getSize(),e=t.pixel,o=Math.atan2(r[1]/2-e[1],e[0]-r[0]/2);if(void 0!==this.Nr){var s=o-this.Nr;i.adjustRotationInternal(-s)}this.Nr=o}}},n.prototype.handleUpEvent=function(t){return!xu(t)||(t.map.getView().endInteraction(this.gr),!1)},n.prototype.handleDownEvent=function(t){return!!xu(t)&&(!(!pu(t)||!this.Cr(t))&&(t.map.getView().beginInteraction(),this.Nr=void 0,!0))},n}(uu),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)}}(),Tu=function(t){function n(n){var i=t.call(this)||this;return i.zr=null,i.nn=document.createElement("div"),i.nn.style.position="absolute",i.nn.style.pointerEvents="auto",i.nn.className="ol-box "+n,i.Qt=null,i.Ir=null,i.Rr=null,i}return ku(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.Lr=function(){var t=this.Ir,n=this.Rr,i="px",r=this.nn.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.Qt){this.Qt.getOverlayContainer().removeChild(this.nn);var n=this.nn.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.Qt=t,this.Qt&&this.Qt.getOverlayContainer().appendChild(this.nn)},n.prototype.setPixels=function(t,n){this.Ir=t,this.Rr=n,this.createOrUpdateGeometry(),this.Lr()},n.prototype.createOrUpdateGeometry=function(){var t=this.Ir,n=this.Rr,i=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.Qt.getCoordinateFromPixelInternal,this.Qt);i[4]=i[0].slice(),this.zr?this.zr.setCoordinates([i]):this.zr=new je([i])},n.prototype.getGeometry=function(){return this.zr},n}(l),Au=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)}}(),Eu="boxstart",Cu="boxdrag",Pu="boxend",Nu="boxcancel",zu=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.coordinate=i,e.mapBrowserEvent=r,e}return Au(n,t),n}(c),Iu=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};return i.Fr=new Tu(r.className||"ol-dragbox"),i.Gr=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(i.onBoxEnd=r.onBoxEnd),i.Ir=null,i.Cr=r.condition?r.condition:pu,i.qr=r.boxEndCondition?r.boxEndCondition:i.defaultBoxEndCondition,i}return Au(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.Gr},n.prototype.getGeometry=function(){return this.Fr.getGeometry()},n.prototype.handleDragEvent=function(t){this.Fr.setPixels(this.Ir,t.pixel),this.dispatchEvent(new zu(Cu,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.Fr.setMap(null);var n=this.qr(t,this.Ir,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new zu(n?Pu:Nu,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.Cr(t)&&(this.Ir=t.pixel,this.Fr.setMap(t.map),this.Fr.setPixels(this.Ir,this.Ir),this.dispatchEvent(new zu(Eu,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(uu),Ru=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)}}(),Lu=function(t){function n(n){var i=this,r=n||{},e=r.condition?r.condition:wu;return(i=t.call(this,{condition:e,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).gr=void 0!==r.duration?r.duration:200,i.Dr=void 0!==r.out&&r.out,i}return Ru(n,t),n.prototype.onBoxEnd=function(t){var n=this.getMap().getView(),i=this.getGeometry();if(this.Dr){var r=n.rotatedExtentForGeometry(i),e=n.getResolutionForExtentInternal(r),o=n.getResolution()/e;(i=i.clone()).scale(o*o)}n.fitInternal(i,{duration:this.gr,easing:eo})},n}(Iu),Fu=37,Gu=38,qu=39,Du=40,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)}}(),Uu=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Br=function(t){return gu(t)&&bu(t)},i.Cr=void 0!==r.condition?r.condition:i.Br,i.gr=void 0!==r.duration?r.duration:100,i.Ur=void 0!==r.pixelDelta?r.pixelDelta:128,i}return Bu(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==B){var i=t.originalEvent,r=i.keyCode;if(this.Cr(t)&&(r==Du||r==Fu||r==qu||r==Gu)){var e=t.map.getView(),o=e.getResolution()*this.Ur,s=0,a=0;r==Du?a=-o:r==Fu?s=-o:r==qu?s=o:a=o;var u=[s,a];Fi(u,e.getRotation()),nu(e,u,this.gr),i.preventDefault(),n=!0}}return!n},n}(ru),Wu=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=t.call(this)||this,r=n||{};return i.Cr=r.condition?r.condition:bu,i.Sr=r.delta?r.delta:1,i.gr=void 0!==r.duration?r.duration:100,i}return Wu(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==B||t.type==U){var i=t.originalEvent,r=i.charCode;if(this.Cr(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var e=t.map,o=r=="+".charCodeAt(0)?this.Sr:-this.Sr;iu(e.getView(),o,void 0,this.gr),i.preventDefault(),n=!0}}return!n},n}(ru),Ju=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="trackpad",Hu="wheel",Yu=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,r)||this).Wr=0,i.Vr=0,i.rt=void 0!==r.maxDelta?r.maxDelta:1,i.gr=void 0!==r.duration?r.duration:250,i.Jr=void 0!==r.timeout?r.timeout:80,i.Xr=void 0===r.useAnchor||r.useAnchor,i.Hr=void 0!==r.constrainResolution&&r.constrainResolution;var e=r.condition?r.condition:du;return i.Cr=r.onFocusOnly?hu(vu,e):e,i.Yr=null,i.Zr=void 0,i.$r,i.Kr=void 0,i.Qr=400,i.te,i.ne=300,i}return Ju(n,t),n.prototype.ie=function(){this.te=void 0,this.getMap().getView().endInteraction(void 0,this.Vr?this.Vr>0?1:-1:0,this.Yr)},n.prototype.handleEvent=function(t){if(!this.Cr(t))return!0;if(t.type!==X)return!0;var n,i=t.map,r=t.originalEvent;if(r.preventDefault(),this.Xr&&(this.Yr=t.coordinate),t.type==X&&(n=r.deltaY,St&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=Tt),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.Vr=n;var e=Date.now();void 0===this.Zr&&(this.Zr=e),(!this.Kr||e-this.Zr>this.Qr)&&(this.Kr=Math.abs(n)<4?Xu:Hu);var o=i.getView();if(this.Kr===Xu&&!o.getConstrainResolution()&&!this.Hr)return this.te?clearTimeout(this.te):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.te=setTimeout(this.ie.bind(this),this.Jr),o.adjustZoom(-n/this.ne,this.Yr),this.Zr=e,!1;this.Wr+=n;var s=Math.max(this.Jr-(e-this.Zr),0);return clearTimeout(this.$r),this.$r=setTimeout(this.re.bind(this,i),s),!1},n.prototype.re=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-Vn(this.Wr,-this.rt*this.ne,this.rt*this.ne)/this.ne;(n.getConstrainResolution()||this.Hr)&&(i=i?i>0?1:-1:0),iu(n,i,this.Yr,this.gr),this.Kr=void 0,this.Wr=0,this.Yr=null,this.Zr=void 0,this.$r=void 0},n.prototype.setMouseAnchor=function(t){this.Xr=t,t||(this.Yr=null)},n}(ru),Zu=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)}}(),$u=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=S),(i=t.call(this,e)||this).ee=null,i.Nr=void 0,i.oe=!1,i.se=0,i.ae=void 0!==r.threshold?r.threshold:.3,i.gr=void 0!==r.duration?r.duration:250,i}return Zu(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.Nr){var o=e-this.Nr;this.se+=o,!this.oe&&Math.abs(this.se)>this.ae&&(this.oe=!0),n=o}this.Nr=e;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Oa){var u=s.getViewport().getBoundingClientRect(),h=au(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.ee=s.getCoordinateFromPixelInternal(h),this.oe&&(s.render(),a.adjustRotationInternal(n,this.ee))}},n.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.gr),!1)},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.ee=null,this.Nr=void 0,this.oe=!1,this.se=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(uu),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)}}(),Qu=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=S),(i=t.call(this,e)||this).ee=null,i.gr=void 0!==r.duration?r.duration:400,i.ue=void 0,i.he=1,i}return Ku(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.ue&&(n=this.ue/s),this.ue=s;var a=t.map,u=a.getView();1!=n&&(this.he=n);var h=a.getViewport().getBoundingClientRect(),c=au(this.targetPointers);c[0]-=h.left,c[1]-=h.top,this.ee=a.getCoordinateFromPixelInternal(c),a.render(),u.adjustResolutionInternal(n,this.ee)},n.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map.getView(),i=this.he>1?1:-1;return n.endInteraction(this.gr,i),!1}return!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.ee=null,this.ue=void 0,this.he=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(uu);function th(t){var n=t||{},i=new ht,r=new wo(-.005,.05,100);return(void 0===n.altShiftDragRotate||n.altShiftDragRotate)&&i.push(new Ou),(void 0===n.doubleClickZoom||n.doubleClickZoom)&&i.push(new ou({delta:n.zoomDelta,duration:n.zoomDuration})),(void 0===n.dragPan||n.dragPan)&&i.push(new Su({onFocusOnly:n.onFocusOnly,kinetic:r})),(void 0===n.pinchRotate||n.pinchRotate)&&i.push(new $u),(void 0===n.pinchZoom||n.pinchZoom)&&i.push(new Qu({duration:n.zoomDuration})),(void 0===n.keyboard||n.keyboard)&&(i.push(new Uu),i.push(new Vu({delta:n.zoomDelta,duration:n.zoomDuration}))),(void 0===n.mouseWheelZoom||n.mouseWheelZoom)&&i.push(new Yu({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(void 0===n.shiftDragZoom||n.shiftDragZoom)&&i.push(new Lu({duration:n.zoomDuration})),i}var nh=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)}}(),ih=function(t){function n(n){return(n=k({},n)).controls||(n.controls=Ka()),n.interactions||(n.interactions=th({onFocusOnly:!0})),t.call(this,n)||this}return nh(n,t),n.prototype.createRenderer=function(){return new qs(this)},n}(Ua),rh="bottom-left",eh="bottom-center",oh="bottom-right",sh="center-left",ah="center-center",uh="center-right",hh="top-left",ch="top-center",fh="top-right",lh=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)}}(),vh="element",dh="map",ph="offset",mh="position",yh="positioning",gh=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"!=typeof r&&(r={animation:n.autoPanAnimation,margin:n.autoPanMargin}),i.autoPan=r||!1,i.rendered={lt:"",visible:!0},i.mapPostrenderListenerKey=null,i.addChangeListener(vh,i.handleElementChanged),i.addChangeListener(dh,i.handleMapChanged),i.addChangeListener(ph,i.handleOffsetChanged),i.addChangeListener(mh,i.handlePositionChanged),i.addChangeListener(yh,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:hh),void 0!==n.position&&i.setPosition(n.position),i}return lh(n,t),n.prototype.getElement=function(){return this.get(vh)},n.prototype.getId=function(){return this.id},n.prototype.getMap=function(){return this.get(dh)},n.prototype.getOffset=function(){return this.get(ph)},n.prototype.getPosition=function(){return this.get(mh)},n.prototype.getPositioning=function(){return this.get(yh)},n.prototype.handleElementChanged=function(){po(this.element);var t=this.getElement();t&&this.element.appendChild(t)},n.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(vo(this.element),Z(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=H(t,na,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(vh,t)},n.prototype.setMap=function(t){this.set(dh,t)},n.prototype.setOffset=function(t){this.set(ph,t)},n.prototype.setPosition=function(t){this.set(mh,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(mh)){var i=this.getRect(n.getTargetElement(),n.getSize()),r=this.getElement(),e=this.getRect(r,[co(r),fo(r)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!hn(i,e)){var a=e[0]-i[0],u=i[2]-e[2],h=e[1]-i[1],c=i[3]-e[3],f=[0,0];if(a<0?f[0]=a-s:u<0&&(f[0]=Math.abs(u)+s),h<0?f[1]=h-s:c<0&&(f[1]=Math.abs(c)+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(yh,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==oh||e==uh||e==fh?a="-100%":e!=eh&&e!=ah&&e!=ch||(a="-50%"),e==rh||e==eh||e==oh?u="-100%":e!=sh&&e!=ah&&e!=uh||(u="-50%");var h="translate("+a+", "+u+") translate("+o+", "+s+")";this.rendered.lt!=h&&(this.rendered.lt=h,i.transform=h,i.msTransform=h)},n.prototype.getOptions=function(){return this.options},n}(rt),wh=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.ce=0,this.fe={},this.le=null,this.ve=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.ce=0,this.fe={},this.le=null,this.ve=null},t.prototype.containsKey=function(t){return this.fe.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var n=this.le;n;)t(n.de,n.pe,this),n=n.newer},t.prototype.get=function(t,n){var i=this.fe[t];return ct(void 0!==i,15),i===this.ve||(i===this.le?(this.le=this.le.newer,this.le.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.ve,this.ve.newer=i,this.ve=i),i.de},t.prototype.remove=function(t){var n=this.fe[t];return ct(void 0!==n,15),n===this.ve?(this.ve=n.older,this.ve&&(this.ve.newer=null)):n===this.le?(this.le=n.newer,this.le&&(this.le.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.fe[t],--this.ce,n.de},t.prototype.getCount=function(){return this.ce},t.prototype.getKeys=function(){var t,n=new Array(this.ce),i=0;for(t=this.ve;t;t=t.older)n[i++]=t.pe;return n},t.prototype.getValues=function(){var t,n=new Array(this.ce),i=0;for(t=this.ve;t;t=t.older)n[i++]=t.de;return n},t.prototype.peekLast=function(){return this.le.de},t.prototype.peekLastKey=function(){return this.le.pe},t.prototype.peekFirstKey=function(){return this.ve.pe},t.prototype.pop=function(){var t=this.le;return delete this.fe[t.pe],t.newer&&(t.newer.older=null),this.le=t.newer,this.le||(this.ve=null),--this.ce,t.de},t.prototype.replace=function(t,n){this.get(t),this.fe[t].de=n},t.prototype.set=function(t,n){ct(!(t in this.fe),16);var i={pe:t,newer:null,older:this.ve,de:n};this.ve?this.ve.newer=i:this.le=i,this.ve=i,this.fe[t]=i,++this.ce},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function bh(t,n,i,r){return void 0!==r?(r[0]=t,r[1]=n,r[2]=i,r):[t,n,i]}function xh(t,n,i){return t+"/"+n+"/"+i}function jh(t){return xh(t[0],t[1],t[2])}function Mh(t){var n=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return xh(n[0],n[1],n[2])}function Sh(t){return t.split("/").map(Number)}function _h(t){return(t[1]<i||i>n.getMaxZoom())return!1;var o=n.getFullTileRange(i);return!o||o.containsXY(r,e)}var kh=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=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return kh(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=Sh(this.peekFirstKey())[0];this.forEach(function(n){n.tileCoord[0]!==t&&(this.remove(jh(n.tileCoord)),n.release())}.bind(this))}},n}(wh),Ah=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.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Eh(t,n,i,r,e){return void 0!==e?(e.minX=t,e.maxX=n,e.minY=i,e.maxY=r,e):new Ah(t,n,i,r)}var Ch=Ah,Ph=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)}}(),Nh=[],zh=function(t){function n(n,i,r,e){var o=t.call(this,n,i,{transition:0})||this;return o.me={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.ye={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=e.bind(void 0,o),o.wrappedTileCoord=r,o}return Ph(n,t),n.prototype.getContext=function(t){var n=e(t);return n in this.me||(this.me[n]=ho(1,1,Nh)),this.me[n]},n.prototype.hasContext=function(t){return e(t)in this.me},n.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},n.prototype.getReplayState=function(t){var n=e(t);return n in this.ye||(this.ye[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.ye[n]},n.prototype.load=function(){this.getSourceTiles()},n.prototype.release=function(){for(var n in this.me)Nh.push(this.me[n].canvas),delete this.me[n];t.prototype.release.call(this)},n}(uo),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.ge=e,a.we=null,a.Tt,a.projection=null,a.resolution,a.It=o,a.be=r,a.key=r,a}return Ih(n,t),n.prototype.getFormat=function(){return this.ge},n.prototype.getFeatures=function(){return this.we},n.prototype.load=function(){this.state==Ke&&(this.setState(Qe),this.It(this,this.be),this.Tt&&this.Tt(this.extent,this.resolution,this.projection))},n.prototype.onLoad=function(t,n){this.setFeatures(t)},n.prototype.onError=function(){this.setState(no)},n.prototype.setFeatures=function(t){this.we=t,this.setState(to)},n.prototype.setLoader=function(t){this.Tt=t},n}(uo);function Lh(t){return Array.isArray(t)?ko(t):t}var Fh="arraybuffer",Gh="json",qh="text",Dh="xml",Bh=!1;function Uh(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()==Fh&&(a.responseType="arraybuffer"),a.withCredentials=Bh,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=n.getType(),u=void 0;r==Gh||r==qh?u=a.responseText:r==Dh?(u=a.responseXML)||(u=(new DOMParser).parseFromString(a.responseText,"application/xml")):r==Fh&&(u=a.response),u?o(n.readFeatures(u,{extent:i,featureProjection:e}),n.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Wh(t,n){return function(i,r,e,o,s){var a=this;Uh(t,n,i,r,e,(function(t,n){a.addFeatures(t),void 0!==o&&o(t)}),s||_)}}function Vh(t,n){return[[-1/0,-1/0,1/0,1/0]]}function Jh(t,n,i,r){var o=document.createElement("script"),s="olc_"+e(n);function a(){delete window[s],o.parentNode.removeChild(o)}o.async=!0,o.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(o)}var Xh=function(){function t(){}return t.prototype.drawCustom=function(t,n,i){},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}(),Hh=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)}}(),Yh=function(t){function n(n,i,r,e,o,s,a){var u=t.call(this)||this;return u.me=n,u.bt=i,u.B=r,u.lt=e,u.xe=o,u.je=s,u.Me=a,u.Se=null,u._e=null,u.Oe=null,u.ke=null,u.Te=null,u.jt=null,u.Ae=0,u.Ee=0,u.Ce=0,u.Pe=0,u.Ne=0,u.ze=0,u.Ie=!1,u.Re=0,u.Le=[0,0],u.Fe=0,u.Ge="",u.qe=0,u.De=0,u.Be=!1,u.Ue=0,u.We=[0,0],u.Ve=null,u.Je=null,u.Xe=null,u.He=[],u.Ye=[1,0,0,1,0,0],u}return Hh(n,t),n.prototype.Ze=function(t,n,i,r){if(this.jt){var e=yr(t,n,i,r,this.lt,this.He),o=this.me,s=this.Ye,a=o.globalAlpha;1!=this.Pe&&(o.globalAlpha=a*this.Pe);var u=this.Re;this.Ie&&(u+=this.xe);for(var h=0,c=e.length;h2||Math.abs(t[4*n+3]-191.25)>2}function dc(t,n,i,r){var e=sr(i,n,t),o=$i(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||un(u,e)){var h=$i(t,o,e)/o;isFinite(h)&&h>0&&(o/=h)}return o}function pc(t,n,i,r){var e=An(i),o=dc(t,n,e,r);return(!isFinite(o)||o<=0)&&_n(i,(function(i){return o=dc(t,n,i,r),isFinite(o)&&o>0})),o}function mc(t,n,i,r,e,o,s,a,u,h,c,f){var l=ho(Math.round(i*t),Math.round(i*n));if(k(l,f),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){wn(d,t.extent)}));var p=Rn(d),m=Pn(d),y=ho(Math.round(i*p/r),Math.round(i*m/r));k(y,f);var g=i/r;u.forEach((function(t,n,i){var r=t.extent[0]-d[0],e=-(t.extent[3]-d[3]),o=Rn(t.extent),s=Pn(t.extent);t.image.width>0&&t.image.height>0&&y.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,r*g,e*g,o*g,s*g)}));var w=zn(s);return a.getTriangles().forEach((function(t,n,e){var s=t.source,a=t.target,u=s[0][0],h=s[0][1],c=s[1][0],p=s[1][1],m=s[2][0],g=s[2][1],b=v((a[0][0]-w[0])/o),x=v(-(a[0][1]-w[1])/o),j=v((a[1][0]-w[0])/o),M=v(-(a[1][1]-w[1])/o),S=v((a[2][0]-w[0])/o),_=v(-(a[2][1]-w[1])/o),O=u,k=h;u=0,h=0;var T=Zn([[c-=O,p-=k,0,0,j-b],[m-=O,g-=k,0,0,S-b],[0,0,c,p,M-x],[0,0,m,g,_-x]]);if(T){if(l.save(),l.beginPath(),function(){if(void 0===hc){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",lc(t,4,5,4,0),lc(t,4,5,0,5);var n=t.getImageData(0,0,3,3).data;hc=vc(n,0)||vc(n,4)||vc(n,8)}return hc}()||f===fc){l.moveTo(j,M);for(var A=b-j,E=x-M,C=0;C<4;C++)l.lineTo(j+v((C+1)*A/4),M+v(C*E/3)),3!=C&&l.lineTo(j+v((C+1)*A/4),M+v((C+1)*E/3));l.lineTo(S,_)}else l.moveTo(j,M),l.lineTo(b,x),l.lineTo(S,_);l.clip(),l.transform(T[0],T[2],T[1],T[3],b,x),l.translate(d[0]-O,d[3]-k),l.scale(r/i,-r/i),l.drawImage(y.canvas,0,0),l.restore()}})),c&&(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]-w[0])/o,s=-(r[0][1]-w[1])/o,a=(r[1][0]-w[0])/o,u=-(r[1][1]-w[1])/o,h=(r[2][0]-w[0])/o,c=-(r[2][1]-w[1])/o;l.beginPath(),l.moveTo(a,u),l.lineTo(e,s),l.lineTo(h,c),l.closePath(),l.stroke()})),l.restore()),l.canvas}var yc=[0,0,0],gc=function(){function t(t){var n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.fi=t.resolutions,ct(j(this.fi,(function(t,n){return n-t}),!0),17),!t.origins)for(var i=0,r=this.fi.length-1;i=this.minZoom;){if(n(a,2===this.ci?Eh(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.B},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.eo?this.eo:this.oo[t]},t.prototype.getResolution=function(t){return this.fi[t]},t.prototype.getResolutions=function(){return this.fi},t.prototype.getTileCoordChildTileRange=function(t,n,i){if(t[0]this.maxZoom||n0?r:Math.max(s/a[0],o/a[1]),h=e+1,c=new Array(h),f=0;f=0;o--)this.Io[o].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.Ao),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.Ao),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.drawElements=function(t,n){var i=this.getGL(),r=i.UNSIGNED_INT,e=n-t,o=4*t;i.drawElements(i.TRIANGLES,e,r,o)},n.prototype.finalizeDraw=function(t){for(var n=0;nthis.Do[0]||n>=this.Do[1])return Pf[0]=0,Pf[1]=0,Pf[2]=0,Pf[3]=0,Pf;this.readAll();var i=Math.floor(t)+(this.Do[1]-Math.floor(n)-1)*this.Do[0];return Pf[0]=this.Bo[4*i],Pf[1]=this.Bo[4*i+1],Pf[2]=this.Bo[4*i+2],Pf[3]=this.Bo[4*i+3],Pf},t.prototype.getTexture=function(){return this.Go},t.prototype.getFramebuffer=function(){return this.qo},t.prototype.Wo=function(){var t=this.Do,n=this.Fo.getGL();this.Go=this.Fo.createTexture(t,null,this.Go),n.bindFramebuffer(n.FRAMEBUFFER,this.qo),n.viewport(0,0,t[0],t[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.Go,0),this.Bo=new Uint8Array(t[0]*t[1]*4)},t}(),zf=1,If=2,Rf=4,Lf=8,Ff=16,Gf=31,qf={};function Df(t){if("number"==typeof t)return zf;if("boolean"==typeof t)return Lf;if("string"==typeof t)return To(t)?Rf|If:If;if(!Array.isArray(t))throw new Error("Unhandled value type: "+JSON.stringify(t));var n=t;if(n.every((function(t){return"number"==typeof t})))return 3===n.length||4===n.length?Rf|Ff:Ff;if("string"!=typeof n[0])throw new Error("Expected an expression operator but received: "+JSON.stringify(n));var i=qf[n[0]];if(void 0===i)throw new Error("Unrecognized expression operator: "+JSON.stringify(n));return i.getReturnType(n.slice(1))}function Bf(t){return Math.log2(t)%1==0}function Uf(t){var n=t.toString();return-1===n.indexOf(".")?n+".0":n}function Wf(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(Uf).join(", ")+")"}function Vf(t){var n=_o(t).slice();return n.length<4&&n.push(1),Wf(n.map((function(t,n){return n<3?t/255:t})))}function Jf(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function Xf(t,n){return Uf(Jf(t,n))}function Hf(t,n,i){if(Array.isArray(n)&&"string"==typeof n[0]){var r=qf[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: "+JSON.stringify(n));return r.toGlsl(t,n.slice(1),i)}var e=Df(n);if((e&zf)>0)return Uf(n);if((e&Lf)>0)return n.toString();if((e&If)>0&&(void 0===i||i==If))return Xf(t,n.toString());if((e&Rf)>0&&(void 0===i||i==Rf))return Vf(n);if((e&Ff)>0)return Wf(n);throw new Error("Unexpected expression "+n+" (expected type "+i+")")}function Yf(t){if(!(Df(t)&zf))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function Zf(t){for(var n=0;nn)throw new Error("At most "+n+" arguments were expected, got "+t.length+" instead")}function il(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function rl(t,n){if(!Bf(n))throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function el(t){return"u_var_"+t}function ol(t){return{getReturnType:function(t){return Lf},toGlsl:function(n,i){Qf(i,2);for(var r=Gf,e=0;e"]={getReturnType:function(t){return Lf},toGlsl:function(t,n){return Qf(n,2),Zf(n),"("+Hf(t,n[0])+" > "+Hf(t,n[1])+")"}},qf[">="]={getReturnType:function(t){return Lf},toGlsl:function(t,n){return Qf(n,2),Zf(n),"("+Hf(t,n[0])+" >= "+Hf(t,n[1])+")"}},qf["<"]={getReturnType:function(t){return Lf},toGlsl:function(t,n){return Qf(n,2),Zf(n),"("+Hf(t,n[0])+" < "+Hf(t,n[1])+")"}},qf["<="]={getReturnType:function(t){return Lf},toGlsl:function(t,n){return Qf(n,2),Zf(n),"("+Hf(t,n[0])+" <= "+Hf(t,n[1])+")"}},qf["=="]=ol("=="),qf["!="]=ol("!="),qf["!"]={getReturnType:function(t){return Lf},toGlsl:function(t,n){return Qf(n,1),Kf(n[0]),"(!"+Hf(t,n[0])+")"}},qf.all=sl("&&"),qf.any=sl("||"),qf.between={getReturnType:function(t){return Lf},toGlsl:function(t,n){Qf(n,3),Zf(n);var i=Hf(t,n[1]),r=Hf(t,n[2]),e=Hf(t,n[0]);return"("+e+" >= "+i+" && "+e+" <= "+r+")"}},qf.array={getReturnType:function(t){return Ff},toGlsl:function(t,n){tl(n,2),nl(n,4),Zf(n);var i=n.map((function(n){return Hf(t,n,zf)}));return"vec"+n.length+"("+i.join(", ")+")"}},qf.color={getReturnType:function(t){return Rf},toGlsl:function(t,n){tl(n,3),nl(n,4),Zf(n);var i=n;3===n.length&&i.push(1);var r=n.map((function(n,i){return Hf(t,n,zf)+(i<3?" / 255.0":"")}));return"vec"+n.length+"("+r.join(", ")+")"}},qf.interpolate={getReturnType:function(t){for(var n=Rf|zf,i=3;i=1;u-=2){a="("+o+" == "+Hf(t,n[u])+" ? "+Hf(t,n[u+1],e)+" : "+(a||s)+")"}return a}},qf.case={getReturnType:function(t){for(var n=Gf,i=1;i=0;o-=2){a="("+Hf(t,n[o])+" ? "+Hf(t,n[o+1],e)+" : "+(a||s)+")"}return a}};var al=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"+this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+i.map((function(t){return"attribute "+t+";"})).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")+"\nvoid main(void) {\n mat4 offsetMatrix = "+n+";\n vec2 halfSize = "+this.sizeExpression+" * 0.5;\n vec2 offset = "+this.offsetExpression+";\n float angle = "+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 = "+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"+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"+this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")+"\nvoid main(void) {\n if ("+this.discardExpression+") { discard; }\n gl_FragColor = "+this.colorExpression+";\n gl_FragColor.rgb *= gl_FragColor.a;\n"+n+"\n}"},t}();function ul(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:{}},h=Hf(u,i,Ff|zf),c=Hf(u,o,Ff),f=Hf(u,e,Ff),l=Hf(u,a,zf),v={inFragmentShader:!0,variables:u.variables,attributes:[],stringLiteralsMap:u.stringLiteralsMap},d=Hf(v,r,Rf),p=Hf(v,s,zf),m="1.0",y="vec2("+Hf(v,i,Ff|zf)+").x";switch(n.symbolType){case"square":case"image":break;case"circle":m="(1.0-smoothstep(1.-4./"+y+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var g="(v_quadCoord*2.-1.)",w="(atan("+g+".x,"+g+".y))";m="(1.0-smoothstep(.5-3./"+y+",.5,cos(floor(.5+"+w+"/2.094395102)*2.094395102-"+w+")*length("+g+")))";break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var b=(new al).setSizeExpression("vec2("+h+")").setRotationExpression(l).setSymbolOffsetExpression(c).setTextureCoordinateExpression(f).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4("+d+".rgb, "+d+".a * "+p+" * "+m+")");if(t.filter){var x=Hf(v,t.filter,Lf);b.setFragmentDiscardExpression("!"+x)}var j={};if(v.variables.forEach((function(n){var i=el(n);b.addUniform("float "+i),j[i]=function(){if(!t.variables||void 0===t.variables[n])throw new Error("The following variable is missing from the style: "+n);var i=t.variables[n];return"string"==typeof i&&(i=Jf(u,i)),void 0!==i?i:-9999999}})),"image"===n.symbolType&&n.src){var M=new Image;M.src=n.src,b.addUniform("sampler2D u_texture").setColorExpression(b.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),j.u_texture=M}return v.attributes.forEach((function(t){-1===u.attributes.indexOf(t)&&u.attributes.push(t),b.addVarying("v_"+t,"float","a_"+t)})),u.attributes.forEach((function(t){b.addAttribute("float a_"+t)})),{builder:b,attributes:u.attributes.map((function(t){return{name:t,callback:function(n,i){var r=i[t];return"string"==typeof r&&(r=Jf(u,r)),void 0!==r?r:-9999999}}})),uniforms:j}}var hl=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)}}(),cl=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.Vo=n.matrixIds,i}return hl(n,t),n.prototype.getMatrixId=function(t){return this.Vo[t]},n.prototype.getMatrixIds=function(){return this.Vo},n}(gc),fl=cl;function ll(t,n,i){var r=[],e=[],o=[],s=[],a=[],u=void 0!==i?i:[],h=Zi(t.SupportedCRS),c=h.getMetersPerUnit(),f="ne"==h.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)||w(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/c,h=n.TileWidth,l=n.TileHeight;f?o.push([n.TopLeftCorner[1],n.TopLeftCorner[0]]):o.push(n.TopLeftCorner),r.push(i),s.push(h==l?h:[h,l]),a.push([n.MatrixWidth,n.MatrixHeight])}})),new cl({extent:n,origins:o,resolutions:r,matrixIds:e,tileSizes:s,sizes:a})}var vl=function(){function n(t){this.Jo=t.opacity,this.Xo=t.rotateWithView,this.br=t.rotation,this.Ho=t.scale,this.Yo=Da(t.scale),this.Zo=t.displacement}return n.prototype.clone=function(){var t=this.getScale();return new n({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},n.prototype.getOpacity=function(){return this.Jo},n.prototype.getRotateWithView=function(){return this.Xo},n.prototype.getRotation=function(){return this.br},n.prototype.getScale=function(){return this.Ho},n.prototype.getScaleArray=function(){return this.Yo},n.prototype.getDisplacement=function(){return this.Zo},n.prototype.getAnchor=function(){return t()},n.prototype.getImage=function(n){return t()},n.prototype.getHitDetectionImage=function(){return t()},n.prototype.getPixelRatio=function(t){return 1},n.prototype.getImageState=function(){return t()},n.prototype.getImageSize=function(){return t()},n.prototype.getOrigin=function(){return t()},n.prototype.getSize=function(){return t()},n.prototype.setOpacity=function(t){this.Jo=t},n.prototype.setRotateWithView=function(t){this.Xo=t},n.prototype.setRotation=function(t){this.br=t},n.prototype.setScale=function(t){this.Ho=t,this.Yo=Da(t)},n.prototype.listenImageChange=function(n){t()},n.prototype.load=function(){t()},n.prototype.unlistenImageChange=function(n){t()},n}(),dl=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)}}(),pl=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).At=void 0,i.$o=null,i.Ko=void 0!==n.fill?n.fill:null,i.eo=[0,0],i.Gt=n.points,i.Qo=void 0!==n.radius?n.radius:n.radius1,i.ts=n.radius2,i.qt=void 0!==n.angle?n.angle:0,i.ns=void 0!==n.stroke?n.stroke:null,i.ee=null,i.Do=null,i.rs=null,i.render(),i}return dl(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(){return this.ee},n.prototype.getAngle=function(){return this.qt},n.prototype.getFill=function(){return this.Ko},n.prototype.getHitDetectionImage=function(){return this.$o||this.es(this.rs),this.$o},n.prototype.getImage=function(t){var n=this.At[t];if(!n){var i=this.rs,r=ho(i.size*t,i.size*t);this.os(i,r,t),n=r.canvas,this.At[t]=n}return n},n.prototype.getPixelRatio=function(t){return t},n.prototype.getImageSize=function(){return this.Do},n.prototype.getImageState=function(){return We},n.prototype.getOrigin=function(){return this.eo},n.prototype.getPoints=function(){return this.Gt},n.prototype.getRadius=function(){return this.Qo},n.prototype.getRadius2=function(){return this.ts},n.prototype.getSize=function(){return this.Do},n.prototype.getStroke=function(){return this.ns},n.prototype.listenImageChange=function(t){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t){},n.prototype.ss=function(t,n,i){if(0===n||this.Gt===1/0||"bevel"!==t&&"miter"!==t)return n;var r=this.Qo,e=void 0===this.ts?r:this.ts;if(r0,6);var l=void 0!==r.src?Be:We;return i.cs=void 0!==r.color?_o(r.color):null,i.Ms=Tl(h,f,c,i.zt,l,i.cs),i.Ss=void 0!==r.offset?r.offset:[0,0],i._s=void 0!==r.offsetOrigin?r.offsetOrigin:Ml,i.eo=null,i.Do=void 0!==r.size?r.size:null,i}return El(n,t),n.prototype.clone=function(){var t=this.getScale();return new n({anchor:this.ee.slice(),anchorOrigin:this.ws,anchorXUnits:this.bs,anchorYUnits:this.xs,crossOrigin:this.zt,color:this.cs&&this.cs.slice?this.cs.slice():this.cs||void 0,src:this.getSrc(),offset:this.Ss.slice(),offsetOrigin:this._s,size:null!==this.Do?this.Do.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},n.prototype.getAnchor=function(){if(this.gs)return this.gs;var t=this.ee,n=this.getSize();if(this.bs==wl||this.xs==wl){if(!n)return null;t=this.ee.slice(),this.bs==wl&&(t[0]*=n[0]),this.xs==wl&&(t[1]*=n[1])}if(this.ws!=Ml){if(!n)return null;t===this.ee&&(t=this.ee.slice()),this.ws!=Sl&&this.ws!=jl||(t[0]=-t[0]+n[0]),this.ws!=xl&&this.ws!=jl||(t[1]=-t[1]+n[1])}var i=this.getDisplacement();return t[0]-=i[0],t[1]+=i[1],this.gs=t,this.gs},n.prototype.setAnchor=function(t){this.ee=t,this.gs=null},n.prototype.getColor=function(){return this.cs},n.prototype.getImage=function(t){return this.Ms.getImage(t)},n.prototype.getPixelRatio=function(t){return this.Ms.getPixelRatio(t)},n.prototype.getImageSize=function(){return this.Ms.getSize()},n.prototype.getImageState=function(){return this.Ms.getImageState()},n.prototype.getHitDetectionImage=function(){return this.Ms.getHitDetectionImage()},n.prototype.getOrigin=function(){if(this.eo)return this.eo;var t=this.Ss;if(this._s!=Ml){var n=this.getSize(),i=this.Ms.getSize();if(!n||!i)return null;t=t.slice(),this._s!=Sl&&this._s!=jl||(t[0]=i[0]-n[0]-t[0]),this._s!=xl&&this._s!=jl||(t[1]=i[1]-n[1]-t[1])}return this.eo=t,this.eo},n.prototype.getSrc=function(){return this.Ms.getSrc()},n.prototype.getSize=function(){return this.Do?this.Do:this.Ms.getSize()},n.prototype.listenImageChange=function(t){this.Ms.addEventListener(N,t)},n.prototype.load=function(){this.Ms.load()},n.prototype.unlistenImageChange=function(t){this.Ms.removeEventListener(N,t)},n}(vl),Pl=function(){function t(t){var n=t||{};this.cs=void 0!==n.color?n.color:null,this.Os=n.lineCap,this.ks=void 0!==n.lineDash?n.lineDash:null,this.Ts=n.lineDashOffset,this.As=n.lineJoin,this.Es=n.miterLimit,this.Cs=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.cs},t.prototype.getLineCap=function(){return this.Os},t.prototype.getLineDash=function(){return this.ks},t.prototype.getLineDashOffset=function(){return this.Ts},t.prototype.getLineJoin=function(){return this.As},t.prototype.getMiterLimit=function(){return this.Es},t.prototype.getWidth=function(){return this.Cs},t.prototype.setColor=function(t){this.cs=t},t.prototype.setLineCap=function(t){this.Os=t},t.prototype.setLineDash=function(t){this.ks=t},t.prototype.setLineDashOffset=function(t){this.Ts=t},t.prototype.setLineJoin=function(t){this.As=t},t.prototype.setMiterLimit=function(t){this.Es=t},t.prototype.setWidth=function(t){this.Cs=t},t}(),Nl=function(){function t(t){var n=t||{};this.zr=null,this.Ps=Fl,void 0!==n.geometry&&this.setGeometry(n.geometry),this.Ko=void 0!==n.fill?n.fill:null,this.jt=void 0!==n.image?n.image:null,this.Zt=void 0!==n.renderer?n.renderer:null,this.ns=void 0!==n.stroke?n.stroke:null,this.Ge=void 0!==n.text?n.text:null,this.Ns=n.zIndex}return t.prototype.clone=function(){var n=this.getGeometry();return n&&"object"==typeof 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.Zt},t.prototype.setRenderer=function(t){this.Zt=t},t.prototype.getGeometry=function(){return this.zr},t.prototype.getGeometryFunction=function(){return this.Ps},t.prototype.getFill=function(){return this.Ko},t.prototype.setFill=function(t){this.Ko=t},t.prototype.getImage=function(){return this.jt},t.prototype.setImage=function(t){this.jt=t},t.prototype.getStroke=function(){return this.ns},t.prototype.setStroke=function(t){this.ns=t},t.prototype.getText=function(){return this.Ge},t.prototype.setText=function(t){this.Ge=t},t.prototype.getZIndex=function(){return this.Ns},t.prototype.setGeometry=function(t){"function"==typeof t?this.Ps=t:"string"==typeof t?this.Ps=function(n){return n.get(t)}:t?void 0!==t&&(this.Ps=function(){return t}):this.Ps=Fl,this.zr=t},t.prototype.setZIndex=function(t){this.Ns=t},t}();function zl(t){var n;if("function"==typeof t)n=t;else{var i;if(Array.isArray(t))i=t;else ct("function"==typeof t.getZIndex,41),i=[t];n=function(){return i}}return n}var Il=null;function Rl(t,n){if(!Il){var i=new gl({color:"rgba(255,255,255,0.4)"}),r=new Pl({color:"#3399CC",width:1.25});Il=[new Nl({image:new yl({fill:i,stroke:r,radius:5}),fill:i,stroke:r})]}return Il}function Ll(){var t={},n=[255,255,255,1],i=[0,153,255,1];return t[gt.POLYGON]=[new Nl({fill:new gl({color:[255,255,255,.5]})})],t[gt.MULTI_POLYGON]=t[gt.POLYGON],t[gt.LINE_STRING]=[new Nl({stroke:new Pl({color:n,width:5})}),new Nl({stroke:new Pl({color:i,width:3})})],t[gt.MULTI_LINE_STRING]=t[gt.LINE_STRING],t[gt.CIRCLE]=t[gt.POLYGON].concat(t[gt.LINE_STRING]),t[gt.POINT]=[new Nl({image:new yl({radius:6,fill:new gl({color:i}),stroke:new Pl({color:n,width:1.5})}),zIndex:1/0})],t[gt.MULTI_POINT]=t[gt.POINT],t[gt.GEOMETRY_COLLECTION]=t[gt.POLYGON].concat(t[gt.LINE_STRING],t[gt.POINT]),t}function Fl(t){return t.getGeometry()}var Gl=Nl,ql="point",Dl="line",Bl=function(){function t(t){var n=t||{};this.zs=n.font,this.br=n.rotation,this.Xo=n.rotateWithView,this.Ho=n.scale,this.Yo=Da(void 0!==n.scale?n.scale:1),this.Ge=n.text,this.Is=n.textAlign,this.Rs=n.textBaseline,this.Ko=void 0!==n.fill?n.fill:new gl({color:"#333"}),this.Ls=void 0!==n.maxAngle?n.maxAngle:Math.PI/4,this.Fs=void 0!==n.placement?n.placement:ql,this.Gs=!!n.overflow,this.ns=void 0!==n.stroke?n.stroke:null,this.qs=void 0!==n.offsetX?n.offsetX:0,this.Ds=void 0!==n.offsetY?n.offsetY:0,this.Bs=n.backgroundFill?n.backgroundFill:null,this.Us=n.backgroundStroke?n.backgroundStroke:null,this.li=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()})},t.prototype.getOverflow=function(){return this.Gs},t.prototype.getFont=function(){return this.zs},t.prototype.getMaxAngle=function(){return this.Ls},t.prototype.getPlacement=function(){return this.Fs},t.prototype.getOffsetX=function(){return this.qs},t.prototype.getOffsetY=function(){return this.Ds},t.prototype.getFill=function(){return this.Ko},t.prototype.getRotateWithView=function(){return this.Xo},t.prototype.getRotation=function(){return this.br},t.prototype.getScale=function(){return this.Ho},t.prototype.getScaleArray=function(){return this.Yo},t.prototype.getStroke=function(){return this.ns},t.prototype.getText=function(){return this.Ge},t.prototype.getTextAlign=function(){return this.Is},t.prototype.getTextBaseline=function(){return this.Rs},t.prototype.getBackgroundFill=function(){return this.Bs},t.prototype.getBackgroundStroke=function(){return this.Us},t.prototype.getPadding=function(){return this.li},t.prototype.setOverflow=function(t){this.Gs=t},t.prototype.setFont=function(t){this.zs=t},t.prototype.setMaxAngle=function(t){this.Ls=t},t.prototype.setOffsetX=function(t){this.qs=t},t.prototype.setOffsetY=function(t){this.Ds=t},t.prototype.setPlacement=function(t){this.Fs=t},t.prototype.setRotateWithView=function(t){this.Xo=t},t.prototype.setFill=function(t){this.Ko=t},t.prototype.setRotation=function(t){this.br=t},t.prototype.setScale=function(t){this.Ho=t,this.Yo=Da(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.ns=t},t.prototype.setText=function(t){this.Ge=t},t.prototype.setTextAlign=function(t){this.Is=t},t.prototype.setTextBaseline=function(t){this.Rs=t},t.prototype.setBackgroundFill=function(t){this.Bs=t},t.prototype.setBackgroundStroke=function(t){this.Us=t},t.prototype.setPadding=function(t){this.li=t},t}(),Ul=function(){function t(t){this.Ws,this.Vs,this.Js,this.Xs=void 0===t||t,this.Hs=0}return t.prototype.insertItem=function(t){var n={prev:void 0,next:void 0,data:t},i=this.Js;if(i){var r=i.next;n.prev=i,n.next=r,i.next=n,r&&(r.prev=n),i===this.Vs&&(this.Vs=n)}else this.Ws=n,this.Vs=n,this.Xs&&(n.next=n,n.prev=n);this.Js=n,this.Hs++},t.prototype.removeItem=function(){var t=this.Js;if(t){var n=t.next,i=t.prev;n&&(n.prev=i),i&&(i.next=n),this.Js=n||i,this.Ws===this.Vs?(this.Js=void 0,this.Ws=void 0,this.Vs=void 0):this.Ws===t?this.Ws=this.Js:this.Vs===t&&(this.Vs=i?this.Js.prev:this.Js),this.Hs--}},t.prototype.firstItem=function(){if(this.Js=this.Ws,this.Js)return this.Js.data},t.prototype.lastItem=function(){if(this.Js=this.Vs,this.Js)return this.Js.data},t.prototype.nextItem=function(){if(this.Js&&this.Js.next)return this.Js=this.Js.next,this.Js.data},t.prototype.getNextItem=function(){if(this.Js&&this.Js.next)return this.Js.next.data},t.prototype.prevItem=function(){if(this.Js&&this.Js.prev)return this.Js=this.Js.prev,this.Js.data},t.prototype.getPrevItem=function(){if(this.Js&&this.Js.prev)return this.Js.prev.data},t.prototype.getCurrItem=function(){if(this.Js)return this.Js.data},t.prototype.setFirstItem=function(){this.Xs&&this.Js&&(this.Ws=this.Js,this.Vs=this.Js.prev)},t.prototype.concat=function(t){if(t.Js){if(this.Js){var n=this.Js.next;this.Js.next=t.Ws,t.Ws.prev=this.Js,n.prev=t.Vs,t.Vs.next=n,this.Hs+=t.Hs}else this.Js=t.Js,this.Ws=t.Ws,this.Vs=t.Vs,this.Hs=t.Hs;t.Js=void 0,t.Ws=void 0,t.Vs=void 0,t.Hs=0}},t.prototype.getLength=function(){return this.Hs},t}(),Wl=i(582),Vl=function(){function t(t){this.Ys=new Wl(t),this.Zs={}}return t.prototype.insert=function(t,n){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:n};this.Ys.insert(i),this.Zs[e(n)]=i},t.prototype.load=function(t,n){for(var i=new Array(n.length),r=0,o=n.length;rthis.sa/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]-y>this.sa/2&&(n[0][0]-=this.sa),n[1][0]-y>this.sa/2&&(n[1][0]-=this.sa),n[2][0]-y>this.sa/2&&(n[2][0]-=this.sa);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.5&&c<1,v=!1;if(u>0){if(this.Qs.isGlobal()&&this.aa)v=Rn(en([t,n,i,r]))/this.aa>.25||v;!l&&this.Ks.isGlobal()&&c&&(v=c>.25||v)}if(!(!v&&this.na&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||Ln(h,this.na)){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],m=this.ta(p),y=void 0;if(l)y=(Qn(e[0],f)+Qn(s[0],f))/2-Qn(m[0],f);else y=(e[0]+s[0])/2-m[0];var g=(e[1]+s[1])/2-m[1];v=y*y+g*g>this.ia}if(v){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var w=[(n[0]+i[0])/2,(n[1]+i[1])/2],b=this.ta(w),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],j=this.ta(x);this.ua(t,n,w,x,e,o,b,j,u-1),this.ua(x,w,i,r,j,b,s,a,u-1)}else{var M=[(t[0]+n[0])/2,(t[1]+n[1])/2],S=this.ta(M),_=[(i[0]+r[0])/2,(i[1]+r[1])/2],O=this.ta(_);this.ua(t,M,_,r,e,S,O,a,u-1),this.ua(M,n,i,_,S,o,s,O,u-1)}return}}if(l){if(!this.oa)return;this.ea=!0}0==(11&d)&&this.ha(t,i,r,e,s,a),0==(14&d)&&this.ha(t,i,n,e,s,o),d&&(0==(13&d)&&this.ha(n,r,t,o,a,e),0==(7&d)&&this.ha(n,r,i,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.ra.forEach((function(n,i,r){var e=n.source;bn(t,e[0]),bn(t,e[1]),bn(t,e[2])})),t},t.prototype.getTriangles=function(){return this.ra},t}(),Hl=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)}}(),Yl=function(t){function n(n,i,r,e,o,s,a,u,h,c,f,l){var v=t.call(this,o,Ke)||this;v.ca=void 0!==f&&f,v.fa=l,v.bt=a,v.la=u,v.At=null,v.va=i,v.da=e,v.pa=s||o,v.ma=[],v.ya=null,v.ga=0;var d=e.getTileCoordExtent(v.pa),p=v.da.getExtent(),m=v.va.getExtent(),y=p?Nn(d,p):d;if(0===On(y))return v.state=io,v;var g=n.getExtent();g&&(m=m?Nn(m,g):g);var w=e.getResolution(v.pa[0]),b=pc(n,r,y,w);if(!isFinite(b)||b<=0)return v.state=io,v;var x=void 0!==c?c:.5;if(v.wa=new Xl(n,r,y,m,b*x,w),0===v.wa.getTriangles().length)return v.state=io,v;v.ga=i.getZForResolution(b);var j=v.wa.calculateSourceExtent();if(m&&(n.canWrapX()?(j[1]=Vn(j[1],m[1],m[3]),j[3]=Vn(j[3],m[1],m[3])):j=Nn(j,m)),On(j)){for(var M=i.getTileRangeForExtentAndZ(j,v.ga),S=M.minX;S<=M.maxX;S++)for(var _=M.minY;_<=M.maxY;_++){var O=h(v.ga,S,_,a);O&&v.ma.push(O)}0===v.ma.length&&(v.state=io)}else v.state=io;return v}return Hl(n,t),n.prototype.getImage=function(){return this.At},n.prototype.ba=function(){var t=[];if(this.ma.forEach(function(n,i,r){n&&n.getState()==to&&t.push({extent:this.va.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.ma.length=0,0===t.length)this.state=no;else{var n=this.pa[0],i=this.da.getTileSize(n),r="number"==typeof i?i:i[0],e="number"==typeof i?i:i[1],o=this.da.getResolution(n),s=this.va.getResolution(this.ga),a=this.da.getTileCoordExtent(this.pa);this.At=mc(r,e,this.bt,s,this.va.getExtent(),o,a,this.wa,t,this.la,this.ca,this.fa),this.state=to}this.changed()},n.prototype.load=function(){if(this.state==Ke){this.state=Qe,this.changed();var t=0;this.ya=[],this.ma.forEach(function(n,i,r){var e=n.getState();if(e==Ke||e==Qe){t++;var o=H(n,N,(function(i){var r=n.getState();r!=to&&r!=no&&r!=io||(Z(o),0===--t&&(this.xa(),this.ba()))}),this);this.ya.push(o)}}.bind(this)),0===t?setTimeout(this.ba.bind(this),0):this.ma.forEach((function(t,n,i){t.getState()==Ke&&t.load()}))}},n.prototype.xa=function(){this.ya.forEach(Z),this.ya=null},n}(uo),Zl="tileloadstart",$l="tileloadend",Kl="tileloaderror",Ql=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 tv(t){return t?Array.isArray(t)?function(n){return t}:"function"==typeof t?t:function(n){return[t]}:null}var nv=function(n){function i(t){var i=n.call(this)||this;return i.projection=Zi(t.projection),i.ja=tv(t.attributions),i.Ma=void 0===t.attributionsCollapsible||t.attributionsCollapsible,i.loading=!1,i.Jt=void 0!==t.state?t.state:$o,i.Sa=void 0!==t.wrapX&&t.wrapX,i}return Ql(i,n),i.prototype.getAttributions=function(){return this.ja},i.prototype.getAttributionsCollapsible=function(){return this.Ma},i.prototype.getProjection=function(){return this.projection},i.prototype.getResolutions=function(){return t()},i.prototype.getState=function(){return this.Jt},i.prototype.getWrapX=function(){return this.Sa},i.prototype.getContextOptions=function(){},i.prototype.refresh=function(){this.changed()},i.prototype.setAttributions=function(t){this.ja=tv(t),this.changed()},i.prototype.setState=function(t){this.Jt=t,this.changed()},i}(rt),iv=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)}}(),rv=function(n){function i(t){var i=n.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX})||this;i.on,i.once,i.un,i._a=void 0!==t.opaque&&t.opaque,i.Oa=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,i.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;var r=t.tileGrid;return r&&Da(r.getTileSize(r.getMinZoom()),[256,256]),i.tileCache=new Th(t.cacheSize||0),i.tmpSize=[0,0],i.pe=t.key||"",i.tileOptions={transition:t.transition},i.zDirection=t.zDirection?t.zDirection:0,i}return iv(i,n),i.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},i.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);i&&i.expireCache(n)},i.prototype.forEachLoadedTile=function(t,n,i,r){var e=this.getTileCacheForProjection(t);if(!e)return!1;for(var o,s,a,u=!0,h=i.minX;h<=i.maxX;++h)for(var c=i.minY;c<=i.maxY;++c)s=xh(n,h,c),a=!1,e.containsKey(s)&&(a=(o=e.get(s)).getState()===to)&&(a=!1!==r(o)),a||(u=!1);return u},i.prototype.getGutterForProjection=function(t){return 0},i.prototype.getKey=function(){return this.pe},i.prototype.setKey=function(t){this.pe!==t&&(this.pe=t,this.changed())},i.prototype.getOpaque=function(t){return this._a},i.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},i.prototype.getTile=function(n,i,r,e,o){return t()},i.prototype.getTileGrid=function(){return this.tileGrid},i.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:wc(t)},i.prototype.getTileCacheForProjection=function(t){return ct(rr(this.getProjection(),t),68),this.tileCache},i.prototype.getTilePixelRatio=function(t){return this.Oa},i.prototype.getTilePixelSize=function(t,n,i){var r=this.getTileGridForProjection(i),e=this.getTilePixelRatio(n),o=Da(r.getTileSize(t),this.tmpSize);return 1==e?o:qa(o,e,this.tmpSize)},i.prototype.getTileCoordForTileUrlFunction=function(t,n){var i=void 0!==n?n:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=bc(r,t,i)),Oh(t,r)?t:null},i.prototype.clear=function(){this.tileCache.clear()},i.prototype.refresh=function(){this.clear(),n.prototype.refresh.call(this)},i.prototype.updateCacheSize=function(t,n){var i=this.getTileCacheForProjection(n);t>i.highWaterMark&&(i.highWaterMark=t)},i.prototype.useTile=function(t,n,i,r){},i}(nv),ev=function(t){function n(n,i){var r=t.call(this,n)||this;return r.tile=i,r}return iv(n,t),n}(c),ov=rv,sv=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)}}(),av=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,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return r.ka=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.Ta={},r}return sv(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=e(i),o=i.getState();o==Qe?(this.Ta[r]=!0,n=Zl):r in this.Ta&&(delete this.Ta[r],n=o==no?Kl:o==to?$l:void 0),null!=n&&this.dispatchEvent(new ev(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=Ec(t);this.urls=n,this.setUrls(n)},n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.ka?this.setTileUrlFunction(kc(t,this.tileGrid),n):this.setKey(n)},n.prototype.tileUrlFunction=function(t,n,i){},n.prototype.useTile=function(t,n,i){var r=xh(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ov),uv=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 hv(t,n){t.getImage().src=n}var cv=function(t){function n(n){var 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:hv,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX,transition:n.transition,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return i.crossOrigin=void 0!==n.crossOrigin?n.crossOrigin:null,i.tileClass=void 0!==n.tileClass?n.tileClass:go,i.tileCacheForProjection={},i.tileGridForProjection={},i.Aa=n.reprojectionErrorThreshold,i.fa=!1===n.imageSmoothing?fc:void 0,i.Ea=!1,i}return uv(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.getContextOptions=function(){return this.fa},n.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!rr(this.getProjection(),t)?0:this.getGutter()},n.prototype.getGutter=function(){return 0},n.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.fa?"\n"+JSON.stringify(this.fa):"")},n.prototype.getOpaque=function(n){return!(this.getProjection()&&n&&!rr(this.getProjection(),n))&&t.prototype.getOpaque.call(this,n)},n.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(!this.tileGrid||n&&!rr(n,t)){var i=e(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=wc(t)),this.tileGridForProjection[i]}return this.tileGrid},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||rr(n,t))return this.tileCache;var i=e(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Th(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},n.prototype.Ca=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,h=new this.tileClass(s,void 0!==u?Ke:io,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(N,this.handleTileChange.bind(this)),h},n.prototype.getTile=function(t,n,i,r,e){var o=this.getProjection();if(o&&e&&!rr(o,e)){var s=this.getTileCacheForProjection(e),a=[t,n,i],u=void 0,h=jh(a);s.containsKey(h)&&(u=s.get(h));var c=this.getKey();if(u&&u.key==c)return u;var f=this.getTileGridForProjection(o),l=this.getTileGridForProjection(e),v=this.getTileCoordForTileUrlFunction(a,e),d=new Yl(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.Aa,this.Ea,this.fa);return d.key=c,u?(d.interimTile=u,d.refreshInterimChain(),s.replace(h,d)):s.set(h,d),d}return this.getTileInternal(t,n,i,r,o||e)},n.prototype.getTileInternal=function(t,n,i,r,e){var o=null,s=xh(t,n,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var u=o;o=this.Ca(t,n,i,r,e,a),u.getState()==Ke?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.Ca(t,n,i,r,e,a),this.tileCache.set(s,o);return o},n.prototype.setRenderReprojectionEdges=function(t){if(this.Ea!=t){for(var n in this.Ea=t,this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},n.prototype.setTileGridForProjection=function(t,n){var i=Zi(t);if(i){var r=e(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=n)}},n}(av),fv=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 lv(t){var n,i,r=t[0],e=new Array(r),o=1<>=1;return e.join("")}var vv=function(t){function n(n){var i=this,r=void 0!==n.hidpi&&n.hidpi;return(i=t.call(this,{cacheSize:n.cacheSize,crossOrigin:"anonymous",imageSmoothing:n.imageSmoothing,opaque:!0,projection:Zi("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:Zo,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).Pa=r,i.Na=void 0!==n.culture?n.culture:"en-us",i.za=void 0!==n.maxZoom?n.maxZoom:-1,i.Ia=n.key,i.Ra=n.imagerySet,Jh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+i.Ra+"?uriScheme=https&include=ImageryProviders&key="+i.Ia+"&c="+i.Na,i.handleImageryMetadataResponse.bind(i),void 0,"jsonp"),i}return fv(n,t),n.prototype.getApiKey=function(){return this.Ia},n.prototype.getImagerySet=function(){return this.Ra},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.za?n.zoomMax:this.za,r=_c(this.getProjection()),e=this.Pa?2:1,o=n.imageWidth==n.imageHeight?n.imageWidth/e:[n.imageWidth/e,n.imageHeight/e],s=jc({extent:r,minZoom:n.zoomMin,maxZoom:i,tileSize:o});this.tileGrid=s;var a=this.Na,u=this.Pa;if(this.tileUrlFunction=Tc(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){bh(t[0],t[1],t[2],i);var o=r;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",lv(i))}}}))),n.imageryProviders){var h=er(Zi("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=u.zoomMin&&s<=u.zoomMax){var c=u.bbox;if(Ln(Bn([c[1],c[0],c[3],c[2]],h),t.extent)){r=!0;break}}}r&&i.push(n.attribution)})),i.push('Terms of Use'),i}.bind(this))}this.setState($o)}else this.setState(Ko)},n}(cv),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)}}(),pv=function(t){function n(n){var i=n||{},r=void 0!==i.projection?i.projection:"EPSG:3857",e=void 0!==i.tileGrid?i.tileGrid:jc({extent:_c(r),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,imageSmoothing:i.imageSmoothing,opaque:i.opaque,projection:r,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:e,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 dv(n,t),n}(cv),mv=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)}}(),yv=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.La=n.account,i.Fa=n.map||"",i.Ga=n.config||{},i.qa={},i.Da(),i}return mv(n,t),n.prototype.getConfig=function(){return this.Ga},n.prototype.updateConfig=function(t){k(this.Ga,t),this.Da()},n.prototype.setConfig=function(t){this.Ga=t||{},this.Da()},n.prototype.Da=function(){var t=JSON.stringify(this.Ga);if(this.qa[t])this.Ba(this.qa[t]);else{var n="https://"+this.La+".carto.com/api/v1/map";this.Fa&&(n+="/named/"+this.Fa);var i=new XMLHttpRequest;i.addEventListener("load",this.Ua.bind(this,t)),i.addEventListener("error",this.Wa.bind(this)),i.open("POST",n),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.Ga))}},n.prototype.Ua=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(Ko)}this.Ba(r),this.qa[t]=r,this.setState($o)}else this.setState(Ko)},n.prototype.Wa=function(t){this.setState(Ko)},n.prototype.Ba=function(t){var n="https://"+t.cdn_url.https+"/"+this.La+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(n)},n}(pv),gv="addfeature",wv="changefeature",bv="clear",xv="removefeature",jv="featuresloadstart",Mv="featuresloadend",Sv="featuresloaderror",_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,i,r){var e=t.call(this,n)||this;return e.feature=i,e.features=r,e}return _v(n,t),n}(c),kv=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{attributions:r.attributions,projection:void 0,state:$o,wrapX:void 0===r.wrapX||r.wrapX})||this).on,i.once,i.un,i.Tt=_,i.ge=r.format,i.Va=void 0===r.overlaps||r.overlaps,i.be=r.url,void 0!==r.loader?i.Tt=r.loader:void 0!==i.be&&(ct(i.ge,7),i.Tt=Wh(i.be,i.ge)),i.Ja=void 0!==r.strategy?r.strategy:Vh;var e,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return i.Xa=s?new Vl:null,i.Ha=new Vl,i.Ya=0,i.Za={},i.$a={},i.Ka={},i.Qa={},i.tu=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(e=r.features).getArray()),s||void 0!==e||(e=new ht(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==e&&i.nu(e),i}return _v(n,t),n.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},n.prototype.addFeatureInternal=function(t){var n=e(t);if(this.iu(n,t)){this.ru(n,t);var i=t.getGeometry();if(i){var r=i.getExtent();this.Xa&&this.Xa.insert(r,t)}else this.Za[n]=t;this.dispatchEvent(new Ov(gv,t))}else this.tu&&this.tu.remove(t)},n.prototype.ru=function(t,n){this.Qa[t]=[H(n,N,this.eu,this),H(n,f,this.eu,this)]},n.prototype.iu=function(t,n){var i=!0,r=n.getId();return void 0!==r&&(r.toString()in this.$a?i=!1:this.$a[r.toString()]=n),i&&(ct(!(t in this.Ka),30),this.Ka[t]=n),i},n.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},n.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],r=[],o=0,s=t.length;o0},n.prototype.refresh=function(){this.clear(!0),this.Ha.clear(),t.prototype.refresh.call(this)},n.prototype.removeLoadedExtent=function(t){var n,i=this.Ha;i.forEachInExtent(t,(function(i){if(yn(i.extent,t))return n=i,!0})),n&&i.remove(n)},n.prototype.removeFeature=function(t){var n=e(t);n in this.Za?delete this.Za[n]:this.Xa&&this.Xa.remove(t),this.removeFeatureInternal(t),this.changed()},n.prototype.removeFeatureInternal=function(t){var n=e(t);this.Qa[n].forEach(Z),delete this.Qa[n];var i=t.getId();void 0!==i&&delete this.$a[i.toString()],delete this.Ka[n],this.dispatchEvent(new Ov(xv,t))},n.prototype.ou=function(t){var n=!1;for(var i in this.$a)if(this.$a[i]===t){delete this.$a[i],n=!0;break}return n},n.prototype.setLoader=function(t){this.Tt=t},n.prototype.setUrl=function(t){ct(this.ge,7),this.be=t,this.setLoader(Wh(t,this.ge))},n}(nv),Tv=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)}}(),Av=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 ct(n.getType()==gt.POINT,10),n},i.source=null,i.su=i.refresh.bind(i),i.updateDistance(i.distance,i.minDistance),i.setSource(n.source||null),i}return Tv(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.su),this.source=t,t&&t.addEventListener(N,this.su),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={},o=0,s=i.length;o=0;--r){var e=this.geometryFunction(t[r]);e?Pi(i,e.getCoordinates()):t.splice(r,1)}Gi(i,1/t.length);var o=An(n),s=this.interpolationRatio,a=new ne([i[0]*(1-s)+o[0]*s,i[1]*(1-s)+o[1]*s]),u=new vt(a);return u.set("features",t,!0),u},n}(kv),Ev=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)}}(),Cv="default",Pv="truncated",Nv=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.au=null,u.ao=n,u}return Ev(n,t),n.prototype.getImage=function(){if(this.au)return this.au;var n=t.prototype.getImage.call(this);if(this.state==to){var i=this.ao;if(n.width==i[0]&&n.height==i[1])return this.au=n,n;var r=ho(i[0],i[1]);return r.drawImage(n,0,0),this.au=r.canvas,r.canvas}return n},n}(go),zv=function(t){function n(n){var i=this,r=n,e=r.size,o=void 0!==r.tierSizeCalculation?r.tierSizeCalculation:Cv,s=r.tilePixelRatio||1,a=e[0],u=e[1],h=[],c=r.tileSize||ga,f=c*s;switch(o){case Cv:for(;a>f||u>f;)h.push([Math.ceil(a/f),Math.ceil(u/f)]),f+=f;break;case Pv:for(var l=a,v=u;l>f||v>f;)h.push([Math.ceil(l/f),Math.ceil(v/f)]),l>>=1,v>>=1;break;default:ct(!1,53)}h.push([1,1]),h.reverse();for(var d=[s],p=[0],m=1,y=h.length;m1,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:Iv(Iv([],n.supports),r),formats:Iv(Iv([],n.formats),e),qualities:Iv(Iv([],n.qualities),o)}},Uv[Fv]=function(t){var n=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?n.formats:Iv(Iv([],n.formats),t.imageInfo.extraFormats),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return p(["jpg","png","gif"],t)})).reduce((function(t,n){return void 0===t&&p(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:Iv(Iv([],n.supports),t.imageInfo.extraFeatures),formats:i,qualities:void 0===t.imageInfo.extraQualities?n.qualities:Iv(Iv([],n.qualities),t.imageInfo.extraQualities),preferredFormat:r}};var Wv=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;n0&&"string"==typeof this.imageInfo.profile[0]&&Dv.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?Gv.none.none:Gv[t][n]}},t.prototype.getTileSourceOptions=function(t){var n=t||{},i=this.getImageApiVersion();if(void 0!==i){var r=void 0===i?void 0:Uv[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&&p(r.formats,n.format)?n.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:n.quality&&p(r.qualities,n.quality)?n.quality:p(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}(),Vv=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 Jv(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Xv=function(t){function n(n){var i=this,r=n||{},e=r.url||"";e+=e.lastIndexOf("/")===e.length-1||""===e?"":"/";var o=r.version||Lv,s=r.sizes||[],a=r.size;ct(null!=a&&Array.isArray(a)&&2==a.length&&!isNaN(a[0])&&a[0]>0&&!isNaN(a[1])&&a[1]>0,60);var u,h,c,f=a[0],l=a[1],v=r.tileSize,d=r.tilePixelRatio||1,m=r.format||"jpg",y=r.quality||(r.version==Rv?"native":"default"),g=r.resolutions||[],w=r.supports||[],b=r.extent||[0,-l,f,0],x=null!=s&&Array.isArray(s)&&s.length>0,j=void 0!==v&&("number"==typeof v&&Number.isInteger(v)&&v>0||Array.isArray(v)&&v.length>0),M=null!=w&&Array.isArray(w)&&(p(w,"regionByPx")||p(w,"regionByPct"))&&(p(w,"sizeByWh")||p(w,"sizeByH")||p(w,"sizeByW")||p(w,"sizeByPct"));if(g.sort((function(t,n){return n-t})),j||M)if(null!=v&&("number"==typeof v&&Number.isInteger(v)&&v>0?(u=v,h=v):Array.isArray(v)&&v.length>0&&((1==v.length||null==v[1]&&Number.isInteger(v[0]))&&(u=v[0],h=v[0]),2==v.length&&(Number.isInteger(v[0])&&Number.isInteger(v[1])?(u=v[0],h=v[1]):null==v[0]&&Number.isInteger(v[1])&&(u=v[1],h=v[1])))),void 0!==u&&void 0!==h||(u=ga,h=ga),0==g.length)for(var S=c=Math.max(Math.ceil(Math.log(f/u)/Math.LN2),Math.ceil(Math.log(l/h)/Math.LN2));S>=0;S--)g.push(Math.pow(2,S));else{var _=Math.max.apply(Math,g);c=Math.round(Math.log(_)/Math.LN2)}else if(u=f,h=l,g=[],x){s.sort((function(t,n){return t[0]-n[0]})),c=-1;var O=[];for(S=0;S0&&g[g.length-1]==k?O.push(S):(g.push(k),c++)}if(O.length>0)for(S=0;Sc)){var d=t[1],b=t[2],S=g[v];if(!(void 0===d||void 0===b||void 0===S||d<0||Math.ceil(f/S/u)<=d||b<0||Math.ceil(l/S/h)<=b)){if(M||j){var _=d*u*S,O=b*h*S,k=u*S,T=h*S,A=u,E=h;if(_+k>f&&(k=f-_),O+T>l&&(T=l-O),_+u*S>f&&(A=Math.floor((f-_+S-1)/S)),O+h*S>l&&(E=Math.floor((l-O+S-1)/S)),0==_&&k==f&&0==O&&T==l)r="full";else if(!M||p(w,"regionByPx"))r=_+","+O+","+k+","+T;else if(p(w,"regionByPct")){r="pct:"+Jv(_/f*100)+","+Jv(O/l*100)+","+Jv(k/f*100)+","+Jv(T/l*100)}o!=Fv||M&&!p(w,"sizeByWh")?!M||p(w,"sizeByW")?a=A+",":p(w,"sizeByH")?a=","+E:p(w,"sizeByWh")?a=A+","+E:p(w,"sizeByPct")&&(a="pct:"+Jv(100/S)):a=A+","+E}else if(r="full",x){var C=s[v][0],P=s[v][1];a=o==Fv?C==f&&P==l?"max":C+","+P:C==f?"full":C+","}else a=o==Fv?"max":"full";return e+r+"/"+a+"/0/"+y+"."+m}}},transition:r.transition})||this).zDirection=r.zDirection,i}return Vv(n,t),n}(cv),Hv=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)}}(),Yv=function(t){function n(n,i,r,e,o,s,a){var u=this,h=n.getExtent(),c=i.getExtent(),f=c?Nn(r,c):r,l=dc(n,i,An(f),e),v=new Xl(n,i,f,h,.5*l,e),d=s(v.calculateSourceExtent(),l,o),p=d?Be:Je,m=d?d.getPixelRatio():1;return(u=t.call(this,r,e,m,p)||this).Qs=i,u.na=h,u.wa=v,u.ei=e,u.uu=r,u.hu=d,u.cu=m,u.fa=a,u.At=null,u.fu=null,u}return Hv(n,t),n.prototype.disposeInternal=function(){this.state==Ue&&this.lu(),t.prototype.disposeInternal.call(this)},n.prototype.getImage=function(){return this.At},n.prototype.getProjection=function(){return this.Qs},n.prototype.ba=function(){var t=this.hu.getState();if(t==We){var n=Rn(this.uu)/this.ei,i=Pn(this.uu)/this.ei;this.At=mc(n,i,this.cu,this.hu.getResolution(),this.na,this.ei,this.uu,this.wa,[{extent:this.hu.getExtent(),image:this.hu.getImage()}],0,void 0,this.fa)}this.state=t,this.changed()},n.prototype.load=function(){if(this.state==Be){this.state=Ue,this.changed();var t=this.hu.getState();t==We||t==Ve?this.ba():(this.fu=H(this.hu,N,(function(t){var n=this.hu.getState();n!=We&&n!=Ve||(this.lu(),this.ba())}),this),this.hu.load())}},n.prototype.lu=function(){Z(this.fu),this.fu=null},n}(De),Zv=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)}}(),$v="imageloadstart",Kv="imageloadend",Qv="imageloaderror",td=function(t){function n(n,i){var r=t.call(this,n)||this;return r.image=i,r}return Zv(n,t),n}(c);function nd(t,n){t.getImage().src=n}var id=function(n){function i(t){var i=n.call(this,{attributions:t.attributions,projection:t.projection,state:t.state})||this;return i.on,i.once,i.un,i.fi=void 0!==t.resolutions?t.resolutions:null,i.vu=null,i.du=0,i.fa=!1===t.imageSmoothing?fc:void 0,i}return Zv(i,n),i.prototype.getResolutions=function(){return this.fi},i.prototype.getContextOptions=function(){return this.fa},i.prototype.findNearestResolution=function(t){if(this.fi){var n=m(this.fi,t,0);t=this.fi[n]}return t},i.prototype.getImage=function(t,n,i,r){var e=this.getProjection();if(e&&r&&!rr(e,r)){if(this.vu){if(this.du==this.getRevision()&&rr(this.vu.getProjection(),r)&&this.vu.getResolution()==n&&yn(this.vu.getExtent(),t))return this.vu;this.vu.dispose(),this.vu=null}return this.vu=new Yv(e,r,t,n,i,function(t,n,i){return this.getImageInternal(t,n,i,e)}.bind(this),this.fa),this.du=this.getRevision(),this.vu}return e&&(r=e),this.getImageInternal(t,n,i,r)},i.prototype.getImageInternal=function(n,i,r,e){return t()},i.prototype.handleImageChange=function(t){var n=t.target;switch(n.getState()){case Ue:this.loading=!0,this.dispatchEvent(new td($v,n));break;case We:this.loading=!1,this.dispatchEvent(new td(Kv,n));break;case Ve:this.loading=!1,this.dispatchEvent(new td(Qv,n))}},i}(nv),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)}}(),ed=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).zt=void 0!==r.crossOrigin?r.crossOrigin:null,i.Pa=void 0===r.hidpi||r.hidpi,i.be=r.url,i.St=void 0!==r.imageLoadFunction?r.imageLoadFunction:nd,i.pu=r.params||{},i.jt=null,i.mu=[0,0],i.yu=0,i.gu=void 0!==r.ratio?r.ratio:1.5,i}return rd(n,t),n.prototype.getParams=function(){return this.pu},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.be)return null;n=this.findNearestResolution(n),i=this.Pa?i:1;var e=this.jt;if(e&&this.yu==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&hn(e.getExtent(),t))return e;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};k(o,this.pu);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.gu){var u=this.gu*Rn(t)/2,h=this.gu*Pn(t)/2;t[0]=s-u,t[1]=a-h,t[2]=s+u,t[3]=a+h}var c=n/i,f=Math.ceil(Rn(t)/c),l=Math.ceil(Pn(t)/c);t[0]=s-c*f/2,t[2]=s+c*f/2,t[1]=a-c*l/2,t[3]=a+c*l/2,this.mu[0]=f,this.mu[1]=l;var v=this.wu(t,this.mu,i,r,o);return this.jt=new Ye(t,n,i,v,this.zt,this.St),this.yu=this.getRevision(),this.jt.addEventListener(N,this.handleImageChange.bind(this)),this.jt},n.prototype.getImageLoadFunction=function(){return this.St},n.prototype.wu=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.be,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&ct(!1,50),Cc(a,e)},n.prototype.getUrl=function(){return this.be},n.prototype.setImageLoadFunction=function(t){this.jt=null,this.St=t,this.changed()},n.prototype.setUrl=function(t){t!=this.be&&(this.be=t,this.jt=null,this.changed())},n.prototype.updateParams=function(t){k(this.pu,t),this.jt=null,this.changed()},n}(id),od=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)}}(),sd=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).bu=r.canvasFunction,i.At=null,i.yu=0,i.gu=void 0!==r.ratio?r.ratio:1.5,i}return od(n,t),n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n);var e=this.At;if(e&&this.yu==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&hn(e.getExtent(),t))return e;qn(t=t.slice(),this.gu);var o=[Rn(t)/n*i,Pn(t)/n*i],s=this.bu.call(this,t,n,i,o,r);return s&&(e=new $e(t,n,i,s)),this.At=e,this.yu=this.getRevision(),e},n}(id),ad=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 ud=function(t){function n(n){var i=t.call(this,{imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions})||this;return i.zt=void 0!==n.crossOrigin?n.crossOrigin:null,i.xu=void 0!==n.displayDpi?n.displayDpi:96,i.pu=n.params||{},i.be=n.url,i.St=void 0!==n.imageLoadFunction?n.imageLoadFunction:nd,i.Pa=void 0===n.hidpi||n.hidpi,i.nt=void 0!==n.metersPerUnit?n.metersPerUnit:1,i.gu=void 0!==n.ratio?n.ratio:1,i.ju=void 0!==n.useOverlay&&n.useOverlay,i.jt=null,i.yu=0,i}return ad(n,t),n.prototype.getParams=function(){return this.pu},n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n),i=this.Pa?i:1;var e=this.jt;if(e&&this.yu==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&hn(e.getExtent(),t))return e;1!=this.gu&&qn(t=t.slice(),this.gu);var o=[Rn(t)/n*i,Pn(t)/n*i];if(void 0!==this.be){var s=this.getUrl(this.be,this.pu,t,o,r);(e=new Ye(t,n,i,s,this.zt,this.St)).addEventListener(N,this.handleImageChange.bind(this))}else e=null;return this.jt=e,this.yu=this.getRevision(),e},n.prototype.getImageLoadFunction=function(){return this.St},n.prototype.updateParams=function(t){k(this.pu,t),this.changed()},n.prototype.getUrl=function(t,n,i,r,e){var o=function(t,n,i,r){var e=Rn(t),o=Pn(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.nt,this.xu),s=An(i),a={OPERATION:this.ju?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.xu,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return k(a,n),Cc(t,a)},n.prototype.setImageLoadFunction=function(t){this.jt=null,this.St=t,this.changed()},n}(id),hd=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)}}(),cd=function(t){function n(n){var i=this,r=void 0!==n.crossOrigin?n.crossOrigin:null,e=void 0!==n.imageLoadFunction?n.imageLoadFunction:nd;return(i=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:Zi(n.projection)})||this).be=n.url,i.Mu=n.imageExtent,i.jt=new Ye(i.Mu,void 0,1,i.be,r,e),i.mu=n.imageSize?n.imageSize:null,i.jt.addEventListener(N,i.handleImageChange.bind(i)),i}return hd(n,t),n.prototype.getImageExtent=function(){return this.Mu},n.prototype.getImageInternal=function(t,n,i,r){return Ln(t,this.jt.getExtent())?this.jt:null},n.prototype.getUrl=function(){return this.be},n.prototype.handleImageChange=function(n){if(this.jt.getState()==We){var i=this.jt.getExtent(),r=this.jt.getImage(),e=void 0,o=void 0;this.mu?(e=this.mu[0],o=this.mu[1]):(e=r.width,o=r.height);var s=Rn(i),a=Pn(i),u=s/e,h=a/o,c=e,f=o;if(u>h?c=Math.round(s/h):f=Math.round(a/u),c!==e||f!==o){var l=ho(c,f);k(l,this.getContextOptions());var v=l.canvas;l.drawImage(r,0,0,e,o,0,0,v.width,v.height),this.jt.setImage(v)}}t.prototype.handleImageChange.call(this,n)},n}(id),fd="carmentaserver",ld="geoserver",vd="mapserver",dd="qgis",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)}}(),md=[101,101],yd=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).zt=void 0!==r.crossOrigin?r.crossOrigin:null,i.be=r.url,i.St=void 0!==r.imageLoadFunction?r.imageLoadFunction:nd,i.pu=r.params||{},i.Su=!0,i._u(),i.Ou=r.serverType,i.Pa=void 0===r.hidpi||r.hidpi,i.jt=null,i.mu=[0,0],i.yu=0,i.gu=void 0!==r.ratio?r.ratio:1.5,i}return pd(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){if(void 0!==this.be){var e=Zi(i),o=this.getProjection();o&&o!==e&&(n=dc(o,e,t,n),t=sr(t,e,o));var s=Cn(t,n,0,md),a={SERVICE:"WMS",VERSION:cc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.pu.LAYERS};k(a,this.pu,r);var u=Math.floor((t[0]-s[0])/n),h=Math.floor((s[3]-t[1])/n);return a[this.Su?"I":"X"]=u,a[this.Su?"J":"Y"]=h,this.wu(s,md,1,o||e,a)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.be){var i={SERVICE:"WMS",VERSION:cc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.pu.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 k(i,n),Cc(this.be,i)}},n.prototype.getParams=function(){return this.pu},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.be)return null;n=this.findNearestResolution(n),1==i||this.Pa&&void 0!==this.Ou||(i=1);var e=n/i,o=An(t),s=Cn(o,e,0,[Math.ceil(Rn(t)/e),Math.ceil(Pn(t)/e)]),a=Cn(o,e,0,[Math.ceil(this.gu*Rn(t)/e),Math.ceil(this.gu*Pn(t)/e)]),u=this.jt;if(u&&this.yu==this.getRevision()&&u.getResolution()==n&&u.getPixelRatio()==i&&hn(u.getExtent(),s))return u;var h={SERVICE:"WMS",VERSION:cc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};k(h,this.pu),this.mu[0]=Math.round(Rn(a)/e),this.mu[1]=Math.round(Pn(a)/e);var c=this.wu(a,this.mu,i,r,h);return this.jt=new Ye(a,n,i,c,this.zt,this.St),this.yu=this.getRevision(),this.jt.addEventListener(N,this.handleImageChange.bind(this)),this.jt},n.prototype.getImageLoadFunction=function(){return this.St},n.prototype.wu=function(t,n,i,r,e){if(ct(void 0!==this.be,9),e[this.Su?"CRS":"SRS"]=r.getCode(),"STYLES"in this.pu||(e.STYLES=""),1!=i)switch(this.Ou){case ld:var o=90*i+.5|0;"FORMAT_OPTIONS"in e?e.FORMAT_OPTIONS+=";dpi:"+o:e.FORMAT_OPTIONS="dpi:"+o;break;case vd:e.MAP_RESOLUTION=90*i;break;case fd:case dd:e.DPI=90*i;break;default:ct(!1,8)}e.WIDTH=n[0],e.HEIGHT=n[1];var s,a=r.getAxisOrientation();return s=this.Su&&"ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,e.BBOX=s.join(","),Cc(this.be,e)},n.prototype.getUrl=function(){return this.be},n.prototype.setImageLoadFunction=function(t){this.jt=null,this.St=t,this.changed()},n.prototype.setUrl=function(t){t!=this.be&&(this.be=t,this.jt=null,this.changed())},n.prototype.updateParams=function(t){k(this.pu,t),this._u(),this.jt=null,this.changed()},n.prototype._u=function(){var t=this.pu.VERSION||cc;this.Su=Ci(t,"1.3")>=0},n}(id),gd=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)}}(),wd='© OpenStreetMap contributors.',bd=function(t){function n(n){var i,r=n||{};i=void 0!==r.attributions?r.attributions:[wd];var e=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",o=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:e,imageSmoothing:r.imageSmoothing,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:o,wrapX:r.wrapX,zDirection:r.zDirection})||this}return gd(n,t),n}(pv),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||{};return t.call(this,i)||this}return xd(n,t),n}(ns),Md=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)}}(),Sd=function(n){function i(t){var i=n.call(this)||this;return i.ku=i.Tu.bind(i),i.Au=t,i.declutterExecutorGroup=null,i}return Md(i,n),i.prototype.getFeatures=function(n){return t()},i.prototype.prepareFrame=function(n){return t()},i.prototype.renderFrame=function(n,i){return t()},i.prototype.loadedTileCallback=function(t,n,i){t[n]||(t[n]={}),t[n][i.tileCoord.toString()]=i},i.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)},i.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){},i.prototype.getDataAtPixel=function(n,i,r){return t()},i.prototype.getLayer=function(){return this.Au},i.prototype.handleFontsChanged=function(){},i.prototype.Tu=function(t){t.target.getState()===We&&this.renderIfReadyAndVisible()},i.prototype.loadImage=function(t){var n=t.getState();return n!=We&&n!=Ve&&t.addEventListener(N,this.ku),n==Be&&(t.load(),n=t.getState()),n==We},i.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==$o&&t.changed()},i}(tt),_d=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)}}(),Od=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}return _d(n,t),n.prototype.useContainer=function(t,n,i){var r,e,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(e=a.getContext("2d")));if(!e||0!==e.canvas.width&&e.canvas.style.transform!==n?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=e,this.containerReused=!0),!this.container){(r=document.createElement("div")).className=o;var s=r.style;s.position="absolute",s.width="100%",s.height="100%";var a=(e=ho()).canvas;r.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=r,this.context=e}},n.prototype.clipUnrotated=function(t,n,i){var r=zn(i),e=In(i),o=Tn(i),s=kn(i);Ft(n.coordinateToPixelTransform,r),Ft(n.coordinateToPixelTransform,e),Ft(n.coordinateToPixelTransform,o),Ft(n.coordinateToPixelTransform,s);var a=this.inversePixelTransform;Ft(a,r),Ft(a,e),Ft(a,o),Ft(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.Eu=function(t,n,i){var r=this.getLayer();if(r.hasListener(t)){var e=new ss(t,this.inversePixelTransform,i,n);r.dispatchEvent(e)}},n.prototype.preRender=function(t,n){this.Eu(Wo,t,n)},n.prototype.postRender=function(t,n){this.Eu(Vo,t,n)},n.prototype.getRenderTransform=function(t,n,i,r,e,o,s){var a=e/2,u=o/2,h=r/n,c=-h,f=-t[0]+s,l=-t[1];return Ut(this.tempTransform,a,u,h,c,-i,f,l)},n.prototype.getDataAtPixel=function(t,n,i){var r,e=Ft(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer().getExtent();if(s&&!un(s,Ft(n.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(e[0]),u=Math.round(e[1]),h=document.createElement("canvas"),c=h.getContext("2d");h.width=1,h.height=1,c.clearRect(0,0,1,1),c.drawImage(o.canvas,a,u,1,1,0,0,1,1),r=c.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:r}return 0===r[3]?null:r},n}(Sd),kd=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)}}(),Td=function(t){function n(n){var i=t.call(this,n)||this;return i.jt=null,i}return kd(n,t),n.prototype.getImage=function(){return this.jt?this.jt.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=Nn(a,dr(n.extent,r.projection))),!s[va]&&!s[da]&&!Fn(a))if(o){var u=r.projection,h=o.getImage(a,e,i,u);h&&this.loadImage(h)&&(this.jt=h)}else this.jt=null;return!!this.jt},n.prototype.renderFrame=function(t,n){var i=this.jt,r=i.getExtent(),e=i.getResolution(),o=i.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,u=t.viewState,h=u.center,c=u.resolution,f=t.size,l=a*e/(c*o),v=Math.round(f[0]*a),d=Math.round(f[1]*a),p=u.rotation;if(p){var m=Math.round(Math.sqrt(v*v+d*d));v=m,d=m}Ut(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,p,-v/2,-d/2),Wt(this.inversePixelTransform,this.pixelTransform);var y=Jt(this.pixelTransform);this.useContainer(n,y,s.opacity);var g=this.context,w=g.canvas;w.width!=v||w.height!=d?(w.width=v,w.height=d):this.containerReused||g.clearRect(0,0,v,d);var b=!1,x=!0;if(s.extent){var j=dr(s.extent,u.projection);(b=(x=Ln(j,t.extent))&&!hn(j,t.extent))&&this.clipUnrotated(g,t,j)}var M=i.getImage(),S=Ut(this.tempTransform,v/2,d/2,l,l,0,o*(r[0]-h[0])/e,o*(h[1]-r[3])/e);this.renderedResolution=e*a/o;var _=M.width*S[0],O=M.height*S[3];if(k(g,this.getLayer().getSource().getContextOptions()),this.preRender(g,t),x&&_>=.5&&O>=.5){var T=S[4],A=S[5],E=s.opacity,C=void 0;1!==E&&(C=g.globalAlpha,g.globalAlpha=E),g.drawImage(M,0,0,+M.width,+M.height,Math.round(T),Math.round(A),Math.round(_),Math.round(O)),1!==E&&(g.globalAlpha=C)}return this.postRender(g,t),b&&g.restore(),y!==w.style.transform&&(w.style.transform=y),this.container},n}(Od),Ad=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)}}(),Ed=function(t){function n(n){return t.call(this,n)||this}return Ad(n,t),n.prototype.createRenderer=function(){return new Td(this)},n}(jd),Cd="preload",Pd="useInterimTilesOnError",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=this,r=n||{},e=k({},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 Nd(n,t),n.prototype.getPreload=function(){return this.get(Cd)},n.prototype.setPreload=function(t){this.set(Cd,t)},n.prototype.getUseInterimTilesOnError=function(){return this.get(Pd)},n.prototype.setUseInterimTilesOnError=function(t){this.set(Pd,t)},n}(ns),Id=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)}}(),Rd=function(t){function n(n){var i=t.call(this,n)||this;return i.extentChanged=!0,i.Cu=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.Pu=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.Nu=new Ch(0,0,0,0),i}return Id(n,t),n.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),r=n.getUseInterimTilesOnError();return i==to||i==io||i==no&&!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()==no&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.Pu=!0):a.setState(to)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},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,o=r.projection,s=r.resolution,a=r.center,u=r.rotation,h=t.pixelRatio,c=this.getLayer(),f=c.getSource(),l=f.getRevision(),v=f.getTileGridForProjection(o),p=v.getZForResolution(s,f.zDirection),m=v.getResolution(p),y=t.extent,g=i.extent&&dr(i.extent,o);g&&(y=Nn(y,dr(i.extent,o)));var w=f.getTilePixelRatio(h),b=Math.round(t.size[0]*w),x=Math.round(t.size[1]*w);if(u){var j=Math.round(Math.sqrt(b*b+x*x));b=j,x=j}var M=m*b/2/w,S=m*x/2/w,_=[a[0]-M,a[1]-S,a[0]+M,a[1]+S],O=v.getTileRangeForExtentAndZ(y,p),T={};T[p]={};var A=this.createLoadedTileFinder(f,o,T),E=this.tmpExtent,C=this.Nu;this.Pu=!1;for(var P=O.minX;P<=O.maxX;++P)for(var N=O.minY;N<=O.maxY;++N){var z=this.getTile(p,P,N,t);if(this.isDrawableTile(z)){var I=e(this);if(z.getState()==to){T[p][z.tileCoord.toString()]=z;var R=z.inTransition(I);this.Pu||!R&&-1!==this.renderedTiles.indexOf(z)||(this.Pu=!0)}if(1===z.getAlpha(I,t.time))continue}var L=v.getTileCoordChildTileRange(z.tileCoord,C,E),F=!1;L&&(F=A(p+1,L)),F||v.forEachTileCoordParentTileRange(z.tileCoord,A,C,E)}var G=m/s;Ut(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/w,1/w,u,-b/2,-x/2);var q=Jt(this.pixelTransform);this.useContainer(n,q,i.opacity);var D=this.context,B=D.canvas;Wt(this.inversePixelTransform,this.pixelTransform),Ut(this.tempTransform,b/2,x/2,G,G,0,-b/2,-x/2),B.width!=b||B.height!=x?(B.width=b,B.height=x):this.containerReused||D.clearRect(0,0,b,x),g&&this.clipUnrotated(D,t,g),k(D,f.getContextOptions()),this.preRender(D,t),this.renderedTiles.length=0;var U,W,V,J=Object.keys(T).map(Number);J.sort(d),1!==i.opacity||this.containerReused&&!f.getOpaque(t.viewState.projection)?(U=[],W=[]):J=J.reverse();for(var X=J.length-1;X>=0;--X){var H=J[X],Y=f.getTilePixelSize(H,h,o),Z=v.getResolution(H)/m,$=Y[0]*Z*G,K=Y[1]*Z*G,Q=v.getTileCoordForCoordAndZ(zn(_),H),tt=v.getTileCoordExtent(Q),nt=Ft(this.tempTransform,[w*(tt[0]-_[0])/m,w*(_[3]-tt[3])/m]),it=w*f.getGutterForProjection(o),rt=T[H];for(var et in rt){var ot=(z=rt[et]).tileCoord,st=Q[1]-ot[1],at=Math.round(nt[0]-(st-1)*$),ut=Q[2]-ot[2],ht=Math.round(nt[1]-(ut-1)*K),ct=at-(P=Math.round(nt[0]-st*$)),ft=ht-(N=Math.round(nt[1]-ut*K)),lt=p===H;if(!(R=lt&&1!==z.getAlpha(e(this),t.time)))if(U){D.save(),V=[P,N,P+ct,N,P+ct,N+ft,P,N+ft];for(var vt=0,dt=U.length;vtthis._maxQueueLength;)this._queue.shift().callback(null,null)},n.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){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)this._workers[0].postMessage({buffers:r,meta:t.meta,imageOps:this._imageOps,width:n,height:i},r);else for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/e),a=0;aStamen Design, under CC BY 3.0.',wd],op={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}},sp={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},ap=function(t){function n(n){var i=n.layer.indexOf("-"),r=-1==i?n.layer:n.layer.slice(0,i),e=sp[r],o=op[n.layer],s=void 0!==n.url?n.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+n.layer+"/{z}/{x}/{y}."+o.extension;return t.call(this,{attributions:ep,cacheSize:n.cacheSize,crossOrigin:"anonymous",imageSmoothing:n.imageSmoothing,maxZoom:null!=n.maxZoom?n.maxZoom:e.maxZoom,minZoom:null!=n.minZoom?n.minZoom:e.minZoom,opaque:o.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:s,wrapX:n.wrapX,zDirection:n.zDirection})||this}return rp(n,t),n}(pv),up=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)}}(),hp=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,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).pu=r.params||{},i.Pa=void 0===r.hidpi||r.hidpi,i.co=[1/0,1/0,-1/0,-1/0],i.setKey(i.Wu()),i}return up(n,t),n.prototype.Wu=function(){var t=0,n=[];for(var i in this.pu)n[t++]=i+"-"+this.pu[i];return n.join("/")},n.prototype.getParams=function(){return this.pu},n.prototype.wu=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[Qn(_h(t),s.length)];return Cc(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},n.prototype.getTilePixelRatio=function(t){return this.Pa?t:1},n.prototype.updateParams=function(t){k(this.pu,t),this.setKey(this.Wu())},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.Pa||(n=1);var e=r.getTileCoordExtent(t,this.co),o=Da(r.getTileSize(t[0]),this.tmpSize);1!=n&&(o=qa(o,n,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return k(s,this.pu),this.wu(t,o,e,n,i,s)}},n}(cv),cp=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)}}(),fp=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=Da(i.tileGrid.getTileSize(r)),o=ho(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 cp(n,t),n}(pv),lp=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)}}(),vp=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:Zi("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:Zo,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this;if(i.Vu=null,i.ao=n.tileSize,n.url)if(n.jsonp)Jh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var r=new XMLHttpRequest;r.addEventListener("load",i.Ju.bind(i)),r.addEventListener("error",i.Xu.bind(i)),r.open("GET",n.url),r.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):ct(!1,51);return i}return lp(n,t),n.prototype.Ju=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.Xu=function(t){this.handleTileJSONError()},n.prototype.getTileJSON=function(){return this.Vu},n.prototype.handleTileJSONResponse=function(t){var n,i=Zi("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=er(i,r);n=Bn(t.bounds,e)}var o=_c(r),s=t.minzoom||0,a=jc({extent:o,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.ao});if(this.tileGrid=a,this.tileUrlFunction=kc(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==n?n:o;this.setAttributions((function(n){return Ln(u,n.extent)?[t.attribution]:null}))}this.Vu=t,this.setState($o)},n.prototype.handleTileJSONError=function(){this.setState(Ko)},n}(cv),dp=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=function(t){function n(n){var i=this,r=n||{},e=r.params||{},o=!("TRANSPARENT"in e)||e.TRANSPARENT;return(i=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,opaque:!o,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).la=void 0!==r.gutter?r.gutter:0,i.pu=e,i.Su=!0,i.Ou=r.serverType,i.Pa=void 0===r.hidpi||r.hidpi,i.co=[1/0,1/0,-1/0,-1/0],i._u(),i.setKey(i.Wu()),i}return dp(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){var e=Zi(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 h=s.getResolution(u[0]),c=s.getTileCoordExtent(u,this.co),f=Da(s.getTileSize(u[0]),this.tmpSize),l=this.la;0!==l&&(f=Fa(f,l,this.tmpSize),c=on(c,h*l,c)),o&&o!==e&&(h=dc(o,e,t,h),c=ar(c,e,o),t=sr(t,e,o));var v={SERVICE:"WMS",VERSION:cc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.pu.LAYERS};k(v,this.pu,r);var d=Math.floor((t[0]-c[0])/h),p=Math.floor((c[3]-t[1])/h);return v[this.Su?"I":"X"]=d,v[this.Su?"J":"Y"]=p,this.wu(u,f,c,1,o||e,v)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.urls[0]){var i={SERVICE:"WMS",VERSION:cc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.pu.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 k(i,n),Cc(this.urls[0],i)}},n.prototype.getGutter=function(){return this.la},n.prototype.getParams=function(){return this.pu},n.prototype.wu=function(t,n,i,r,e,o){var s=this.urls;if(s){if(o.WIDTH=n[0],o.HEIGHT=n[1],o[this.Su?"CRS":"SRS"]=e.getCode(),"STYLES"in this.pu||(o.STYLES=""),1!=r)switch(this.Ou){case ld:var a=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case vd:o.MAP_RESOLUTION=90*r;break;case fd:case dd:o.DPI=90*r;break;default:ct(!1,52)}var u,h=e.getAxisOrientation(),c=i;if(this.Su&&"ne"==h.substr(0,2)){var f=void 0;f=i[0],c[0]=i[1],c[1]=f,f=i[2],c[2]=i[3],c[3]=f}if(o.BBOX=c.join(","),1==s.length)u=s[0];else u=s[Qn(_h(t),s.length)];return Cc(u,o)}},n.prototype.getTilePixelRatio=function(t){return this.Pa&&void 0!==this.Ou?t:1},n.prototype.Wu=function(){var t=0,n=[];for(var i in this.pu)n[t++]=i+"-"+this.pu[i];return n.join("/")},n.prototype.updateParams=function(t){k(this.pu,t),this._u(),this.setKey(this.Wu())},n.prototype._u=function(){var t=this.pu.VERSION||cc;this.Su=Ci(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.Pa&&void 0!==this.Ou||(n=1);var e=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.co),s=Da(r.getTileSize(t[0]),this.tmpSize),a=this.la;0!==a&&(s=Fa(s,a,this.tmpSize),o=on(o,e*a,o)),1!=n&&(s=qa(s,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:cc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return k(u,this.pu),this.wu(t,s,o,n,i,u)}},n}(cv),mp=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)}}(),yp=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i)||this;return a.xt=r,a.B=e,a.Hu=o,a.Yu=null,a.Zu=null,a.Bo=null,a.$u=s,a}return mp(n,t),n.prototype.getImage=function(){return null},n.prototype.getData=function(t){if(!this.Yu||!this.Zu)return null;var n=(t[0]-this.B[0])/(this.B[2]-this.B[0]),i=(t[1]-this.B[1])/(this.B[3]-this.B[1]),r=this.Yu[Math.floor((1-i)*this.Yu.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.Zu){var s=this.Zu[e];o=this.Bo&&s in this.Bo?this.Bo[s]:s}return o},n.prototype.forDataAtCoordinate=function(t,n,i){this.state==io&&!0===i?(this.state=Ke,Y(this,N,(function(i){n(this.getData(t))}),this),this.Ku()):!0===i?setTimeout(function(){n(this.getData(t))}.bind(this),0):n(this.getData(t))},n.prototype.getKey=function(){return this.xt},n.prototype.Qu=function(){this.state=no,this.changed()},n.prototype.Ct=function(t){this.Yu=t.grid,this.Zu=t.keys,this.Bo=t.data,this.state=to,this.changed()},n.prototype.Ku=function(){if(this.state==Ke)if(this.state=Qe,this.$u)Jh(this.xt,this.Ct.bind(this),this.Qu.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.Ju.bind(this)),t.addEventListener("error",this.Xu.bind(this)),t.open("GET",this.xt),t.send()}},n.prototype.Ju=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.Qu()}this.Ct(i)}else this.Qu()},n.prototype.Xu=function(t){this.Qu()},n.prototype.load=function(){this.Hu?this.Ku():this.setState(io)},n}(uo),gp=function(t){function n(n){var i=t.call(this,{projection:Zi("EPSG:3857"),state:Zo,zDirection:n.zDirection})||this;if(i.Hu=void 0===n.preemptive||n.preemptive,i.th=Ac,i.nh=void 0,i.$u=n.jsonp||!1,n.url)if(i.$u)Jh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var r=new XMLHttpRequest;r.addEventListener("load",i.Ju.bind(i)),r.addEventListener("error",i.Xu.bind(i)),r.open("GET",n.url),r.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):ct(!1,51);return i}return mp(n,t),n.prototype.Ju=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.Xu=function(t){this.handleTileJSONError()},n.prototype.getTemplate=function(){return this.nh},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(Ko)},n.prototype.handleTileJSONResponse=function(t){var n,i=Zi("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=er(i,r);n=Bn(t.bounds,e)}var o=_c(r),s=t.minzoom||0,a=jc({extent:o,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=a,this.nh=t.template;var u=t.grids;if(u){if(this.th=kc(u,a),void 0!==t.attribution){var h=void 0!==n?n:o;this.setAttributions((function(n){return Ln(h,n.extent)?[t.attribution]:null}))}this.setState($o)}else this.setState(Ko)},n.prototype.getTile=function(t,n,i,r,e){var o=xh(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.th(a,r,e),h=new yp(s,void 0!==u?Ke:io,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(s),this.Hu,this.$u);return this.tileCache.set(o,h),h},n.prototype.useTile=function(t,n,i){var r=xh(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ov),wp=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)}}(),bp=function(t){function n(n){var i=this,r=n.projection||"EPSG:3857",e=n.extent||_c(r),o=n.tileGrid||jc({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,opaque:!1,projection:r,state:n.state,tileGrid:o,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:xp,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).ge=n.format?n.format:null,i.sourceTileCache=new Th(i.tileCache.highWaterMark),i.Va=null==n.overlaps||n.overlaps,i.tileClass=n.tileClass?n.tileClass:Rh,i.ih={},i}return wp(n,t),n.prototype.getFeaturesInExtent=function(t){var n=[],i=this.tileCache;if(0===i.getCount())return n;var r=Sh(i.peekFirstKey())[0],e=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===r&&i.getState()===to)for(var o=i.getSourceTiles(),s=0,a=o.length;s0&&(i.tileUrlFunction=Tc(o.map(i.createFromWMTSTemplate.bind(i)))),i}return Sp(n,t),n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.setTileUrlFunction(Tc(t.map(this.createFromWMTSTemplate.bind(this))),n)},n.prototype.getDimensions=function(){return this.eh},n.prototype.getFormat=function(){return this.ge},n.prototype.getLayer=function(){return this.Au},n.prototype.getMatrixSet=function(){return this.oh},n.prototype.getRequestEncoding=function(){return this.sh},n.prototype.getStyle=function(){return this.C},n.prototype.getVersion=function(){return this.rh},n.prototype.ah=function(){var t=0,n=[];for(var i in this.eh)n[t++]=i+"-"+this.eh[i];return n.join("/")},n.prototype.updateDimensions=function(t){k(this.eh,t),this.setKey(this.ah())},n.prototype.createFromWMTSTemplate=function(t){var n=this.sh,i={layer:this.Au,style:this.C,tilematrixset:this.oh};n==jp&&k(i,{Service:"WMTS",Request:"GetTile",Version:this.rh,Format:this.ge}),t=n==jp?Cc(t,i):t.replace(/\{(\w+?)\}/g,(function(t,n){return n.toLowerCase()in i?i[n.toLowerCase()]:t}));var r=this.tileGrid,e=this.eh;return function(i,o,s){if(i){var a={TileMatrix:r.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};k(a,e);var u=t;return u=n==jp?Cc(u,a):u.replace(/\{(\w+?)\}/g,(function(t,n){return a[n]}))}}},n}(cv);var Op=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)}}(),kp="GENERATE_BUFFERS",Tp=function(t){function n(n,i){var r=t.call(this,n)||this,e=i||{};return r.helper=new Cf({postProcesses:e.postProcesses,uniforms:e.uniforms}),void 0!==e.className&&(r.helper.getCanvas().className=e.className),r}return Op(n,t),n.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},n.prototype.Eu=function(t,n){var i=this.getLayer();if(i.hasListener(t)){var r=new ss(t,null,n,null);i.dispatchEvent(r)}},n.prototype.preRender=function(t){this.Eu(Wo,t)},n.prototype.postRender=function(t){this.Eu(Vo,t)},n}(Sd),Ap=[],Ep={vertexPosition:0,indexPosition:0};function Cp(t,n,i,r,e){t[n+0]=i,t[n+1]=r,t[n+2]=e}function Pp(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 Np(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 zp=Tp,Ip=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)}}(),Rp="renderOrder",Lp=function(t){function n(n){var i=this,r=n||{},e=k({},r);return delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,(i=t.call(this,e)||this).uh=void 0!==r.declutter&&r.declutter,i.hh=void 0!==r.renderBuffer?r.renderBuffer:100,i.C=null,i.P=void 0,i.setStyle(r.style),i.fh=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,i.lh=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,i}return Ip(n,t),n.prototype.getDeclutter=function(){return this.uh},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderBuffer=function(){return this.hh},n.prototype.getRenderOrder=function(){return this.get(Rp)},n.prototype.getStyle=function(){return this.C},n.prototype.getStyleFunction=function(){return this.P},n.prototype.getUpdateWhileAnimating=function(){return this.fh},n.prototype.getUpdateWhileInteracting=function(){return this.lh},n.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Wl(9)),this.getRenderer().renderDeclutter(t)},n.prototype.setRenderOrder=function(t){this.set(Rp,t)},n.prototype.setStyle=function(t){this.C=void 0!==t?t:Rl,this.P=null===t?void 0:zl(this.C),this.changed()},n}(ns),Fp=new Blob(['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;rc&&this.instructions.push([Xp.CUSTOM,c,e,t,i,Jr])):u==gt.POINT&&(r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),e=this.coordinates.length,this.instructions.push([Xp.CUSTOM,c,e,t,i]));this.endGeometry(n)},n.prototype.beginGeometry=function(t,n){this.Rh=[Xp.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.Rh),this.Lh=[Xp.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.Lh)},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;tthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.Fh=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=[Xp.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[Xp.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&&!b(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.Rh[2]=this.instructions.length,this.Rh=null,this.Lh[2]=this.hitDetectionInstructions.length,this.Lh=null;var n=[Xp.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},n.prototype.getBufferedMaxExtent=function(){if(!this.Fh&&(this.Fh=sn(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;on(this.Fh,t,this.Fh)}return this.Fh},n}(Xh),Zp=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)}}(),$p=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.fs=null,o.jt=null,o.Dh=void 0,o.Bh=void 0,o.Uh=void 0,o.Wh=void 0,o.Jo=void 0,o.Vh=void 0,o.Jh=void 0,o.Xo=void 0,o.br=void 0,o.Ho=void 0,o.Cs=void 0,o.Xh=void 0,o}return Zp(n,t),n.prototype.drawPoint=function(t,n){if(this.jt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Xp.DRAW_IMAGE,e,o,this.jt,this.Bh*this.Dh,this.Uh*this.Dh,Math.ceil(this.Wh*this.Dh),this.Jo,this.Vh,this.Jh,this.Xo,this.br,[this.Ho[0]*this.pixelRatio/this.Dh,this.Ho[1]*this.pixelRatio/this.Dh],Math.ceil(this.Cs*this.Dh),this.Xh]),this.hitDetectionInstructions.push([Xp.DRAW_IMAGE,e,o,this.fs,this.Bh,this.Uh,this.Wh,this.Jo,this.Vh,this.Jh,this.Xo,this.br,this.Ho,this.Cs,this.Xh]),this.endGeometry(n)}},n.prototype.drawMultiPoint=function(t,n){if(this.jt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Xp.DRAW_IMAGE,e,o,this.jt,this.Bh*this.Dh,this.Uh*this.Dh,Math.ceil(this.Wh*this.Dh),this.Jo,this.Vh,this.Jh,this.Xo,this.br,[this.Ho[0]*this.pixelRatio/this.Dh,this.Ho[1]*this.pixelRatio/this.Dh],Math.ceil(this.Cs*this.Dh),this.Xh]),this.hitDetectionInstructions.push([Xp.DRAW_IMAGE,e,o,this.fs,this.Bh,this.Uh,this.Wh,this.Jo,this.Vh,this.Jh,this.Xo,this.br,this.Ho,this.Cs,this.Xh]),this.endGeometry(n)}},n.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.Bh=void 0,this.Uh=void 0,this.fs=null,this.jt=null,this.Dh=void 0,this.Wh=void 0,this.Ho=void 0,this.Jo=void 0,this.Vh=void 0,this.Jh=void 0,this.Xo=void 0,this.br=void 0,this.Cs=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.Dh=t.getPixelRatio(this.pixelRatio),this.Bh=i[0],this.Uh=i[1],this.fs=e,this.jt=o,this.Wh=r[1],this.Jo=t.getOpacity(),this.Vh=s[0],this.Jh=s[1],this.Xo=t.getRotateWithView(),this.br=t.getRotation(),this.Ho=t.getScaleArray(),this.Cs=r[0],this.Xh=n},n}(Yp),Kp=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)}}(),Qp=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e)||this}return Kp(n,t),n.prototype.Hh=function(t,n,i,r){var e=this.coordinates.length,o=this.appendFlatLineCoordinates(t,n,i,r,!1,!1),s=[Xp.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([Xp.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,ws,0],Vp);var o=t.getFlatCoordinates(),s=t.getStride();this.Hh(o,0,o.length,s),this.hitDetectionInstructions.push(Wp),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([Xp.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Vp);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),u=0,h=0,c=o.length;ht&&(y>m&&(m=y,d=g,p=o),y=0,g=o-e)),s=a,c=l,f=v),u=w,h=b}return(y+=a)>m?[g,o]:[d,p]}var rm=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)}}(),em={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},om=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.$h=null,o.Ge="",o.qe=0,o.De=0,o.Be=void 0,o.Ue=0,o.Ve=null,o.fillStates={},o.Je=null,o.strokeStates={},o.Xe={},o.textStates={},o.Kh="",o.Qh="",o.tc="",o.Xh=void 0,o}return rm(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.Ve,r=this.Je,e=this.Xe;if(""!==this.Ge&&e&&(i||r)){var o=this.coordinates,s=o.length,a=t.getType(),u=null,h=t.getStride();if(e.placement!==Dl||a!=gt.LINE_STRING&&a!=gt.MULTI_LINE_STRING&&a!=gt.POLYGON&&a!=gt.MULTI_POLYGON){var c=e.overflow?null:[];switch(a){case gt.POINT:case gt.MULTI_POINT:u=t.getFlatCoordinates();break;case gt.LINE_STRING:u=t.getFlatMidpoint();break;case gt.CIRCLE:u=t.getCenter();break;case gt.MULTI_LINE_STRING:u=t.getFlatMidpoints(),h=2;break;case gt.POLYGON:u=t.getFlatInteriorPoint(),e.overflow||c.push(u[2]/this.resolution),h=3;break;case gt.MULTI_POLYGON:var f=t.getFlatInteriorPoints();u=[];for(j=0,M=f.length;jT[2]}else _=b>O;var A,E=Math.PI,C=[],P=j+r===n;if(m=0,y=M,l=t[n=j],v=t[n+1],P){g();var N=Math.atan2(v-p,l-d);_&&(N+=N>0?-E:E);var z=(O+b)/2,I=(k+x)/2;return C[0]=[z,I,(S-o)/2,N,e],C}for(var R=0,L=e.length;R0?-E:E),void 0!==A){var G=F-A;if(G+=G>E?-2*E:G<-E?2*E:0,Math.abs(G)>s)return null}A=F;for(var q=R,D=0;Rt?t-u:e,b=o+h>n?n-h:o,x=v[3]+w*f[0]+v[1],j=v[0]+b*f[1]+v[2],M=y-v[3],S=g-v[0];return(d||0!==c)&&(fm[0]=M,dm[0]=M,fm[1]=S,lm[1]=S,lm[0]=M+x,vm[0]=lm[0],vm[1]=S+j,dm[1]=vm[1]),0!==c?(Ft(m=Ut([1,0,0,1,0,0],i,r,1,1,c,-i,-r),fm),Ft(m,lm),Ft(m,vm),Ft(m,dm),vn(Math.min(fm[0],lm[0],vm[0],dm[0]),Math.min(fm[1],lm[1],vm[1],dm[1]),Math.max(fm[0],lm[0],vm[0],dm[0]),Math.max(fm[1],lm[1],vm[1],dm[1]),cm)):vn(Math.min(M,M+x),Math.min(S,S+j),Math.max(M,M+x),Math.max(S,S+j),cm),l&&(y=Math.round(y),g=Math.round(g)),{drawImageX:y,drawImageY:g,drawImageW:w,drawImageH:b,originX:u,originY:h,declutterBox:{minX:cm[0],minY:cm[1],maxX:cm[2],maxY:cm[3],value:p},canvasTransform:m,scale:f}},t.prototype.dc=function(t,n,i,r,e,o,s){var a=!(!o&&!s),u=r.declutterBox,h=t.canvas,c=s?s[2]*r.scale[0]/2:0;return u.minX-c<=h.width/n&&u.maxX+c>=0&&u.minY-c<=h.height/n&&u.maxY+c>=0&&(a&&this.fc(t,fm,lm,vm,dm,o,s),Fs(t,r.canvasTransform,e,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.Ko=function(t){if(this.ac){var n=Ft(this.hc,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(n[0]%i,n[1]%i),t.rotate(this.xe)}t.fill(),this.ac&&t.restore()},t.prototype.lc=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.mc=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=ym(t,e.textAlign||Ms),h=em[e.textBaseline||Ss],c=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:u*(o.width/a-2*e.scale[0])+2*(.5-u)*c,anchorY:h*o.height/a+2*(.5-h)*c}},t.prototype.yc=function(t,n,i,r,e,o,s,a){var u;this.He&&b(i,this.hc)?u=this.He:(this.He||(this.He=[]),u=yr(this.coordinates,0,this.coordinates.length,2,i,this.He),Lt(this.hc,i));for(var h,c,f,l,v,d,p,m,y,g,w,x,j,M,S,_,O=0,k=r.length,T=0,A=0,E=0,C=null,P=null,N=this.uc,z=this.xe,I=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,R={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:z},L=this.instructions!=r||this.overlaps?0:200;OL&&(this.Ko(t),A=0),E>L&&(t.stroke(),E=0),A||E||(t.beginPath(),l=NaN,v=NaN),++O;break;case Xp.CIRCLE:var G=u[T=F[1]],q=u[T+1],D=u[T+2]-G,B=u[T+3]-q,U=Math.sqrt(D*D+B*B);t.moveTo(G+U,q),t.arc(G,q,U,0,2*Math.PI,!0),++O;break;case Xp.CLOSE_PATH:t.closePath(),++O;break;case Xp.CUSTOM:T=F[1],h=F[2];var W=F[3],V=F[4],J=6==F.length?F[5]:void 0;R.geometry=W,R.feature=j,O in N||(N[O]=[]);var X=N[O];J?J(u,T,h,2,X):(X[0]=u[T],X[1]=u[T+1],X.length=2),V(X,R),++O;break;case Xp.DRAW_IMAGE:T=F[1],h=F[2],m=F[3],c=F[4],f=F[5];var H=F[6],Y=F[7],Z=F[8],$=F[9],K=F[10],Q=F[11],tt=F[12],nt=F[13],it=F[14];if(!m&&F.length>=19){y=F[18],g=F[19],w=F[20],x=F[21];var rt=this.mc(y,g,w,x);m=rt.label,F[3]=m;var et=F[22];c=(rt.anchorX-et)*this.pixelRatio,F[4]=c;var ot=F[23];f=(rt.anchorY-ot)*this.pixelRatio,F[5]=f,H=m.height,F[6]=H,nt=m.width,F[13]=nt}var st=void 0;F.length>24&&(st=F[24]);var at=void 0,ut=void 0,ht=void 0;F.length>16?(at=F[15],ut=F[16],ht=F[17]):(at=_s,ut=!1,ht=!1),K&&I?Q+=z:K||I||(Q-=z);for(var ct=0;T0){if(!o||f!==Kh&&f!==nc||-1!==o.indexOf(t)){var h=(l[a]-3)/4,v=r-h%s,d=r-(h/s|0),p=e(t,n,v*v+d*d);if(p)return p}c.clearRect(0,0,s,s);break}}var p,m,y,g,w,b=Object.keys(this.gc).map(Number);for(b.sort(d),p=b.length-1;p>=0;--p){var x=b[p].toString();for(y=this.gc[x],m=wm.length-1;m>=0;--m)if(void 0!==(g=y[f=wm[m]])&&(w=g.executeHitDetection(c,a,i,v,h)))return w}},t.prototype.getClipCoords=function(t){var n=this.ec;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 yr(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return E(this.gc)},t.prototype.execute=function(t,n,i,r,e,o,s){var a=Object.keys(this.gc).map(Number);a.sort(d),this.ec&&(t.save(),this.clip(t,i));var u,h,c,f,l,v,p=o||wm;for(s&&a.reverse(),u=0,h=a.length;ui)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=[],h=(e=0,r.length);e0&&(s.width=0),this.container;var h=Math.round(t.size[0]*i),c=Math.round(t.size[1]*i);s.width!=h||s.height!=c?(s.width=h,s.height=c,s.style.transform!==e&&(s.style.transform=e)):this.containerReused||o.clearRect(0,0,h,c),this.preRender(o,t);var f=t.viewState,l=f.projection,v=!1,d=!0;if(r.extent&&this.clipping){var p=dr(r.extent,l);(v=(d=Ln(p,t.extent))&&!hn(p,t.extent))&&this.clipUnrotated(o,t,p)}d&&this.renderWorlds(a,t),v&&o.restore(),this.postRender(o,t);var m=r.opacity,y=this.container;return m!==parseFloat(y.style.opacity)&&(y.style.opacity=1===m?"":String(m)),this.Ec!==f.rotation&&(this.Ec=f.rotation,this.Oc=null),this.container},n.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.Oc&&!this.Sc){var i=[this.context.canvas.width,this.context.canvas.height];Ft(this.pixelTransform,i);var r=this.Cc,e=this.Tc,o=this.Ec,s=this.Pc,a=this.Ac,u=this.getLayer(),h=[],c=i[0]*Sm,f=i[1]*Sm;h.push(this.getRenderTransform(r,e,o,Sm,c,f,0).slice());var l=u.getSource(),v=s.getExtent();if(l.getWrapX()&&s.canWrapX()&&!hn(v,a)){for(var d=a[0],p=Rn(v),m=0,y=void 0;dv[2];)y=p*++m,h.push(this.getRenderTransform(r,e,o,Sm,c,f,y).slice()),d-=p}this.Oc=_m(i,h,this.kc,u.getStyleFunction(),a,e,o)}n(Om(t,this.kc,this.Oc))}.bind(this))},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,o){var s=this;if(this.zc){var a,u=n.viewState.resolution,h=n.viewState.rotation,c=this.getLayer(),f={},l=function(t,n,i){var s=e(t),a=f[s];if(a){if(!0!==a&&iw[0]&&M[2]>w[2]&&g.push([M[0]-x,M[1],M[2]-x,M[3]])}if(!this._c&&this.Tc==c&&this.yu==l&&this.Nc==d&&hn(this.Ac,m))return b(this.Cu,y)||(this.Oc=null,this.Cu=y),this.Cc=p,this.replayGroupChanged=!1,!0;this.zc=null,this._c=!1;var S,_=new am(oc(c,f),m,c,f);this.getLayer().getDeclutter()&&(S=new am(oc(c,f),m,c,f));var O,k=cr();if(k){for(var T=0,A=g.length;T0)n([]);else{var y=zn(f.getTileCoordExtent(r.wrappedTileCoord)),g=[(l[0]-y[0])/c,(y[1]-l[1])/c],w=r.getSourceTiles().reduce((function(t,n){return t.concat(n.getFeatures())}),[]),b=r.hitDetectionImageData[s];if(!b&&!this.Sc){var x=Da(f.getTileSize(f.getZForResolution(c))),j=this.Ec;b=_m(x,[this.getRenderTransform(f.getTileCoordCenter(r.wrappedTileCoord),c,0,Sm,x[0]*Sm,x[1]*Sm,0)],w,o.getStyleFunction(),f.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(o).renderedResolution,j),r.hitDetectionImageData[s]=b}n(Om(g,w,b))}}.bind(this))},n.prototype.handleFontsChanged=function(){T(this.qc);var t=this.getLayer();t.getVisible()&&void 0!==this.Gc&&t.changed()},n.prototype.Mc=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,o=!(r[va]||r[da]),s=this.renderedTiles,a=0,u=s.length;a=0;--f)c[f].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,o,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),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(n.viewState.projection),f=t.tileCoord,l=c.getTileCoordExtent(t.wrappedTileCoord),v=c.getTileCoordExtent(f,this.tmpExtent)[0]-l[0];return It(qt(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(e,o,s,i,u,h,v))},n.prototype.renderFrame=function(n,i){var r=n.viewHints,o=!(r[va]||r[da]);this.Jc(o,n),t.prototype.renderFrame.call(this,n,i),this.Fc=n.pixelToCoordinateTransform.slice(),this.Ec=n.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode(),u=s.getSource(),h=n.usedTiles[e(u)];for(var c in this.qc)h&&c in h||delete this.qc[c];var f=this.context,l=f.globalAlpha;f.globalAlpha=s.getOpacity();for(var v=Rm[a],d=n.viewState.rotation,p=this.renderedTiles,m=[],y=[],g=p.length-1;g>=0;--g)for(var w=p[g],b=this.getTileRenderTransform(w,n),x=w.executorGroups[e(s)],j=!1,M=0,S=x.length;M8){n.animate=!0;break}var r=this.qc[i];delete this.qc[i],this.Vc(r,n)}},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;s1?s:2,x=o||new Array(b);for(p=0;p>1;e0&&m.length>0;)o=m.pop(),c=d.pop(),l=p.pop(),(u=o.toString())in y||(h.push(l[0],l[1]),y[u]=!0),s=m.pop(),f=d.pop(),v=p.pop(),Hn((e=n(r=t(a=(o+s)/2)))[0],e[1],l[0],l[1],v[0],v[1])this.Nf.length;)a=new vt,this.Nf.push(a);var h=r.getFeaturesCollection();h.clear();var c,f,l=0;for(c=0,f=this.ff.length;cMath.PI/2);for(var m=uc(t),y=f;y<=l;++y){var g=this.ff.length+this.lf.length,w=void 0,b=void 0,x=void 0,j=void 0;if(this.xf)for(b=0,x=this.xf.length;b=a?(t[0]=s[0],t[2]=s[2]):o=!0);var u=[Vn(n[0],this.af,this.ef),Vn(n[1],this.uf,this.sf)],h=this.pf(u);isNaN(h[1])&&(h[1]=Math.abs(this.tf)>=Math.abs(this.if)?this.tf:this.if);var c,f,l,v,d=Vn(h[0],this.rf,this.nf),p=Vn(h[1],this.if,this.tf),m=this.cf,y=t;o||(y=[Vn(t[0],this.af,this.ef),Vn(t[1],this.uf,this.sf),Vn(t[2],this.af,this.ef),Vn(t[3],this.uf,this.sf)]);var g=Bn(y,this.pf,void 0,8),w=g[3],b=g[2],x=g[1],j=g[0];if(o||(un(y,this.yf)&&(j=this.rf,x=this.if),un(y,this.gf)&&(b=this.nf,x=this.if),un(y,this.wf)&&(j=this.rf,w=this.tf),un(y,this.bf)&&(b=this.nf,w=this.tf),w=Vn(w,p,this.tf),b=Vn(b,d,this.nf),x=Vn(x,this.if,p),j=Vn(j,this.rf,d)),v=Vn(d=Math.floor(d/e)*e,this.rf,this.nf),f=this.Ff(v,x,w,r,t,0),c=0,o)for(;(v-=e)>=j&&c++r[o]&&(e=o,o=1);var s=Math.max(n[1],r[e]),a=Math.min(n[3],r[o]),u=Vn(n[1]+Math.abs(n[1]-n[3])*this._f,s,a),h=[r[e-1]+(r[o-1]-r[e-1])*(u-r[e])/(r[o]-r[e]),u],c=this.xf[i].geom;return c.setCoordinates(h),c},n.prototype.getMeridians=function(){return this.ff},n.prototype.Df=function(t,n,i,r,e){var o=$m(t,n,i,this.ni,r),s=this.lf[e];return s?(s.setFlatCoordinates(dt,o),s.changed()):s=new Jm(o,dt),s},n.prototype.Uf=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=Vn(n[0]+Math.abs(n[0]-n[2])*this.Of,s,a),h=[u,r[e+1]+(r[o+1]-r[e+1])*(u-r[e])/(r[o]-r[e])],c=this.jf[i].geom;return c.setCoordinates(h),c},n.prototype.getParallels=function(){return this.lf},n.prototype.Rf=function(t){var n=Zi("EPSG:4326"),i=t.getWorldExtent();this.tf=i[3],this.nf=i[2],this.if=i[1],this.rf=i[0];var r=or(t,n);if(this.rf=Math.abs(this.if)?this.tf:this.if),this.ni=t},n}(Hm),iy=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)}}(),ry="blur",ey="gradient",oy="radius",sy=["#00f","#0ff","#0f0","#ff0","#f00"];var ay=function(t){function n(n){var i=this,r=n||{},e=k({},r);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,(i=t.call(this,e)||this).Vf=null,i.addChangeListener(ey,i.Jf),i.setGradient(r.gradient?r.gradient:sy),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.Xf="string"==typeof o?function(t){return t.get(o)}:o,i.setRenderOrder(null),i}return iy(n,t),n.prototype.getBlur=function(){return this.get(ry)},n.prototype.getGradient=function(){return this.get(ey)},n.prototype.getRadius=function(){return this.get(oy)},n.prototype.Jf=function(){this.Vf=function(t){for(var n=1,i=256,r=ho(n,i),e=r.createLinearGradient(0,0,n,i),o=1/(t.length-1),s=0,a=t.length;s>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 xy(t,n,i){if(1==t)n.id=i.readVarint();else if(2==t)for(var r=i.readVarint()+i.pos;i.pos>3}s--,1===o||2===o?(a+=t.readSVarint(),u+=t.readSVarint(),1===o&&h>c&&(r.push(h),c=h),i.push(a,u),h+=2):7===o?h>c&&(i.push(i[c],i[c+1]),h+=2):ct(!1,59)}h>c&&(r.push(h),c=h)},n.prototype.tl=function(t,n,i){var r,e=n.type;if(0===e)return null;var o,s=n.properties;this.Kf?(o=s[this.Kf],delete s[this.Kf]):o=n.id,s[this.$f]=n.layer.name;var a=[],u=[];this.Qf(t,n,a,u);var h=function(t,n){var i;1===t?i=1===n?gt.POINT:gt.MULTI_POINT:2===t?i=1===n?gt.LINE_STRING:gt.MULTI_LINE_STRING:3===t&&(i=gt.POLYGON);return i}(e,u.length);if(this.Zf===Wm)(r=new this.Zf(h,a,u,s,o)).transform(i.dataProjection);else{var c=void 0;if(h==gt.POLYGON){for(var f=[],l=0,v=0,d=0,p=u.length;d1?new my(a,dt,f):new je(a,dt,u)}else c=h===gt.POINT?new ne(a,dt):h===gt.LINE_STRING?new Jm(a,dt):h===gt.POLYGON?new je(a,dt,u):h===gt.MULTI_POINT?new dy(a,dt):h===gt.MULTI_LINE_STRING?new ly(a,dt,u):null;r=new(0,this.Zf),this.A&&r.setGeometryName(this.A);var y=hy(c,!1,i);r.setGeometry(y),r.setId(o),r.setProperties(s,!0)}return r},n.prototype.getType=function(){return Fh},n.prototype.readFeatures=function(t,n){var i=this.Lu,r=this.adaptOptions(n),e=Zi(r.dataProjection);e.setWorldExtent(r.extent),r.dataProjection=e;var o=new yy(t),s=o.readFields(wy,{}),a=[];for(var u in s)if(!i||-1!=i.indexOf(u)){var h=s[u],c=h?[0,0,h.extent,h.extent]:null;e.setExtent(c);for(var f=0,l=h.length;f`."},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 `{: }`. 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://`."},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://`."},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 `{: }`."}},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 doesn’t 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`, 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 Fy="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Gy(t){var n={exports:{}};return t(n,n.exports),n.exports}var qy=Gy((function(t,n){!function(i){var r=n&&!n.nodeType&&n,e=t&&!t.nodeType&&t,o="object"==typeof Fy&&Fy;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var s,a,u=2147483647,h=36,c=/^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 m(t){throw RangeError(v[t])}function y(t,n){for(var i=t.length,r=[];i--;)r[i]=n(t[i]);return r}function g(t,n){var i=t.split("@"),r="";return i.length>1&&(r=i[0]+"@",t=i[1]),r+y((t=t.replace(l,".")).split("."),n).join(".")}function w(t){for(var n,i,r=[],e=0,o=t.length;e=55296&&n<=56319&&e65535&&(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+=h)t=d(t/35);return d(r+36*t/(t+38))}function M(t){var n,i,r,e,o,s,a,c,f,l,v,p=[],y=t.length,g=0,w=128,x=72;for((i=t.lastIndexOf("-"))<0&&(i=0),r=0;r=128&&m("not-basic"),p.push(t.charCodeAt(r));for(e=i>0?i+1:0;e=y&&m("invalid-input"),((c=(v=t.charCodeAt(e++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:h)>=h||c>d((u-g)/s))&&m("overflow"),g+=c*s,!(c<(f=a<=x?1:a>=x+26?26:a-x));a+=h)s>d(u/(l=h-f))&&m("overflow"),s*=l;x=j(g-o,n=p.length+1,0==o),d(g/n)>u-w&&m("overflow"),w+=d(g/n),g%=n,p.splice(g++,0,w)}return b(p)}function S(t){var n,i,r,e,o,s,a,c,f,l,v,y,g,b,M,S=[];for(y=(t=w(t)).length,n=128,i=0,o=72,s=0;s=n&&vd((u-i)/(g=r+1))&&m("overflow"),i+=(a-n)*g,n=a,s=0;su&&m("overflow"),v==n){for(c=i,f=h;!(c<(l=f<=o?1:f>=o+26?26:f-o));f+=h)M=c-l,b=h-l,S.push(p(x(l+M%b,0))),c=d(M/b);S.push(p(x(c,0))),o=j(i,g,r==e),i=0,++r}++i,++n}return S.join("")}if(s={version:"1.3.2",ucs2:{decode:w,encode:b},decode:M,encode:S,toASCII:function(t){return g(t,(function(t){return f.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return g(t,(function(t){return c.test(t)?M(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}(Fy)})),Dy=function(t){return"string"==typeof t},By=function(t){return"object"==typeof t&&null!==t},Uy=function(t){return null===t},Wy=function(t){return null==t};function Vy(t,n){return Object.prototype.hasOwnProperty.call(t,n)}var Jy=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=0?(h=v.substr(0,d),c=v.substr(d+1)):(h=v,c=""),f=decodeURIComponent(h),l=decodeURIComponent(c),Vy(e,f)?Array.isArray(e[f])?e[f].push(l):e[f]=[e[f],l]:e[f]=l}return e},Xy=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},Hy=function(t,n,i,r){return n=n||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(r){var e=encodeURIComponent(Xy(r))+i;return Array.isArray(t[r])?t[r].map((function(t){return e+encodeURIComponent(Xy(t))})).join(n):e+encodeURIComponent(Xy(t[r]))})).join(n):r?encodeURIComponent(Xy(r))+i+encodeURIComponent(Xy(t)):""},Yy=Gy((function(t,n){n.decode=n.parse=Jy,n.encode=n.stringify=Hy}));function Zy(){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 $y=/^([a-z0-9.+-]+:)/i,Ky=/:[0-9]*$/,Qy=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,tg=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),ng=["'"].concat(tg),ig=["%","/","?",";","#"].concat(ng),rg=["/","?","#"],eg=/^[+a-z0-9A-Z_-]{0,63}$/,og=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,sg={javascript:!0,"javascript:":!0},ag={javascript:!0,"javascript:":!0},ug={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function hg(t,n,i){if(t&&By(t)&&t instanceof Zy)return t;var r=new Zy;return r.parse(t,n,i),r}Zy.prototype.parse=function(t,n,i){if(!Dy(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),e=-1!==r&&r127?b+="x":b+=w[x];if(!b.match(eg)){var M=y.slice(0,d),S=y.slice(d+1),_=w.match(og);_&&(M.push(_[1]),S.unshift(_[2])),S.length&&(s="/"+S.join(".")+s),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=qy.toASCII(this.hostname));var O=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+O,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!sg[h])for(d=0,g=ng.length;d0)&&i.host.split("@"))&&(i.auth=_.shift(),i.host=i.hostname=_.shift());return i.search=t.search,i.query=t.query,Uy(i.pathname)&&Uy(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!w.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var x=w.slice(-1)[0],j=(i.host||t.host||w.length>1)&&("."===x||".."===x)||""===x,M=0,S=w.length;S>=0;S--)"."===(x=w[S])?w.splice(S,1):".."===x?(w.splice(S,1),M++):M&&(w.splice(S,1),M--);if(!y&&!g)for(;M--;M)w.unshift("..");!y||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),j&&"/"!==w.join("/").substr(-1)&&w.push("");var _,O=""===w[0]||w[0]&&"/"===w[0].charAt(0);b&&(i.hostname=i.host=O?"":w.length?w.shift():"",(_=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=_.shift(),i.host=i.hostname=_.shift()));return(y=y||i.host&&w.length)&&!O&&w.unshift(""),w.length?i.pathname=w.join("/"):(i.pathname=null,i.path=null),Uy(i.pathname)&&Uy(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},Zy.prototype.parseHost=function(){var t=this.host,n=Ky.exec(t);n&&(":"!==(n=n[0])&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};function cg(t){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];for(var r=0,e=n;r":"value"===t.itemType.kind?"array":"array<"+n+">"}return t.kind}var _g=[vg,dg,pg,mg,yg,xg,gg,Mg(wg),jg];function Og(t,n){if("error"===n.kind)return null;if("array"===t.kind){if("array"===n.kind&&(0===n.N&&"value"===n.itemType.kind||!Og(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)for(var i=0,r=_g;i255?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("("),h=e.indexOf(")");if(-1!==u&&h+1===e.length){var c=e.substr(0,u),f=e.substr(u+1,h-(u+1)).split(","),l=1;switch(c){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]),m=p<=.5?p*(d+1):p+d-p*d,y=2*p-m;return[r(255*a(y,m,v+1/3)),r(255*a(y,m,v)),r(255*a(y,m,v-1/3)),l];default:return null}}return null}}catch(t){}})),Eg=function(t,n,i,r){void 0===r&&(r=1),this.r=t,this.g=n,this.b=i,this.a=r};Eg.parse=function(t){if(t){if(t instanceof Eg)return t;if("string"==typeof t){var n=Ag.parseCSSColor(t);if(n)return new Eg(n[0]/255*n[3],n[1]/255*n[3],n[2]/255*n[3],n[3])}}},Eg.prototype.toString=function(){var t=this.toArray(),n=t[0],i=t[1],r=t[2],e=t[3];return"rgba("+Math.round(n)+","+Math.round(i)+","+Math.round(r)+","+e+")"},Eg.prototype.toArray=function(){var t=this,n=t.r,i=t.g,r=t.b,e=t.a;return 0===e?[0,0,0,0]:[255*n/e,255*i/e,255*r/e,e]},Eg.black=new Eg(0,0,0,1),Eg.white=new Eg(1,1,1,1),Eg.transparent=new Eg(0,0,0,0),Eg.red=new Eg(1,0,0,1),Eg.blue=new Eg(0,0,1,1);var Cg=function(t,n,i){this.sensitivity=t?n?"variant":"case":n?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Cg.prototype.compare=function(t,n){return this.collator.compare(t,n)},Cg.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Pg=function(t,n,i,r,e){this.text=t,this.image=n,this.scale=i,this.fontStack=r,this.textColor=e},Ng=function(t){this.sections=t};Ng.fromString=function(t){return new Ng([new Pg(t,null,null,null,null)])},Ng.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},Ng.factory=function(t){return t instanceof Ng?t:Ng.fromString(t)},Ng.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},Ng.prototype.serialize=function(){for(var t=["format"],n=0,i=this.sections;n=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 ["+[t,n,i,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,n,i,r]:[t,n,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Rg(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 Eg)return!0;if(t instanceof Cg)return!0;if(t instanceof Ng)return!0;if(t instanceof zg)return!0;if(Array.isArray(t)){for(var n=0,i=t;n2){var a=t[1];if("string"!=typeof a||!(a in Dg)||"object"===a)return n.error('The item type argument of "array" must be one of string, number, boolean',1);o=Dg[a],r++}else o=wg;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return n.error('The length argument to "array" must be a positive integer literal',2);s=t[2],r++}i=Mg(o,s)}else i=Dg[e];for(var u=[];r1)&&n.push(r)}}return n.concat(this.args.map((function(t){return t.serialize()})))};var Ug=function(t){this.type=xg,this.sections=t};Ug.parse=function(t,n){if(t.length<2)return n.error("Expected at least one argument.");var i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return n.error("First argument must be an image or text section.");for(var r=[],e=!1,o=1;o<=t.length-1;++o){var s=t[o];if(e&&"object"==typeof s&&!Array.isArray(s)){e=!1;var a=null;if(s["font-scale"]&&!(a=n.parse(s["font-scale"],1,dg)))return null;var u=null;if(s["text-font"]&&!(u=n.parse(s["text-font"],1,Mg(pg))))return null;var h=null;if(s["text-color"]&&!(h=n.parse(s["text-color"],1,yg)))return null;var c=r[r.length-1];c.scale=a,c.font=u,c.textColor=h}else{var f=n.parse(t[o],1,wg);if(!f)return null;var l=f.type.kind;if("string"!==l&&"value"!==l&&"null"!==l&&"resolvedImage"!==l)return n.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");e=!0,r.push({content:f,scale:null,font:null,textColor:null})}}return new Ug(r)},Ug.prototype.evaluate=function(t){return new Ng(this.sections.map((function(n){var i=n.content.evaluate(t);return Lg(i)===jg?new Pg("",i,null,null,null):new Pg(Fg(i),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)})))},Ug.prototype.eachChild=function(t){for(var n=0,i=this.sections;n-1),i},Wg.prototype.eachChild=function(t){t(this.input)},Wg.prototype.outputDefined=function(){return!1},Wg.prototype.serialize=function(){return["image",this.input.serialize()]};var Vg={"to-boolean":mg,"to-color":yg,"to-number":dg,"to-string":pg},Jg=function(t,n){this.type=t,this.args=n};Jg.parse=function(t,n){if(t.length<2)return n.error("Expected at least one argument.");var i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return n.error("Expected one argument.");for(var r=Vg[i],e=[],o=1;o4?"Invalid rbga value "+JSON.stringify(n)+": expected an array containing either three or four numeric values.":Ig(n[0],n[1],n[2],n[3])))return new Eg(n[0]/255,n[1]/255,n[2]/255,n[3])}throw new qg(i||"Could not parse color from value '"+("string"==typeof n?n:String(JSON.stringify(n)))+"'")}if("number"===this.type.kind){for(var s=null,a=0,u=this.args;a=n[2])&&(!(t[1]<=n[1])&&!(t[3]>=n[3])))}function tw(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*$g),Math.round(e*o*$g)]}function nw(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 iw(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 rw(t,n){for(var i=!1,r=0,e=n.length;r0&&f<0||c<0&&f>0}function sw(t,n,i){for(var r=0,e=i;ri[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}Kg(n,t)}function lw(t,n,i,r){for(var e=Math.pow(2,r.z)*$g,o=[r.x*$g,r.y*$g],s=[],a=0,u=t;a=0)return!1;var i=!0;return t.eachChild((function(t){i&&!yw(t,n)&&(i=!1)})),i}dw.parse=function(t,n){if(2!==t.length)return n.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Rg(t[1])){var i=t[1];if("FeatureCollection"===i.type)for(var r=0;rn))throw new qg("Input is not a number.");s=a-1}return 0}ww.prototype.parse=function(t,n,i,r,e){return void 0===e&&(e={}),n?this.concat(n,i,r)._parse(t,e):this._parse(t,e)},ww.prototype._parse=function(t,n){function i(t,n,i){return"assert"===i?new Bg(n,[t]):"coerce"===i?new Jg(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 "+typeof 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 Gg)&&"resolvedImage"!==o.type.kind&&bw(o)){var u=new Hg;try{o=new Gg(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},ww.prototype.concat=function(t,n,i){var r="number"==typeof t?this.path.concat(t):this.path,e=i?this.scope.concat(i):this.scope;return new ww(this.registry,r,n||null,e,this.errors)},ww.prototype.error=function(t){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var r=""+this.key+n.map((function(t){return"["+t+"]"})).join("");this.errors.push(new fg(r,t))},ww.prototype.checkSubtype=function(t,n){var i=Og(t,n);return i&&this.error(i),i};var jw=function(t,n,i){this.type=t,this.input=n,this.labels=[],this.outputs=[];for(var r=0,e=i;r=s)return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var c=n.parse(a,h,e);if(!c)return null;e=e||c.type,r.push([s,c])}return new jw(e,i,r)},jw.prototype.evaluate=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[xw(n,r)].evaluate(t)},jw.prototype.eachChild=function(t){t(this.input);for(var n=0,i=this.outputs;n0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t};var Mw=Sw;function Sw(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 _w(t,n,i){return t*(1-i)+n*i}Sw.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Sw.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Sw.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Sw.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)(r=1))return r;for(;io?i=e:r=e,e=.5*(r-i)+i}return e},Sw.prototype.solve=function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))};var Ow=Object.freeze({__proto__:null,number:_w,color:function(t,n,i){return new Eg(_w(t.r,n.r,i),_w(t.g,n.g,i),_w(t.b,n.b,i),_w(t.a,n.a,i))},array:function(t,n,i){return t.map((function(t,r){return _w(t,n[r],i)}))}}),kw=.95047,Tw=1.08883,Aw=4/29,Ew=6/29,Cw=3*Ew*Ew,Pw=Math.PI/180,Nw=180/Math.PI;function zw(t){return t>.008856451679035631?Math.pow(t,1/3):t/Cw+Aw}function Iw(t){return t>Ew?t*t*t:Cw*(t-Aw)}function Rw(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Lw(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Fw(t){var n=Lw(t.r),i=Lw(t.g),r=Lw(t.b),e=zw((.4124564*n+.3575761*i+.1804375*r)/kw),o=zw((.2126729*n+.7151522*i+.072175*r)/1);return{l:116*o-16,a:500*(e-o),b:200*(o-zw((.0193339*n+.119192*i+.9503041*r)/Tw)),alpha:t.a}}function Gw(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*Iw(n),i=kw*Iw(i),r=Tw*Iw(r),new Eg(Rw(3.2404542*i-1.5371385*n-.4985314*r),Rw(-.969266*i+1.8760108*n+.041556*r),Rw(.0556434*i-.2040259*n+1.0572252*r),t.alpha)}function qw(t,n,i){var r=n-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}var Dw={forward:Fw,reverse:Gw,interpolate:function(t,n,i){return{l:_w(t.l,n.l,i),a:_w(t.a,n.a,i),b:_w(t.b,n.b,i),alpha:_w(t.alpha,n.alpha,i)}}},Bw={forward:function(t){var n=Fw(t),i=n.l,r=n.a,e=n.b,o=Math.atan2(e,r)*Nw;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*Pw,i=t.c;return Gw({l:t.l,a:Math.cos(n)*i,b:Math.sin(n)*i,alpha:t.alpha})},interpolate:function(t,n,i){return{h:qw(t.h,n.h,i),c:_w(t.c,n.c,i),l:_w(t.l,n.l,i),alpha:_w(t.alpha,n.alpha,i)}}},Uw=Object.freeze({__proto__:null,lab:Dw,hcl:Bw}),Ww=function(t,n,i,r,e){this.type=t,this.operator=n,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(var o=0,s=e;o1})))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return n.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(e=n.parse(e,2,dg)))return null;var u=[],h=null;"interpolate-hcl"===i||"interpolate-lab"===i?h=yg:n.expectedType&&"value"!==n.expectedType.kind&&(h=n.expectedType);for(var c=0;c=f)return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',v);var p=n.parse(l,d,h);if(!p)return null;h=h||p.type,u.push([f,p])}return"number"===h.kind||"color"===h.kind||"array"===h.kind&&"number"===h.itemType.kind&&"number"==typeof h.N?new Ww(h,i,r,e,u):n.error("Type "+Sg(h)+" is not interpolatable.")},Ww.prototype.evaluate=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;if(r>=n[e-1])return i[e-1].evaluate(t);var o=xw(n,r),s=n[o],a=n[o+1],u=Ww.interpolationFactor(this.interpolation,r,s,a),h=i[o].evaluate(t),c=i[o+1].evaluate(t);return"interpolate"===this.operator?Ow[this.type.kind.toLowerCase()](h,c,u):"interpolate-hcl"===this.operator?Bw.reverse(Bw.interpolate(Bw.forward(h),Bw.forward(c),u)):Dw.reverse(Dw.interpolate(Dw.forward(h),Dw.forward(c),u))},Ww.prototype.eachChild=function(t){t(this.input);for(var n=0,i=this.outputs;n=i.length)throw new qg("Array index out of bounds: "+n+" > "+(i.length-1)+".");if(n!==Math.floor(n))throw new qg("Array index must be an integer, but found "+n+" instead.");return i[n]},Hw.prototype.eachChild=function(t){t(this.index),t(this.input)},Hw.prototype.outputDefined=function(){return!1},Hw.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Yw=function(t,n){this.type=mg,this.needle=t,this.haystack=n};Yw.parse=function(t,n){if(3!==t.length)return n.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,wg),r=n.parse(t[2],2,wg);return i&&r?kg(i.type,[mg,pg,dg,vg,wg])?new Yw(i,r):n.error("Expected first argument to be of type boolean, string, number or null, but found "+Sg(i.type)+" instead"):null},Yw.prototype.evaluate=function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!Tg(n,["boolean","string","number","null"]))throw new qg("Expected first argument to be of type boolean, string, number or null, but found "+Sg(Lg(n))+" instead.");if(!Tg(i,["string","array"]))throw new qg("Expected second argument to be of type array or string, but found "+Sg(Lg(i))+" instead.");return i.indexOf(n)>=0},Yw.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Yw.prototype.outputDefined=function(){return!0},Yw.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Zw=function(t,n,i){this.type=dg,this.needle=t,this.haystack=n,this.fromIndex=i};Zw.parse=function(t,n){if(t.length<=2||t.length>=5)return n.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,wg),r=n.parse(t[2],2,wg);if(!i||!r)return null;if(!kg(i.type,[mg,pg,dg,vg,wg]))return n.error("Expected first argument to be of type boolean, string, number or null, but found "+Sg(i.type)+" instead");if(4===t.length){var e=n.parse(t[3],3,dg);return e?new Zw(i,r,e):null}return new Zw(i,r)},Zw.prototype.evaluate=function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Tg(n,["boolean","string","number","null"]))throw new qg("Expected first argument to be of type boolean, string, number or null, but found "+Sg(Lg(n))+" instead.");if(!Tg(i,["string","array"]))throw new qg("Expected second argument to be of type array or string, but found "+Sg(Lg(i))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(n,r)}return i.indexOf(n)},Zw.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},Zw.prototype.outputDefined=function(){return!1},Zw.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var $w=function(t,n,i,r,e,o){this.inputType=t,this.type=n,this.input=i,this.cases=r,this.outputs=e,this.otherwise=o};$w.parse=function(t,n){if(t.length<5)return n.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return n.error("Expected an even number of arguments.");var i,r;n.expectedType&&"value"!==n.expectedType.kind&&(r=n.expectedType);for(var e={},o=[],s=2;sNumber.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof l&&Math.floor(l)!==l)return h.error("Numeric branch labels must be integer values.");if(i){if(h.checkSubtype(i,Lg(l)))return null}else i=Lg(l);if(void 0!==e[String(l)])return h.error("Branch labels must be unique.");e[String(l)]=o.length}var v=n.parse(u,s,r);if(!v)return null;r=r||v.type,o.push(v)}var d=n.parse(t[1],1,wg);if(!d)return null;var p=n.parse(t[t.length-1],t.length-1,r);return p?"value"!==d.type.kind&&n.concat(1).checkSubtype(i,d.type)?null:new $w(i,r,d,e,o,p):null},$w.prototype.evaluate=function(t){var n=this.input.evaluate(t);return(Lg(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)},$w.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},$w.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},$w.prototype.serialize=function(){for(var t=this,n=["match",this.input.serialize()],i=[],r={},e=0,o=Object.keys(this.cases).sort();e=5)return n.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,wg),r=n.parse(t[2],2,dg);if(!i||!r)return null;if(!kg(i.type,[Mg(wg),pg,wg]))return n.error("Expected first argument to be of type array or string, but found "+Sg(i.type)+" instead");if(4===t.length){var e=n.parse(t[3],3,dg);return e?new Qw(i.type,i,r,e):null}return new Qw(i.type,i,r)},Qw.prototype.evaluate=function(t){var n=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!Tg(n,["string","array"]))throw new qg("Expected first argument to be of type array or string, but found "+Sg(Lg(n))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return n.slice(i,r)}return n.slice(i)},Qw.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Qw.prototype.outputDefined=function(){return!1},Qw.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var rb=ib("==",(function(t,n,i){return n===i}),nb),eb=ib("!=",(function(t,n,i){return n!==i}),(function(t,n,i,r){return!nb(0,n,i,r)})),ob=ib("<",(function(t,n,i){return n",(function(t,n,i){return n>i}),(function(t,n,i,r){return r.compare(n,i)>0})),ab=ib("<=",(function(t,n,i){return n<=i}),(function(t,n,i,r){return r.compare(n,i)<=0})),ub=ib(">=",(function(t,n,i){return n>=i}),(function(t,n,i,r){return r.compare(n,i)>=0})),hb=function(t,n,i,r,e){this.type=pg,this.number=t,this.locale=n,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=e};hb.parse=function(t,n){if(3!==t.length)return n.error("Expected two arguments.");var i=n.parse(t[1],1,dg);if(!i)return null;var r=t[2];if("object"!=typeof r||Array.isArray(r))return n.error("NumberFormat options argument must be an object.");var e=null;if(r.locale&&!(e=n.parse(r.locale,1,pg)))return null;var o=null;if(r.currency&&!(o=n.parse(r.currency,1,pg)))return null;var s=null;if(r["min-fraction-digits"]&&!(s=n.parse(r["min-fraction-digits"],1,dg)))return null;var a=null;return r["max-fraction-digits"]&&!(a=n.parse(r["max-fraction-digits"],1,dg))?null:new hb(i,e,o,s,a)},hb.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},hb.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},hb.prototype.outputDefined=function(){return!1},hb.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var cb=function(t){this.type=dg,this.input=t};cb.parse=function(t,n){if(2!==t.length)return n.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?n.error("Expected argument of type string or array, but found "+Sg(i.type)+" instead."):new cb(i):null},cb.prototype.evaluate=function(t){var n=this.input.evaluate(t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new qg("Expected value to be of type string or array, but found "+Sg(Lg(n))+" instead.")},cb.prototype.eachChild=function(t){t(this.input)},cb.prototype.outputDefined=function(){return!1},cb.prototype.serialize=function(){var t=["length"];return this.eachChild((function(n){t.push(n.serialize())})),t};var fb={"==":rb,"!=":eb,">":sb,"<":ob,">=":ub,"<=":ab,array:Bg,at:Hw,boolean:Bg,case:Kw,coalesce:Jw,collator:Zg,format:Ug,image:Wg,in:Yw,"index-of":Zw,interpolate:Ww,"interpolate-hcl":Ww,"interpolate-lab":Ww,length:cb,let:Xw,literal:Gg,match:$w,number:Bg,"number-format":hb,object:Bg,slice:Qw,step:jw,string:Bg,"to-boolean":Jg,"to-color":Jg,"to-number":Jg,"to-string":Jg,var:gw,within:dw};function lb(t,n){var i=n[0],r=n[1],e=n[2],o=n[3];i=i.evaluate(t),r=r.evaluate(t),e=e.evaluate(t);var s=o?o.evaluate(t):1,a=Ig(i,r,e,s);if(a)throw new qg(a);return new Eg(i/255*s,r/255*s,e/255*s,s)}function vb(t,n){return t in n}function db(t,n){var i=n[t];return void 0===i?null:i}function pb(t){return{type:t}}function mb(t){return{result:"success",value:t}}function yb(t){return{result:"error",value:t}}function gb(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function wb(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function bb(t){return!!t.expression&&t.expression.interpolated}function xb(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function jb(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Mb(t){return t}function Sb(t,n){var i,r,e,o="color"===n.type,s=t.stops&&"object"==typeof t.stops[0][0],a=s||void 0!==t.property,u=s||!a,h=t.type||(bb(n)?"exponential":"interval");if(o&&((t=cg({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],Eg.parse(t[1])]}))),t.default?t.default=Eg.parse(t.default):t.default=Eg.parse(n.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Uw[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===h)i=Tb;else if("interval"===h)i=kb;else if("categorical"===h){i=Ob,r=Object.create(null);for(var c=0,f=t.stops;c=t.stops[r-1][0])return t.stops[r-1][1];var e=xw(t.stops.map((function(t){return t[0]})),i);return t.stops[e][1]}function Tb(t,n,i){var r=void 0!==t.base?t.base:1;if("number"!==xb(i))return _b(t.default,n.default);var e=t.stops.length;if(1===e)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[e-1][0])return t.stops[e-1][1];var o=xw(t.stops.map((function(t){return t[0]})),i),s=function(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)}(i,r,t.stops[o][0],t.stops[o+1][0]),a=t.stops[o][1],u=t.stops[o+1][1],h=Ow[n.type]||Mb;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=Uw[t.colorSpace];h=function(t,n){return c.reverse(c.interpolate(c.forward(t),c.forward(n),s))}}return"function"==typeof a.evaluate?{evaluate:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var i=a.evaluate.apply(void 0,t),r=u.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==r)return h(i,r,s)}}:h(a,u,s)}function Ab(t,n,i){return"color"===n.type?i=Eg.parse(i):"formatted"===n.type?i=Ng.fromString(i.toString()):"resolvedImage"===n.type?i=zg.fromString(i.toString()):xb(i)===n.type||"enum"===n.type&&n.values[i]||(i=void 0),_b(i,t.default,n.default)}Yg.register(fb,{error:[{kind:"error"},[pg],function(t,n){var i=n[0];throw new qg(i.evaluate(t))}],typeof:[pg,[wg],function(t,n){return Sg(Lg(n[0].evaluate(t)))}],"to-rgba":[Mg(dg,4),[yg],function(t,n){return n[0].evaluate(t).toArray()}],rgb:[yg,[dg,dg,dg],lb],rgba:[yg,[dg,dg,dg,dg],lb],has:{type:mg,overloads:[[[pg],function(t,n){return vb(n[0].evaluate(t),t.properties())}],[[pg,gg],function(t,n){var i=n[0],r=n[1];return vb(i.evaluate(t),r.evaluate(t))}]]},get:{type:wg,overloads:[[[pg],function(t,n){return db(n[0].evaluate(t),t.properties())}],[[pg,gg],function(t,n){var i=n[0],r=n[1];return db(i.evaluate(t),r.evaluate(t))}]]},"feature-state":[wg,[pg],function(t,n){return db(n[0].evaluate(t),t.featureState||{})}],properties:[gg,[],function(t){return t.properties()}],"geometry-type":[pg,[],function(t){return t.geometryType()}],id:[wg,[],function(t){return t.id()}],zoom:[dg,[],function(t){return t.globals.zoom}],"heatmap-density":[dg,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[dg,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[dg,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[wg,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[dg,pb(dg),function(t,n){for(var i=0,r=0,e=n;r":[mg,[pg,wg],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e>o}],"filter-id->":[mg,[wg],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r>e}],"filter-<=":[mg,[pg,wg],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e<=o}],"filter-id-<=":[mg,[wg],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r<=e}],"filter->=":[mg,[pg,wg],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e>=o}],"filter-id->=":[mg,[wg],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r>=e}],"filter-has":[mg,[wg],function(t,n){return n[0].value in t.properties()}],"filter-has-id":[mg,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[mg,[Mg(pg)],function(t,n){return n[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[mg,[Mg(wg)],function(t,n){return n[0].value.indexOf(t.id())>=0}],"filter-in-small":[mg,[pg,Mg(wg)],function(t,n){var i=n[0];return n[1].value.indexOf(t.properties()[i.value])>=0}],"filter-in-large":[mg,[pg,Mg(wg)],function(t,n){var i=n[0],r=n[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()[i.value],r.value,0,r.value.length-1)}],all:{type:mg,overloads:[[[mg,mg],function(t,n){var i=n[0],r=n[1];return i.evaluate(t)&&r.evaluate(t)}],[pb(mg),function(t,n){for(var i=0,r=n;i0&&"string"==typeof t[0]&&t[0]in fb}function Pb(t,n){var i=new ww(fb,[],n?function(t){var n={color:yg,string:pg,number:dg,enum:pg,boolean:mg,formatted:xg,resolvedImage:jg};if("array"===t.type)return Mg(n[t.value]||wg,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?mb(new Eb(r,n)):yb(i.errors)}Eb.prototype.evaluateWithoutErrorHandling=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)},Eb.prototype.evaluate=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 qg("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+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}};var Nb=function(t,n){this.kind=t,this._styleExpression=n,this.isStateDependent="constant"!==t&&!mw(n.expression)};Nb.prototype.evaluateWithoutErrorHandling=function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)},Nb.prototype.evaluate=function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)};var zb=function(t,n,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=n,this.isStateDependent="camera"!==t&&!mw(n.expression),this.interpolationType=r};function Ib(t,n){if("error"===(t=Pb(t,n)).result)return t;var i=t.value.expression,r=pw(i);if(!r&&!gb(n))return yb([new fg("","data expressions not supported")]);var e=yw(i,["zoom"]);if(!e&&!wb(n))return yb([new fg("","zoom expressions not supported")]);var o=Lb(i);if(!o&&!e)return yb([new fg("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof fg)return yb([o]);if(o instanceof Ww&&!bb(n))return yb([new fg("",'"interpolate" expressions cannot be used with this property')]);if(!o)return mb(new Nb(r?"constant":"source",t.value));var s=o instanceof Ww?o.interpolation:void 0;return mb(new zb(r?"camera":"composite",t.value,o.labels,s))}zb.prototype.evaluateWithoutErrorHandling=function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)},zb.prototype.evaluate=function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)},zb.prototype.interpolationFactor=function(t,n,i){return this.interpolationType?Ww.interpolationFactor(this.interpolationType,t,n,i):0};var Rb=function(t,n){this._parameters=t,this._specification=n,cg(this,Sb(this._parameters,this._specification))};function Lb(t){var n=null;if(t instanceof Xw)n=Lb(t.result);else if(t instanceof Jw)for(var i=0,r=t.args;i3&&n===t[t.length-2]||(r&&2===t.length||t.push(n),t.push(i))}function Vb(t,n){return t.type?t.type:n.expression.interpolated?"exponential":"interval"}function Jb(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=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var n=0,i=t.slice(1);nn?1:0}function $b(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var n=1;n"===i||"<="===i||">="===i?Qb(t[1],t[2],i):"any"===i?(n=t.slice(1),["any"].concat(n.map(Kb))):"all"===i?["all"].concat(t.slice(1).map(Kb)):"none"===i?["all"].concat(t.slice(1).map(Kb).map(ix)):"in"===i?tx(t[1],t.slice(2)):"!in"===i?ix(tx(t[1],t.slice(2))):"has"===i?nx(t[1]):"!has"===i?ix(nx(t[1])):"within"!==i||t}function Qb(t,n,i){switch(t){case"$type":return["filter-type-"+i,n];case"$id":return["filter-id-"+i,n];default:return["filter-"+i,t,n]}}function tx(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 typeof t!=typeof n[0]}))?["filter-in-large",t,["literal",n.sort(Zb)]]:["filter-in-small",t,["literal",n]]}}function nx(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function ix(t){return["!",t]}var rx=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ex(t,n){var i={};for(var r in t)"ref"!==r&&(i[r]=t[r]);return rx.forEach((function(t){t in n&&(i[t]=n[t])})),i}var ox=function(t,n,i,r){this.message=(t?t+": ":"")+i,r&&(this.identifier=r),null!=n&&n.ul&&(this.line=n.ul)},sx=function(t){this.error=t,this.message=t.message;var n=t.message.match(/line (\d+)/);this.line=n?parseInt(n[1],10):0};function ax(t){var n=t.key,i=t.value;return i?[new ox(n,i,"constants have been deprecated as of v8")]:[]}function ux(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function hx(t){if(Array.isArray(t))return t.map(hx);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var n={};for(var i in t)n[i]=hx(t[i]);return n}return ux(t)}function cx(t){var n=t.key,i=t.value,r=t.valueSpec||{},e=t.objectElementValidators||{},o=t.style,s=t.styleSpec,a=[],u=xb(i);if("object"!==u)return[new ox(n,i,"object expected, "+u+" found")];for(var h in i){var c=h.split(".")[0],f=r[c]||r["*"],l=void 0;if(e[c])l=e[c];else if(r[c])l=Ax;else if(e["*"])l=e["*"];else{if(!r["*"]){a.push(new ox(n,i[h],'unknown property "'+h+'"'));continue}l=Ax}a=a.concat(l({key:(n?n+".":n)+h,value:i[h],valueSpec:f,style:o,styleSpec:s,object:i,objectKey:h},i))}for(var v in r)e[v]||r[v].required&&void 0===r[v].default&&void 0===i[v]&&a.push(new ox(n,i,'missing required property "'+v+'"'));return a}function fx(t){var n=t.value,i=t.valueSpec,r=t.style,e=t.styleSpec,o=t.key,s=t.arrayElementValidator||Ax;if("array"!==xb(n))return[new ox(o,n,"array expected, "+xb(n)+" found")];if(i.length&&n.length!==i.length)return[new ox(o,n,"array length "+i.length+" expected, length "+n.length+" found")];if(i["min-length"]&&n.lengtha)return[new ox(n,i,i+" is greater than the maximum value "+a)]}return[]}function vx(t){var n,i,r,e=t.valueSpec,o=ux(t.value.type),s={},a="categorical"!==o&&void 0===t.value.property,u=!a,h="array"===xb(t.value.stops)&&"array"===xb(t.value.stops[0])&&"object"===xb(t.value.stops[0][0]),c=cx({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 ox(t.key,t.value,'identity function may not have a "stops" property')];var n=[],i=t.value;n=n.concat(fx({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===xb(i)&&0===i.length&&n.push(new ox(t.key,i,"array must have at least one stop"));return n},default:function(t){return Ax({key:t.key,value:t.value,valueSpec:e,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&a&&c.push(new ox(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new ox(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!bb(t.valueSpec)&&c.push(new ox(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!gb(t.valueSpec)?c.push(new ox(t.key,t.value,"property functions not supported")):a&&!wb(t.valueSpec)&&c.push(new ox(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!h||void 0!==t.value.property||c.push(new ox(t.key,t.value,'"property" property is required')),c;function f(t){var n=[],o=t.value,a=t.key;if("array"!==xb(o))return[new ox(a,o,"array expected, "+xb(o)+" found")];if(2!==o.length)return[new ox(a,o,"array length 2 expected, length "+o.length+" found")];if(h){if("object"!==xb(o[0]))return[new ox(a,o,"object expected, "+xb(o[0])+" found")];if(void 0===o[0].zoom)return[new ox(a,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new ox(a,o,"object stop key must have value")];if(r&&r>ux(o[0].zoom))return[new ox(a,o[0].zoom,"stop zoom values must appear in ascending order")];ux(o[0].zoom)!==r&&(r=ux(o[0].zoom),i=void 0,s={}),n=n.concat(cx({key:a+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:lx,value:l}}))}else n=n.concat(l({key:a+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return Cb(hx(o[1]))?n.concat([new ox(a+"[1]",o[1],"expressions are not allowed in function stops.")]):n.concat(Ax({key:a+"[1]",value:o[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function l(t,r){var a=xb(t.value),u=ux(t.value),h=null!==t.value?t.value:r;if(n){if(a!==n)return[new ox(t.key,h,a+" stop domain type must match previous stop domain type "+n)]}else n=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new ox(t.key,h,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==o){var c="number expected, "+a+" found";return gb(e)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ox(t.key,h,c)]}return"categorical"!==o||"number"!==a||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===a&&void 0!==i&&u":case">=":n.length>=2&&"$type"===ux(n[1])&&o.push(new ox(i,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&o.push(new ox(i,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(r=xb(n[1]))&&o.push(new ox(i+"[1]",n[1],"string expected, "+r+" found"));for(var s=2;sh&&_.push("'"+this.cl[j]+"'");k=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.cl[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(g==c?"end of input":"'"+(this.cl[g]||g)+"'"),this.parseError(k,{text:l.match,token:this.cl[g]||g,line:l.yylineno,loc:p,expected:_})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+g);switch(b[0]){case 1:i.push(g),r.push(l.yytext),e.push(l.yylloc),i.push(b[1]),g=null,u=l.yyleng,s=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(M=this.fl[b[1]][1],O.$=r[r.length-M],O._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},m&&(O._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),void 0!==(x=this.performAction.apply(O,[s,u,a,v.yy,b[1],r,e].concat(f))))return x;M&&(i=i.slice(0,-1*M*2),r=r.slice(0,-1*M),e=e.slice(0,-1*M)),i.push(this.fl[b[1]][0]),r.push(O.$),e.push(O._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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;on[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 Ix(t){if(t instanceof String||"string"==typeof t||t instanceof Buffer)try{return zx.parse(t.toString())}catch(t){throw new sx(t)}return t}function Rx(t,n){void 0===n&&(n=Ly);var i=t;try{i=Ix(i)}catch(t){return[t]}return Cx(i,n)}new Set(["vector","raster","raster-dem"]);var Lx=Cb,Fx=Ib,Gx=Gb,qx=jb;Rx.parsed=Rx,Rx.latest=Rx;"function"==typeof Object.assign&&Object.assign;function Dx(t){return t*Math.PI/180}var Bx=function(){for(var t=[],n=78271.51696402048;t.length<=24;n/=2)t.push(n);return t}();function Ux(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 Wx,Vx=Array(256).join(" ");function Jx(t,n){if(n>=.05){for(var i="",r=t.split("\n"),e=Vx.slice(0,Math.round(n/.1)),o=0,s=r.length;o0&&(i+="\n"),i+=r[o].split("").join(e);return i}return t}function Xx(){return Wx||(Wx=Ux(1,1).getContext("2d")),Wx}function Hx(t,n){return Xx().measureText(t).width+(t.length-1)*n}var Yx={};function Zx(t,n,i,r){if(-1!==t.indexOf("\n")){for(var e=t.split("\n"),o=[],s=0,a=e.length;s1){var f=Xx();f.font=n;var l=f.measureText("M").width*i,v="";for(o=[],s=0,a=c.length;s1;++s){var m=o[s];if(Hx(m,r)<.35*l){var y=s>0?Hx(o[s-1],r):1/0,g=s.7*l&&Hx(b,r)<.6*l){var x=w.split(" "),j=x.pop();Hx(j,r)<.2*l&&(o[s]=x.join(" "),o[s+1]=j+" "+b),a-=1}}h=o.join("\n")}else h=t;h=Jx(h,r),Yx[u]=h}return h}ks&&H(ks,I,(function(){Yx={}}));var $x,Kx,Qx=qx,tj=Gx,nj=Lx,ij=Fx,rj={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ej={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]},oj={},sj={zoom:0},aj={};function uj(t,n,i,r,e){var o=t.id;aj[o]||(aj[o]={});var s=aj[o];if(!s[i]){var a=(t[n]||oj)[i],u=Ly[n+"_"+t.type][i];void 0===a&&(a=u.default);var h=nj(a);if(!h&&Qx(a)&&(a=tj(a,u),h=!0),h){var c=function(t,n){var i=ij(t,n);if("error"===i.result)throw new Error(i.value.map((function(t){return t.key+": "+t.message})).join(", "));return i.value}(a,u);s[i]=c.evaluate.bind(c)}else"color"==u.type&&(a=Eg.parse(a)),s[i]=function(){return a}}return sj.zoom=r,s[i](sj,e)}var hj={};function cj(t,n){if(t){if(0===t.a||0===n)return;var i=t.a;return n=void 0===n?1:n,"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*n+")"}return t}var fj=/^([^]*)\{(.*)\}([^]*)$/;function lj(t,n){var i;do{if(i=t.match(fj)){var r=n[i[2]]||"";t=i[1]+r+i[3]}}while(i);return t}var vj=!1;function dj(t,n,i,r,e,o,s){if(void 0===r&&(r=Bx),"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 h=new Image;h.crossOrigin="anonymous",h.onload=function(){a=h,u=[h.width,h.height],t.changed(),h.onload=null},h.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var c=self;c.postMessage({action:"loadImage",src:o}),c.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=m.maxzoom)return"continue";var b=m.filter;if(!b||function(t,n,i,r){return t in hj||(hj[t]=Yb(n).filter),sj.zoom=r,hj[t](sj,i)}(y,b,l,h)){c=m;var x=void 0,j=void 0,T=void 0,A=void 0,E=void 0,C=void 0,P=p.index;if(3==f&&("fill"==m.type||"fill-extrusion"==m.type))if(j=uj(m,"paint",m.type+"-opacity",h,l),m.type+"-pattern"in w){var N=uj(m,"paint",m.type+"-pattern",h,l);if(N){var z="string"==typeof N?lj(N,i):N.toString();if(a&&e&&e[z]){++d,(C=k[d])&&C.getFill()&&!C.getStroke()&&!C.getText()||(C=new Gl({fill:new gl}),k[d]=C),T=C.getFill(),C.setZIndex(P);var I=O[ht=z+"."+j];if(!I)(lt=(ft=Ux((ct=e[z]).width,ct.height)).getContext("2d")).globalAlpha=j,lt.drawImage(a,ct.x,ct.y,ct.width,ct.height,0,0,ct.width,ct.height),I=lt.createPattern(ft,"repeat"),O[ht]=I;T.setColor(I)}}}else(x=cj(uj(m,"paint",m.type+"-color",h,l),j))&&(m.type+"-outline-color"in w&&(E=cj(uj(m,"paint",m.type+"-outline-color",h,l),j)),E||(E=x),++d,(C=k[d])&&C.getFill()&&C.getStroke()&&!C.getText()||(C=new Gl({fill:new gl,stroke:new Pl}),k[d]=C),(T=C.getFill()).setColor(x),(A=C.getStroke()).setColor(E),A.setWidth(1),C.setZIndex(P));if(1!=f&&"line"==m.type){x=!("line-pattern"in w)&&"line-color"in w?cj(uj(m,"paint","line-color",h,l),uj(m,"paint","line-opacity",h,l)):void 0;var R=uj(m,"paint","line-width",h,l);x&&R>0&&(++d,(C=k[d])&&C.getStroke()&&!C.getFill()&&!C.getText()||(C=new Gl({stroke:new Pl}),k[d]=C),(A=C.getStroke()).setLineCap(uj(m,"layout","line-cap",h,l)),A.setLineJoin(uj(m,"layout","line-join",h,l)),A.setMiterLimit(uj(m,"layout","line-miter-limit",h,l)),A.setColor(x),A.setWidth(R),A.setLineDash(w["line-dasharray"]?uj(m,"paint","line-dasharray",h,l).map((function(t){return t*R})):null),C.setZIndex(P))}var L=!1,F=null,G=0,q=void 0,D=void 0,B=void 0;if((1==f||2==f)&&"icon-image"in g){var U=uj(m,"layout","icon-image",h,l);if(U){q="string"==typeof U?lj(U,i):U.toString();var W=void 0;if(a&&e&&e[q]){var V=uj(m,"layout","icon-rotation-alignment",h,l);if(2==f){var J=t.getGeometry();if(J.getFlatMidpoint||J.getFlatMidpoints){var X=J.getExtent();if(Math.sqrt(Math.max(Math.pow((X[2]-X[0])/n,2),Math.pow((X[3]-X[1])/n,2)))>150){var H="MultiLineString"===J.getType()?J.getFlatMidpoints():J.getFlatMidpoint();if(Kx||(Kx=new Wm("Point",$x=[NaN,NaN],[],{},null)),W=Kx,$x[0]=H[0],$x[1]=H[1],"line"===(Pt=uj(m,"layout","symbol-placement",h,l))&&"map"===V)for(var Y=J.getStride(),Z=J.getFlatCoordinates(),$=0,K=Z.length-Y;$=rt&&H[0]<=ot&&H[1]>=et&&H[1]<=st){G=Math.atan2(tt-it,nt-Q);break}}}}}if(2!==f||W){var at=uj(m,"layout","icon-size",h,l),ut=void 0!==w["icon-color"]?uj(m,"paint","icon-color",h,l):null;if(!ut||0!==ut.a){var ht=q+"."+at;if(null!==ut&&(ht+="."+ut),!(D=_[ht])){var ct=e[q];if(null!==ut){var ft,lt;(lt=(ft=Ux(ct.width,ct.height)).getContext("2d")).drawImage(a,ct.x,ct.y,ct.width,ct.height,0,0,ct.width,ct.height);for(var vt=lt.getImageData(0,0,ft.width,ft.height),dt=0,pt=vt.data.length;dt0?new Pl({width:bt,color:gt}):void 0,fill:wt?new gl({color:wt}):void 0}),_[xt]=D),C.setImage(D),F=C.getText(),C.setText(void 0),C.setGeometry(void 0),C.setZIndex(P),L=!0}var jt=void 0;if("text-field"in g)jt=lj(uj(m,"layout","text-field",h,l).toString(),i).trim(),j=uj(m,"paint","text-opacity",h,l);if(jt&&j&&!B){L||(++d,(C=k[d])&&C.getText()&&!C.getFill()&&!C.getStroke()||(C=new Gl,k[d]=C),C.setImage(void 0),C.setGeometry(void 0)),C.getText()||C.setText(F||new Bl({padding:[2,2,2,2]})),F=C.getText();var Mt=Math.round(uj(m,"layout","text-size",h,l)),St=uj(m,"layout","text-font",h,l),_t=uj(m,"layout","text-line-height",h,l),Ot=Ry(s?s(St):St,Mt,_t),kt=g["text-transform"];"uppercase"==kt?jt=jt.toUpperCase():"lowercase"==kt&&(jt=jt.toLowerCase());var Tt=uj(m,"layout","text-max-width",h,l),At=uj(m,"layout","text-letter-spacing",h,l),Et=2==f?Jx(jt,At):Zx(jt,Ot,Tt,At);F.setText(Et),F.setFont(Ot),F.setRotation(Dx(uj(m,"layout","text-rotate",h,l)));var Ct=uj(m,"layout","text-anchor",h,l),Pt=L||1==f?"point":uj(m,"layout","symbol-placement",h,l);F.setPlacement(Pt);var Nt=uj(m,"paint","text-halo-width",h,l),zt=uj(m,"layout","text-offset",h,l),It=uj(m,"paint","text-translate",h,l),Rt=0,Lt=0;if("point"==Pt){var Ft="center";-1!==Ct.indexOf("left")?(Ft="left",Lt=Nt):-1!==Ct.indexOf("right")&&(Ft="right",Lt=-Nt),F.setTextAlign(Ft);var Gt=uj(m,"layout","text-rotation-alignment",h,l);F.setRotateWithView("map"==Gt)}else F.setMaxAngle(Dx(uj(m,"layout","text-max-angle",h,l))*jt.length/Et.length),F.setTextAlign(),F.setRotateWithView(!1);var qt="middle";0==Ct.indexOf("bottom")?(qt="bottom",Rt=-Nt-.5*(_t-1)*Mt):0==Ct.indexOf("top")&&(qt="top",Rt=Nt+.5*(_t-1)*Mt),F.setTextBaseline(qt),F.setOffsetX(zt[0]*Mt+Lt+It[0]),F.setOffsetY(zt[1]*Mt+Rt+It[1]),S.setColor(cj(uj(m,"paint","text-color",h,l),j)),F.setFill(S);var Dt=cj(uj(m,"paint","text-halo-color",h,l),j);if(Dt){M.setColor(Dt),Nt*=2;var Bt=.5*Mt;M.setWidth(Nt<=Bt?Nt:Bt),F.setStroke(M)}else F.setStroke(void 0);var Ut=uj(m,"layout","text-padding",h,l),Wt=F.getPadding();Ut!==Wt[0]&&(Wt[0]=Ut,Wt[1]=Ut,Wt[2]=Ut,Wt[3]=Ut),C.setZIndex(P)}}},m=0,y=o.length;m-1?(k.length=d+1,vj&&("function"==typeof t.set?t.set("mapbox-layer",c):t.getProperties()["mapbox-layer"]=c),k):void 0}};return t.setStyle(T),t.set("mapbox-source",f),t.set("mapbox-layers",d),T}var pj,mj=i(975),yj=/font-family: ?([^;]*);/,gj=/("|')/g;function wj(t){if(!pj){pj={};for(var n=document.styleSheets,i=0,r=n.length;i2?r[2]:""):t+i}function Oj(t,n,i,r,e){return new Promise((function(o,s){if("object"!=typeof n&&(n=JSON.parse(n)),8!=n.version)return s(new Error("glStyle version 8 required."));if(!(t instanceof Hm||t instanceof _y))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,u,h;function c(){h||n.sprite&&!a?h?(t.setStyle(h),o()):s(new Error("Something went wrong trying to apply style.")):(h=dj(t,n,i,e,a,u,jj),t.getStyle()?o():s(new Error("Nothing to show for source ["+i+"]")))}if(n.sprite){var f=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",l=_j(n.sprite,r,f+".json");fetch(l,{credentials:"same-origin"}).then((function(t){return t.ok||""===f?t:(l=_j(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 "+l+": "+t.statusText))})).then((function(t){if(void 0===t)return s(new Error("No sprites found."));a=t,u=_j(n.sprite,r,f+".png"),c()})).catch((function(t){s(new Error("Sprites cannot be loaded: "+l+": "+t.message))}))}else c()}))}new Iy;var kj=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)}}(),Tj="https://api.mapbox.com";function Aj(t){var n="mapbox://";return 0!==t.indexOf(n)?"":t.slice(n.length)}function Ej(t,n){var i=Aj(t);if(!i)return t;var r="sprites/";if(0!==i.indexOf(r))throw new Error("unexpected sprites url: "+t);var e=i.slice(r.length);return Tj+"/styles/v1/"+e+"/sprite?access_token="+n}function Cj(t,n){var i=Aj(t);if(!i)return t;var r="fonts/";if(0!==i.indexOf(r))throw new Error("unexpected fonts url: "+t);var e=i.slice(r.length);return Tj+"/fonts/v1/"+e+"/0-255.pbf?access_token="+n}function Pj(t,n){var i=Aj(t);if(!i)return t;var r="styles/";if(0!==i.indexOf(r))throw new Error("unexpected style url: "+t);var e=i.slice(r.length);return Tj+"/styles/v1/"+e+"?&access_token="+n}function Nj(t,n){var i=Aj(t);return i?"https://{a-d}.tiles.mapbox.com/v4/"+i+"/{z}/{x}/{y}.vector.pbf?access_token="+n:t}var zj=function(t){function n(n){var i=t.call(this,z)||this;return i.error=n,i}return kj(n,t),n}(c),Ij="vector",Rj=function(t){function n(n){var i=this,r=!("declutter"in n)||n.declutter,e=new bp({state:Zo,format:new My});return(i=t.call(this,{source:e,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).sourceId=n.source,i.layers=n.layers,i.accessToken=n.accessToken,i.fetchStyle(n.styleUrl),i}return kj(n,t),n.prototype.fetchStyle=function(t){var n=this,i=Pj(t,this.accessToken);fetch(i).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: "+t.status);return t.json()})).then((function(t){n.onStyleLoad(t)})).catch((function(t){n.handleError(t)}))},n.prototype.onStyleLoad=function(t){var n,i,r=this;if(this.layers){for(var e={},o=0;o0){this.gl&&(this.gl.clear(),this.gl.addFeatures(f)),this.dispatchEvent(new Uj(Bj,t,f,o));break}}},n.prototype.xl=function(){var t=this.getMap();if(t){var n=this.target?this.target:t.getViewport();this.yl=[H(n,D,this.handleDrop,this),H(n,G,this.handleStop,this),H(n,q,this.handleStop,this),H(n,D,this.handleStop,this)]}},n.prototype.setActive=function(n){!this.getActive()&&n&&this.xl(),this.getActive()&&!n&&this.jl(),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.jl(),t.prototype.setMap.call(this,n),this.getActive()&&this.xl()},n.prototype.bl=function(t,n,i){try{return t.readFeatures(n,i)}catch(t){return null}},n.prototype.jl=function(){this.yl&&(this.yl.forEach(Z),this.yl=null)},n.prototype.handleDrop=function(t){for(var n=t.dataTransfer.files,i=0,r=n.length;i1?1:-1;return n.endInteraction(this.gr,i),this.he=0,!1},n.prototype.handleDownEvent=function(t){return!!xu(t)&&(!!this.Cr(t)&&(t.map.getView().beginInteraction(),this.Nr=void 0,this.Ml=void 0,!0))},n}(uu),Xj=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)}}(),Hj=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 Xj(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=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||_n(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=this.Rl?(this.Ol=n.pixel,this._l=!this.El,i=!0):this.Tl=void 0,this._l&&void 0!==this.kl&&(clearTimeout(this.kl),this.kl=void 0));return this.El&&n.type===Hs.POINTERDRAG&&null!==this.Fl?(this.Xl(n.coordinate),r=!1):this.El&&n.type===Hs.POINTERDOWN?r=!1:i&&this.getPointerCount()<2?(r=n.type===Hs.POINTERMOVE)&&this.El?(this.In(n),this._l&&n.originalEvent.preventDefault()):("mouse"===n.originalEvent.pointerType||n.type===Hs.POINTERDRAG&&void 0===this.kl)&&this.In(n):n.type===Hs.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,n)&&r},n.prototype.handleDownEvent=function(t){return this._l=!this.El,this.El?(this.Ol=t.pixel,this.Ll||this.Hl(t.coordinate),!0):this.Cr(t)?(this.Tl=Date.now(),this.kl=setTimeout(function(){this.In(new Xs(Hs.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.Rl),this.Ol=t.pixel,!0):(this.Tl=void 0,!1)},n.prototype.handleUpEvent=function(t){var n=!0;if(0===this.getPointerCount())if(this.kl&&(clearTimeout(this.kl),this.kl=void 0),this.In(t),this._l){var i=!this.Ll;i&&this.Hl(t.coordinate),!i&&this.El?this.finishDrawing():this.El||i&&this.Kr!==$j||(this.Yl(t.pixel)?this.Il(t)&&this.finishDrawing():this.Xl(t.coordinate)),n=!1}else this.El&&this.abortDrawing();return!n&&this.Pl&&t.preventDefault(),n},n.prototype.In=function(t){if(this.Al=t.originalEvent.pointerType,this.Ol&&(!this.El&&this._l||this.El&&!this._l)){var n=this.Ol,i=t.pixel,r=n[0]-i[0],e=n[1]-i[1],o=r*r+e*e;if(this._l=this.El?o>this.Ul:o<=this.Ul,!this._l)return}this.Ll?this.Zl(t.coordinate):this.$l(t)},n.prototype.Yl=function(t){var n=!1;if(this.Fl){var i=!1,r=[this.Ll],e=this.Kr;if(e===$j)n=!0;else if(e===tM)n=2===this.ql.length;else if(e===Kj)i=this.ql.length>this.Nl;else if(e===Qj){var o=this.ql;i=o[0].length>this.Nl,r=[o[0][0],o[0][o[0].length-2]]}if(i)for(var s=this.getMap(),a=0,u=r.length;a=this.zl&&(this.El?i.pop():n=!0),i.push(t.slice()),this.Ps(i,r,e)):o===Qj&&((i=this.ql[0]).length>=this.zl&&(this.El?i.pop():n=!0),i.push(t.slice()),n&&(this.Ll=i[0]),this.Ps(this.ql,r,e)),this.Kl(),n&&this.finishDrawing()},n.prototype.removeLastPoint=function(){if(this.Fl){var t,n=this.Fl.getGeometry(),i=this.getMap().getView().getProjection(),r=this.Kr;if(r===Kj||r===tM){if((t=this.ql).splice(-2,1),t.length>=2){this.Ll=t[t.length-2].slice();var e=this.Ll.slice();t[t.length-1]=e,this.Gl.setGeometry(new ne(e))}this.Ps(t,n,i),n.getType()===gt.POLYGON&&this.Dl&&this.Ql(n)}else if(r===Qj){(t=this.ql[0]).splice(-2,1);var o=this.Dl.getGeometry();if(t.length>=2){e=t[t.length-2].slice();t[t.length-1]=e,this.Gl.setGeometry(new ne(e))}o.setCoordinates(t),this.Ps(this.ql,n,i)}1===t.length&&this.abortDrawing(),this.Kl()}},n.prototype.finishDrawing=function(){var t=this.tv();if(t){var n=this.ql,i=t.getGeometry(),r=this.getMap().getView().getProjection();this.Kr===Kj?(n.pop(),this.Ps(n,i,r)):this.Kr===Qj&&(n[0].pop(),this.Ps(n,i,r),n=i.getCoordinates()),this.Xc===gt.MULTI_POINT?t.setGeometry(new dy([n])):this.Xc===gt.MULTI_LINE_STRING?t.setGeometry(new ly([n])):this.Xc===gt.MULTI_POLYGON&&t.setGeometry(new my([n])),this.dispatchEvent(new eM(iM,t)),this.we&&this.we.push(t),this.gl&&this.gl.addFeature(t)}},n.prototype.tv=function(){this.Ll=null;var t=this.Fl;return this.Fl=null,this.Gl=null,this.Dl=null,this.Wl.getSource().clear(!0),t},n.prototype.abortDrawing=function(){var t=this.tv();t&&this.dispatchEvent(new eM(rM,t))},n.prototype.appendCoordinates=function(t){var n,i=this.Kr,r=!this.Fl;if(r&&this.Hl(t[0]),i===Kj||i===tM)n=this.ql;else{if(i!==Qj)return;n=this.ql&&this.ql.length?this.ql[0]:[]}r&&n.shift(),n.pop();for(var e=0;ef?o[1]:o[0]),s}}return null},n.prototype.In=function(t){var n=t.pixel,i=t.map,r=this.uv(n,i);r||(r=i.getCoordinateFromPixelInternal(n)),this.hv(r)},n.prototype.cv=function(t){var n=this.ev;return n?t?n.setGeometry(Se(t)):n.setGeometry(void 0):(n=new vt(t?Se(t):{}),this.ev=n,this.sv.getSource().addFeature(n)),n},n.prototype.hv=function(t){var n=this.ov;n?n.getGeometry().setCoordinates(t):(n=new vt(new ne(t)),this.ov=n,this.av.getSource().addFeature(n));return n},n.prototype.handleEvent=function(n){return!n.originalEvent||!this.Cr(n)||(n.type!=Hs.POINTERMOVE||this.handlingDownUpSequence||this.In(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.uv(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.nv=cM(o(e)):null!==s?this.nv=fM(o([s,r[1]]),o([s,r[3]])):null!==a&&(this.nv=fM(o([r[0],a]),o([r[2],a])))}else e=i.getCoordinateFromPixelInternal(n),this.setExtent([e[0],e[1],e[0],e[1]]),this.nv=cM(e);return!0},n.prototype.handleDragEvent=function(t){if(this.nv){var n=t.coordinate;this.setExtent(this.nv(n)),this.hv(n)}},n.prototype.handleUpEvent=function(t){this.nv=null;var n=this.getExtentInternal();return n&&0!==On(n)||this.setExtent(null),!1},n.prototype.setMap=function(n){this.sv.setMap(n),this.av.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getExtent=function(){return vr(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.B},n.prototype.setExtent=function(t){this.B=t||null,this.cv(t),this.dispatchEvent(new uM(this.B))},n}(uu),vM=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)}}(),dM=[0,0,0,0],pM=[],mM="modifystart",yM="modifyend",gM=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.features=i,e.mapBrowserEvent=r,e}return vM(n,t),n}(c);function wM(t,n){return t.index-n.index}function bM(t,n,i){var r=n.geometry;if(r.getType()===gt.CIRCLE){var e=r;if(1===n.index){var o=cr();o&&(e=e.clone().transform(o,i));var s=qi(e.getCenter(),lr(t,i)),a=Math.sqrt(s)-e.getRadius();return a*a}}var u=lr(t,i);return pM[0]=lr(n.segment[0],i),pM[1]=lr(n.segment[1],i),Bi(u,pM)}function xM(t,n,i){var r=n.geometry;if(r.getType()===gt.CIRCLE&&1===n.index){var e=r,o=cr();return o&&(e=e.clone().transform(o,i)),fr(e.getClosestPoint(lr(t,i)),i)}var s=lr(t,i);return pM[0]=lr(n.segment[0],i),pM[1]=lr(n.segment[1],i),fr(zi(s,pM),i)}var jM=function(t){function n(n){var i,r,e=t.call(this,n)||this;if(e.on,e.once,e.un,e.fv=e.eu.bind(e),e.Cr=n.condition?n.condition:ju,e.lv=function(t){return cu(t)&&yu(t)},e.vv=n.deleteCondition?n.deleteCondition:e.lv,e.dv=n.insertVertexCondition?n.insertVertexCondition:du,e.ov=null,e.pv=null,e.mv=[0,0],e.yv=!1,e.gv=null,e.wv=new Vl,e.iv=void 0!==n.pixelTolerance?n.pixelTolerance:10,e.rv=!1,e.bv=!1,e.xv=[],e.Wl=new Hm({source:new kv({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.style?n.style:(i=Ll(),function(t,n){return i[gt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.jv={Point:e.Mv.bind(e),LineString:e.Sv.bind(e),LinearRing:e.Sv.bind(e),Polygon:e._v.bind(e),MultiPoint:e.Ov.bind(e),MultiLineString:e.kv.bind(e),MultiPolygon:e.Tv.bind(e),Circle:e.Av.bind(e),GeometryCollection:e.Ev.bind(e)},e.gl=null,e.Cv=null,n.features?r=n.features:n.source&&(e.gl=n.source,r=new ht(e.gl.getFeatures()),e.gl.addEventListener(gv,e.Pv.bind(e)),e.gl.addEventListener(xv,e.Nv.bind(e))),!r)throw new Error("The modify interaction requires features, a source or a layer");return n.hitDetection&&(e.Cv=n.hitDetection),e.we=r,e.we.forEach(e.zv.bind(e)),e.we.addEventListener(et,e.Iv.bind(e)),e.we.addEventListener(ot,e.Rv.bind(e)),e.Lv=null,e.Sr=[0,0],e.Fv=void 0===n.snapToPointer?!e.Cv:n.snapToPointer,e}return vM(n,t),n.prototype.zv=function(t){var n=t.getGeometry();if(n){var i=this.jv[n.getType()];i&&i(t,n)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.Gv(this.mv,r),t.addEventListener(N,this.fv)},n.prototype.qv=function(t,n){if(!this.gv){this.gv=new ht;for(var i=this.gv.getArray(),r=0,e=n.length;r=0;--r){for(var e=i[r],o=this.xv.length-1;o>=0;--o)this.xv[o][0]===e&&this.xv.splice(o,1);n.remove(e)}},n.prototype.setActive=function(n){this.ov&&!n&&(this.Wl.getSource().removeFeature(this.ov),this.ov=null),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Wl.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getOverlay=function(){return this.Wl},n.prototype.Pv=function(t){t.feature&&this.we.push(t.feature)},n.prototype.Nv=function(t){t.feature&&this.we.remove(t.feature)},n.prototype.Iv=function(t){this.zv(t.element)},n.prototype.eu=function(t){if(!this.bv){var n=t.target;this.Dv(n),this.zv(n)}},n.prototype.Rv=function(t){var n=t.element;this.Dv(n)},n.prototype.Mv=function(t,n){var i=n.getCoordinates(),r={feature:t,geometry:n,segment:[i,i]};this.wv.insert(n.getExtent(),r)},n.prototype.Ov=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r=0;--m)this.Vv(o[m],s)}return!!this.ov},n.prototype.handleUpEvent=function(t){for(var n=this.xv.length-1;n>=0;--n){var i=this.xv[n][0],r=i.geometry;if(r.getType()===gt.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.wv.update(pn(e),o);var a=r,u=cr();if(u){var h=t.map.getView().getProjection();a=_e(a=a.clone().transform(u,h)).transform(h,u)}this.wv.update(a.getExtent(),s)}else this.wv.update(en(i.segment),i)}return this.gv&&(this.dispatchEvent(new gM(yM,this.gv,t)),this.gv=null),!1},n.prototype.In=function(t){this.mv=t.pixel,this.Gv(t.pixel,t.map,t.coordinate)},n.prototype.Gv=function(t,n,i){var r,o,s=this,a=i||n.getCoordinateFromPixel(t),u=n.getView().getProjection();if(this.Cv){var h="object"==typeof this.Cv?function(t){return t===s.Cv}:void 0;n.forEachFeatureAtPixel(t,(function(t,n,i){if((i=i||t.getGeometry()).getType()===gt.POINT&&p(s.we.getArray(),t)){o=i;var e=i.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:i,segment:[e,e]}]}return!0}),{layerFilter:h})}if(!r){var c=vr(on(dr(pn(a,dM),u),n.getView().getResolution()*this.iv,dM),u);r=this.wv.getInExtent(c)}if(r&&r.length>0){var f=r.sort((function(t,n){return bM(a,t,u)-bM(a,n,u)}))[0],l=f.segment,v=xM(a,f,u),d=n.getPixelFromCoordinate(v),m=Di(t,d);if(o||m<=this.iv){var y={};if(y[e(l)]=!0,this.Fv||(this.Sr[0]=v[0]-a[0],this.Sr[1]=v[1]-a[1]),f.geometry.getType()===gt.CIRCLE&&1===f.index)this.rv=!0,this.Uv(v,[f.feature],[f.geometry]);else{var g=n.getPixelFromCoordinate(l[0]),w=n.getPixelFromCoordinate(l[1]),b=qi(d,g),x=qi(d,w);m=Math.sqrt(Math.min(b,x)),this.rv=m<=this.iv,this.rv&&(v=b>x?l[1]:l[0]),this.Uv(v,[f.feature],[f.geometry]);var j={};j[e(f.geometry)]=!0;for(var M=1,S=r.length;M=0;--o)f=e((c=(i=l[o])[0]).feature),c.depth&&(f+="-"+c.depth.join("-")),f in v||(v[f]={}),0===i[1]?(v[f].right=c,v[f].index=c.index):1==i[1]&&(v[f].left=c,v[f].index=c.index+1);for(f in v){switch(h=v[f].right,a=v[f].left,(u=(s=v[f].index)-1)<0&&(u=0),t=n=(r=(c=void 0!==a?a:h).geometry).getCoordinates(),d=!1,r.getType()){case gt.MULTI_LINE_STRING:n[c.depth[0]].length>2&&(n[c.depth[0]].splice(s,1),d=!0);break;case gt.LINE_STRING:n.length>2&&(n.splice(s,1),d=!0);break;case gt.MULTI_POLYGON:t=t[c.depth[1]];case gt.POLYGON:(t=t[c.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.Wv(r,n);var p=[];if(void 0!==a&&(this.wv.remove(a),p.push(a.segment[0])),void 0!==h&&(this.wv.remove(h),p.push(h.segment[1])),void 0!==a&&void 0!==h){var m={depth:c.depth,feature:c.feature,geometry:c.geometry,index:u,segment:p};this.wv.insert(en(m.segment),m)}this.Jv(r,s,c.depth,-1),this.ov&&(this.Wl.getSource().removeFeature(this.ov),this.ov=null),l.length=0}}return d},n.prototype.Wv=function(t,n){this.bv=!0,t.setCoordinates(n),this.bv=!1},n.prototype.Jv=function(t,n,i,r){this.wv.forEachInExtent(t.getExtent(),(function(e){e.geometry===t&&(void 0===i||void 0===e.depth||b(e.depth,i))&&e.index>n&&(e.index+=r)}))},n}(uu),MM=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)}}(),SM="select",_M=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 MM(n,t),n}(c),OM={};var kM=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r,e,o=n||{};if(i.Hv=i.zv.bind(i),i.Yv=i.Dv.bind(i),i.Cr=o.condition?o.condition:yu,i.Zv=o.addCondition?o.addCondition:mu,i.$v=o.removeCondition?o.removeCondition:mu,i.Kv=o.toggleCondition?o.toggleCondition:wu,i.Qv=!!o.multi&&o.multi,i.td=o.filter?o.filter:M,i.rd=o.hitTolerance?o.hitTolerance:0,i.C=void 0!==o.style?o.style:(g((r=Ll())[gt.POLYGON],r[gt.LINE_STRING]),g(r[gt.GEOMETRY_COLLECTION],r[gt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),i.we=o.features||new ht,o.layers)if("function"==typeof o.layers)e=o.layers;else{var s=o.layers;e=function(t){return p(s,t)}}else e=M;return i.ed=e,i.od={},i}return MM(n,t),n.prototype.sd=function(t,n){this.od[e(t)]=n},n.prototype.getFeatures=function(){return this.we},n.prototype.getHitTolerance=function(){return this.rd},n.prototype.getLayer=function(t){return this.od[e(t)]},n.prototype.setHitTolerance=function(t){this.rd=t},n.prototype.setMap=function(n){this.getMap()&&this.C&&this.we.forEach(this.ad.bind(this)),t.prototype.setMap.call(this,n),n?(this.we.addEventListener(et,this.Hv),this.we.addEventListener(ot,this.Yv),this.C&&this.we.forEach(this.ud.bind(this))):(this.we.removeEventListener(et,this.Hv),this.we.removeEventListener(ot,this.Yv))},n.prototype.zv=function(t){var n=t.element;this.C&&this.ud(n)},n.prototype.Dv=function(t){var n=t.element;this.C&&this.ad(n)},n.prototype.getStyle=function(){return this.C},n.prototype.ud=function(t){var n=e(t);n in OM||(OM[n]=t.getStyle()),t.setStyle(this.C)},n.prototype.ad=function(t){for(var i=this.getMap().getInteractions().getArray(),r=i.length-1;r>=0;--r){var o=i[r];if(o!==this&&o instanceof n&&o.getStyle()&&-1!==o.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(o.getStyle())}var s=e(t);t.setStyle(OM[s]),delete OM[s]},n.prototype.hd=function(t){delete this.od[e(t)]},n.prototype.handleEvent=function(t){if(!this.Cr(t))return!0;var n=this.Zv(t),i=this.$v(t),r=this.Kv(t),e=!n&&!i&&!r,o=t.map,s=this.getFeatures(),a=[],u=[];if(e){T(this.od),o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.td(t,n))return u.push(t),this.sd(t,n),!this.Qv}.bind(this),{layerFilter:this.ed,hitTolerance:this.rd});for(var h=s.getLength()-1;h>=0;--h){var c=s.item(h),f=u.indexOf(c);f>-1?u.splice(f,1):(s.remove(c),a.push(c))}0!==u.length&&s.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.td(t,e))return!n&&!r||p(s.getArray(),t)?(i||r)&&p(s.getArray(),t)&&(a.push(t),this.hd(t)):(u.push(t),this.sd(t,e)),!this.Qv}.bind(this),{layerFilter:this.ed,hitTolerance:this.rd});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 _M(SM,u,a,t)),!0},n}(ru),TM=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 AM(t){return t.feature?t.feature:t.element?t.element:void 0}var EM=[],CM=function(t){function n(n){var i=this,r=n||{},e=r;return e.handleDownEvent||(e.handleDownEvent=M),e.stopDown||(e.stopDown=S),(i=t.call(this,e)||this).gl=r.source?r.source:null,i.fd=void 0===r.vertex||r.vertex,i.ld=void 0===r.edge||r.edge,i.we=r.features?r.features:null,i.vd=[],i.dd={},i.pd={},i.md={},i.iv=void 0!==r.pixelTolerance?r.pixelTolerance:10,i.wv=new Vl,i.jv={Point:i.Mv.bind(i),LineString:i.Sv.bind(i),LinearRing:i.Sv.bind(i),Polygon:i._v.bind(i),MultiPoint:i.Ov.bind(i),MultiLineString:i.kv.bind(i),MultiPolygon:i.Tv.bind(i),GeometryCollection:i.Ev.bind(i),Circle:i.Av.bind(i)},i}return TM(n,t),n.prototype.addFeature=function(t,n){var i=void 0===n||n,r=e(t),o=t.getGeometry();if(o){var s=this.jv[o.getType()];s&&(this.pd[r]=o.getExtent([1/0,1/0,-1/0,-1/0]),s(t,o))}i&&(this.dd[r]=H(t,N,this.eu,this))},n.prototype.yd=function(t){this.addFeature(t)},n.prototype.gd=function(t){this.removeFeature(t)},n.prototype.wd=function(){var t;return this.we?t=this.we:this.gl&&(t=this.gl.getFeatures()),t},n.prototype.handleEvent=function(n){var i=this.snapTo(n.pixel,n.coordinate,n.map);return i.snapped&&(n.coordinate=i.vertex.slice(0,2),n.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,n)},n.prototype.Iv=function(t){var n=AM(t);this.addFeature(n)},n.prototype.Rv=function(t){var n=AM(t);this.removeFeature(n)},n.prototype.eu=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=e(n);i in this.md||(this.md[i]=n)}else this.bd(n)},n.prototype.handleUpEvent=function(t){var n=A(this.md);return n.length&&(n.forEach(this.bd.bind(this)),this.md={}),!1},n.prototype.removeFeature=function(t,n){var i=void 0===n||n,r=e(t),o=this.pd[r];if(o){var s=this.wv,a=[];s.forEachInExtent(o,(function(n){t===n.feature&&a.push(n)}));for(var u=a.length-1;u>=0;--u)s.remove(a[u])}i&&(Z(this.dd[r]),delete this.dd[r])},n.prototype.setMap=function(n){var i=this.getMap(),r=this.vd,e=this.wd();i&&(r.forEach(Z),r.length=0,e.forEach(this.gd.bind(this))),t.prototype.setMap.call(this,n),n&&(this.we?r.push(H(this.we,et,this.Iv,this),H(this.we,ot,this.Rv,this)):this.gl&&r.push(H(this.gl,gv,this.Iv,this),H(this.gl,xv,this.Rv,this)),e.forEach(this.yd.bind(this)))},n.prototype.snapTo=function(t,n,i){var r=en([i.getCoordinateFromPixel([t[0]-this.iv,t[1]+this.iv]),i.getCoordinateFromPixel([t[0]+this.iv,t[1]-this.iv])]),e=this.wv.getInExtent(r);this.fd&&!this.ld&&(e=e.filter((function(t){return t.feature.getGeometry().getType()!==gt.CIRCLE})));var o=!1,s=null,a=null;if(0===e.length)return{snapped:o,vertex:s,vertexPixel:a};for(var u,h=i.getView().getProjection(),c=lr(n,h),f=1/0,l=0;lw?p[1]:p[0],a=i.getPixelFromCoordinate(s))}else if(this.ld){var b=u.feature.getGeometry().getType()===gt.CIRCLE;if(b){var x=u.feature.getGeometry(),j=cr();j&&(x=x.clone().transform(j,h)),s=fr(Ni(c,x),h)}else EM[0]=lr(p[0],h),EM[1]=lr(p[1],h),s=fr(zi(c,EM),h);if(Di(t,a=i.getPixelFromCoordinate(s))<=this.iv&&(o=!0,this.fd&&!b)){m=i.getPixelFromCoordinate(p[0]),y=i.getPixelFromCoordinate(p[1]),g=qi(a,m),w=qi(a,y);Math.sqrt(Math.min(g,w))<=this.iv&&(s=g>w?p[1]:p[0],a=i.getPixelFromCoordinate(s))}}return o&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:o,vertex:s,vertexPixel:a}},n.prototype.bd=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},n.prototype.Av=function(t,n){var i=this.getMap().getView().getProjection(),r=n,e=cr();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=0;i--){var h=o[i][0];if(hn(new Qr(h).getExtent(),new Qr(a).getExtent())){o[i].push(a),u=!0;break}}u||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(e=gt.POLYGON,t=k({},t,((i={}).rings=a[0],i))):(e=gt.MULTI_POLYGON,t=k({},t,((r={}).rings=a,r)))}return hy((0,qM[e])(t),!1,n)}function UM(t){var n=dt;return!0===t.hasZ&&!0===t.hasM?n=yt:!0===t.hasZ?n=pt:!0===t.hasM&&(n=mt),n}function WM(t){var n=t.getLayout();return{hasZ:n===pt||n===yt,hasM:n===mt||n===yt}}function VM(t,n){return(0,DM[t.getType()])(hy(t,!0,n),n)}DM[gt.POINT]=function(t,n){var i,r=t.getCoordinates(),e=t.getLayout();e===pt?i={x:r[0],y:r[1],z:r[2]}:e===mt?i={x:r[0],y:r[1],m:r[2]}:e===yt?i={x:r[0],y:r[1],z:r[2],m:r[3]}:e===dt?i={x:r[0],y:r[1]}:ct(!1,34);return i},DM[gt.LINE_STRING]=function(t,n){var i=WM(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:[t.getCoordinates()]}},DM[gt.POLYGON]=function(t,n){var i=WM(t);return{hasZ:i.hasZ,hasM:i.hasM,rings:t.getCoordinates(!1)}},DM[gt.MULTI_POINT]=function(t,n){var i=WM(t);return{hasZ:i.hasZ,hasM:i.hasM,points:t.getCoordinates()}},DM[gt.MULTI_LINE_STRING]=function(t,n){var i=WM(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:t.getCoordinates()}},DM[gt.MULTI_POLYGON]=function(t,n){for(var i=WM(t),r=t.getCoordinates(!1),e=[],o=0;o=0;s--)e.push(r[o][s]);return{hasZ:i.hasZ,hasM:i.hasM,rings:e}};var JM=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this)||this).A=r.geometryName,i}return GM(n,t),n.prototype.readFeatureFromObject=function(t,n,i){var r=t,e=BM(r.geometry,n),o=new vt;if(this.A&&o.setGeometryName(this.A),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;o0?i[0]:null},i.prototype.readFeatureFromNode=function(t,n){return null},i.prototype.readFeatures=function(t,n){if(t){if("string"==typeof t){var i=Jc(t);return this.readFeaturesFromDocument(i,n)}return Wc(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n)}return[]},i.prototype.readFeaturesFromDocument=function(t,n){for(var i=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&g(i,this.readFeaturesFromNode(r,n));return i},i.prototype.readFeaturesFromNode=function(n,i){return t()},i.prototype.readGeometry=function(t,n){if(t){if("string"==typeof t){var i=Jc(t);return this.readGeometryFromDocument(i,n)}return Wc(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n)}return null},i.prototype.readGeometryFromDocument=function(t,n){return null},i.prototype.readGeometryFromNode=function(t,n){return null},i.prototype.readProjection=function(t){if(t){if("string"==typeof t){var n=Jc(t);return this.readProjectionFromDocument(n)}return Wc(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},i.prototype.readProjectionFromDocument=function(t){return this.dataProjection},i.prototype.readProjectionFromNode=function(t){return this.dataProjection},i.prototype.writeFeature=function(t,n){var i=this.writeFeatureNode(t,n);return this.Od.serializeToString(i)},i.prototype.writeFeatureNode=function(t,n){return null},i.prototype.writeFeatures=function(t,n){var i=this.writeFeaturesNode(t,n);return this.Od.serializeToString(i)},i.prototype.writeFeaturesNode=function(t,n){return null},i.prototype.writeGeometry=function(t,n){var i=this.writeGeometryNode(t,n);return this.Od.serializeToString(i)},i.prototype.writeGeometryNode=function(t,n){return null},i}(uy),YM=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)}}(),ZM="http://www.opengis.net/gml",$M=/^[\s\xa0]*$/,KM=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:Hc(i.readFeaturesInternal),featureMembers:Yc(i.readFeaturesInternal)},i}return YM(n,t),n.prototype.readFeaturesInternal=function(t,n){var i=t.localName,r=null;if("FeatureCollection"==i)r=sf([],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;a0){e[a]={kd:e[a]};for(var h=0;h0:f===gt.POINT||f===gt.MULTI_POINT}}a&&(u=o.get("name"),(a=a&&!!u)&&u.search(/&[^&]+;/)>-1&&(V_||(V_=document.createElement("textarea")),V_.innerHTML=u,u=V_.value));var l=i;if(t?l=t:n&&(l=Y_(n,i,r)),a){var v=function(t,n){var i=[0,0],r="start",e=t.getImage();if(e){var o=e.getImageSize();if(null===o&&(o=p_),2==o.length){var s=e.getScaleArray();i[0]=s[0]*o[0]/2,i[1]=-s[1]*o[1]/2,r="left"}}var a=t.getText();a?((a=a.clone()).setFont(a.getFont()||U_.getFont()),a.setScale(a.getScale()||U_.getScale()),a.setFill(a.getFill()||U_.getFill()),a.setStroke(a.getStroke()||D_)):a=U_.clone();return a.setText(n),a.setOffsetX(i[0]),a.setOffsetY(i[1]),a.setTextAlign(r),new Gl({image:e,text:a})}(l[0],u);return h.length>0?(v.setGeometry(new Ty(h)),[v,new Gl({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.Hd,this.$d,this.Kd);r.setStyle(a)}return delete i.Style,r.setProperties(i,!0),r}},n.prototype.ip=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=SO.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.$d[e]=r}}},n.prototype.rp=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=iO.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.$d[e]=r}}},n.prototype.readFeatureFromNode=function(t,n){if(!p(E_,t.namespaceURI))return null;var i=this.np(t,[this.getReadOptions(t,n)]);return i||null},n.prototype.readFeaturesFromNode=function(t,n){if(!p(E_,t.namespaceURI))return[];var i,r=t.localName;if("Document"==r||"Folder"==r)return(i=this.tp(t,[this.getReadOptions(t,n)]))||[];if("Placemark"==r){var e=this.np(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&&g(i,s)}return i}return[]},n.prototype.readName=function(t){if(t){if("string"==typeof t){var n=Jc(t);return this.readNameFromDocument(n)}return Wc(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(p(E_,n.namespaceURI)&&"name"==n.localName)return aS(n);for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(p(E_,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=Jc(t);g(n,this.readNetworkLinksFromDocument(i))}else Wc(t)?g(n,this.readNetworkLinksFromDocument(t)):g(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&&g(n,this.readNetworkLinksFromNode(i));return n},n.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(p(E_,i.namespaceURI)&&"NetworkLink"==i.localName){var r=sf({},N_,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!p(E_,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||g(n,this.readNetworkLinksFromNode(i))}return n},n.prototype.readRegion=function(t){var n=[];if("string"==typeof t){var i=Jc(t);g(n,this.readRegionFromDocument(i))}else Wc(t)?g(n,this.readRegionFromDocument(t)):g(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&&g(n,this.readRegionFromNode(i));return n},n.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(p(E_,i.namespaceURI)&&"Region"==i.localName){var r=sf({},I_,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!p(E_,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||g(n,this.readRegionFromNode(i))}return n},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Dc(E_[4],"kml"),r="http://www.w3.org/2000/xmlns/";i.setAttributeNS(r,"xmlns:gx",A_[0]),i.setAttributeNS(r,"xmlns:xsi",qc),i.setAttributeNS(qc,"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=R_[i.namespaceURI],a=rf(o,s);return uf(e,L_,nf,a,[n],s,this),i},n}(HM);function Y_(t,n,i){return Array.isArray(t)?t:"string"==typeof t?Y_(i[t],n,i):n}function Z_(t){var n=Bc(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 $_(t){var n=Bc(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 K_(t){var n=Bc(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function Q_(t){var n=Bc(t,!1).trim().replace(/^(?!.*#)/,"#"),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function tO(t){return rS(t)}var nO=ef(E_,{Pair:function(t,n){var i=sf({},EO,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 iO(t,n){return sf(void 0,nO,t,n,this)}var rO=ef(E_,{Icon:$c((function(t,n){var i=sf({},lO,t,n);return i||null})),color:$c(Z_),heading:$c(rS),hotSpot:$c((function(t){var n,i=t.getAttribute("xunits"),r=t.getAttribute("yunits");return n="insetPixels"!==i?"insetPixels"!==r?xl:Ml:"insetPixels"!==r?jl:Sl,{x:parseFloat(t.getAttribute("x")),xunits:C_[i],y:parseFloat(t.getAttribute("y")),yunits:C_[r],origin:n}})),scale:$c(tO)});var eO=ef(E_,{color:$c(Z_),scale:$c(tO)});var oO=ef(E_,{color:$c(Z_),width:$c(rS)});var sO=ef(E_,{color:$c(Z_),fill:$c(tS),outline:$c(tS)});var aO=ef(E_,{coordinates:Yc($_)});function uO(t,n){return sf(null,aO,t,n)}var hO=ef(A_,{Track:Hc(fO)});var cO=ef(E_,{when:function(t,n){var i=n[n.length-1].whens,r=Bc(t,!1),e=Date.parse(r);i.push(isNaN(e)?0:e)}},ef(A_,{coord:function(t,n){var i=n[n.length-1].coordinates,r=Bc(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 fO(t,n){var i=sf({coordinates:[],whens:[]},cO,t,n);if(i){for(var r=[],e=i.coordinates,o=i.whens,s=0,a=Math.min(e.length,o.length);s0){var r=n[n.length-1];r.push.apply(r,i)}},outerBoundaryIs:function(t,n){var i=sf(void 0,IO,t,n);if(i){n[n.length-1][0]=i}}});function jO(t,n){var i=sf({},pO,t,n),r=sf([null],xO,t,n);if(r&&r[0]){for(var e=r[0],o=[e.length],s=1,a=r.length;s0,c=u.href;c?r=c:h&&(r=m_);var f,l=xl,v=i.hotSpot;v?(e=[v.x,v.y],o=v.xunits,s=v.yunits,l=v.origin):r===m_?(e=l_,o=v_,s=d_):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(e=[.5,0],o=wl,s=wl);var d,p=u.x,m=u.y;void 0!==p&&void 0!==m&&(f=[p,m]);var y,g=u.w,w=u.h;void 0!==g&&void 0!==w&&(d=[g,w]);var b=i.heading;void 0!==b&&(y=Kn(b));var x=i.scale,j=i.color;if(h){r==m_&&(d=p_,void 0===x&&(x=y_));var M=new Cl({anchor:e,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.zt,offset:f,offsetOrigin:xl,rotation:y,scale:x,size:d,src:this.Qd(r),color:j});a.imageStyle=M}else a.imageStyle=G_}},LabelStyle:function(t,n){var i=sf({},eO,t,n);if(i){var r=n[n.length-1],e=new Bl({fill:new gl({color:"color"in i?i.color:f_}),scale:i.scale});r.textStyle=e}},LineStyle:function(t,n){var i=sf({},oO,t,n);if(i){var r=n[n.length-1],e=new Pl({color:"color"in i?i.color:f_,width:"width"in i?i.width:1});r.strokeStyle=e}},PolyStyle:function(t,n){var i=sf({},sO,t,n);if(i){var r=n[n.length-1],e=new gl({color:"color"in i?i.color:f_});r.fillStyle=e;var o=i.fill;void 0!==o&&(r.fill=o);var s=i.outline;void 0!==s&&(r.outline=s)}}});function SO(t,n){var i=sf({},MO,t,n,this);if(!i)return null;var r,e="fillStyle"in i?i.fillStyle:F_,o=i.fill;void 0===o||o||(e=null),"imageStyle"in i?i.imageStyle!=G_&&(r=i.imageStyle):r=q_;var s="textStyle"in i?i.textStyle:U_,a="strokeStyle"in i?i.strokeStyle:B_,u=i.outline;return void 0===u||u?[new Gl({fill:e,image:r,stroke:a,text:s,zIndex:void 0})]:[new Gl({geometry:function(t){var n=t.getGeometry(),i=n.getType();return i===gt.GEOMETRY_COLLECTION?new Ty(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n!==gt.POLYGON&&n!==gt.MULTI_POLYGON}))):i!==gt.POLYGON&&i!==gt.MULTI_POLYGON?n:void 0},fill:e,image:r,stroke:a,text:s,zIndex:void 0}),new Gl({geometry:function(t){var n=t.getGeometry(),i=n.getType();return i===gt.GEOMETRY_COLLECTION?new Ty(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===gt.POLYGON||n===gt.MULTI_POLYGON}))):i===gt.POLYGON||i===gt.MULTI_POLYGON?n:void 0},fill:e,stroke:null,zIndex:void 0})]}function _O(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 h=0;h0){var y=rf(e,s);uf(r,sk,uk,[{names:s,values:y}],i)}var g=i[0],w=n.getGeometry();w&&(w=hy(w,!0,g)),uf(r,sk,$O,[w],i)}var ck=ef(E_,["extrude","tessellate","altitudeMode","coordinates"]),fk=ef(E_,{extrude:Kc(uS),tessellate:Kc(uS),altitudeMode:Kc(vS),coordinates:Kc((function(t,n,i){var r,e=i[i.length-1],o=e.layout,s=e.stride;o==dt||o==mt?r=2:o==pt||o==yt?r=3:ct(!1,34);var a=n.length,u="";if(a>0){u+=n[0];for(var h=1;h>1):e>>1}return n}function eT(t){for(var n="",i=0,r=t.length;i=32;)n=63+(32|31&t),i+=String.fromCharCode(n),t>>=5;return n=t+63,i+=String.fromCharCode(n)}var aT=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=Zi("EPSG:4326"),i.ep=r.factor?r.factor:1e5,i.op=r.geometryLayout?r.geometryLayout:dt,i}return $k(n,t),n.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new vt(i)},n.prototype.readFeaturesFromText=function(t,n){return[this.readFeatureFromText(t,n)]},n.prototype.readGeometryFromText=function(t,n){var i=_r(this.op),r=Qk(t,i,this.ep);FM(r,0,r.length,i,r);var e=Jr(r,0,r.length,i);return hy(new Jm(e,this.op),!1,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(ct(!1,40),"")},n.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},n.prototype.writeGeometryText=function(t,n){var i=(t=hy(t,!0,this.adaptOptions(n))).getFlatCoordinates(),r=t.getStride();return FM(i,0,i.length,r,i),Kk(i,r,this.ep)},n}(g_),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)}}(),hT=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.$f=r.layerName,i.Lu=r.layers?r.layers:null,i.dataProjection=Zi(r.dataProjection?r.dataProjection:"EPSG:4326"),i}return uT(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;r0&&e.pop(),r=i>=0?n[i]:n[~i].slice().reverse(),e.push.apply(e,r);for(var a=0,u=e.length;a=2,57),r}return gT(n,t),n}(yT),bT=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=function(t){function n(n){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return bT(n,t),n}(wT),jT=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)}}(),MT=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 jT(n,t),n}(yT),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)}}(),_T=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 ST(n,t),n}(yT),OT=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,i,r){return t.call(this,"Contains",n,i,r)||this}return OT(n,t),n}(_T),TT=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)}}(),AT=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 TT(n,t),n}(_T),ET=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,i,r){return t.call(this,"Disjoint",n,i,r)||this}return ET(n,t),n}(_T),PT=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)}}(),NT=function(t){function n(n,i){var r=t.call(this,n)||this;return r.propertyName=i,r}return PT(n,t),n}(yT),zT=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)}}(),IT=function(t){function n(n,i,r){var e=t.call(this,"During",n)||this;return e.begin=i,e.end=r,e}return zT(n,t),n}(NT),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)}}(),LT=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 RT(n,t),n}(NT),FT=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=function(t){function n(n,i,r){return t.call(this,"PropertyIsEqualTo",n,i,r)||this}return FT(n,t),n}(LT),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)}}(),DT=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThan",n,i)||this}return qT(n,t),n}(LT),BT=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)}}(),UT=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThanOrEqualTo",n,i)||this}return BT(n,t),n}(LT),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){return t.call(this,"Intersects",n,i,r)||this}return WT(n,t),n}(_T),JT=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=function(t){function n(n,i,r){var e=t.call(this,"PropertyIsBetween",n)||this;return e.lowerBoundary=i,e.upperBoundary=r,e}return JT(n,t),n}(NT),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)}}(),YT=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 HT(n,t),n}(NT),ZT=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)}}(),$T=function(t){function n(n){return t.call(this,"PropertyIsNull",n)||this}return ZT(n,t),n}(NT),KT=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)}}(),QT=function(t){function n(n,i){return t.call(this,"PropertyIsLessThan",n,i)||this}return KT(n,t),n}(LT),tA=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)}}(),nA=function(t){function n(n,i){return t.call(this,"PropertyIsLessThanOrEqualTo",n,i)||this}return tA(n,t),n}(LT),iA=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)}}(),rA=function(t){function n(n){var i=t.call(this,"Not")||this;return i.condition=n,i}return iA(n,t),n}(yT),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,i,r){return t.call(this,"PropertyIsNotEqualTo",n,i,r)||this}return eA(n,t),n}(LT),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){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return sA(n,t),n}(wT),uA=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)}}(),hA=function(t){function n(n){var i=t.call(this,"ResourceId")||this;return i.rid=n,i}return uA(n,t),n}(yT),cA=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){return t.call(this,"Within",n,i,r)||this}return cA(n,t),n}(_T);function lA(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(xT,n))}function vA(t,n,i){return new MT(t,n,i)}var dA=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)}}(),pA={"http://www.opengis.net/gml":{boundedBy:$c(QM.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:Hc(QM.prototype.readFeaturesInternal)}},mA={"http://www.opengis.net/wfs":{totalInserted:$c(oS),totalUpdated:$c(oS),totalDeleted:$c(oS)},"http://www.opengis.net/wfs/2.0":{totalInserted:$c(oS),totalUpdated:$c(oS),totalDeleted:$c(oS)}},yA={"http://www.opengis.net/wfs":{TransactionSummary:$c(AA,"transactionSummary"),InsertResults:$c(NA,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:$c(AA,"transactionSummary"),InsertResults:$c(NA,"insertIds")}},gA={"http://www.opengis.net/wfs":{PropertyName:Kc(vS)},"http://www.opengis.net/wfs/2.0":{PropertyName:Kc(vS)}},wA={"http://www.opengis.net/wfs":{Insert:Kc(zA),Update:Kc(FA),Delete:Kc(LA),Property:Kc(GA),Native:Kc(qA)},"http://www.opengis.net/wfs/2.0":{Insert:Kc(zA),Update:Kc(FA),Delete:Kc(LA),Property:Kc(GA),Native:Kc(qA)}},bA="feature",xA="http://www.w3.org/2000/xmlns/",jA={"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"},MA={"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"},SA={"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"},_A={"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"},OA={"2.0.0":OS,"1.1.0":xS,"1.0.0":yS},kA=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.rh=r.version?r.version:"1.1.0",i.ap=r.featureType,i.up=r.featureNS,i.hp=r.gmlFormat?r.gmlFormat:new OA[i.rh],i.cp=r.schemaLocation?r.schemaLocation:_A[i.rh],i}return dA(n,t),n.prototype.getFeatureType=function(){return this.ap},n.prototype.setFeatureType=function(t){this.ap=t},n.prototype.readFeaturesFromNode=function(t,n){var i={node:t};k(i,{featureType:this.ap,featureNS:this.up}),k(i,this.getReadOptions(t,n||{}));var r=[i],e=sf([],"2.0.0"===this.rh?pA:this.hp.FEATURE_COLLECTION_PARSERS,t,r,this.hp);return e||(e=[]),e},n.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var n=Jc(t);return this.readTransactionResponseFromDocument(n)}return Wc(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},n.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var n=Jc(t);return this.readFeatureCollectionMetadataFromDocument(n)}return Wc(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=sS(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,sf(n,pA,t,[],this.hp)},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 sf({},yA,t,[])},n.prototype.writeGetFeature=function(t){var n=this,i=Dc(MA[this.rh],"GetFeature");i.setAttribute("service","WFS"),i.setAttribute("version",this.rh),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(qc,"xsi:schemaLocation",this.cp);var r={node:i};if(k(r,{version:this.rh,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.up,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),ct(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var e=t.filter;t.bbox&&(ct(t.geometryName,12),e=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,e)),k(r,{geometryName:t.geometryName,filter:e}),eE(i,t.featureTypes,[r])}else t.featureTypes.forEach((function(e){var o=n.combineBboxAndFilter(e.geometryName,e.bbox,t.srsName,t.filter);k(r,{geometryName:e.geometryName,filter:o}),eE(i,[e.name],[r])}));return i},n.prototype.combineBboxAndFilter=function(t,n,i,r){var e=vA(t,n,i);return r?lA(r,e):e},n.prototype.writeTransaction=function(t,n,i,r){var e,o=[],s=r.version?r.version:this.rh,a=Dc(MA[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(qc,"xsi:schemaLocation",_A[s]);var u=function(t,n,i,r){var e,o=r.featurePrefix?r.featurePrefix:bA;"1.0.0"===i?e=2:"1.1.0"===i?e=3:"2.0.0"===i&&(e=3.2);return k({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&&TA("Insert",t,o,u),n&&TA("Update",n,o,u),i&&TA("Delete",i,o,u),r.nativeElements&&TA("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.hp.readGeometryElement(n,i),Zi(i.pop().srsName)}return null},n}(HM);function TA(t,n,i,r){uf(r,wA,tf(t),n,i)}function AA(t,n){return sf({},mA,t,n)}var EA={"http://www.opengis.net/ogc":{FeatureId:Hc((function(t,n){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:Hc((function(t,n){return t.getAttribute("fid")}))}};function CA(t,n){of(EA,t,n)}var PA={"http://www.opengis.net/wfs":{Feature:CA},"http://www.opengis.net/wfs/2.0":{Feature:CA}};function NA(t,n){return sf([],PA,t,n)}function zA(t,n,i){var r=i[i.length-1],e=r.featureType,o=r.featureNS,s=r.gmlVersion,a=Dc(o,e);t.appendChild(a),2===s?yS.prototype.writeFeatureElement(a,n,i):3===s?xS.prototype.writeFeatureElement(a,n,i):OS.prototype.writeFeatureElement(a,n,i)}function IA(t,n,i){var r=i[i.length-1].version,e=jA[r],o=Dc(e,"Filter"),s=Dc(e,"FeatureId");o.appendChild(s),s.setAttribute("fid",n),t.appendChild(o)}function RA(t,n){var i=(t=t||bA)+":";return 0===n.indexOf(i)?n:i+n}function LA(t,n,i){var r=i[i.length-1];ct(void 0!==n.getId(),26);var e=r.featureType,o=r.featurePrefix,s=r.featureNS,a=RA(o,e);t.setAttribute("typeName",a),t.setAttributeNS(xA,"xmlns:"+o,s);var u=n.getId();void 0!==u&&IA(t,u,i)}function FA(t,n,i){var r=i[i.length-1];ct(void 0!==n.getId(),27);var e=r.version,o=r.featureType,s=r.featurePrefix,a=r.featureNS,u=RA(s,o),h=n.getGeometryName();t.setAttribute("typeName",u),t.setAttributeNS(xA,"xmlns:"+s,a);var c=n.getId();if(void 0!==c){for(var f=n.getKeys(),l=[],v=0,d=f.length;v0,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(""),h=s?this.readUint32(n):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.vp){if(this.dp!==n)throw new Error("Inconsistent endian");if(this.gp!==u)throw new Error("Inconsistent geometry layout");if(h&&this.yp!==h)throw new Error("Inconsistent coordinate system (SRID)")}else this.dp=n,this.pp=e,this.mp=o,this.gp=u,this.yp=h,this.vp=!0;return a},t.prototype.readWkbPayload=function(t){switch(t){case uE:return this.readPoint();case hE:return this.readLineString();case cE:case yE:return this.readPolygon();case fE:return this.readMultiPoint();case lE:return this.readMultiLineString();case vE:case pE:case mE:return this.readMultiPolygon();case dE: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=0&&(t+=this.wp?2147483648:1e3),this.gp.indexOf("M")>=0&&(t+=this.wp?1073741824:2e3),this.wp&&Number.isInteger(n)&&(t|=536870912),this.writeUint8(this.dp?1:0),this.writeUint32(t),this.wp&&Number.isInteger(n)&&this.writeUint32(n)},t.prototype.writeMultiPoint=function(t,n){this.writeUint32(t.length);for(var i=0;i="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.Ep=function(t,n){return t>="0"&&t<="9"||"."==t&&!(void 0!==n&&n)},t.prototype.Cp=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.Pp=function(){return this.wkt.charAt(++this.Tp)},t.prototype.nextToken=function(){var t,n=this.Pp(),i=this.Tp,r=n;if("("==n)t=kE;else if(","==n)t=EE;else if(")"==n)t=TE;else if(this.Ep(n)||"-"==n)t=AE,r=this.Np();else if(this.Ap(n))t=OE,r=this.zp();else{if(this.Cp(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=CE}return{position:i,value:r,type:t}},t.prototype.Np=function(){var t,n=this.Tp,i=!1,r=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(r=!0),t=this.Pp()}while(this.Ep(t,i)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(n,this.Tp--))},t.prototype.zp=function(){var t,n=this.Tp;do{t=this.Pp()}while(this.Ap(t));return this.wkt.substring(n,this.Tp--).toUpperCase()},t}(),IE=function(){function t(t){this.Ip=t,this.Rp={position:0,type:_E},this.gp=dt}return t.prototype.Lp=function(){this.Rp=this.Ip.nextToken()},t.prototype.isTokenType=function(t){return this.Rp.type==t},t.prototype.match=function(t){var n=this.isTokenType(t);return n&&this.Lp(),n},t.prototype.parse=function(){return this.Lp(),this.Fp()},t.prototype.Gp=function(){var t=dt,n=this.Rp;if(this.isTokenType(OE)){var i=n.value;"Z"===i?t=pt:"M"===i?t=mt:"ZM"===i&&(t=yt),t!==dt&&this.Lp()}return t},t.prototype.qp=function(){if(this.match(kE)){var t=[];do{t.push(this.Fp())}while(this.match(EE));if(this.match(TE))return t}throw new Error(this.Dp())},t.prototype.Bp=function(){if(this.match(kE)){var t=this.Up();if(this.match(TE))return t}throw new Error(this.Dp())},t.prototype.Wp=function(){if(this.match(kE)){var t=this.Vp();if(this.match(TE))return t}throw new Error(this.Dp())},t.prototype.Jp=function(){if(this.match(kE)){var t=this.Xp();if(this.match(TE))return t}throw new Error(this.Dp())},t.prototype.Hp=function(){if(this.match(kE)){var t=void 0;if(t=this.Rp.type==kE?this.Yp():this.Vp(),this.match(TE))return t}throw new Error(this.Dp())},t.prototype.Zp=function(){if(this.match(kE)){var t=this.Xp();if(this.match(TE))return t}throw new Error(this.Dp())},t.prototype.$p=function(){if(this.match(kE)){var t=this.Kp();if(this.match(TE))return t}throw new Error(this.Dp())},t.prototype.Up=function(){for(var t=[],n=this.gp.length,i=0;i0&&(n+=" "+r)}return 0===i.length?n+" "+SE:n+"("+i+")"}var BE=RE,UE=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)}}(),WE=[null,"http://www.opengis.net/wms"],VE=ef(WE,{Service:$c((function(t,n){return sf({},HE,t,n)})),Capability:$c((function(t,n){return sf({},JE,t,n)}))}),JE=ef(WE,{Request:$c((function(t,n){return sf({},iC,t,n)})),Exception:$c((function(t,n){return sf([],KE,t,n)})),Layer:$c((function(t,n){var i=sf({},QE,t,n);if(void 0===i.Layer)return Object.assign(i,hC(t,n));return i}))}),XE=function(t){function n(){var n=t.call(this)||this;return n.version=void 0,n}return UE(n,t),n.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=sf({version:this.version},VE,t,[]);return n||null},n}(Ck),HE=ef(WE,{Name:$c(aS),Title:$c(aS),Abstract:$c(aS),KeywordList:$c(vC),OnlineResource:$c(Pk),ContactInformation:$c((function(t,n){return sf({},YE,t,n)})),Fees:$c(aS),AccessConstraints:$c(aS),LayerLimit:$c(oS),MaxWidth:$c(oS),MaxHeight:$c(oS)}),YE=ef(WE,{ContactPersonPrimary:$c((function(t,n){return sf({},ZE,t,n)})),ContactPosition:$c(aS),ContactAddress:$c((function(t,n){return sf({},$E,t,n)})),ContactVoiceTelephone:$c(aS),ContactFacsimileTelephone:$c(aS),ContactElectronicMailAddress:$c(aS)}),ZE=ef(WE,{ContactPerson:$c(aS),ContactOrganization:$c(aS)}),$E=ef(WE,{AddressType:$c(aS),Address:$c(aS),City:$c(aS),StateOrProvince:$c(aS),PostCode:$c(aS),Country:$c(aS)}),KE=ef(WE,{Format:Hc(aS)}),QE=ef(WE,{Name:$c(aS),Title:$c(aS),Abstract:$c(aS),KeywordList:$c(vC),CRS:Zc(aS),EX_GeographicBoundingBox:$c((function(t,n){var i=sf({},nC,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:Zc((function(t,n){var i=[eS(t.getAttribute("minx")),eS(t.getAttribute("miny")),eS(t.getAttribute("maxx")),eS(t.getAttribute("maxy"))],r=[eS(t.getAttribute("resx")),eS(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:i,res:r}})),Dimension:Zc((function(t,n){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:nS(t.getAttribute("multipleValues")),nearestValue:nS(t.getAttribute("nearestValue")),current:nS(t.getAttribute("current")),values:aS(t)}})),Attribution:$c((function(t,n){return sf({},tC,t,n)})),AuthorityURL:Zc((function(t,n){var i=cC(t,n);if(i)return i.name=t.getAttribute("name"),i;return})),Identifier:Zc(aS),MetadataURL:Zc((function(t,n){var i=cC(t,n);if(i)return i.type=t.getAttribute("type"),i;return})),DataURL:Zc(cC),FeatureListURL:Zc(cC),Style:Zc((function(t,n){return sf({},sC,t,n)})),MinScaleDenominator:$c(rS),MaxScaleDenominator:$c(rS),Layer:Zc(hC)}),tC=ef(WE,{Title:$c(aS),OnlineResource:$c(Pk),LogoURL:$c(lC)}),nC=ef(WE,{westBoundLongitude:$c(rS),eastBoundLongitude:$c(rS),southBoundLatitude:$c(rS),northBoundLatitude:$c(rS)}),iC=ef(WE,{GetCapabilities:$c(fC),GetMap:$c(fC),GetFeatureInfo:$c(fC)}),rC=ef(WE,{Format:Zc(aS),DCPType:Zc((function(t,n){return sf({},eC,t,n)}))}),eC=ef(WE,{HTTP:$c((function(t,n){return sf({},oC,t,n)}))}),oC=ef(WE,{Get:$c(cC),Post:$c(cC)}),sC=ef(WE,{Name:$c(aS),Title:$c(aS),Abstract:$c(aS),LegendURL:Zc(lC),StyleSheetURL:$c(cC),StyleURL:$c(cC)}),aC=ef(WE,{Format:$c(aS),OnlineResource:$c(Pk)}),uC=ef(WE,{Keyword:Hc(aS)});function hC(t,n){var i=n[n.length-1],r=sf({},QE,t,n);if(r){var e=nS(t.getAttribute("queryable"));void 0===e&&(e=i.queryable),r.queryable=void 0!==e&&e;var o=sS(t.getAttribute("cascaded"));void 0===o&&(o=i.cascaded),r.cascaded=o;var s=nS(t.getAttribute("opaque"));void 0===s&&(s=i.opaque),r.opaque=void 0!==s&&s;var a=nS(t.getAttribute("noSubsets"));void 0===a&&(a=i.noSubsets),r.noSubsets=void 0!==a&&a;var u=eS(t.getAttribute("fixedWidth"));u||(u=i.fixedWidth),r.fixedWidth=u;var h=eS(t.getAttribute("fixedHeight"));h||(h=i.fixedHeight),r.fixedHeight=h;["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 cC(t,n){return sf({},aC,t,n)}function fC(t,n){return sf({},rC,t,n)}function lC(t,n){var i=cC(t,n);if(i){var r=[sS(t.getAttribute("width")),sS(t.getAttribute("height"))];return i.size=r,i}}function vC(t,n){return sf([],uC,t,n)}var dC=XE,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)}}(),mC=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.up="http://mapserver.gis.umn.edu/mapserver",i.hp=new yS,i.Lu=r.layers?r.layers:null,i}return pC(n,t),n.prototype.getLayers=function(){return this.Lu},n.prototype.setLayers=function(t){this.Lu=t},n.prototype.im=function(t,n){t.setAttribute("namespaceURI",this.up);var i=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==i)for(var e=0,o=t.childNodes.length;ec*HC||h>f*HC?this.Em():hn(o,r)||this.Nm()}}},n.prototype.Em=function(){var t=this.getMap(),n=this._m,i=t.getSize(),r=t.getView().calculateExtentInternal(i),e=n.getView(),o=Math.log(7.5)/Math.LN2;qn(r,1/(Math.pow(2,o/2)*YC)),e.fitInternal(Se(r))},n.prototype.Nm=function(){var t=this.getMap(),n=this._m,i=t.getView();n.getView().setCenterInternal(i.getCenterInternal())},n.prototype.zm=function(){var t=this.getMap(),n=this._m;if(t.isRendered()&&n.isRendered()){var i=t.getSize(),r=t.getView(),e=n.getView(),o=this.Xo?0:-r.getRotation(),s=this.Om,a=this.Om.getElement(),u=r.getCenterInternal(),h=r.getResolution(),c=e.getResolution(),f=i[0]*h/c,l=i[1]*h/c;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.Cm=function(){this.Im||(this.Im=Y(this._m,na,(function(t){delete this.Im,this.zm()}),this))},n.prototype.lr=function(t){t.preventDefault(),this.mr()},n.prototype.mr=function(){this.element.classList.toggle(ls),this.rr?lo(this.ur,this.hr):lo(this.hr,this.ur),this.rr=!this.rr;var t=this._m;if(!this.rr){if(t.isRendered())return this.Mm=void 0,void t.render();t.updateSize(),this.Em(),this.Cm()}},n.prototype.getCollapsible=function(){return this.ar},n.prototype.setCollapsible=function(t){this.ar!==t&&(this.ar=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.rr&&this.mr())},n.prototype.setCollapsed=function(t){this.ar&&this.rr!==t&&this.mr()},n.prototype.getCollapsed=function(){return this.rr},n.prototype.getRotateWithView=function(){return this.Xo},n.prototype.setRotateWithView=function(t){this.Xo!==t&&(this.Xo=t,0!==this.getMap().getView().getRotation()&&(this.Xo?this.jm():this._m.getView().setRotation(0),this.Mm=void 0,this.Pm(),this.zm()))},n.prototype.getOverviewMap=function(){return this._m},n.prototype.render=function(t){this.Pm(),this.zm()},n}(Va),KC=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)}}(),QC="units",tP="degrees",nP="imperial",iP="nautical",rP="metric",eP="us",oP=[1,2,5],sP=25.4/.28,aP=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.Rm=document.createElement("div"),i.Rm.className=e+"-inner",i.element.className=e+" "+hs,i.element.appendChild(i.Rm),i.Lm=null,i.Fm=void 0!==r.minWidth?r.minWidth:64,i.en=!1,i.Gm=void 0,i.gm="",i.addChangeListener(QC,i.qm),i.setUnits(r.units||rP),i.Dm=r.bar||!1,i.Bm=r.steps||4,i.Um=r.text||!1,i.Wm=r.dpi||void 0,i}return KC(n,t),n.prototype.getUnits=function(){return this.get(QC)},n.prototype.qm=function(){this.pr()},n.prototype.setUnits=function(t){this.set(QC,t)},n.prototype.setDpi=function(t){this.Wm=t},n.prototype.pr=function(){var t=this.Lm;if(t){var n=t.center,i=t.projection,r=this.getUnits(),e=r==tP?jt.DEGREES:jt.METERS,o=$i(i,t.resolution,n,e),s=this.Fm*(this.Wm||sP)/sP,a=s*o,u="";if(r==tP){var h=bt[jt.DEGREES];(a*=h)=s)break;++d}v=this.Dm?this.createScaleBar(f,c,u):c.toFixed(l<0?-l:0)+" "+u,this.gm!=v&&(this.Rm.innerHTML=v,this.gm=v),this.Gm!=f&&(this.Rm.style.width=f+"px",this.Gm=f),this.en||(this.element.style.display="",this.en=!0)}else this.en&&(this.element.style.display="none",this.en=!1)},n.prototype.createScaleBar=function(t,n,i){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),e=[],o=t/this.Bm,s="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.Bm?this.createStepText(a,t,!1,n,i):"")+""),a===this.Bm-1&&e.push(this.createStepText(a+1,t,!0,n,i)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.Um?'
'+r+"
":"")+e.join("")+"
"},n.prototype.createMarker=function(t,n){return'
'},n.prototype.createStepText=function(t,n,i,r,e){var o=(0===t?0:Math.round(r/this.Bm*t*100)/100)+(0===t?"":" "+e);return'
'+o+"
"},n.prototype.getScaleForResolution=function(){var t=$i(this.Lm.projection,this.Lm.resolution,this.Lm.center),n=this.Wm||sP,i=this.Lm.projection.getMetersPerUnit();return parseFloat(t.toString())*i*(1e3/25.4)*n},n.prototype.render=function(t){var n=t.frameState;this.Lm=n?n.viewState:null,this.pr()},n}(Va),uP=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)}}(),hP=0,cP=1,fP=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render})||this).wn=[],i.Vm=void 0,i.Jm=hP,i.gn,i.Xm=0,i.Hm=0,i.Ym,i.Zm,i.$m=null,i.Km=!1,i.gr=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 "+hs;var s=i.element;return s.className=e+" "+"ol-unselectable "+fs,s.appendChild(o),s.addEventListener(Zs,i.Qm.bind(i),!1),s.addEventListener(Ys,i.ty.bind(i),!1),s.addEventListener($s,i.ny.bind(i),!1),s.addEventListener(L,i.iy.bind(i),!1),o.addEventListener(L,h,!1),i}return uP(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),n&&n.render()},n.prototype.ey=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(0===n&&0===i)return this.Km=!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.$m=[s,a],n>i?(this.Jm=cP,this.Hm=n-s):(this.Jm=hP,this.Xm=i-a),this.Km=!0},n.prototype.iy=function(t){var n=this.getMap().getView(),i=this.oy(t.offsetX-this.$m[0]/2,t.offsetY-this.$m[1]/2),r=this.sy(i),e=n.getConstrainedZoom(n.getZoomForResolution(r));n.animateInternal({zoom:e,duration:this.gr,easing:eo})},n.prototype.Qm=function(t){if(!this.gn&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.Ym=t.clientX-parseFloat(n.style.left),this.Zm=t.clientY-parseFloat(n.style.top),this.gn=!0,0===this.wn.length){var i=this.ty,r=this.ny,e=this.getMap().getOwnerDocument();this.wn.push(H(e,Ys,i,this),H(e,$s,r,this))}}},n.prototype.ty=function(t){if(this.gn){var n=t.clientX-this.Ym,i=t.clientY-this.Zm,r=this.oy(n,i);this.Vm=this.sy(r),this.getMap().getView().setResolution(this.Vm)}},n.prototype.ny=function(t){this.gn&&(this.getMap().getView().endInteraction(),this.gn=!1,this.Ym=void 0,this.Zm=void 0,this.wn.forEach(Z),this.wn.length=0)},n.prototype.uy=function(t){var n=this.hy(t),i=this.element.firstElementChild;this.Jm==cP?i.style.left=this.Hm*n+"px":i.style.top=this.Xm*n+"px"},n.prototype.oy=function(t,n){return Vn(this.Jm===cP?t/this.Hm:n/this.Xm,0,1)},n.prototype.sy=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},n.prototype.hy=function(t){return Vn(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},n.prototype.render=function(t){if(t.frameState&&(this.Km||this.ey())){var n=t.frameState.viewState.resolution;this.Vm=n,this.uy(n)}},n}(Va),lP=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)}}(),vP=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(L,i.lr.bind(i),!1);var u=e+" "+"ol-unselectable "+fs,h=i.element;return h.className=u,h.appendChild(a),i}return lP(n,t),n.prototype.lr=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(Se(n))},n}(Va),dP={};dP.AssertionError=u,dP.Collection=ht,dP.Collection.CollectionEvent=ut,dP.Disposable=l,dP.Feature=vt,dP.Feature.createStyleFunction=lt,dP.Geolocation=Ge,dP.Image=Ye,dP.Image.listenImage=He,dP.ImageBase=De,dP.ImageCanvas=$e,dP.ImageTile=go,dP.Kinetic=wo,dP.Map=ih,dP.MapBrowserEvent=Xs,dP.MapBrowserEventHandler=ta,dP.MapEvent=Vs,dP.Object=rt,dP.Object.ObjectEvent=it,dP.Observable=tt,dP.Observable.unByKey=Q,dP.Overlay=gh,dP.PluggableMap=Ua,dP.Tile=uo,dP.TileCache=Th,dP.TileQueue=fa,dP.TileQueue.getTilePriority=la,dP.TileRange=Ch,dP.TileRange.createOrUpdate=Eh,dP.VectorRenderTile=zh,dP.VectorTile=Rh,dP.View=La,dP.View.createCenterConstraint=Pa,dP.View.createResolutionConstraint=Na,dP.View.createRotationConstraint=za,dP.View.isNoopAnimation=Ia,dP.array={},dP.array.binarySearch=v,dP.array.equals=b,dP.array.extend=g,dP.array.find=w,dP.array.findIndex=x,dP.array.includes=p,dP.array.isSorted=j,dP.array.linearFindNearest=m,dP.array.numberSafeCompareFunction=d,dP.array.remove=function(t,n){var i=t.indexOf(n),r=i>-1;return r&&t.splice(i,1),r},dP.array.reverseSubArray=y,dP.array.stableSort=function(t,n){var i,r=t.length,e=Array(t.length);for(i=0;i3&&!!Yr(t,n,i,r)},dP.geom.flat.transform={},dP.geom.flat.transform.rotate=gr,dP.geom.flat.transform.scale=wr,dP.geom.flat.transform.transform2D=yr,dP.geom.flat.transform.translate=br,dP.has={},dP.has.DEVICE_PIXEL_RATIO=Tt,dP.has.FIREFOX=St,dP.has.IMAGE_DECODE=Et,dP.has.MAC=kt,dP.has.PASSIVE_EVENT_LISTENERS=Ct,dP.has.SAFARI=_t,dP.has.WEBKIT=Ot,dP.has.WORKER_OFFSCREEN_CANVAS=At,dP.interaction={},dP.interaction.DoubleClickZoom=ou,dP.interaction.DragAndDrop=Wj,dP.interaction.DragAndDrop.DragAndDropEvent=Uj,dP.interaction.DragBox=Iu,dP.interaction.DragBox.DragBoxEvent=zu,dP.interaction.DragPan=Su,dP.interaction.DragRotate=Ou,dP.interaction.DragRotateAndZoom=Jj,dP.interaction.DragZoom=Lu,dP.interaction.Draw=oM,dP.interaction.Draw.DrawEvent=eM,dP.interaction.Draw.createBox=function(){return function(t,n,i){var r=en([t[0],t[t.length-1]].map((function(t){return lr(t,i)}))),e=[[kn(r),Tn(r),In(r),zn(r),kn(r)]],o=n;o?o.setCoordinates(e):o=new je(e);var s=cr();return s&&o.transform(i,s),o}},dP.interaction.Draw.createRegularPolygon=function(t,n){return function(i,r,e){var o=lr(i[0],e),s=lr(i[i.length-1],e),a=Math.sqrt(qi(o,s)),u=r||_e(new Yj(o),t),h=n;if(!n&&0!==n){var c=s[0]-o[0],f=s[1]-o[1];h=Math.atan2(f,c)}Oe(u,o,a,h);var l=cr();return l&&u.transform(e,l),u}},dP.interaction.Extent=lM,dP.interaction.Extent.ExtentEvent=uM,dP.interaction.Interaction=ru,dP.interaction.Interaction.pan=nu,dP.interaction.Interaction.zoomByDelta=iu,dP.interaction.KeyboardPan=Uu,dP.interaction.KeyboardZoom=Vu,dP.interaction.Modify=jM,dP.interaction.Modify.ModifyEvent=gM,dP.interaction.MouseWheelZoom=Yu,dP.interaction.PinchRotate=$u,dP.interaction.PinchZoom=Qu,dP.interaction.Pointer=uu,dP.interaction.Pointer.centroid=au,dP.interaction.Select=kM,dP.interaction.Select.SelectEvent=_M,dP.interaction.Snap=CM,dP.interaction.Translate=LM,dP.interaction.Translate.TranslateEvent=RM,dP.interaction.defaults=th,dP.layer={},dP.layer.Base=Uo,dP.layer.BaseImage=jd,dP.layer.BaseTile=zd,dP.layer.BaseVector=Lp,dP.layer.Graticule=ny,dP.layer.Group=Us,dP.layer.Heatmap=ay,dP.layer.Image=Ed,dP.layer.Layer=ns,dP.layer.Layer.inView=ts,dP.layer.MapboxVector=Rj,dP.layer.MapboxVector.getMapboxPath=Aj,dP.layer.MapboxVector.normalizeGlyphsUrl=Cj,dP.layer.MapboxVector.normalizeSourceUrl=Nj,dP.layer.MapboxVector.normalizeSpriteUrl=Ej,dP.layer.MapboxVector.normalizeStyleUrl=Pj,dP.layer.Tile=Gd,dP.layer.Vector=Hm,dP.layer.VectorImage=Fj,dP.layer.VectorTile=_y,dP.layer.WebGLPoints=qj,dP.loadingstrategy={},dP.loadingstrategy.all=Vh,dP.loadingstrategy.bbox=function(t,n){return[t]},dP.loadingstrategy.tile=function(t){return function(n,i){var r=t.getZForResolution(i),e=t.getTileRangeForExtentAndZ(n,r),o=[],s=[r,0,0];for(s[1]=e.minX;s[1]<=e.maxX;++s[1])for(s[2]=e.minY;s[2]<=e.maxY;++s[2])o.push(t.getTileCoordExtent(s));return o}},dP.math={},dP.math.clamp=Vn,dP.math.cosh=Jn,dP.math.lerp=ti,dP.math.log2=Xn,dP.math.modulo=Qn,dP.math.solveLinearSystem=Zn,dP.math.squaredDistance=Yn,dP.math.squaredSegmentDistance=Hn,dP.math.toDegrees=$n,dP.math.toRadians=Kn,dP.net={},dP.net.jsonp=Jh,dP.obj={},dP.obj.assign=k,dP.obj.clear=T,dP.obj.getValues=A,dP.obj.isEmpty=E,dP.proj={},dP.proj.Projection=Wn,dP.proj.Units={},dP.proj.Units.METERS_PER_UNIT=bt,dP.proj.addCommon=mr,dP.proj.addCoordinateTransforms=ir,dP.proj.addEquivalentProjections=Ki,dP.proj.addEquivalentTransforms=Qi,dP.proj.addProjection=Hi,dP.proj.addProjections=Yi,dP.proj.clearAllProjections=function(){gi(),ji()},dP.proj.clearUserProjection=function(){ur=null},dP.proj.cloneTransform=Ji,dP.proj.createProjection=tr,dP.proj.createSafeCoordinateTransform=pr,dP.proj.createTransformFromCoordinateTransform=nr,dP.proj.epsg3857={},dP.proj.epsg3857.EXTENT=ei,dP.proj.epsg3857.HALF_SIZE=ri,dP.proj.epsg3857.MAX_SAFE_Y=si,dP.proj.epsg3857.PROJECTIONS=ui,dP.proj.epsg3857.RADIUS=ii,dP.proj.epsg3857.WORLD_EXTENT=oi,dP.proj.epsg3857.fromEPSG4326=hi,dP.proj.epsg3857.toEPSG4326=ci,dP.proj.epsg4326={},dP.proj.epsg4326.EXTENT=vi,dP.proj.epsg4326.METERS_PER_UNIT=di,dP.proj.epsg4326.PROJECTIONS=mi,dP.proj.epsg4326.RADIUS=li,dP.proj.equivalent=rr,dP.proj.fromLonLat=function(t,n){return sr(t,"EPSG:4326",void 0!==n?n:"EPSG:3857")},dP.proj.fromUserCoordinate=lr,dP.proj.fromUserExtent=dr,dP.proj.get=Zi,dP.proj.getPointResolution=$i,dP.proj.getTransform=or,dP.proj.getTransformFromProjections=er,dP.proj.getUserProjection=cr,dP.proj.identityTransform=Xi,dP.proj.proj4={},dP.proj.proj4.register=function(t){var n,i,r=Object.keys(t.defs),e=r.length;for(n=0;n180)&&(i[0]=Qn(r+180,360)-180),i},dP.proj.toUserCoordinate=fr,dP.proj.toUserExtent=vr,dP.proj.transform=sr,dP.proj.transformExtent=ar,dP.proj.transformWithProjections=function(t,n,i){return er(n,i)(t)},dP.proj.transforms={},dP.proj.transforms.add=Mi,dP.proj.transforms.clear=ji,dP.proj.transforms.get=Si,dP.proj.transforms.remove=function(t,n){var i=t.getCode(),r=n.getCode(),e=xi[i][r];return delete xi[i][r],E(xi[i])&&delete xi[i],e},dP.proj.useGeographic=function(){hr("EPSG:4326")},dP.render={},dP.render.Box=Tu,dP.render.Event=ss,dP.render.Feature=Wm,dP.render.VectorContext=Xh,dP.render.canvas={},dP.render.canvas.Builder=Yp,dP.render.canvas.BuilderGroup=am,dP.render.canvas.Executor=gm,dP.render.canvas.ExecutorGroup=Mm,dP.render.canvas.ExecutorGroup.getPixelIndexArray=jm,dP.render.canvas.ImageBuilder=$p,dP.render.canvas.Immediate=Yh,dP.render.canvas.Instruction={},dP.render.canvas.Instruction.beginPathInstruction=Vp,dP.render.canvas.Instruction.closePathInstruction=Jp,dP.render.canvas.Instruction.fillInstruction=Up,dP.render.canvas.Instruction.strokeInstruction=Wp,dP.render.canvas.LineStringBuilder=Qp,dP.render.canvas.PolygonBuilder=nm,dP.render.canvas.TextBuilder=om,dP.render.canvas.checkedFonts=Os,dP.render.canvas.defaultFillStyle=ys,dP.render.canvas.defaultFont=ms,dP.render.canvas.defaultLineCap=gs,dP.render.canvas.defaultLineDash=ws,dP.render.canvas.defaultLineDashOffset=0,dP.render.canvas.defaultLineJoin=bs,dP.render.canvas.defaultLineWidth=1,dP.render.canvas.defaultMiterLimit=xs,dP.render.canvas.defaultPadding=_s,dP.render.canvas.defaultStrokeStyle=js,dP.render.canvas.defaultTextAlign=Ms,dP.render.canvas.defaultTextBaseline=Ss,dP.render.canvas.drawImageOrLabel=Fs,dP.render.canvas.hitdetect={},dP.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=Sm,dP.render.canvas.hitdetect.createHitDetectionImageData=_m,dP.render.canvas.hitdetect.hitDetect=Om,dP.render.canvas.labelCache=ks,dP.render.canvas.measureAndCacheTextWidth=Rs,dP.render.canvas.measureTextHeight=Ns,dP.render.canvas.measureTextWidth=Is,dP.render.canvas.measureTextWidths=Ls,dP.render.canvas.registerFont=Ps,dP.render.canvas.rotateAtOffset=function(t,n,i,r){0!==n&&(t.translate(i,r),t.rotate(n),t.translate(-i,-r))},dP.render.canvas.textHeights=Cs,dP.render.getRenderPixel=function(t,n){var i=n.slice(0);return Ft(t.inversePixelTransform.slice(),i),i},dP.render.getVectorContext=uc,dP.render.toContext=function(t,n){var i=t.canvas,r=n||{},e=r.pixelRatio||Tt,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=qt([1,0,0,1,0,0],e,e);return new Yh(t,e,s,a,0)},dP.renderer={},dP.renderer.Composite=qs,dP.renderer.Layer=Sd,dP.renderer.Map=es,dP.renderer.canvas={},dP.renderer.canvas.ImageLayer=Td,dP.renderer.canvas.Layer=Od,dP.renderer.canvas.TileLayer=Ld,dP.renderer.canvas.VectorImageLayer=Em,dP.renderer.canvas.VectorLayer=Tm,dP.renderer.canvas.VectorTileLayer=Lm,dP.renderer.vector={},dP.renderer.vector.defaultOrder=rc,dP.renderer.vector.getSquaredTolerance=ec,dP.renderer.vector.getTolerance=oc,dP.renderer.vector.renderFeature=sc,dP.renderer.webgl={},dP.renderer.webgl.Layer=zp,dP.renderer.webgl.Layer.colorDecodeId=Np,dP.renderer.webgl.Layer.colorEncodeId=Pp,dP.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},dP.renderer.webgl.Layer.writePointFeatureToBuffers=function(t,n,i,r,e,o){var s=3+e,a=t[n+0],u=t[n+1],h=Ap;h.length=e;for(var c=0;c1?x(i.TileMatrixSetLink,"projection"in n?function(t,i,r){var o=w(e,(function(n){return n.Identifier==t.TileMatrixSet})).SupportedCRS,s=Zi(o),a=Zi(n.projection);return s&&a?rr(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=x(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,h={};"Dimension"in i&&i.Dimension.forEach((function(t,n,i){var r=t.Identifier,e=t.Default;void 0===e&&(e=t.Value[0]),h[r]=e}));var c,f=w(t.Contents.TileMatrixSet,(function(t,n,i){return t.Identifier==o})),l=f.SupportedCRS;if(l&&(c=Zi(l)),"projection"in n){var v=Zi(n.projection);v&&(c&&!rr(v,c)||(c=v))}var d=!1,m="ne"==c.getAxisOrientation().substr(0,2),y=f.TileMatrix[0],g={MinTileCol:0,MinTileRow:0,MaxTileCol:y.MatrixWidth-1,MaxTileRow:y.MatrixHeight-1};if(s){g=s[s.length-1];var b=w(f.TileMatrix,(function(t){return t.Identifier===g.TileMatrix||f.Identifier+":"+t.Identifier===g.TileMatrix}));b&&(y=b)}var j=28e-5*y.ScaleDenominator/c.getMetersPerUnit(),M=m?[y.TopLeftCorner[1],y.TopLeftCorner[0]]:y.TopLeftCorner,S=y.TileWidth*j,_=y.TileHeight*j,O=f.BoundingBox,k=[M[0]+S*g.MinTileCol,M[1]-_*(1+g.MaxTileRow),M[0]+S*(1+g.MaxTileCol),M[1]-_*g.MinTileRow];if(void 0!==O&&!hn(O,k)){var T=i.WGS84BoundingBox,A=Zi("EPSG:4326").getExtent();if(k=O,T)d=T[0]===A[0]&&T[2]===A[2];else{var E=ar(O,f.SupportedCRS,"EPSG:4326");d=E[0]-1e-10<=A[0]&&E[2]+1e-10>=A[2]}}var C=ll(f,k,s),P=[],N=n.requestEncoding;if(N=void 0!==N?N:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var z=t.OperationsMetadata.GetTile.DCP.HTTP.Get,I=0,R=z.length;I