mapbox-gl
Version:
A WebGL interactive maps library
2 lines • 90.4 kB
JavaScript
!function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){"use strict";var r=e("./src/setup"),o=e("./src/options"),i=e("./src/api"),s=e("./src/constants"),a=function(e){e=o(e);var t={options:e},n=i(t);t.api=n;var a=r(t);return n.addTo=a.addTo,n.remove=a.remove,n.types=s.types,n.options=e,n};t.exports=a,window.mapboxgl=window.mapboxgl||{},window.mapboxgl.Draw=a},{"./src/api":23,"./src/constants":24,"./src/options":58,"./src/setup":60}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,o="/"===s.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+n||"."},n.normalize=function(e){var o=n.isAbsolute(e),i="/"===s(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var o=r(e.split("/")),i=r(t.split("/")),s=Math.min(o.length,i.length),a=s,u=0;u<s;u++)if(o[u]!==i[u]){a=u;break}for(var c=[],u=a;u<o.length;u++)c.push("..");return c=c.concat(i.slice(a)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return i(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:4}],4:[function(e,t,n){function r(e){if(c===setTimeout)return setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(e){if(l===clearTimeout)return clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function i(){h&&f&&(h=!1,f.length?d=f.concat(d):y=-1,d.length&&s())}function s(){if(!h){var e=r(i);h=!0;for(var t=d.length;t;){for(f=d,d=[];++y<t;)f&&f[y].run();y=-1,t=d.length}f=null,h=!1,o(e)}}function a(e,t){this.fun=e,this.array=t}function u(){}var c,l,p=t.exports={};!function(){try{c=setTimeout}catch(e){c=function(){throw new Error("setTimeout is not defined")}}try{l=clearTimeout}catch(e){l=function(){throw new Error("clearTimeout is not defined")}}}();var f,d=[],h=!1,y=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new a(e,t)),1!==d.length||h||r(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],5:[function(e,t,n){function r(e){var t,n=0;switch(e.type){case"Polygon":return o(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)n+=o(e.coordinates[t]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(t=0;t<e.geometries.length;t++)n+=r(e.geometries[t]);return n}}function o(e){var t=0;if(e&&e.length>0){t+=Math.abs(s(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(s(e[n]))}return t}function s(e){var t,n,r,o,s,c,l=0,p=e.length;if(p>2){for(i=0;i<p;i++)i===p-2?(o=p-2,s=p-1,c=0):i===p-1?(o=p-1,s=0,c=1):(o=i,s=i+1,c=i+2),t=e[o],n=e[s],r=e[c],l+=(a(r[0])-a(t[0]))*Math.sin(a(n[1]));l=l*u.RADIUS*u.RADIUS/2}return l}function a(e){return e*Math.PI/180}var u=e("wgs84");t.exports.geometry=r,t.exports.ring=s},{wgs84:6}],6:[function(e,t,n){t.exports.RADIUS=6378137,t.exports.FLATTENING=1/298.257223563,t.exports.POLAR_RADIUS=6356752.3142},{}],7:[function(e,t,n){function r(e){for(var t=s(),n=o(e),r=0;r<n.length;r++)t.include(n[r]);return t}var o=e("geojson-coords"),i=e("traverse"),s=e("extent");t.exports=function(e){return r(e).bbox()},t.exports.polygon=function(e){return r(e).polygon()},t.exports.bboxify=function(e){return i(e).map(function(e){e&&"string"==typeof e.type&&(e.bbox=r(e).bbox(),this.update(e))})}},{extent:8,"geojson-coords":10,traverse:13}],8:[function(e,t,n){function r(){return this instanceof r?(this._bbox=[1/0,1/0,-(1/0),-(1/0)],void(this._valid=!1)):new r}t.exports=r,r.prototype.include=function(e){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[0]),this._bbox[3]=Math.max(this._bbox[3],e[1]),this},r.prototype.union=function(e){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[2]),this._bbox[3]=Math.max(this._bbox[3],e[3]),this},r.prototype.bbox=function(){return this._valid?this._bbox:null},r.prototype.contains=function(e){return this._valid?this._bbox[0]<=e[0]&&this._bbox[1]<=e[1]&&this._bbox[2]>=e[0]&&this._bbox[3]>=e[1]:null},r.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null}},{}],9:[function(e,t,n){t.exports=function(e,t){function n(e){return Array.isArray(e)&&e.length&&"number"==typeof e[0]?[e]:e.reduce(function(e,t){return Array.isArray(t)&&Array.isArray(t[0])?e.concat(n(t)):(e.push(t),e)},[])}return n(e)}},{}],10:[function(e,t,n){var r=e("geojson-normalize"),o=e("geojson-flatten"),i=e("./flatten");t.exports=function(e){if(!e)return[];var t=o(r(e)),n=[];return t.features.forEach(function(e){e.geometry&&(n=n.concat(i(e.geometry.coordinates)))}),n}},{"./flatten":9,"geojson-flatten":11,"geojson-normalize":12}],11:[function(e,t,n){function r(e,t){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.reduce(function(e,t){return e.concat(r(t))},[]),e;case"Feature":return r(e.geometry).map(function(t){return{type:"Feature",properties:JSON.parse(JSON.stringify(e.properties)),geometry:t}});case"MultiPoint":return e.coordinates.map(function(e){return{type:"Point",coordinates:e}});case"MultiPolygon":return e.coordinates.map(function(e){return{type:"Polygon",coordinates:e}});case"MultiLineString":return e.coordinates.map(function(e){return{type:"LineString",coordinates:e}});case"GeometryCollection":return e.geometries;case"Point":case"Polygon":case"LineString":return[e];default:return e}}t.exports=r},{}],12:[function(e,t,n){function r(e){if(!e||!e.type)return null;var t=o[e.type];return t?"geometry"===t?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]}:"feature"===t?{type:"FeatureCollection",features:[e]}:"featurecollection"===t?e:void 0:null}t.exports=r;var o={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"}},{}],13:[function(e,t,n){function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(a){function u(){if("object"==typeof f.node&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=h(f.node)),f.isLeaf=0==f.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===a){f.circular=o[e];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}var c=n?i(a):a,l={},p=!0,f={node:c,node_:a,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){f.isRoot||(f.parent.node[f.key]=e),f.node=e,t&&(p=!1)},delete:function(e){delete f.parent.node[f.key],e&&(p=!1)},remove:function(e){y(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],e&&(p=!1)},keys:null,before:function(e){l.before=e},after:function(e){l.after=e},pre:function(e){l.pre=e},post:function(e){l.post=e},stop:function(){s=!1},block:function(){p=!1}};if(!s)return f;u();var d=t.call(f,f.node);return void 0!==d&&f.update&&f.update(d),l.before&&l.before.call(f,f.node),p?("object"!=typeof f.node||null===f.node||f.circular||(o.push(f),u(),g(f.keys,function(t,o){r.push(t),l.pre&&l.pre.call(f,f.node[t],t);var i=e(f.node[t]);n&&m.call(f.node,t)&&(f.node[t]=i.node),i.isLast=o==f.keys.length-1,i.isFirst=0==o,l.post&&l.post.call(f,i),r.pop()}),o.pop()),l.after&&l.after.call(f,f.node),f):f}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(y(e))t=[];else if(a(e))t=new Date(e.getTime?e.getTime():e);else if(u(e))t=new RegExp(e);else if(c(e))t={message:e.message};else if(l(e))t=new Boolean(e);else if(p(e))t=new Number(e);else if(f(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return g(h(e),function(n){t[n]=e[n]}),t}return e}function s(e){return Object.prototype.toString.call(e)}function a(e){return"[object Date]"===s(e)}function u(e){return"[object RegExp]"===s(e)}function c(e){return"[object Error]"===s(e)}function l(e){return"[object Boolean]"===s(e)}function p(e){return"[object Number]"===s(e)}function f(e){return"[object String]"===s(e)}var d=t.exports=function(e){return new r(e)};r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!m.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!m.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];m.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach(function(t){this.isRoot&&n||(r=e.call(this,r,t))}),r},r.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e},r.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var s=i(r);return e.push(r),t.push(s),g(h(r),function(e){s[e]=n(r[e])}),e.pop(),t.pop(),s}return r}(this.value)};var h=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},g=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};g(h(r.prototype),function(e){d[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}});var m=Object.hasOwnProperty||function(e,t){return t in e}},{}],14:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{dup:12}],15:[function(e,t,n){function r(e,t){var n,r=[];if("object"==typeof e)n=e;else{if("string"!=typeof e)return[{message:"Expected string or object as input",line:0}];try{n=o.parse(e)}catch(e){var s=e.message.match(/line (\d+)/),a=parseInt(s[1],10);return[{line:a-1,message:e.message,error:e}]}}return r=r.concat(i.hint(n,t))}var o=e("jsonlint-lines"),i=e("./object");t.exports.hint=r},{"./object":17,"jsonlint-lines":16}],16:[function(e,t,n){(function(r){var o=function(){function e(){this.yy={}}var t=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},n=[1,12],r=[1,13],o=[1,9],i=[1,10],s=[1,11],a=[1,14],u=[1,15],c=[14,18,22,24],l=[18,22],p=[22,24],f={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,n,r,o,i,s){var a=i.length-1;switch(o){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=i[a-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=i[a-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[i[a-2],i[a]];break;case 16:this.$={},this.$[i[a][0]]=i[a][1];break;case 17:this.$=i[a-2],void 0!==i[a-2][i[a][0]]&&(this.$.__duplicateProperties__||Object.defineProperty(this.$,"__duplicateProperties__",{value:[],enumerable:!1}),this.$.__duplicateProperties__.push(i[a][0])),i[a-2][i[a][0]]=i[a][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[i[a]];break;case 21:this.$=i[a-2],i[a-2].push(i[a])}},table:[{3:5,4:n,5:6,6:r,7:3,8:o,9:4,10:i,11:s,12:1,13:2,15:7,16:8,17:a,23:u},{1:[3]},{14:[1,16]},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11]),t(c,[2,12]),t(c,[2,3]),t(c,[2,4]),t(c,[2,5]),t([14,18,21,22,24],[2,1]),t(c,[2,2]),{3:20,4:n,18:[1,17],19:18,20:19},{3:5,4:n,5:6,6:r,7:3,8:o,9:4,10:i,11:s,13:23,15:7,16:8,17:a,23:u,24:[1,21],25:22},{1:[2,6]},t(c,[2,13]),{18:[1,24],22:[1,25]},t(l,[2,16]),{21:[1,26]},t(c,[2,18]),{22:[1,28],24:[1,27]},t(p,[2,20]),t(c,[2,14]),{3:20,4:n,20:29},{3:5,4:n,5:6,6:r,7:3,8:o,9:4,10:i,11:s,13:30,15:7,16:8,17:a,23:u},t(c,[2,19]),{3:5,4:n,5:6,6:r,7:3,8:o,9:4,10:i,11:s,13:31,15:7,16:8,17:a,23:u},t(l,[2,17]),t(l,[2,15]),t(p,[2,21])],defaultActions:{16:[2,6]},parseError:function(e,t){function n(e,t){this.message=e,this.hash=t}if(!t.recoverable)throw n.prototype=Error,new n(e,t);this.trace(e)},parse:function(e){var t=this,n=[0],r=[null],o=[],i=this.table,s="",a=0,u=0,c=0,l=2,p=1,f=o.slice.call(arguments,1),d=Object.create(this.lexer),h={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(h.yy[y]=this.yy[y]);d.setInput(e,h.yy),h.yy.lexer=d,h.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var g=d.yylloc;o.push(g);var m=d.options&&d.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,b,E,T,O,x,I,L,S=function(){var e;return e=d.lex()||p,"number"!=typeof e&&(e=t.symbols_[e]||e),e},C={};;){if(b=n[n.length-1],this.defaultActions[b]?E=this.defaultActions[b]:(null!==_&&"undefined"!=typeof _||(_=S()),E=i[b]&&i[b][_]),"undefined"==typeof E||!E.length||!E[0]){var N="";L=[];for(O in i[b])this.terminals_[O]&&O>l&&L.push("'"+this.terminals_[O]+"'");N=d.showPosition?"Parse error on line "+(a+1)+":\n"+d.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(a+1)+": Unexpected "+(_==p?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:g,expected:L})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(E[0]){case 1:n.push(_),r.push(d.yytext),o.push(d.yylloc),n.push(E[1]),_=null,v?(_=v,v=null):(u=d.yyleng,s=d.yytext,a=d.yylineno,g=d.yylloc,c>0&&c--);break;case 2:if(x=this.productions_[E[1]][1],C.$=r[r.length-x],C._$={first_line:o[o.length-(x||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(x||1)].first_column,last_column:o[o.length-1].last_column},m&&(C._$.range=[o[o.length-(x||1)].range[0],o[o.length-1].range[1]]),T=this.performAction.apply(C,[s,u,a,h.yy,E[1],r,o].concat(f)),"undefined"!=typeof T)return T;x&&(n=n.slice(0,-1*x*2),r=r.slice(0,-1*x),o=o.slice(0,-1*x)),n.push(this.productions_[E[1]][0]),r.push(C.$),o.push(C._$),I=i[n[n.length-2]][n[n.length-1]],n.push(I);break;case 3:return!0}}return!0}},d=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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),n.length-1&&(this.yylineno-=n.length-1);var o=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,o;if(this.options.backtrack_lexer&&(o={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&&(o.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;i<o.length;i++)if(n=this._input.match(this.rules[o[i]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=i,this.options.backtrack_lexer){if(e=this.test_match(n,o[i]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,o[r]),e!==!1&&e):""===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 e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.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}}};return e}();return f.lexer=d,e.prototype=f,f.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof n&&(n.parser=o,n.Parser=o.Parser,n.parse=function(){return o.parse.apply(o,arguments)},n.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var o=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return n.parser.parse(o)},"undefined"!=typeof t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:4,fs:2,path:3}],17:[function(e,t,n){function r(e,t){function n(e){if(t&&t.noDuplicateMembers===!1||!e.__duplicateProperties__||b.push({message:"An object contained duplicate members, making parsing ambigous: "+e.__duplicateProperties__.join(", "),line:e.__line__}),!i(e,"type","string"))if(T[e.type])e&&T[e.type](e);else{var n=O[e.type.toLowerCase()];void 0!==n?b.push({message:"Expected "+n+" but got "+e.type+" (case sensitive)",line:e.__line__}):b.push({message:"The type "+e.type+" is unknown",line:e.__line__})}}function r(e,t){return e.every(function(e){return null!==e&&typeof e===t})}function i(e,t,n){if("undefined"==typeof e[t])return b.push({message:'"'+t+'" member required',line:e.__line__});if("array"===n){if(!Array.isArray(e[t]))return b.push({message:'"'+t+'" member should be an array, but is an '+typeof e[t]+" instead",line:e.__line__})}else{if("object"===n&&e[t]&&"Object"!==e[t].constructor.name)return b.push({message:'"'+t+'" member should be '+n+", but is an "+e[t].constructor.name+" instead",line:e.__line__});if(n&&typeof e[t]!==n)return b.push({message:'"'+t+'" member should be '+n+", but is an "+typeof e[t]+" instead",line:e.__line__})}}function s(e){if(c(e),l(e),void 0!==e.properties&&b.push({message:'FeatureCollection object cannot contain a "properties" member',line:e.__line__}),void 0!==e.coordinates&&b.push({message:'FeatureCollection object cannot contain a "coordinates" member',line:e.__line__}),!i(e,"features","array")){if(!r(e.features,"object"))return b.push({message:"Every feature must be an object",line:e.__line__});e.features.forEach(v)}}function a(e,t){if(!Array.isArray(e))return b.push({message:"position should be an array, is a "+typeof e+" instead",line:e.__line__||t});if(e.length<2)return b.push({message:"position must have 2 or more elements",line:e.__line__||t});if(e.length>3)return b.push({message:"position should not have more than 3 elements",line:e.__line__||t});if(!r(e,"number"))return b.push({message:"each element in a position must be a number",line:e.__line__||t});var n=10,o=6;return E===n?(E+=1,b.push({message:"truncated warnings: we've encountered coordinate precision warning "+n+" times, no more warnings will be reported",level:"warn",line:e.__line__||t})):void(E<n&&e.forEach(function(n){var r=0,i=String(n).split(".")[1];if(void 0!==i&&(r=i.length),r>o)return E+=1,b.push({message:"precision of coordinates should be reduced",level:"warn",line:e.__line__||t})}))}function u(e,t,n,r){if(void 0===r&&void 0!==e.__line__&&(r=e.__line__),0===n)return a(e,r);if(1===n&&t)if("LinearRing"===t){if(!Array.isArray(e[e.length-1]))return b.push({message:"a number was found where a coordinate array should have been found: this needs to be nested more deeply",line:r}),!0;e.length<4&&b.push({message:"a LinearRing of coordinates needs to have four or more positions",line:r}),!e.length||e[e.length-1].length===e[0].length&&e[e.length-1].every(function(t,n){return e[0][n]===t})||b.push({message:"the first and last positions in a LinearRing of coordinates must be the same",line:r})}else if("Line"===t&&e.length<2)return b.push({message:"a line needs to have two or more coordinates to be valid",line:r});Array.isArray(e)?e.forEach(function(e){u(e,t,n-1,e.__line__||r)}):b.push({message:"a number was found where a coordinate array should have been found: this needs to be nested more deeply",line:r})}function c(e){if(e.crs){var t="urn:ogc:def:crs:OGC:1.3:CRS84";"object"==typeof e.crs&&e.crs.properties&&e.crs.properties.name===t?b.push({message:"old-style crs member is not recommended, this object is equivalent to the default and should be removed",level:"warn",line:e.__line__}):b.push({message:"old-style crs member is not recommended",level:"warn",line:e.__line__})}}function l(e){if(e.bbox)return Array.isArray(e.bbox)?(r(e.bbox,"number")||b.push({message:"each element in a bbox member must be a number",line:e.bbox.__line__}),4!==e.bbox.length&&6!==e.bbox.length&&b.push({message:"bbox must contain 4 elements (for 2D) or 6 elements (for 3D)",line:e.bbox.__line__}),b.length):void b.push({message:"bbox member must be an array of numbers, but is a "+typeof e.bbox,line:e.__line__})}function p(e){void 0!==e.properties&&b.push({message:'geometry object cannot contain a "properties" member',line:e.__line__}),void 0!==e.geometry&&b.push({message:'geometry object cannot contain a "geometry" member',line:e.__line__}),void 0!==e.features&&b.push({message:'geometry object cannot contain a "features" member',line:e.__line__})}function f(e){c(e),l(e),p(e),i(e,"coordinates","array")||a(e.coordinates)}function d(e){c(e),l(e),i(e,"coordinates","array")||u(e.coordinates,"LinearRing",2)||o(e,b)}function h(e){c(e),l(e),i(e,"coordinates","array")||u(e.coordinates,"LinearRing",3)||o(e,b)}function y(e){c(e),l(e),i(e,"coordinates","array")||u(e.coordinates,"Line",1)}function g(e){c(e),l(e),i(e,"coordinates","array")||u(e.coordinates,"Line",2)}function m(e){c(e),l(e),i(e,"coordinates","array")||u(e.coordinates,"",1)}function _(e){c(e),l(e),i(e,"geometries","array")||(r(e.geometries,"object")||b.push({message:"The geometries array in a GeometryCollection must contain only geometry objects",line:e.__line__}),1===e.geometries.length&&b.push({message:"GeometryCollection with a single geometry should be avoided in favor of single part or a single object of multi-part type",level:"warn",line:e.geometries.__line__}),e.geometries.forEach(function(t){t&&("GeometryCollection"===t.type&&b.push({message:"GeometryCollection should avoid nested geometry collections",level:"warn",line:e.geometries.__line__}),n(t))}))}function v(e){c(e),l(e),void 0!==e.id&&"string"!=typeof e.id&&"number"!=typeof e.id&&b.push({message:'Feature "id" member must have a string or number value',line:e.__line__}),void 0!==e.features&&b.push({message:'Feature object cannot contain a "features" member',line:e.__line__}),void 0!==e.coordinates&&b.push({message:'Feature object cannot contain a "coordinates" member',line:e.__line__}),"Feature"!==e.type&&b.push({message:"GeoJSON features must have a type=feature member",line:e.__line__}),i(e,"properties","object"),i(e,"geometry","object")||e.geometry&&n(e.geometry)}var b=[],E=0,T={Point:f,Feature:v,MultiPoint:m,LineString:y,MultiLineString:g,FeatureCollection:s,GeometryCollection:_,Polygon:d,MultiPolygon:h},O=Object.keys(T).reduce(function(e,t){return e[t.toLowerCase()]=t,e},{});return"object"!=typeof e||null===e||void 0===e?(b.push({message:"The root of a GeoJSON object must be an object.",line:0}),b):(n(e),b.forEach(function(e){({}).hasOwnProperty.call(e,"line")&&void 0===e.line&&delete e.line}),b)}var o=e("./rhr");t.exports.hint=r},{"./rhr":18}],18:[function(e,t,n){function r(e){return e*Math.PI/180}function o(e){var t=0;if(e.length>2)for(var n,o,i=0;i<e.length-1;i++)n=e[i],o=e[i+1],t+=r(o[0]-n[0])*(2+Math.sin(r(n[1]))+Math.sin(r(o[1])));return t>=0}function i(e){if(e&&e.length>0){if(!o(e[0]))return!1;var t=e.slice(1,e.length);if(t.some(o))return!1}return!0}function s(e){return"Polygon"===e.type?i(e.coordinates):"MultiPolygon"===e.type?e.coordinates.every(i):void 0}t.exports=function(e,t){s(e)||t.push({message:"Polygons and MultiPolygons should follow the right-hand rule",level:"warn",line:e.__line__})}},{}],19:[function(e,t,n){var r=t.exports=function(e,t){if(t||(t=16),void 0===e&&(e=128),e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),o=2;n===1/0;o*=2)n=Math.log(Math.pow(2,e/o))/Math.log(t)*o;for(var i=n-Math.floor(n),s="",o=0;o<Math.floor(n);o++){var a=Math.floor(Math.random()*t).toString(t);s=a+s}if(i){var u=Math.pow(t,i),a=Math.floor(Math.random()*u).toString(t);s=a+s}var c=parseInt(s,t);return c!==1/0&&c>=Math.pow(2,e)?r(e,t):s};r.rack=function(e,t,n){var o=function(o){var s=0;do{if(s++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}var a=r(e,t)}while(Object.hasOwnProperty.call(i,a));return i[a]=o,a},i=o.hats={};return o.get=function(e){return o.hats[e]},o.set=function(e,t){return o.hats[e]=t,o},o.bits=e||128,o.base=t||16,o}},{}],20:[function(e,t,n){(function(e){function r(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function o(e){return function(t){return null==t?void 0:t[e]}}function i(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function s(e){return function(t){return e(t)}}function a(e,t){
return null==e?void 0:e[t]}function u(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function c(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function l(e,t){return function(n){return e(t(n))}}function p(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function f(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function d(){this.__data__=xt?xt(null):{}}function h(e){return this.has(e)&&delete this.__data__[e]}function y(e){var t=this.__data__;if(xt){var n=t[e];return n===ye?void 0:n}return lt.call(t,e)?t[e]:void 0}function g(e){var t=this.__data__;return xt?void 0!==t[e]:lt.call(t,e)}function m(e,t){var n=this.__data__;return n[e]=xt&&void 0===t?ye:t,this}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function v(){this.__data__=[]}function b(e){var t=this.__data__,n=U(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():gt.call(t,n,1),!0}function E(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]}function T(e){return U(this.__data__,e)>-1}function O(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function I(){this.__data__={hash:new f,map:new(bt||_),string:new f}}function L(e){return W(this,e).delete(e)}function S(e){return W(this,e).get(e)}function C(e){return W(this,e).has(e)}function N(e,t){return W(this,e).set(e,t),this}function w(e){var t=-1,n=e?e.length:0;for(this.__data__=new x;++t<n;)this.add(e[t])}function A(e){return this.__data__.set(e,ye),this}function M(e){return this.__data__.has(e)}function P(e){this.__data__=new _(e)}function j(){this.__data__=new _}function k(e){return this.__data__.delete(e)}function R(e){return this.__data__.get(e)}function D(e){return this.__data__.has(e)}function F(e,t){var n=this.__data__;if(n instanceof _){var r=n.__data__;if(!bt||r.length<he-1)return r.push([e,t]),this;n=this.__data__=new x(r)}return n.set(e,t),this}function U(e,t){for(var n=e.length;n--;)if(re(e[n][0],t))return n;return-1}function G(e){return pt.call(e)}function $(e,t){return null!=e&&(lt.call(e,t)||"object"==typeof e&&t in e&&null===jt(e))}function V(e,t,n,r,o){return e===t||(null==e||null==t||!le(e)&&!pe(t)?e!==e&&t!==t:B(e,t,V,n,r,o))}function B(e,t,n,r,o,i){var s=Rt(e),a=Rt(t),c=be,l=be;s||(c=kt(e),c=c==ve?Ce:c),a||(l=kt(t),l=l==ve?Ce:l);var p=c==Ce&&!u(e),f=l==Ce&&!u(t),d=c==l;if(d&&!p)return i||(i=new P),s||Dt(e)?Y(e,t,n,r,o,i):z(e,t,c,n,r,o,i);if(!(o&me)){var h=p&<.call(e,"__wrapped__"),y=f&<.call(t,"__wrapped__");if(h||y){var g=h?e.value():e,m=y?t.value():t;return i||(i=new P),n(g,m,r,o,i)}}return!!d&&(i||(i=new P),X(e,t,n,r,o,i))}function J(e){if(!le(e)||ee(e))return!1;var t=ue(e)||u(e)?ft:ze;return t.test(ne(e))}function q(e){return pe(e)&&ce(e.length)&&!!We[pt.call(e)]}function Y(e,t,n,o,i,s){var a=i&me,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var p=-1,f=!0,d=i&ge?new w:void 0;for(s.set(e,t),s.set(t,e);++p<u;){var h=e[p],y=t[p];if(o)var g=a?o(y,h,p,t,e,s):o(h,y,p,e,t,s);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!r(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,o,i,s)))return d.add(t)})){f=!1;break}}else if(h!==y&&!n(h,y,o,i,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function z(e,t,n,r,o,i,s){switch(n){case Re:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ke:return!(e.byteLength!=t.byteLength||!r(new ht(e),new ht(t)));case Ee:case Te:case Se:return re(+e,+t);case Oe:return e.name==t.name&&e.message==t.message;case we:case Me:return e==t+"";case Le:var a=c;case Ae:var u=i&me;if(a||(a=p),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;i|=ge,s.set(e,t);var f=Y(a(e),a(t),r,o,i,s);return s.delete(e),f;case Pe:if(At)return At.call(e)==At.call(t)}return!1}function X(e,t,n,r,o,i){var s=o&me,a=de(e),u=a.length,c=de(t),l=c.length;if(u!=l&&!s)return!1;for(var p=u;p--;){var f=a[p];if(!(s?f in t:$(t,f)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var h=!0;i.set(e,t),i.set(t,e);for(var y=s;++p<u;){f=a[p];var g=e[f],m=t[f];if(r)var _=s?r(m,g,f,t,e,i):r(g,m,f,e,t,i);if(!(void 0===_?g===m||n(g,m,r,o,i):_)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(h=!1)}return i.delete(e),i.delete(t),h}function W(e,t){var n=e.__data__;return Q(t)?n["string"==typeof t?"string":"hash"]:n.map}function H(e,t){var n=a(e,t);return J(n)?n:void 0}function K(e){var t=e?e.length:void 0;return ce(t)&&(Rt(e)||fe(e)||oe(e))?i(t,String):null}function Z(e,t){return t=null==t?_e:t,!!t&&("number"==typeof e||Xe.test(e))&&e>-1&&e%1==0&&e<t}function Q(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function ee(e){return!!ut&&ut in e}function te(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||st;return e===n}function ne(e){if(null!=e){try{return ct.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function re(e,t){return e===t||e!==e&&t!==t}function oe(e){return se(e)&<.call(e,"callee")&&(!yt.call(e,"callee")||pt.call(e)==ve)}function ie(e){return null!=e&&ce(Pt(e))&&!ue(e)}function se(e){return pe(e)&&ie(e)}function ae(e,t){return V(e,t)}function ue(e){var t=le(e)?pt.call(e):"";return t==xe||t==Ie}function ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=_e}function le(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function pe(e){return!!e&&"object"==typeof e}function fe(e){return"string"==typeof e||!Rt(e)&&pe(e)&&pt.call(e)==Me}function de(e){var t=te(e);if(!t&&!ie(e))return Mt(e);var n=K(e),r=!!n,o=n||[],i=o.length;for(var s in e)!$(e,s)||r&&("length"==s||Z(s,i))||t&&"constructor"==s||o.push(s);return o}var he=200,ye="__lodash_hash_undefined__",ge=1,me=2,_e=9007199254740991,ve="[object Arguments]",be="[object Array]",Ee="[object Boolean]",Te="[object Date]",Oe="[object Error]",xe="[object Function]",Ie="[object GeneratorFunction]",Le="[object Map]",Se="[object Number]",Ce="[object Object]",Ne="[object Promise]",we="[object RegExp]",Ae="[object Set]",Me="[object String]",Pe="[object Symbol]",je="[object WeakMap]",ke="[object ArrayBuffer]",Re="[object DataView]",De="[object Float32Array]",Fe="[object Float64Array]",Ue="[object Int8Array]",Ge="[object Int16Array]",$e="[object Int32Array]",Ve="[object Uint8Array]",Be="[object Uint8ClampedArray]",Je="[object Uint16Array]",qe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,ze=/^\[object .+?Constructor\]$/,Xe=/^(?:0|[1-9]\d*)$/,We={};We[De]=We[Fe]=We[Ue]=We[Ge]=We[$e]=We[Ve]=We[Be]=We[Je]=We[qe]=!0,We[ve]=We[be]=We[ke]=We[Ee]=We[Re]=We[Te]=We[Oe]=We[xe]=We[Le]=We[Se]=We[Ce]=We[we]=We[Ae]=We[Me]=We[je]=!1;var He="object"==typeof e&&e&&e.Object===Object&&e,Ke="object"==typeof self&&self&&self.Object===Object&&self,Ze=He||Ke||Function("return this")(),Qe="object"==typeof n&&n&&!n.nodeType&&n,et=Qe&&"object"==typeof t&&t&&!t.nodeType&&t,tt=et&&et.exports===Qe,nt=tt&&He.process,rt=function(){try{return nt&&nt.binding("util")}catch(e){}}(),ot=rt&&rt.isTypedArray,it=Array.prototype,st=Object.prototype,at=Ze["__core-js_shared__"],ut=function(){var e=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ct=Function.prototype.toString,lt=st.hasOwnProperty,pt=st.toString,ft=RegExp("^"+ct.call(lt).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dt=Ze.Symbol,ht=Ze.Uint8Array,yt=st.propertyIsEnumerable,gt=it.splice,mt=Object.getPrototypeOf,_t=Object.keys,vt=H(Ze,"DataView"),bt=H(Ze,"Map"),Et=H(Ze,"Promise"),Tt=H(Ze,"Set"),Ot=H(Ze,"WeakMap"),xt=H(Object,"create"),It=ne(vt),Lt=ne(bt),St=ne(Et),Ct=ne(Tt),Nt=ne(Ot),wt=dt?dt.prototype:void 0,At=wt?wt.valueOf:void 0;f.prototype.clear=d,f.prototype.delete=h,f.prototype.get=y,f.prototype.has=g,f.prototype.set=m,_.prototype.clear=v,_.prototype.delete=b,_.prototype.get=E,_.prototype.has=T,_.prototype.set=O,x.prototype.clear=I,x.prototype.delete=L,x.prototype.get=S,x.prototype.has=C,x.prototype.set=N,w.prototype.add=w.prototype.push=A,w.prototype.has=M,P.prototype.clear=j,P.prototype.delete=k,P.prototype.get=R,P.prototype.has=D,P.prototype.set=F;var Mt=l(_t,Object),Pt=o("length"),jt=l(mt,Object),kt=G;(vt&&kt(new vt(new ArrayBuffer(1)))!=Re||bt&&kt(new bt)!=Le||Et&&kt(Et.resolve())!=Ne||Tt&&kt(new Tt)!=Ae||Ot&&kt(new Ot)!=je)&&(kt=function(e){var t=pt.call(e),n=t==Ce?e.constructor:void 0,r=n?ne(n):void 0;if(r)switch(r){case It:return Re;case Lt:return Le;case St:return Ne;case Ct:return Ae;case Nt:return je}return t});var Rt=Array.isArray,Dt=ot?s(ot):q;t.exports=ae}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],21:[function(e,t,n){"use strict";function r(e,t){this.x=e,this.y=t}t.exports=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,o=n*this.x+t*this.y;return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(e){return e instanceof r?e:Array.isArray(e)?new r(e[0],e[1]):e}},{}],22:[function(e,t,n){function r(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)o.call(n,r)&&(e[r]=n[r])}return e}t.exports=r;var o=Object.prototype.hasOwnProperty},{}],23:[function(e,t,n){"use strict";var r=e("lodash.isequal"),o=e("geojson-normalize"),i=e("hat"),s=e("./lib/features_at"),a=e("./lib/string_sets_are_equal"),u=e("geojsonhint"),c=e("./constants"),l=e("./lib/string_set"),p={Polygon:e("./feature_types/polygon"),LineString:e("./feature_types/line_string"),Point:e("./feature_types/point"),MultiPolygon:e("./feature_types/multi_feature"),MultiLineString:e("./feature_types/multi_feature"),MultiPoint:e("./feature_types/multi_feature")};t.exports=function(e){var t={modes:c.modes};return t.getFeatureIdsAt=function(t){var n=s({point:t},null,e);return n.map(function(e){return e.properties.id})},t.getSelectedIds=function(){return e.store.getSelectedIds()},t.set=function(n){if(void 0===n.type||n.type!==c.geojsonTypes.FEATURE_COLLECTION||!Array.isArray(n.features))throw new Error("Invalid FeatureCollection");var r=e.store.createRenderBatch(),o=e.store.getAllIds().slice(),i=t.add(n),s=new l(i);return o=o.filter(function(e){return!s.has(e)}),o.length&&t.delete(o),r(),i},t.add=function(t){var n=u.hint(t).filter(function(e){return"message"!==e.level});if(n.length)throw new Error(n[0].message);var s=o(t);s=JSON.parse(JSON.stringify(s));var a=s.features.map(function(t){if(t.id=t.id||i(),null===t.geometry)throw new Error("Invalid geometry: null");if(void 0===e.store.get(t.id)||e.store.get(t.id).type!==t.geometry.type){var n=p[t.geometry.type];if(void 0===n)throw new Error("Invalid geometry type: "+t.geometry.type+".");var o=new n(e,t);e.store.add(o)}else{var s=e.store.get(t.id);s.properties=t.properties,r(s.getCoordinates(),t.geometry.coordinates)||s.incomingCoords(t.geometry.coordinates)}return t.id});return e.store.render(),a},t.get=function(t){var n=e.store.get(t);if(n)return n.toGeoJSON()},t.getAll=function(){return{type:c.geojsonTypes.FEATURE_COLLECTION,features:e.store.getAll().map(function(e){return e.toGeoJSON()})}},t.delete=function(n){return e.store.delete(n,{silent:!0}),t.getMode()!==c.modes.DIRECT_SELECT||e.store.getSelectedIds().length?e.store.render():e.events.changeMode(c.modes.SIMPLE_SELECT,void 0,{silent:!0}),t},t.deleteAll=function(){return e.store.delete(e.store.getAllIds(),{silent:!0}),t.getMode()===c.modes.DIRECT_SELECT?e.events.changeMode(c.modes.SIMPLE_SELECT,void 0,{silent:!0}):e.store.render(),t},t.changeMode=function(n){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n===c.modes.SIMPLE_SELECT&&t.getMode()===c.modes.SIMPLE_SELECT?a(r.featureIds||[],e.store.getSelectedIds())?t:(e.store.setSelected(r.featureIds,{silent:!0}),e.store.render(),t):n===c.modes.DIRECT_SELECT&&t.getMode()===c.modes.DIRECT_SELECT&&r.featureId===e.store.getSelectedIds()[0]?t:(e.events.changeMode(n,r,{silent:!0}),t)},t.getMode=function(){return e.events.getMode()},t.trash=function(){return e.events.trash({silent:!0}),t},t}},{"./constants":24,"./feature_types/line_string":27,"./feature_types/multi_feature":28,"./feature_types/point":29,"./feature_types/polygon":30,"./lib/features_at":38,"./lib/string_set":47,"./lib/string_sets_are_equal":48,"geojson-normalize":14,geojsonhint:15,hat:19,"lodash.isequal":20}],24:[function(e,t,n){"use strict";t.exports={classes:{CONTROL_BASE:"mapboxgl-ctrl",CONTROL_PREFIX:"mapboxgl-ctrl-",CONTROL_BUTTON:"mapbox-gl-draw_ctrl-draw-btn",CONTROL_BUTTON_LINE:"mapbox-gl-draw_line",CONTROL_BUTTON_POLYGON:"mapbox-gl-draw_polygon",CONTROL_BUTTON_POINT:"mapbox-gl-draw_point",CONTROL_BUTTON_TRASH:"mapbox-gl-draw_trash",CONTROL_GROUP:"mapboxgl-ctrl-group",ATTRIBUTION:"mapboxgl-ctrl-attrib",ACTIVE_BUTTON:"active",BOX_SELECT:"mapbox-gl-draw_boxselect"},sources:{HOT:"mapbox-gl-draw-hot",COLD:"mapbox-gl-draw-cold"},cursors:{ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},types:{POLYGON:"polygon",LINE:"line_string",POINT:"point"},geojsonTypes:{FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"},modes:{DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},events:{CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",RENDER:"draw.render"},updateActions:{MOVE:"move",CHANGE_COORDINATES:"change_coordinates"},meta:{FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},activeStates:{ACTIVE:"true",INACTIVE:"false"},LAT_MIN:-90,LAT_RENDERED_MIN:-85,LAT_MAX:90,LAT_RENDERED_MAX:85,LNG_MIN:-270,LNG_MAX:270}},{}],25:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,i=e("./lib/mode_handler"),s=e("./lib/get_features_and_set_cursor"),a=e("./lib/is_click"),u=e("./constants"),c=(o={},r(o,u.modes.SIMPLE_SELECT,e("./modes/simple_select")),r(o,u.modes.DIRECT_SELECT,e("./modes/direct_select")),r(o,u.modes.DRAW_POINT,e("./modes/draw_point")),r(o,u.modes.DRAW_LINE_STRING,e("./modes/draw_line_string")),r(o,u.modes.DRAW_POLYGON,e("./modes/draw_polygon")),r(o,u.modes.STATIC,e("./modes/static")),o);t.exports=function(e){function t(t,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];l.stop();var s=c[t];if(void 0===s)throw new Error(t+" is not valid");o=t;var a=s(e,n);l=i(a,e),r.silent||e.map.fire(u.events.MODE_CHANGE,{mode:t}),e.store.setDirty(),e.store.render()}var n={},r={},o=u.modes.SIMPLE_SELECT,l=i(c.simple_select(e),e);r.drag=function(t){a(n,{point:t.point,time:(new Date).getTime()})?t.originalEvent.stopPropagation():(e.ui.queueMapClasses({mouse:u.cursors.DRAG}),l.drag(t))},r.mousemove=function(t){if(1===t.originalEvent.which)return r.drag(t);var n=s(t,e);t.featureTarget=n,l.mousemove(t)},r.mousedown=function(t){n={time:(new Date).getTime(),point:t.point};var r=s(t,e);t.featureTarget=r,l.mousedown(t)},r.mouseup=function(t){var r=s(t,e);t.featureTarget=r,a(n,{point:t.point,time:(new Date).getTime()})?l.click(t):l.mouseup(t)},r.mouseout=function(e){l.mouseout(e)};var p=function(e){return!(8===e||46===e||e>=48&&e<=57)};r.keydown=function(n){8!==n.keyCode&&46!==n.keyCode||!e.options.controls.trash?p(n.keyCode)?l.keydown(n):49===n.keyCode&&e.options.controls.point?t(u.modes.DRAW_POINT):50===n.keyCode&&e.options.controls.line_string?t(u.modes.DRAW_LINE_STRING):51===n.keyCode&&e.options.controls.polygon&&t(u.modes.DRAW_POLYGON):(n.preventDefault(),l.trash())},r.keyup=function(e){p(e.keyCode)&&l.keyup(e)},r.zoomend=function(){e.store.changeZoom()};var f={changeMode:t,currentModeName:function(){return o},currentModeRender:function(e,t){return l.render(e,t)},fire:function(e,t){r[e]&&r[e](t)},addEventListeners:function(){e.map.on("mousemove",r.mousemove),e.map.on("mousedown",r.mousedown),e.map.on("mouseup",r.mouseup),e.container.addEventListener("mouseout",r.mouseout),e.options.keybindings&&(e.container.addEventListener("keydown",r.keydown),e.container.addEventListener("keyup",r.keyup))},removeEventListeners:function(){e