jonnybarnes.uk/public/assets/js/maps.js

21 lines
458 KiB
JavaScript
Raw Normal View History

!function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=19)}([function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";function i(t){var e=/POINT\((.*)\)/.exec(t),r=e[1].split(" ")[0],i=e[1].split(" ")[1];return{latitude:i,longitude:r}}e.a=i},function(t,e,r){"use strict";function i(t){return Array.isArray(t)?t:Array.from(t)}function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=t.dataset.latitude,o=t.dataset.longitude,l=t.dataset.id,c=window["geojson"+l];if(null==c&&(c={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[o,n]},properties:{title:"Current Location",icon:"circle-stroked",uri:"current-location"}}]}),null!=i){var p=!0,f=!1,d=void 0;try{for(var m,y=i[Symbol.iterator]();!(p=(m=y.next()).done);p=!0){var v=m.value,g=r.i(s.a)(v.location).longitude,_=r.i(s.a)(v.location).latitude;c.features.push({type:"Feature",geometry:{type:"Point",coordinates:[g,_]},properties:{title:v.name,icon:"circle",uri:v.slug}})}}catch(t){f=!0,d=t}finally{try{!p&&y.return&&y.return()}finally{if(f)throw d}}}if(null!=e){e.coords.longitude,e.coords.latitude}var map=new a.a.Map({container:t,style:"mapbox://styles/mapbox/streets-v9",center:[o,n],zoom:15});if(null==e&&map.scrollZoom.disable(),map.addControl(new a.a.NavigationControl),t.appendChild(h(map)),map.on("load",function(){map.addSource("points",{type:"geojson",data:c}),map.addLayer({id:"points",interactive:!0,type:"symbol",source:"points",layout:{"icon-image":"{icon}-15","text-field":"{title}","text-offset":[0,1]}})}),null!=e&&map.on("click",function(t){var e=map.queryRenderedFeatures(t.point,{layer:["points"]});e.length&&(map.flyTo({center:e[0].geometry.coordinates}),r.i(u.a)(e[0].properties.uri))}),c.features&&c.features.length>1){var x=new a.a.LngLatBounds,b=!0,w=!1,E=void 0;try{for(var T,S=c.features[Symbol.iterator]();!(b=(T=S.next()).done);b=!0){var z=T.value;x.extend(z.geometry.coordinates)}}catch(t){w=!0,E=t}finally{try{!b&&S.return&&S.return()}finally{if(w)throw E}}map.fitBounds(x,{padding:65})}return map}var o=r(9),a=r.n(o),s=r(1),u=r(4);e.a=n,a.a.accessToken="pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw";var l=function(t){return t.split("-").map(function(t){var e=i(t),r=e[0],n=e.slice(1);return r.toUpperCase()+n.join("").toLowerCase()}).join(" ")},c=function(map,t,e){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=document.createElement("input");i.setAttribute("id",e),i.setAttribute("type","radio"),i.setAttribute("name","toggle"),i.setAttribute("value",e),1==r&&i.setAttribute("checked","checked"),i.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/"+e+"-v9")});var n=document.createElement("label");n.setAttribute("for",e),n.appendChild(document.createTextNode(l(e))),t.appendChild(i),t.appendChild(n)},h=function(map){var t=document.createElement("div");return t.classList.add("map-menu"),c(map,t,"streets",!0),c(map,t,"satellite-streets"),t}},,function(t,e,r){"use strict";function i(t){document.querySelector("select")&&("current-location"==t?document.querySelector('select [id="option-coords"]').selected=!0:document.querySelector('select [value="'+t+'"]').selected=!0)}e.a=i},function(t,e,r){"use strict";function i(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-i(t)}function o(t){var e,r,n,o,a,s,u=t.leng
Updating codebase to use es6/7 Squashed commit of the following: commit 07b27d00f135a521143154a2e77abdc1680b7d5b Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Jan 26 14:59:35 2017 +0000 Fix styleci.io issue commit 9e67f0a96484f8047f22d13abb4cd41c2e44b95d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Jan 26 08:28:22 2017 +0000 Remove some unused dependencies commit 3c65070f3ff2aec10d821ae9f12821bc08e37d0a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 25 18:00:10 2017 +0000 Compressed webpack/babel output commit 694c43d1a9a6c8cb84d4cc789a6643b8d2863cec Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 25 17:59:27 2017 +0000 Let’s compress the es5 output commit debffc0e41760fcc87e6d3768163e6ed8ea5d98c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 25 17:45:05 2017 +0000 webpack/babel generated es5 assets commit 1e978d6c5795f230ab320f94ad2fb98871bb6fa5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 25 17:36:52 2017 +0000 Allow content of micropub form page to be persisted commit 44fb8026962ef574700f07ef93d18bdb38cdedb2 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 25 17:35:58 2017 +0000 Name the micropub form commit 732abaf561bf9d6392fe506d30d320e9c17b8226 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 25 17:34:39 2017 +0000 Add webStorage dependency commit a4520085dfc673c5c3d940150358b8ecc3cdf022 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Jan 16 12:32:33 2017 +0000 No need for a form id on the micropub form untill form autosave is added commit a182be46a616d8e4085be5e24cbd3623f13cc28d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 14 20:37:31 2017 +0000 Polyfill fetch and promise only in older browsers using unpkg.com commit fdc044150dc8e2b755f93119b196ba0455bbbb83 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Jan 13 15:46:05 2017 +0000 Generated js from webpack/babel commit d24e6aa9fff38823a0c667e6f9e43dcb2ca179c4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Jan 13 15:45:32 2017 +0000 Lots of es6 to generate and add map, particularly the new note form commit e7004a9fe475e07d43de905fb00d51c659878474 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Jan 13 15:44:54 2017 +0000 Don’t link to commons.js, it aint being made at the moment commit d4a2e4e143b644287f9da109eb2850c2361b2f20 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Jan 13 15:43:27 2017 +0000 Temporarily don’t optimize JS commit 05623de122da7d88642af60f85e5320a3ff651fc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 11 14:24:15 2017 +0000 Add places to geojson data commit 3eb1a4f29bb4263b9998a6f3f53abb7d1eeff520 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 11 14:22:53 2017 +0000 Use alertify.js to give relevant feedback to user commit 6f123fa178d6cd19528130ebd78157c37eaab1a1 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 11 14:21:24 2017 +0000 Add alertify.css back commit 89fca3b3aeb23ef97fb767514e0502298d1b83fd Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Jan 11 14:19:56 2017 +0000 Webpack’d javascript commit 94ab60f34079238ed6228bf6e789f14d7a09823b Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Jan 9 09:10:17 2017 +0000 Webpack’d javascript commit 1ca3a55a27c20ea08633b589023fe5ad1acb2b68 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Jan 9 09:09:06 2017 +0000 Define const functions in order of usage commit dc5535b32a357611860e0e98fcdc7d9c12c5d383 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 8 18:50:55 2017 +0000 Link to correct js files with defer option commit 42f0e5b85825943ed148736e8e0fe22f5654ae90 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 8 18:50:18 2017 +0000 New webpacked es6 code commit 300443bb0ce7b65bda1cf550fe5c7173a89edaf3 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 8 18:49:44 2017 +0000 Moving towards consolidated es6 map code commit b1001760e03dd358f896feb90dd3acc0bc6728fc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 8 18:44:40 2017 +0000 Don’t mangle the fetch function commit 289e59025634b6d2569b73ae87e3ea4942034e33 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 8 18:43:47 2017 +0000 Updated yarn/npm dependencies commit 3439b008e6bd96d8c45591c2a945c4ac246440ec Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 29 11:58:50 2016 +0000 Link to the correct assets on the new note page commit 81dc83e362266028f8336ae5a27e92c8c8a2b6dc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 29 11:57:46 2016 +0000 Add a map to the new note page commit 5101ecd3dd60cd78e9a4bce81a5e60a2f575bc57 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 29 11:56:54 2016 +0000 Bundle common JS between entry points commit 1f916adcfd1b07df388417b6bd800e109cec543c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 29 11:55:31 2016 +0000 Add geojson to individual notes commit 7a6ae8ca49b4ca49413ddb977f7b534f62b41c20 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Dec 28 19:53:30 2016 +0000 Link to self-hosted mapbox-gl.css commit 8be006ec2b738cbcebd06283e18c292b3efd7d16 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Dec 28 19:52:41 2016 +0000 Use self-hosted mapbox-gl css, and a better default geojson title value commit 5ec480842a2194a071b6a23ae181a8de5b8d47cd Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Dec 28 17:09:46 2016 +0000 Access geojson data to markup map correctly commit f2f1d7563f7b0cb7cc62658cc2817e56d2b47c31 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Dec 28 17:09:07 2016 +0000 Generate geojson data for places commit 9f8c9ba02f7ac37b4ab81aad2fb0cd2c077c45cd Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 23 11:55:10 2016 +0000 Use geojson to add a default you location point commit 3da499d3ea6a214f8008d1b98f9b0c2f31ecba0c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 22 22:29:18 2016 +0000 Some code cleaning commit 39376097eda82491df272cc214d70ff3095d4873 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 22 22:21:29 2016 +0000 Use satellite streets view commit f3db8f43fc403bc180e24d63e21c8311441cb2b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 22 16:46:03 2016 +0000 Semi working map state, still need to add own css, and add marker commit 5f398a642b9db67f4b0733988c20138b37d2141d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 22 13:17:04 2016 +0000 Reference new maps.js with bundled mapbox commit bad97649a623c5552e6b607a1975aa2de8131191 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 22 13:16:25 2016 +0000 Add mapbox-gl again commit 47484962e7620aa7a9a5153cfc03e2ba4030dd5c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Dec 21 00:03:23 2016 +0000 Early working version of maps.js commit e53e0f39952a65996c09b06fd35918ffabed0de2 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Dec 20 17:14:17 2016 +0000 Setup webpack commit f930a1e2bd7d18809bd40d0cc22f9c3af75f1984 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Dec 20 15:00:42 2016 +0000 Add webpack v2 commit b16e8d62db071155a8b5fb216d3d60ebf6fa9468 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Dec 20 14:53:47 2016 +0000 Define default settings for babel commit 97c13cb753e08d25aa48ecff579efa05173a2c81 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Dec 20 14:53:31 2016 +0000 Add babeljs commit dd9efc3b056cf96323d7f11acff0fb1ab137caef Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Dec 20 14:49:23 2016 +0000 Remove old javascript commit ab99c251ad5847b48d347e2c9426077b3ba8e0f5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 16 13:26:10 2016 +0000 update readme to reflect changes to how syndication targets need to be set
2017-01-26 15:21:21 +00:00
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var K=r(5),Q=r(7),$=r(8);e.Buffer=a,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=n(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,r){return s(null,t,e,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,r){return l(null,t,e,r)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!$(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=a.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var o=t[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)_(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)_(this,e,e+3),_(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,i,n){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,n>>>=0,this===t)return 0;for(var o=n-i,s=r-e,u=Math.min(o,s),l=this.slice(i,n),c=t.slice(e,r),h=0;h<u;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},a.prototype.indexOf=function(t,e,r){return x(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return x(this,t,e,r,!1)},a.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return T(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return z(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(thi
var q=N[V];A(q,new h(q[0].x,q[0].y,0))}else if("Point"===t.type)for(var Z=0,G=t.geometry;Z<G.length;Z+=1)for(var X=G[Z],W=0,Y=X;W<Y.length;W+=1){var H=Y[W];A([H],new h(H.x,H.y,0))}},D.prototype.anchorIsTooClose=function(t,e,r){var i=this.compareText;if(t in i){for(var n=i[t],o=n.length-1;o>=0;o--)if(r.dist(n[o])<e)return!0}else i[t]=[];return i[t].push(r),!1},D.prototype.place=function(t,e){var r=this;this.createArrays();var i=this.layers[0].layout,n=t.maxScale,o="map"===i["text-rotation-alignment"]&&"line"===i["symbol-placement"],a="map"===i["icon-rotation-alignment"]&&"line"===i["symbol-placement"],s=i["text-allow-overlap"]||i["icon-allow-overlap"]||i["text-ignore-placement"]||i["icon-ignore-placement"];if(s){var u=this.symbolInstancesArray.toArray(this.symbolInstancesStartIndex,this.symbolInstancesEndIndex),l=t.angle,c=Math.sin(l),h=Math.cos(l);this.sortedSymbolInstances=u.sort(function(t,e){var r=c*t.anchorPointX+h*t.anchorPointY|0,i=c*e.anchorPointX+h*e.anchorPointY|0;return r-i||e.index-t.index})}for(var p=this.symbolInstancesStartIndex;p<this.symbolInstancesEndIndex;p++){var f=r.sortedSymbolInstances?r.sortedSymbolInstances[p-r.symbolInstancesStartIndex]:r.symbolInstancesArray.get(p),d={boxStartIndex:f.textBoxStartIndex,boxEndIndex:f.textBoxEndIndex},m={boxStartIndex:f.iconBoxStartIndex,boxEndIndex:f.iconBoxEndIndex},y=!(f.textBoxStartIndex===f.textBoxEndIndex),v=!(f.iconBoxStartIndex===f.iconBoxEndIndex),g=i["text-optional"]||!y,_=i["icon-optional"]||!v,x=y?t.placeCollisionFeature(d,i["text-allow-overlap"],i["symbol-avoid-edges"]):t.minScale,b=v?t.placeCollisionFeature(m,i["icon-allow-overlap"],i["symbol-avoid-edges"]):t.minScale;g||_?!_&&x?x=Math.max(b,x):!g&&b&&(b=Math.max(b,x)):b=x=Math.max(b,x),y&&(t.insertCollisionFeature(d,x,i["text-ignore-placement"]),x<=n&&r.addSymbols(r.arrays.glyph,f.glyphQuadStartIndex,f.glyphQuadEndIndex,x,i["text-keep-upright"],o,t.angle,f.writingModes)),v&&(t.insertCollisionFeature(m,b,i["icon-ignore-placement"]),b<=n&&r.addSymbols(r.arrays.icon,f.iconQuadStartIndex,f.iconQuadEndIndex,b,i["icon-keep-upright"],a,t.angle))}e&&this.addToDebugBuffers(t)},D.prototype.addSymbols=function(t,e,r,n,o,a,s,u){for(var l=this,c=t.elementArray,h=t.layoutVertexArray,p=this.zoom,f=Math.max(Math.log(n)/Math.LN2+p,0),d=e;d<r;d++){var m=l.symbolQuadsArray.get(d).SymbolQuad,y=(m.anchorAngle+s+Math.PI)%(2*Math.PI);if(u&P.vertical){if(a&&m.writingMode===P.vertical){if(o&&a&&y<=5*Math.PI/4||y>7*Math.PI/4)continue}else if(o&&a&&y<=3*Math.PI/4||y>5*Math.PI/4)continue}else if(o&&a&&(y<=Math.PI/2||y>3*Math.PI/2))continue;var v=m.tl,g=m.tr,_=m.bl,x=m.br,b=m.tex,w=m.anchorPoint,E=Math.max(p+Math.log(m.minScale)/Math.LN2,f),T=Math.min(p+Math.log(m.maxScale)/Math.LN2,25);if(!(T<=E)){E===f&&(E=0);var S=Math.round(m.glyphAngle/(2*Math.PI)*256),z=t.prepareSegment(4),A=z.vertexLength;i(h,w.x,w.y,v.x,v.y,b.x,b.y,E,T,f,S),i(h,w.x,w.y,g.x,g.y,b.x+b.w,b.y,E,T,f,S),i(h,w.x,w.y,_.x,_.y,b.x,b.y+b.h,E,T,f,S),i(h,w.x,w.y,x.x,x.y,b.x+b.w,b.y+b.h,E,T,f,S),c.emplaceBack(A,A+1,A+2),c.emplaceBack(A+1,A+2,A+3),z.vertexLength+=4,z.primitiveLength+=2}}},D.prototype.addToDebugBuffers=function(t){for(var e=this,r=this.arrays.collisionBox,i=r.layoutVertexArray,a=r.elementArray,s=-t.angle,u=t.yStretch,l=this.symbolInstancesStartIndex;l<this.symbolInstancesEndIndex;l++){var c=e.symbolInstancesArray.get(l);c.textCollisionFeature={boxStartIndex:c.textBoxStartIndex,boxEndIndex:c.textBoxEndIndex},c.iconCollisionFeature={boxStartIndex:c.iconBoxStartIndex,boxEndIndex:c.iconBoxEndIndex};for(var h=0;h<2;h++){var p=c[0===h?"textCollisionFeature":"iconCollisionFeature"];if(p)for(var f=p.boxStartIndex;f<p.boxEndIndex;f++){var d=e.collisionBoxArray.get(f),m=d.anchorPoint,y=new o(d.x1,d.y1*u)._rotate(s),v=new o(d.x2,d.y1*u)._rotate(s),g=new o(d.x1,d.y2*u)._rotate(s),_=new o(d.x2,d.y2*u)._rotate(s),x=Math.max(0,Math.min(25,e.zoom+Math.log(d.maxScale)/Math.LN2)),b=Math.max(0,Math.min(25,e.zoom+Math.log(d.placementScale)/Math.LN2)),w=r.prepareSegment(4),E=w.vertexLength;n(i,m,y,x,b),n(i,m,v,x,b),n(i,m,_,x,b),n(i,m,g,x,b),a.emplaceBack(E,E+1),a.emplaceBa
C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1
r.isOpaquePass||e.reverse()),r.renderLayer(r,t,o,e),r.currentLayer+=r.isOpaquePass?-1:1}},v.prototype.depthMask=function(t){t!==this._depthMask&&(this._depthMask=t,this.gl.depthMask(t))},v.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||i.length)&&(this.id=r.id,y[r.type](t,e,r,i))},v.prototype.setDepthSublayer=function(t){var e=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,r=e-1+this.depthRange;this.gl.depthRange(r,e)},v.prototype.translatePosMatrix=function(t,e,r,i){if(!r[0]&&!r[1])return t;if("viewport"===i){var o=Math.sin(-this.transform.angle),a=Math.cos(-this.transform.angle);r=[r[0]*a-r[1]*o,r[0]*o+r[1]*a]}var s=[u(e,r[0],this.transform.zoom),u(e,r[1],this.transform.zoom),0],l=new Float32Array(16);return n.translate(l,t,s),l},v.prototype.saveTileTexture=function(t){var e=this.reusableTextures.tiles[t.size];e?e.push(t):this.reusableTextures.tiles[t.size]=[t]},v.prototype.saveViewportTexture=function(t){this.reusableTextures.viewport=t},v.prototype.getTileTexture=function(t){var e=this.reusableTextures.tiles[t];return e&&e.length>0?e.pop():null},v.prototype.getViewportTexture=function(t,e){var r=this.reusableTextures.viewport;if(r)return r.width===t&&r.height===e?r:(this.gl.deleteTexture(r),void(this.reusableTextures.viewport=null))},v.prototype.lineWidth=function(t){this.gl.lineWidth(l.clamp(t,this.lineWidthRange[0],this.lineWidthRange[1]))},v.prototype.showOverdrawInspector=function(t){if(t||this._showOverdrawInspector){this._showOverdrawInspector=t;var e=this.gl;if(t){e.blendFunc(e.CONSTANT_COLOR,e.ONE);var r=8,i=1/r;e.blendColor(i,i,i,0),e.clearColor(0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)}else e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA)}},v.prototype.createProgram=function(t,e){var r=this.gl,n=r.createProgram(),o=m[t],a="#define MAPBOX_GL_JS\n#define DEVICE_PIXEL_RATIO "+i.devicePixelRatio.toFixed(1)+"\n";this._showOverdrawInspector&&(a+="#define OVERDRAW_INSPECTOR;\n");var s=r.createShader(r.FRAGMENT_SHADER);r.shaderSource(s,e.applyPragmas(a+m.prelude.fragmentSource+o.fragmentSource,"fragment")),r.compileShader(s),r.attachShader(n,s);var u=r.createShader(r.VERTEX_SHADER);r.shaderSource(u,e.applyPragmas(a+m.prelude.vertexSource+o.vertexSource,"vertex")),r.compileShader(u),r.attachShader(n,u),r.linkProgram(n);for(var l=r.getProgramParameter(n,r.ACTIVE_ATTRIBUTES),c={program:n,numAttributes:l},h=0;h<l;h++){var p=r.getActiveAttrib(n,h);c[p.name]=r.getAttribLocation(n,p.name)}for(var f=r.getProgramParameter(n,r.ACTIVE_UNIFORMS),d=0;d<f;d++){var y=r.getActiveUniform(n,d);c[y.name]=r.getUniformLocation(n,y.name)}return c},v.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=this.createProgram(t,e)),this.cache[r]},v.prototype.useProgram=function(t,e){var r=this.gl,i=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.currentProgram!==i&&(r.useProgram(i.program),this.currentProgram=i),i},e.exports=v},{"../data/buffer":8,"../data/extent":11,"../data/pos_array":14,"../data/program_configuration":15,"../data/raster_bounds_array":16,"../source/pixels_to_tile_units":46,"../source/source_cache":51,"../util/browser":110,"../util/util":129,"./draw_background":25,"./draw_circle":26,"./draw_debug":28,"./draw_fill":29,"./draw_fill_extrusion":30,"./draw_line":31,"./draw_raster":32,"./draw_symbol":33,"./frame_history":34,"./shaders":38,"./vertex_array_object":39,"@mapbox/gl-matrix":133}],37:[function(t,e,r){"use strict";var i=t("../source/pixels_to_tile_units");r.prepare=function(t,e,r){var i=e.gl,n=e.spriteAtlas.getPosition(t.from,!0),o=e.spriteAtlas.getPosition(t.to,!0);n&&o&&(i.uniform1i(r.u_image,0),i.uniform2fv(r.u_pattern_tl_a,n.tl),i.uniform2fv(r.u_pattern_br_a,n.br),i.uniform2fv(r.u_pattern_tl_b,o.tl),i.uniform2fv(r.u_pattern_br_b,o.br),i.uniform1f(r.u_mix,t.t),i.uniform2fv(r.u_pattern_size_a,n.size),i.uniform2fv(r.u_pattern_size_b,o.size),i.uniform1f(r.u_scale_a,t.fromScale),i.uniform1f(r.u_scale_b,t.toScale),i.a
vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\nuniform mediump float u_width;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases. \n // moved them into the shader for clarity and simplicity. \n gapwidth = gapwidth / 2.0;\n float width = u_width / 2.0;\n offset = -1.0 * offset;\n \n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit to get the position\n vec2 pos = floor(a_pos * 0.5);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSou
i._cache.get(t.id)}},e.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/t.tileSize)+1,r=Math.ceil(t.height/t.tileSize)+1,i=e*r,n=5;this._cache.setMaxSize(Math.floor(i*n))},e.prototype.update=function(t){var r=this;if(this._sourceLoaded){var i,n,a,s;this.updateCacheSize(t);var u=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),c=Math.max(u-e.maxOverzooming,this._source.minzoom),h=Math.max(u+e.maxUnderzooming,this._source.minzoom),f={};this._coveredTiles={};var d;for(d=this.used?this._source.coord?[this._source.coord]:t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}):[],i=0;i<d.length;i++)n=d[i],a=r.addTile(n),f[n.id]=!0,a.hasData()||r.findLoadedChildren(n,h,f)||(s=r.findLoadedParent(n,c,f),s&&r.addTile(s.coord));var m={};if(o(this._source.type))for(var y=Object.keys(f),v=0;v<y.length;v++){var g=y[v];n=l.fromID(g),a=r._tiles[g],a&&("undefined"==typeof a.fadeEndTime||a.fadeEndTime>=Date.now())&&(r.findLoadedChildren(n,h,f)&&(f[g]=!0),s=r.findLoadedParent(n,c,m),s&&r.addTile(s.coord))}var _;for(_ in m)f[_]||(r._coveredTiles[_]=!0);for(_ in m)f[_]=!0;var x=p.keysDifference(this._tiles,f);for(i=0;i<x.length;i++)r.removeTile(+x[i]);this.transform=t}},e.prototype.addTile=function(t){var e=this._tiles[t.id];if(e)return e;var r=t.wrapped();if(e=this._tiles[r.id],e||(e=this._cache.get(r.id),e&&(e.redoPlacement(this._source),this._cacheTimers[r.id]&&(clearTimeout(this._cacheTimers[r.id]),this._cacheTimers[r.id]=void 0,this._setTileReloadTimer(r.id,e)))),!e){var i=t.z,n=i>this._source.maxzoom?Math.pow(2,i-this._source.maxzoom):1;e=new s(r,this._source.tileSize*n,this._source.maxzoom),this.loadTile(e,this._tileLoaded.bind(this,e,t.id))}return e.uses++,this._tiles[t.id]=e,this._source.fire("dataloading",{tile:e,coord:e.coord,dataType:"tile"}),e},e.prototype._setTileReloadTimer=function(t,e){var r=this,i=e.getExpiry();i&&(this._timers[t]=setTimeout(function(){r.reloadTile(t,"expired"),r._timers[t]=void 0},i-(new Date).getTime()))},e.prototype._setCacheInvalidationTimer=function(t,e){var r=this,i=e.getExpiry();i&&(this._cacheTimers[t]=setTimeout(function(){r._cache.remove(t),r._cacheTimers[t]=void 0},i-(new Date).getTime()))},e.prototype.removeTile=function(t){var e=this._tiles[t];if(e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),this._timers[t]=void 0),this._source.fire("data",{tile:e,coord:e.coord,dataType:"tile"}),!(e.uses>0)))if(e.hasData()){var r=e.coord.wrapped().id;this._cache.add(r,e),this._setCacheInvalidationTimer(r,e)}else e.aborted=!0,this.abortTile(e),this.unloadTile(e)},e.prototype.clearTiles=function(){var t=this;for(var e in this._tiles)t.removeTile(e);this._cache.reset()},e.prototype.tilesIn=function(t){for(var e=this,r={},n=this.getIds(),o=1/0,a=1/0,s=-(1/0),u=-(1/0),c=t[0].zoom,p=0;p<t.length;p++){var d=t[p];o=Math.min(o,d.column),a=Math.min(a,d.row),s=Math.max(s,d.column),u=Math.max(u,d.row)}for(var m=0;m<n.length;m++){var y=e._tiles[n[m]],v=l.fromID(n[m]),g=[i(v,y.sourceMaxZoom,new h(o,a,c)),i(v,y.sourceMaxZoom,new h(s,u,c))];if(g[0].x<f&&g[0].y<f&&g[1].x>=0&&g[1].y>=0){for(var _=[],x=0;x<t.length;x++)_.push(i(v,y.sourceMaxZoom,t[x]));var b=r[y.coord.id];void 0===b&&(b=r[y.coord.id]={tile:y,coord:v,queryGeometry:[],scale:Math.pow(2,e.transform.zoom-y.coord.z)}),b.queryGeometry.push(_)}}var w=[];for(var E in r)w.push(r[E]);return w},e.prototype.redoPlacement=function(){for(var t=this,e=this.getIds(),r=0;r<e.length;r++){var i=t.getTileByID(e[r]);i.redoPlacement(t._source)}},e.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map(l.fromID),r=0,i=e;r<i.length;r+=1){var n=i[r];n.posMatrix=t.transform.calculatePosMatrix(n,t._source.maxzoom)}return e},e}(u);d.maxOverzooming=10,d.maxUnderzooming=3,e.exports=d},{"../data/extent":11,"../geo/coordinate":18,"../util/evented":118,"../util/lru_cache":124,"../util/util":129,"./source":50,"./tile":52,"./tile_coord":53}],52:[function(t,e,r){"use str
this._updatedAllPaintProps=!1},e.prototype.setState=function(t){var e=this;if(this._checkLoaded(),y.emitErrors(this,y(t)))return!1;t=c.extend({},t),t.layers=E(t.layers);var r=T(this.serialize(),t).filter(function(t){return!(t.command in A)});if(0===r.length)return!1;var i=r.filter(function(t){return!(t.command in z)});if(i.length>0)throw new Error("Unimplemented: "+i.map(function(t){return t.command}).join(", ")+".");return r.forEach(function(t){"setTransition"!==t.command&&e[t.command].apply(e,t.args)}),this.stylesheet=t,!0},e.prototype.addSource=function(t,e,r){if(this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!e.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(e)+".");var i=["vector","raster","geojson","video","image","canvas"],n=i.indexOf(e.type)>=0;if(!n||!this._validate(y.source,"sources."+t,e,null,r)){var o=this.sourceCaches[t]=new _(t,e,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:o.loaded(),source:o.serialize(),sourceId:t}}),o.onAdd(this.map),this._changed=!0}},e.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");var e=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],e.setEventedParent(null),e.clearTiles(),e.onRemove&&e.onRemove(this.map),this._changed=!0},e.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},e.prototype.addLayer=function(t,e,r){this._checkLoaded();var i=t.id;if("object"==typeof t.source&&(this.addSource(i,t.source),t=c.extend(t,{source:i})),!this._validate(y.layer,"layers."+i,t,{arrayIndex:-1},r)){var o=n.create(t);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var a=e?this._order.indexOf(e):this._order.length;if(this._order.splice(a,0,i),this._layers[i]=o,this._removedLayers[i]&&o.source){var s=this._removedLayers[i];delete this._removedLayers[i],this._updatedSources[o.source]=s.type!==o.type?"clear":"reload"}this._updateLayer(o),"symbol"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(i)}},e.prototype.moveLayer=function(t,e){this._checkLoaded(),this._changed=!0;var r=this._layers[t];if(!r)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")});var i=this._order.indexOf(t);this._order.splice(i,1);var n=e?this._order.indexOf(e):this._order.length;this._order.splice(n,0,t),"symbol"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]="reload"))},e.prototype.removeLayer=function(t){this._checkLoaded();var e=this._layers[t];if(!e)return void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")});e.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),"symbol"===e.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[t]=e,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t]},e.prototype.getLayer=function(t){return this._layers[t]},e.prototype.setLayerZoomRange=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);return i?void(i.minzoom===e&&i.maxzoom===r||(null!=e&&(i.minzoom=e),null!=r&&(i.maxzoom=r),this._updateLayer(i))):void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")})},e.prototype.setFilter=function(t,e){this._checkLoaded();var r=this.getLayer(t);return r?void(null!==e&&void 0!==e&&this._validate(y.filter,"layers."+r.id+".filter",e)||c.deepEqual(r.filter,e)||(r.filter=c.clone(e),this._updateLayer(r))):void this.fire("error",{error:new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")})},e.prototype.getFilter=function(t){return c.clone(this.getLayer(t).filter)},e.prototype.setLayoutProperty=function(t,e,r){this._checkLoaded();var i=this.getLayer(t);return i?v
this.width=a,this.height=a,this.bin=new i(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)};u.prototype.getGlyphs=function(){var t,e,r,i={};for(var n in this.ids)t=n.split("#"),e=t[0],r=t[1],i[e]||(i[e]=[]),i[e].push(r);return i},u.prototype.getRects=function(){var t,e,r,i=this,n={};for(var o in this.ids)t=o.split("#"),e=t[0],r=t[1],n[e]||(n[e]={}),n[e][r]=i.index[o];return n},u.prototype.addGlyph=function(t,e,r,i){var o=this;if(!r)return null;var a=e+"#"+r.id;if(this.index[a])return this.ids[a].indexOf(t)<0&&this.ids[a].push(t),this.index[a];if(!r.bitmap)return null;var s=r.width+2*i,u=r.height+2*i,l=1,c=s+2*l,h=u+2*l;c+=4-c%4,h+=4-h%4;var p=this.bin.packOne(c,h);if(p||(this.resize(),p=this.bin.packOne(c,h)),!p)return n.warnOnce("glyph bitmap overflow"),null;this.index[a]=p,this.ids[a]=[t];for(var f=this.data,d=r.bitmap,m=0;m<u;m++)for(var y=o.width*(p.y+m+l)+p.x+l,v=s*m,g=0;g<s;g++)f[y+g]=d[v+g];return this.dirty=!0,p},u.prototype.resize=function(){var t=this,e=this.width,r=this.height;if(!(e>=s||r>=s)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=o,this.height*=o,this.bin.resize(this.width,this.height);for(var i=new ArrayBuffer(this.width*this.height),n=0;n<r;n++){var a=new Uint8Array(t.data.buffer,r*n,e),u=new Uint8Array(i,r*n*o,e);u.set(a)}this.data=new Uint8Array(i)}},u.prototype.bind=function(t){this.gl=t,this.texture?t.bindTexture(t.TEXTURE_2D,this.texture):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,null))},u.prototype.updateTexture=function(t){this.bind(t),this.dirty&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data),this.dirty=!1)},e.exports=u},{"../util/util":129,"shelf-pack":200}],83:[function(t,e,r){"use strict";function i(t,e,r,i){return i=i||"abc",r.replace("{s}",i[t.length%i.length]).replace("{fontstack}",t).replace("{range}",e)}var n=t("../util/mapbox").normalizeGlyphsURL,o=t("../util/ajax"),a=t("../util/verticalize_punctuation"),s=t("../util/glyphs"),u=t("../symbol/glyph_atlas"),l=t("pbf"),c=function(t,e,r){var i=1;this.advance=t.advance,this.left=t.left-r-i,this.top=t.top+r+i,this.rect=e},h=function(t){this.url=t&&n(t),this.atlases={},this.stacks={},this.loading={}};h.prototype.getSimpleGlyphs=function(t,e,r,i){var n=this;void 0===this.stacks[t]&&(this.stacks[t]={}),void 0===this.atlases[t]&&(this.atlases[t]=new u);for(var o={},s=this.stacks[t],l=this.atlases[t],h=3,p={},f=0,d=function(e){var i=Math.floor(e/256);if(s[i]){var n=s[i].glyphs[e],a=l.addGlyph(r,t,n,h);n&&(o[e]=new c(n,a,h))}else void 0===p[i]&&(p[i]=[],f++),p[i].push(e)},m=0;m<e.length;m++){var y=e[m],v=String.fromCharCode(y);d(y),a.lookup[v]&&d(a.lookup[v].charCodeAt(0))}f||i(void 0,o,t);var g=function(e,a,s){if(!e)for(var u=n.stacks[t][a]=s.stacks[0],d=0;d<p[a].length;d++){var m=p[a][d],y=u.glyphs[m],v=l.addGlyph(r,t,y,h);y&&(o[m]=new c(y,v,h))}f--,f||i(void 0,o,t)};for(var _ in p)n.loadRange(t,_,g)},h.prototype.loadRange=function(t,e,r){if(256*e>65535)return r("glyphs > 65535 not supported");void 0===this.loading[t]&&(this.loading[t]={});var n=this.loading[t];if(n[e])n[e].push(r);else{n[e]=[r];var a=256*e+"-"+(256*e+255),u=i(t,a,this.url);o.getArrayBuffer(u,function(t,r){for(var i=!t&&new s(new l(r.data)),o=0;o<n[e].length;o++)n[e][o](t,e,i);delete n[e]})}},h.prototype.getGlyphAtlas=function(t){return this.atlases[t]},e.exports=h},{"../symbol/glyph_atlas":82,"../util/ajax":109,"../util/glyphs":120,"../util/mapbox":125,"../util/verticalize_punctuation":131,pbf:196}],84:[function(t,e,r){"use strict";e.exports=function(t){function e(e){s.push(t[e]),u++}function r(t,e,r){var i=a[t];return delete a[t],a[e]=i,s[i].geometry[0].pop(),s[i].geometry[0]=s[
n.enableDrag(),this._map.getCanvasContainer().dispatchEvent(i(t)),t.stopPropagation())},u.prototype._createButton=function(t,e,r){var i=n.create("button",t,this._container);return i.type="button",i.setAttribute("aria-label",e),i.addEventListener("click",function(){r()}),i},e.exports=u},{"../../util/dom":117,"../../util/util":129,"../../util/window":112}],96:[function(t,e,r){"use strict";function i(t,e,r){var i=r&&r.maxWidth||100,a=t._container.clientHeight/2,s=o(t.unproject([0,a]),t.unproject([i,a]));if(r&&"imperial"===r.unit){var u=3.2808*s;if(u>5280){var l=u/5280;n(e,i,l,"mi")}else n(e,i,u,"ft")}else n(e,i,s,"m")}function n(t,e,r,i){var n=a(r),o=n/r;"m"===i&&n>=1e3&&(n/=1e3,i="km"),t.style.width=e*o+"px",t.innerHTML=n+i}function o(t,e){var r=6371e3,i=Math.PI/180,n=t.lat*i,o=e.lat*i,a=Math.sin(n)*Math.sin(o)+Math.cos(n)*Math.cos(o)*Math.cos((e.lng-t.lng)*i),s=r*Math.acos(Math.min(a,1));return s}function a(t){var e=Math.pow(10,(""+Math.floor(t)).length-1),r=t/e;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:1,e*r}var s=t("../../util/dom"),u=t("../../util/util"),l=function(t){this.options=t,u.bindAll(["_onMove"],this)};l.prototype.getDefaultPosition=function(){return"bottom-left"},l.prototype._onMove=function(){i(this._map,this._container,this.options)},l.prototype.onAdd=function(t){return this._map=t,this._container=s.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},l.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off("move",this._onMove),this._map=void 0},e.exports=l},{"../../util/dom":117,"../../util/util":129}],97:[function(t,e,r){"use strict";var i=t("../../util/dom"),n=t("../../geo/lng_lat_bounds"),o=t("../../util/util"),a=t("../../util/window"),s=function(t){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),o.bindAll(["_onMouseDown","_onMouseMove","_onMouseUp","_onKeyDown"],this)};s.prototype.isEnabled=function(){return!!this._enabled},s.prototype.isActive=function(){return!!this._active},s.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("mousedown",this._onMouseDown,!1),this._enabled=!0)},s.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("mousedown",this._onMouseDown),this._enabled=!1)},s.prototype._onMouseDown=function(t){t.shiftKey&&0===t.button&&(a.document.addEventListener("mousemove",this._onMouseMove,!1),a.document.addEventListener("keydown",this._onKeyDown,!1),a.document.addEventListener("mouseup",this._onMouseUp,!1),i.disableDrag(),this._startPos=i.mousePos(this._el,t),this._active=!0)},s.prototype._onMouseMove=function(t){var e=this._startPos,r=i.mousePos(this._el,t);this._box||(this._box=i.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(e.x,r.x),o=Math.max(e.x,r.x),a=Math.min(e.y,r.y),s=Math.max(e.y,r.y);i.setTransform(this._box,"translate("+n+"px,"+a+"px)"),this._box.style.width=o-n+"px",this._box.style.height=s-a+"px"},s.prototype._onMouseUp=function(t){if(0===t.button){var e=this._startPos,r=i.mousePos(this._el,t),o=(new n).extend(this._map.unproject(e)).extend(this._map.unproject(r));this._finish(),e.x===r.x&&e.y===r.y?this._fireEvent("boxzoomcancel",t):this._map.fitBounds(o,{linear:!0}).fire("boxzoomend",{originalEvent:t,boxZoomBounds:o})}},s.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},s.prototype._finish=function(){this._active=!1,a.document.removeEventListener("mousemove",this._onMouseMove,!1),a.document.removeEventListener("keydown",this._onKeyDown,!1),a.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),i.enableDrag()},s.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},e.exports=s},{"../../geo/lng_lat_bounds":20,"../../util/dom":117,"../../util/util":129,"../../util/window
"../geo/lng_lat_bounds":20,"../geo/transform":21,"../render/painter":36,"../style/animation_loop":59,"../style/style":63,"../util/browser":110,"../util/dom":117,"../util/util":129,"../util/window":112,"./bind_handlers":91,"./camera":92,"./control/attribution_control":93,"./hash":104,"mapbox-gl-supported":193,"point-geometry":197}],106:[function(t,e,r){"use strict";var i=t("../util/dom"),n=t("../geo/lng_lat"),o=t("point-geometry"),a=function(t,e){this._offset=o.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this),this._onMapClick=this._onMapClick.bind(this),t||(t=i.create("div")),t.classList.add("mapboxgl-marker"),this._element=t,this._popup=null};a.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this._update(),this._map.on("click",this._onMapClick),this},a.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map=null),i.remove(this._element),this._popup&&this._popup.remove(),this},a.prototype.getLngLat=function(){return this._lngLat},a.prototype.setLngLat=function(t){return this._lngLat=n.convert(t),this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},a.prototype.getElement=function(){return this._element},a.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&(this._popup=t,this._popup.setLngLat(this._lngLat)),this},a.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},a.prototype.getPopup=function(){return this._popup},a.prototype.togglePopup=function(){var t=this._popup;t&&(t.isOpen()?t.remove():t.addTo(this._map))},a.prototype._update=function(t){if(this._map){var e=this._map.project(this._lngLat)._add(this._offset);t&&"moveend"!==t.type||(e=e.round()),i.setTransform(this._element,"translate("+e.x+"px, "+e.y+"px)")}},e.exports=a},{"../geo/lng_lat":19,"../util/dom":117,"point-geometry":197}],107:[function(t,e,r){"use strict";function i(t){if(t){if("number"==typeof t){var e=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new l(0,t),"top-left":new l(e,e),"top-right":new l(-e,e),bottom:new l(0,-t),"bottom-left":new l(e,-e),"bottom-right":new l(-e,-e),left:new l(t,0),right:new l(-t,0)}}if(n(t)){var r=l.convert(t);return{top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{top:l.convert(t.top||[0,0]),"top-left":l.convert(t["top-left"]||[0,0]),"top-right":l.convert(t["top-right"]||[0,0]),bottom:l.convert(t.bottom||[0,0]),"bottom-left":l.convert(t["bottom-left"]||[0,0]),"bottom-right":l.convert(t["bottom-right"]||[0,0]),left:l.convert(t.left||[0,0]),right:l.convert(t.right||[0,0])}}return i(new l(0,0))}function n(t){return t instanceof l||Array.isArray(t)}var o=t("../util/util"),a=t("../util/evented"),s=t("../util/dom"),u=t("../geo/lng_lat"),l=t("point-geometry"),c=t("../util/window"),h={closeButton:!0,closeOnClick:!0},p=function(t){function e(e){t.call(this),this.options=o.extend(Object.create(h),e),o.bindAll(["_update","_onClickClose"],this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addTo=function(t){return this._map=t,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},e.prototype.isOpen=function(){return!!this._map},e.prototype.remove=function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire("close"),this},e.prototype.getLngLat=function(){return this._lngLat},e.prototype.setLngLat=function(t){return this._lngLat=u.convert(t),this._update(),this},e.prototype.setText=function(t){return this.setDOMConte
if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)},r.bezier=function(t,e,r,n){var o=new i(t,e,r,n);return function(t){return o.solve(t)}},r.ease=r.bezier(.25,.1,.25,1),r.clamp=function(t,e,r){return Math.min(r,Math.max(e,t))},r.wrap=function(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n},r.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),n[a]=e,0===--i&&r(o,n)})})},r.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},r.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},r.extend=function(t,e,r,i){for(var n=arguments,o=1;o<arguments.length;o++){var a=n[o];for(var s in a)t[s]=a[s]}return t},r.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r};var o=1;r.uniqueId=function(){return o++},r.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},r.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,i=-(1/0),o=-(1/0),a=0;a<t.length;a++)e=Math.min(e,t[a].column),r=Math.min(r,t[a].row),i=Math.max(i,t[a].column),o=Math.max(o,t[a].row);var s=i-e,u=o-r,l=Math.max(s,u);return new n((e+i)/2,(r+o)/2,0).zoomTo(Math.floor(-Math.log(l)/Math.LN2))},r.endsWith=function(t,e){return t.indexOf(e,t.length-e.length)!==-1},r.mapObject=function(t,e,r){var i=this,n={};for(var o in t)n[o]=e.call(r||i,t[o],o,t);return n},r.filterObject=function(t,e,r){var i=this,n={};for(var o in t)e.call(r||i,t[o],o,t)&&(n[o]=t[o]);return n},r.deepEqual=function(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!r.deepEqual(t[i],e[i]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;var n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(var o in t)if(!r.deepEqual(t[o],e[o]))return!1;return!0}return t===e},r.clone=function(t){return Array.isArray(t)?t.map(r.clone):"object"==typeof t&&t?r.mapObject(t,r.clone):t},r.arraysIntersect=function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1};var a={};r.warnOnce=function(t){a[t]||("undefined"!=typeof console&&console.warn(t),a[t]=!0)},r.isCounterClockwise=function(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)},r.calculateSignedArea=function(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],r=t[a],i+=(r.x-e.x)*(e.y+r.y);return i},r.isClosedPolygon=function(t){if(t.length<4)return!1;var e=t[0],i=t[t.length-1];return!(Math.abs(e.x-i.x)>0||Math.abs(e.y-i.y)>0)&&Math.abs(r.calculateSignedArea(t))>.01},r.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,[e*Math.cos(r)*Math.sin(i),e*Math.sin(r)*Math.sin(i),e*Math.cos(i)]},r.parseCacheControl=function(t){var e=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(t.replace(e,function(t,e,i,n){var o=i||n;return r[e]=!o||o.toLowerCase(),""}),r["max-age"]){var i=parseInt(r["max-age"],10);isNaN(i)?delete r["max-age"]:r["max-age"]=i}return r}},{"../geo/coordinate":18,"@mapbox/unitbezier":134,"point-geometry":197}],130:[function(t,e,r){"use strict";var i=function(t,e,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},n={geometry:{}};n.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},n.geometry.set=function(t){this._geometry=t},i.prototype.toJSON=function(){var t=this,e={geometry:this.geometry};for(var r in this)"_geometry"!==r&&"_vectorTileFeature"!==r&&(e[r]=t[r]);return e},Object.defineProperties(i.prototype,n),e.exports=i},{}],131:[function(t,e,r){"use strict";var i=t("./script_detection");e.exports=function(t){for(var r="",n=0;n<t.length;n++){var o=t.charCodeAt(n+1)||null,a=t.charCodeAt(n-1)||null,s
if(a>1&&console.timeEnd("drilling down"),null!==m){var y=1<<t-m;u=o(m,Math.floor(e/y),Math.floor(r/y))}return this.tiles[u]?h.tile(this.tiles[u],n):null}},{"./clip":141,"./convert":142,"./tile":146,"./transform":147,"./wrap":148}],145:[function(t,e,r){"use strict";function i(t,e){var r,i,o,a,s=e*e,u=t.length,l=0,c=u-1,h=[];for(t[l][2]=1,t[c][2]=1;c;){for(i=0,r=l+1;r<c;r++)o=n(t[r],t[l],t[c]),o>i&&(a=r,i=o);i>s?(t[a][2]=i,h.push(l),h.push(a),l=a):(c=h.pop(),l=h.pop())}}function n(t,e,r){var i=e[0],n=e[1],o=r[0],a=r[1],s=t[0],u=t[1],l=o-i,c=a-n;if(0!==l||0!==c){var h=((s-i)*l+(u-n)*c)/(l*l+c*c);h>1?(i=o,n=a):h>0&&(i+=l*h,n+=c*h)}return l=s-i,c=u-n,l*l+c*c}e.exports=i},{}],146:[function(t,e,r){"use strict";function i(t,e,r,i,o,a){for(var s={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:e,transformed:!1,min:[2,1],max:[-1,0]},u=0;u<t.length;u++){s.numFeatures++,n(s,t[u],o,a);var l=t[u].min,c=t[u].max;l[0]<s.min[0]&&(s.min[0]=l[0]),l[1]<s.min[1]&&(s.min[1]=l[1]),c[0]>s.max[0]&&(s.max[0]=c[0]),c[1]>s.max[1]&&(s.max[1]=c[1])}return s}function n(t,e,r,i){var n,a,s,u,l=e.geometry,c=e.type,h=[],p=r*r;if(1===c)for(n=0;n<l.length;n++)h.push(l[n]),t.numPoints++,t.numSimplified++;else for(n=0;n<l.length;n++)if(s=l[n],i||!(2===c&&s.dist<r||3===c&&s.area<p)){var f=[];for(a=0;a<s.length;a++)u=s[a],(i||u[2]>p)&&(f.push(u),t.numSimplified++),t.numPoints++;3===c&&o(f,s.outer),h.push(f)}else t.numPoints+=s.length;if(h.length){var d={geometry:h,type:c,tags:e.tags||null};null!==e.id&&(d.id=e.id),t.features.push(d)}}function o(t,e){var r=a(t);r<0===e&&t.reverse()}function a(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],r=t[a],i+=(r[0]-e[0])*(e[1]+r[1]);return i}e.exports=i},{}],147:[function(t,e,r){"use strict";function i(t,e){if(t.transformed)return t;var r,i,o,a=t.z2,s=t.x,u=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],c=l.geometry,h=l.type;if(1===h)for(i=0;i<c.length;i++)c[i]=n(c[i],e,a,s,u);else for(i=0;i<c.length;i++){var p=c[i];for(o=0;o<p.length;o++)p[o]=n(p[o],e,a,s,u)}}return t.transformed=!0,t}function n(t,e,r,i,n){var o=Math.round(e*(t[0]*r-i)),a=Math.round(e*(t[1]*r-n));return[o,a]}r.tile=i,r.point=n},{}],148:[function(t,e,r){"use strict";function i(t,e,r){var i=t,o=a(t,1,-1-e,e,0,r,-1,2),s=a(t,1,1-e,2+e,0,r,-1,2);return(o||s)&&(i=a(t,1,-e,1+e,0,r,-1,2)||[],o&&(i=n(o,1).concat(i)),s&&(i=i.concat(n(s,-1)))),i}function n(t,e){for(var r=[],i=0;i<t.length;i++){var n,a=t[i],u=a.type;if(1===u)n=o(a.geometry,e);else{n=[];for(var l=0;l<a.geometry.length;l++)n.push(o(a.geometry[l],e))}r.push(s(a.tags,u,n,a.id))}return r}function o(t,e){var r=[];r.area=t.area,r.dist=t.dist;for(var i=0;i<t.length;i++)r.push([t[i][0]+e,t[i][1],t[i][2]]);return r}var a=t("./clip"),s=t("./feature");e.exports=i},{"./clip":141,"./feature":143}],149:[function(t,e,r){"use strict";function i(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var o=new Int32Array(this.arrayBuffer);t=o[0],e=o[1],r=o[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var s=o[n+a],u=o[n+a+1];i.push(s===u?null:o.subarray(s,u))}var l=o[n+i.length],c=o[n+i.length+1];this.keys=o.subarray(l,c),this.bboxes=o.subarray(c),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var h=0;h<this.d*this.d;h++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var p=r/e*t;this.min=-p,this.max=t+p}e.exports=i;var n=3;i.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},i.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},i.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},i.prototype.query=function(t,e,r,i){var n=this.min,o=this.max;if(t<=n&&e<=n&&o<=r&&o<=i)return Array.prototype.slice.call(this.keys);var a=[],s={};return this._forEachCell(t,e,r,i,this._queryCell,a,s),a},i.prototype._queryCell=function(t,e,r,i,n,o,a){var s=this.cells[n];if(null!==s)for(var u=this.keys,l=
"categorical"===m&&r in y?[new i(t.key,t.value,"stop domain values must be unique")]:(y[r]=!0,[])):[new i(t.key,t.value,"integer expected, found %s",r)]}var h,p,f,d=t.valueSpec,m=l(t.value.type),y={},v="categorical"!==m&&void 0===t.value.property,g=!v,_="array"===n(t.value.stops)&&"array"===n(t.value.stops[0])&&"object"===n(t.value.stops[0][0]),x=a({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:e}});return"identity"===m||t.value.stops||x.push(new i(t.key,t.value,'missing required property "stops"')),"exponential"===m&&"piecewise-constant"===t.valueSpec.function&&x.push(new i(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(g&&!t.valueSpec["property-function"]?x.push(new i(t.key,t.value,"property functions not supported")):v&&!t.valueSpec["zoom-function"]&&x.push(new i(t.key,t.value,"zoom functions not supported"))),"categorical"!==m&&!_||void 0!==t.value.property||x.push(new i(t.key,t.value,'"property" property is required')),x}},{"../error/validation_error":167,"../util/get_type":170,"../util/unbundle_jsonlint":172,"./validate":173,"./validate_array":174,"./validate_number":185,"./validate_object":186}],181:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("./validate_string");e.exports=function(t){var e=t.value,r=t.key,o=n(t);return o.length?o:(e.indexOf("{fontstack}")===-1&&o.push(new i(r,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&o.push(new i(r,e,'"glyphs" url must include a "{range}" token')),o)}},{"../error/validation_error":167,"./validate_string":189}],182:[function(t,e,r){"use strict";var i=t("../error/validation_error"),n=t("../util/unbundle_jsonlint"),o=t("./validate_object"),a=t("./validate_filter"),s=t("./validate_paint_property"),u=t("./validate_layout_property"),l=t("../util/extend");e.exports=function(t){var e=[],r=t.value,c=t.key,h=t.style,p=t.styleSpec;r.type||r.ref||e.push(new i(c,r,'either "type" or "ref" is required'));var f=n(r.type),d=n(r.ref);if(r.id)for(var m=0;m<t.arrayIndex;m++){var y=h.layers[m];n(y.id)===n(r.id)&&e.push(new i(c,r.id,'duplicate layer id "%s", previously used at line %d',r.id,y.id.__line__))}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new i(c,r[t],'"%s" is prohibited for ref layers',t))});var v;h.layers.forEach(function(t){t.id==d&&(v=t)}),v?v.ref?e.push(new i(c,r.ref,"ref cannot reference another ref layer")):f=n(v.type):e.push(new i(c,r.ref,'ref layer "%s" not found',d))}else if("background"!==f)if(r.source){var g=h.sources&&h.sources[r.source];g?"vector"==g.type&&"raster"==f?e.push(new i(c,r.source,'layer "%s" requires a raster source',r.id)):"raster"==g.type&&"raster"!=f?e.push(new i(c,r.source,'layer "%s" requires a vector source',r.id)):"vector"!=g.type||r["source-layer"]||e.push(new i(c,r,'layer "%s" must specify a "source-layer"',r.id)):e.push(new i(c,r.source,'source "%s" not found',r.source))}else e.push(new i(c,r,'missing required property "source"'));return e=e.concat(o({key:c,value:r,valueSpec:p.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},filter:a,layout:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return u(l({layerType:f},t))}}})},paint:function(t){return o({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return s(l({layerType:f},t))}}})}}}))}},{"../error/validation_error":167,"../util/extend":169,"../util/unbundle_jsonlint":172,"./validate_filter":179,"./validate_layout_property":183,"./validate_object":186,"./validate_paint_property":187}],183:[function(t,e,r){"use strict";var i=t("./validate"),n=t("../error/validation_error");e.exports=function(t){var e=t.key,r=t.style,o=t.styleSpec,a=t.value,s=t.objectKey,u=o["layout_"+t.layerType];if(!u)return[];if(t.valueSpec||u[s]){var l=[];return"symbol"===t.layerType&&("icon-image"===s&&r&&!r.sprite?l.push(new n
if(e=t.charCodeAt(o),e>55295&&e<57344){if(!r){e>56319||o+1===i?n.push(239,191,189):r=e;continue}if(e<56320){n.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(n.push(239,191,189),r=null);e<128?n.push(e):e<2048?n.push(e>>6|192,63&e|128):e<65536?n.push(e>>12|224,e>>6&63|128,63&e|128):n.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return n}e.exports=i;var o,a,s,u=t("ieee754");o={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return u.read(this,t,!0,23,4)},readDoubleLE:function(t){return u.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return u.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return u.write(this,t,e,!0,52,8)},toString:function(t,e,r){var i="",n="";e=e||0,r=Math.min(this.length,r||this.length);for(var o=e;o<r;o++){var a=this[o];a<=127?(i+=decodeURIComponent(n)+String.fromCharCode(a),n=""):n+="%"+a.toString(16)}return i+=decodeURIComponent(n)},write:function(t,e){for(var r=t===a?s:n(t),i=0;i<r.length;i++)this[e+i]=r[i]},slice:function(t,e){return this.subarray(t,e)},copy:function(t,e){e=e||0;for(var r=0;r<this.length;r++)t[e+r]=this[r]}},o.writeInt32LE=o.writeUInt32LE,i.byteLength=function(t){return a=t,s=n(t),s.length},i.isBuffer=function(t){return!(!t||!t._isBuffer)}},{ieee754:150}],196:[function(t,e,i){(function(r){"use strict";function i(t){this.buf=y.isBuffer(t)?t:new y(t||0),this.pos=0,this.length=this.buf.length}function n(t,e){var r,i=e.buf;if(r=i[e.pos++],t+=268435456*(127&r),r<128)return t;if(r=i[e.pos++],t+=34359738368*(127&r),r<128)return t;if(r=i[e.pos++],t+=4398046511104*(127&r),r<128)return t;if(r=i[e.pos++],t+=562949953421312*(127&r),r<128)return t;if(r=i[e.pos++],t+=72057594037927940*(127&r),r<128)return t;if(r=i[e.pos++],t+=0x8000000000000000*(127&r),r<128)return t;throw new Error("Expected varint not more than 10 bytes")}function o(t,e){e.realloc(10);for(var r=e.pos+10;t>=1;){if(e.pos>=r)throw new Error("Given varint doesn't fit into 10 bytes");var i=255&t;e.buf[e.pos++]=i|(t>=128?128:0),t/=128}}function a(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function s(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function u(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function l(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function c(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function p(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}e.exports=i;var y=r.Buffer||t("./buffer");i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var v=4294967296,g=1/v,_=Math.pow(2,63);i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*v;return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*v;return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,e,r=this.buf;return e=r[this.pos++],t=127&e,e<128?t:(e=r[this.pos++],t|=(127&e)<<7,e<128?t:(e=r[this.pos++],t|=(127&e)<<14,e<1
}function n(t,e,r){3===t&&e.layers.push(p(r,r.readVarint()+r.pos))}function o(t,e){var r;if(void 0!==t.layers)for(r=0;r<t.layers.length;r++)e.writeMessage(3,d,t.layers[r])}function a(t,e){return t.readFields(s,{},e)}function s(t,e,r){1===t?e.string_value=r.readString():2===t?e.float_value=r.readFloat():3===t?e.double_value=r.readDouble():4===t?e.int_value=r.readVarint():5===t?e.uint_value=r.readVarint():6===t?e.sint_value=r.readSVarint():7===t&&(e.bool_value=r.readBoolean())}function u(t,e){void 0!==t.string_value&&e.writeStringField(1,t.string_value),void 0!==t.float_value&&e.writeFloatField(2,t.float_value),void 0!==t.double_value&&e.writeDoubleField(3,t.double_value),void 0!==t.int_value&&e.writeVarintField(4,t.int_value),void 0!==t.uint_value&&e.writeVarintField(5,t.uint_value),void 0!==t.sint_value&&e.writeSVarintField(6,t.sint_value),void 0!==t.bool_value&&e.writeBooleanField(7,t.bool_value)}function l(t,e){var r=t.readFields(c,{},e);return void 0===r.type&&(r.type="Unknown"),r}function c(t,e,r){1===t?e.id=r.readVarint():2===t?e.tags=r.readPackedVarint():3===t?e.type=r.readVarint():4===t&&(e.geometry=r.readPackedVarint())}function h(t,e){void 0!==t.id&&e.writeVarintField(1,t.id),void 0!==t.tags&&e.writePackedVarint(2,t.tags),void 0!==t.type&&e.writeVarintField(3,t.type),void 0!==t.geometry&&e.writePackedVarint(4,t.geometry)}function p(t,e){return t.readFields(f,{features:[],keys:[],values:[]},e)}function f(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():2===t?e.features.push(l(r,r.readVarint()+r.pos)):3===t?e.keys.push(r.readString()):4===t?e.values.push(a(r,r.readVarint()+r.pos)):5===t&&(e.extent=r.readVarint())}function d(t,e){void 0!==t.version&&e.writeVarintField(15,t.version),void 0!==t.name&&e.writeStringField(1,t.name);var r;if(void 0!==t.features)for(r=0;r<t.features.length;r++)e.writeMessage(2,h,t.features[r]);if(void 0!==t.keys)for(r=0;r<t.keys.length;r++)e.writeStringField(3,t.keys[r]);if(void 0!==t.values)for(r=0;r<t.values.length;r++)e.writeMessage(4,u,t.values[r]);void 0!==t.extent&&e.writeVarintField(5,t.extent)}var m=r.tile={read:i,write:o};m.GeomType={Unknown:0,Point:1,LineString:2,Polygon:3},m.value={read:a,write:u},m.feature={read:l,write:h},m.layer={read:p,write:d}},{}],213:[function(t,e,r){var i=arguments[3],n=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function r(t){y[t]=!0;for(var e in n[t][1]){var i=n[t][1][e];y[i]||r(i)}}for(var s,u=Object.keys(o),l=0,c=u.length;l<c;l++){var h=u[l],p=o[h].exports;if(p===t||p&&p.default===t){s=h;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},l=0,c=u.length;l<c;l++){var h=u[l];f[h]=h}n[s]=[Function(["require","module","exports"],"("+t+")(self)"),f]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,n[d]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),m];var y={};r(d);var v="("+i+")({"+Object.keys(y).map(function(t){return a(t)+":["+n[t][0]+","+a(n[t][1])+"]"}).join(",")+"},{},["+a(d)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,_=new Blob([v],{type:"text/javascript"});if(e&&e.bare)return _;var x=g.createObjectURL(_),b=new Worker(x);return b.objectURL=x,b}},{}],214:[function(t,e,r){e.exports.RADIUS=6378137,e.exports.FLATTENING=1/298.257223563,e.exports.POLAR_RADIUS=6356752.3142},{}],215:[function(e,r,i){!function(e,n){"object"==typeof i&&"undefined"!=typeof r?n(i):"function"==typeof t&&t.amd?t(["exports"],n):n(e.WhooTS=e.WhooTS||{})}(this,function(t){function e(t,e,i,n,o,a){a=a||{};var s=t+"?"+["bbox="+r(i,n,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+e].join("&");return s}function r(t,e,r){e=Math.pow(2,r)-e-1;var n=i(256*t,256*e,r),o=i(256*(t+1),256*(e+1),r);return n[0]+","+n[1]+","+o[0]+","+o[1]}function i(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r),n=t*i-2*Math.PI*6378137/2,o=e*i-2*Math.PI*6378137/2;return[n,o]}t.getURL=e,