@loaders.gl/shapefile 3.0.10 → 3.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dbf-worker.js +1 -1
- package/dist/dbf-worker.js.map +1 -1
- package/dist/dist.es5.min.js +1 -1
- package/dist/dist.es5.min.js.map +1 -1
- package/dist/dist.min.js +1 -1
- package/dist/dist.min.js.map +1 -1
- package/dist/es5/dbf-loader.js +1 -1
- package/dist/es5/index.js +0 -10
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/shapefile-loader.js +1 -1
- package/dist/es5/shp-loader.js +1 -1
- package/dist/esm/dbf-loader.js +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/parsers/parse-dbf.js +2 -2
- package/dist/esm/lib/parsers/parse-dbf.js.map +1 -1
- package/dist/esm/lib/parsers/parse-shapefile.js +1 -1
- package/dist/esm/lib/parsers/parse-shapefile.js.map +1 -1
- package/dist/esm/lib/parsers/parse-shp-geometry.js +1 -1
- package/dist/esm/lib/parsers/parse-shp-geometry.js.map +1 -1
- package/dist/esm/lib/parsers/parse-shp-header.js +2 -2
- package/dist/esm/lib/parsers/parse-shp-header.js.map +1 -1
- package/dist/esm/lib/parsers/parse-shp.js +2 -2
- package/dist/esm/lib/parsers/parse-shp.js.map +1 -1
- package/dist/esm/shapefile-loader.js +1 -1
- package/dist/esm/shp-loader.js +1 -1
- package/dist/shp-worker.js +1 -1
- package/dist/shp-worker.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +0 -3
- package/dist/es5/lib/filesystems/node-filesystem.js +0 -272
- package/dist/es5/lib/filesystems/node-filesystem.js.map +0 -1
- package/dist/esm/lib/filesystems/node-filesystem.js +0 -67
- package/dist/esm/lib/filesystems/node-filesystem.js.map +0 -1
- package/src/lib/filesystems/node-filesystem.ts +0 -87
package/dist/dist.es5.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHPLoader=e.SHPWorkerLoader=e.SHP_MAGIC_NUMBER=void 0;var r=n(12);function i(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=[0,0,39,10];e.SHP_MAGIC_NUMBER=h;var u={name:"SHP",id:"shp",module:"shapefile",version:"3.0.10",worker:!0,category:"geometry",extensions:["shp"],mimeTypes:["application/octet-stream"],tests:[new Uint8Array(h).buffer],options:{shp:{_maxDimensions:4}}};e.SHPWorkerLoader=u;var l,c,f=s(s({},u),{},{parse:(l=regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,r.parseSHP)(e,n));case 1:case"end":return t.stop()}}),t)})),c=function(){var t=this,e=arguments;return new Promise((function(n,r){var a=l.apply(t,e);function s(t){i(a,n,r,s,o,"next",t)}function o(t){i(a,n,r,s,o,"throw",t)}s(void 0)}))},function(t,e){return c.apply(this,arguments)}),parseSync:r.parseSHP,parseInBatches:r.parseSHPInBatches});e.SHPLoader=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Type",{enumerable:!0,get:function(){return a.Type}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return a.DataType}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return a.Null}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return a.Bool}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return a.Int}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return a.Int8}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return a.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return a.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return a.Int64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return a.Uint8}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return a.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return a.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return a.Uint64}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return a.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return a.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return a.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return a.Float64}}),Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return a.Binary}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return a.Utf8}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return a.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return a.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return a.DateMillisecond}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return a.Time}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return a.TimeSecond}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return a.TimeMillisecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return a.Timestamp}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return a.TimestampSecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return a.TimestampMillisecond}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return a.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return a.TimestampNanosecond}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return a.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return a.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return a.IntervalYearMonth}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return a.FixedSizeList}});var r=s(n(26)),i=s(n(28)),a=n(29);function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw s}}}}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"offset",void 0),h(this,"arrayBuffers",void 0),h(this,"ended",void 0),h(this,"maxRewindBytes",void 0);var n=(e||{}).maxRewindBytes,r=void 0===n?0:n;this.offset=0,this.arrayBuffers=[],this.ended=!1,this.maxRewindBytes=r}var e,n,a;return e=t,(n=[{key:"write",value:function(t){this.arrayBuffers.push(t)}},{key:"end",value:function(){this.arrayBuffers=[],this.ended=!0}},{key:"hasAvailableBytes",value:function(t){var e,n=-this.offset,r=i(this.arrayBuffers);try{for(r.s();!(e=r.n()).done;)if((n+=e.value.byteLength)>=t)return!0}catch(t){r.e(t)}finally{r.f()}return!1}},{key:"findBufferOffsets",value:function(t){for(var e=-this.offset,n=[],r=0;r<this.arrayBuffers.length;r++){var i=this.arrayBuffers[r];if(e+i.byteLength<=0)e+=i.byteLength;else{var a=e<=0?Math.abs(e):0,s=void 0;if(a+t<=i.byteLength)return s=a+t,n.push([r,[a,s]]),n;s=i.byteLength,n.push([r,[a,s]]),t-=i.byteLength-a,e+=i.byteLength}}return null}},{key:"getDataView",value:function(t){var e=this.findBufferOffsets(t);if(!e&&this.ended)throw new Error("binary data exhausted");if(!e)return null;if(1===e.length){var n=r(e[0],2),i=n[0],a=r(n[1],2),s=a[0],o=a[1],h=this.arrayBuffers[i],u=new DataView(h,s,o-s);return this.offset+=t,this.disposeBuffers(),u}var l=new DataView(this._combineArrayBuffers(e));return this.offset+=t,this.disposeBuffers(),l}},{key:"disposeBuffers",value:function(){for(;this.arrayBuffers.length>0&&this.offset-this.maxRewindBytes>=this.arrayBuffers[0].byteLength;)this.offset-=this.arrayBuffers[0].byteLength,this.arrayBuffers.shift()}},{key:"_combineArrayBuffers",value:function(t){var e,n=0,a=i(t);try{for(a.s();!(e=a.n()).done;){var s=r(e.value[1],2),o=s[0];n+=s[1]-o}}catch(t){a.e(t)}finally{a.f()}var h,u=new Uint8Array(n),l=0,c=i(t);try{for(c.s();!(h=c.n()).done;){var f=r(h.value,2),y=f[0],p=r(f[1],2),d=p[0],v=p[1],m=new Uint8Array(this.arrayBuffers[y]);u.set(m.subarray(d,v),l),l+=v-d}}catch(t){c.e(t)}finally{c.f()}return u.buffer}},{key:"skip",value:function(t){this.offset+=t}},{key:"rewind",value:function(t){this.offset-=t}}])&&o(e.prototype,n),a&&o(e,a),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSHPHeader=function(t){var e={magic:t.getInt32(0,!1),length:2*t.getInt32(24,!1),version:t.getInt32(28,!0),type:t.getInt32(32,!0),bbox:{minX:t.getFloat64(36,!0),minY:t.getFloat64(44,!0),minZ:t.getFloat64(68,!0),minM:t.getFloat64(84,!0),maxX:t.getFloat64(52,!0),maxY:t.getFloat64(60,!0),maxZ:t.getFloat64(76,!0),maxM:t.getFloat64(92,!0)}};9994!==e.magic&&console.error("SHP file: bad magic number ".concat(e.magic));1e3!==e.version&&console.error("SHP file: bad version ".concat(e.version));return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DBFLoader=e.DBFWorkerLoader=void 0;var r=n(21);function i(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={name:"DBF",id:"dbf",module:"shapefile",version:"3.0.10",worker:!0,category:"table",extensions:["dbf"],mimeTypes:["application/x-dbf"],options:{dbf:{encoding:"latin1"}}};e.DBFWorkerLoader=h;var u,l,c=s(s({},h),{},{parse:(u=regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,r.parseDBF)(e,n));case 1:case"end":return t.stop()}}),t)})),l=function(){var t=this,e=arguments;return new Promise((function(n,r){var a=u.apply(t,e);function s(t){i(a,n,r,s,o,"next",t)}function o(t){i(a,n,r,s,o,"throw",t)}s(void 0)}))},function(t,e){return l.apply(this,arguments)}),parseSync:r.parseDBF,parseInBatches:r.parseDBFInBatches});e.DBFLoader=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(6);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"schema",void 0),a(this,"options",void 0),a(this,"length",0),a(this,"objectRows",null),a(this,"arrayRows",null),a(this,"cursor",0),a(this,"_headers",[]),this.options=n,this.schema=e,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}var e,n,s;return e=t,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"object-row-table":var n=(0,r.convertToObjectRow)(t,this._headers);this.addObjectRow(n,e);break;case"array-row-table":this.arrayRows=this.arrayRows||new Array(100),this.arrayRows[this.length]=t,this.length++}}},{key:"addObjectRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"array-row-table":var n=(0,r.convertToArrayRow)(t,this._headers);this.addArrayRow(n,e);break;case"object-row-table":this.objectRows=this.objectRows||new Array(100),this.objectRows[this.length]=t,this.length++}}},{key:"getBatch",value:function(){var t=this.arrayRows||this.objectRows;return t?(t=t.slice(0,this.length),this.arrayRows=null,this.objectRows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}])&&i(e.prototype,n),s&&i(e,s),t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertToObjectRow=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n},e.convertToArrayRow=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var n=new Array(e.length),r=0;r<e.length;r++)n[r]=t[e[r]];return n}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,"schema",void 0),s(this,"length",0),s(this,"allocated",0),s(this,"columns",{}),this.schema=e,this._reallocateColumns()}var e,n,i;return e=t,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t){this._reallocateColumns();var e=0;for(var n in this.columns)this.columns[n][this.length]=t[e++];this.length++}},{key:"addObjectRow",value:function(t){for(var e in this._reallocateColumns(),t)this.columns[e][this.length]=t[e];this.length++}},{key:"getBatch",value:function(){this._pruneColumns();var t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(var e in this.schema){var n=this.schema[e];t[n.name]=this.columns[n.index]}return this.columns={},{shape:"columnar-table",batchType:"data",data:t,schema:this.schema,length:this.length}}},{key:"_reallocateColumns",value:function(){if(!(this.length<this.allocated))for(var t in this.allocated=this.allocated>0?this.allocated*=2:100,this.columns={},this.schema){var e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){var i=new n(this.allocated);i.set(r),this.columns[e.index]=i}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}},{key:"_pruneColumns",value:function(){for(var t=0,e=Object.entries(this.columns);t<e.length;t++){var n=r(e[t],2),i=n[0],a=n[1];this.columns[i]=a.slice(0,this.length)}}}])&&a(e.prototype,n),i&&a(e,i),t}();e.default=o},function(t,e,n){"use strict";(function(e){var r=n(10),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,r)}).call(this,n(9))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ShapefileLoader",{enumerable:!0,get:function(){return i.ShapefileLoader}}),Object.defineProperty(e,"DBFLoader",{enumerable:!0,get:function(){return a.DBFLoader}}),Object.defineProperty(e,"DBFWorkerLoader",{enumerable:!0,get:function(){return a.DBFWorkerLoader}}),Object.defineProperty(e,"SHPLoader",{enumerable:!0,get:function(){return s.SHPLoader}}),Object.defineProperty(e,"SHPWorkerLoader",{enumerable:!0,get:function(){return s.SHPWorkerLoader}}),Object.defineProperty(e,"_NodeFileSystem",{enumerable:!0,get:function(){return o.default}});var r,i=n(11),a=n(4),s=n(0),o=(r=n(35))&&r.__esModule?r:{default:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._typecheckShapefileLoader=e.ShapefileLoader=void 0;var r=n(0),i=n(14),a={name:"Shapefile",id:"shapefile",module:"shapefile",version:"3.0.10",category:"geometry",extensions:["shp"],mimeTypes:["application/octet-stream"],tests:[new Uint8Array(r.SHP_MAGIC_NUMBER).buffer],options:{shapefile:{},shp:{_maxDimensions:4}},parse:i.parseShapefile,parseInBatches:i.parseShapefileInBatches};e.ShapefileLoader=a;var s=a;e._typecheckShapefileLoader=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSHP=function(t,e){var n=new b(e);return n.write(t),n.end(),n.result},e.parseSHPInBatches=function(t,e){return g.apply(this,arguments)};var r,i=(r=n(2))&&r.__esModule?r:{default:r},a=n(3),s=n(13);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return new f(t)}function l(t){return function(){return new c(t.apply(this,arguments))}}function c(t){var e,n;function r(e,n){try{var a=t[e](n),s=a.value,o=s instanceof f;Promise.resolve(o?s.wrapped:s).then((function(t){o?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function f(t){this.wrapped=t}function y(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)}c.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(t){return this._invoke("next",t)},c.prototype.throw=function(t){return this._invoke("throw",t)},c.prototype.return=function(t){return this._invoke("return",t)};var p=0,d=1,v=2,m=3,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"options",{}),h(this,"binaryReader",new i.default({maxRewindBytes:12})),h(this,"state",p),h(this,"result",{geometries:[]}),this.options=e}var e,n,r;return e=t,(n=[{key:"write",value:function(t){this.binaryReader.write(t),this.state=M(this.state,this.result,this.binaryReader,this.options)}},{key:"end",value:function(){this.binaryReader.end(),this.state=M(this.state,this.result,this.binaryReader,this.options),this.state!==v&&(this.state=m,this.result.error="SHP incomplete file")}}])&&o(e.prototype,n),r&&o(e,r),t}();function g(){return(g=l(regeneratorRuntime.mark((function t(e,n){var r,i,a,s,o,h,l,c,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new b(n),i=!1,a=!0,s=!1,t.prev=4,h=y(e);case 6:return t.next=8,u(h.next());case 8:return l=t.sent,a=l.done,t.next=12,u(l.value);case 12:if(c=t.sent,a){t.next=27;break}if(f=c,r.write(f),i||!r.result.header){t.next=20;break}return i=!0,t.next=20,r.result.header;case 20:if(!(r.result.geometries.length>0)){t.next=24;break}return t.next=23,r.result.geometries;case 23:r.result.geometries=[];case 24:a=!0,t.next=6;break;case 27:t.next=33;break;case 29:t.prev=29,t.t0=t.catch(4),s=!0,o=t.t0;case 33:if(t.prev=33,t.prev=34,a||null==h.return){t.next=38;break}return t.next=38,u(h.return());case 38:if(t.prev=38,!s){t.next=41;break}throw o;case 41:return t.finish(38);case 42:return t.finish(33);case 43:if(r.end(),!(r.result.geometries.length>0)){t.next=47;break}return t.next=47,r.result.geometries;case 47:return t.abrupt("return");case 48:case"end":return t.stop()}}),t,null,[[4,29,33,43],[34,,38,42]])})))).apply(this,arguments)}function M(t,e,n,r){for(;;)try{switch(t){case m:case v:return t;case p:var i=n.getDataView(100);if(!i)return t;e.header=(0,a.parseSHPHeader)(i),e.progress={bytesUsed:0,bytesTotal:e.header.length,rows:0},e.currentIndex=1,t=d;break;case d:for(;n.hasAvailableBytes(12);){var o=n.getDataView(12),h={recordNumber:o.getInt32(0,!1),byteLength:2*o.getInt32(4,!1),type:o.getInt32(8,!0)};if(!n.hasAvailableBytes(h.byteLength-4))return n.rewind(12),t;if(h.byteLength<4||h.type!==e.header.type||h.recordNumber!==e.currentIndex)n.rewind(8);else{n.rewind(4);var u=n.getDataView(h.byteLength),l=(0,s.parseRecord)(u,r);e.geometries.push(l),e.currentIndex++,e.progress.rows=e.currentIndex-1}}return n.ended&&(t=v),t;default:return t=m,e.error="illegal parser state ".concat(t),t}}catch(n){return t=m,e.error="SHP parsing failed: ".concat(null==n?void 0:n.message),t}}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(e,"__esModule",{value:!0}),e.parseRecord=function(t,e){var n=((null==e?void 0:e.shp)||{})._maxDimensions,r=0,i=t.getInt32(r,!0);switch(r+=Int32Array.BYTES_PER_ELEMENT,i){case 0:return null;case 1:return a(t,r,Math.min(2,n));case 3:return o(t,r,Math.min(2,n),"LineString");case 5:return o(t,r,Math.min(2,n),"Polygon");case 8:return s(t,r,Math.min(2,n));case 11:return a(t,r,Math.min(4,n));case 13:return o(t,r,Math.min(4,n),"LineString");case 15:return o(t,r,Math.min(4,n),"Polygon");case 18:return s(t,r,Math.min(4,n));case 21:return a(t,r,Math.min(3,n));case 23:return o(t,r,Math.min(3,n),"LineString");case 25:return o(t,r,Math.min(3,n),"Polygon");case 28:return s(t,r,Math.min(3,n));default:throw new Error("unsupported shape type: ".concat(i))}};function a(t,e,n){var i,a=r(h(t,e,1,n),2);return i=a[0],e=a[1],{positions:{value:i,size:n},type:"Point"}}function s(t,e,n){e+=4*Float64Array.BYTES_PER_ELEMENT;var i,a=t.getInt32(e,!0),s=null,o=null,l=r(h(t,e+=Int32Array.BYTES_PER_ELEMENT,a,2),2);if(i=l[0],e=l[1],4===n){var c=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,a,1),2);o=c[0],e=c[1]}if(n>=3){var f=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,a,1),2);s=f[0],e=f[1]}return{positions:{value:u(i,s,o),size:n},type:"Point"}}function o(t,e,n,i){e+=4*Float64Array.BYTES_PER_ELEMENT;var a=t.getInt32(e,!0);e+=Int32Array.BYTES_PER_ELEMENT;var s=t.getInt32(e,!0);e+=Int32Array.BYTES_PER_ELEMENT;var o=t.byteOffset+e,c=a*Int32Array.BYTES_PER_ELEMENT,f=new Int32Array(a+1);f.set(new Int32Array(t.buffer.slice(o,o+c))),f[a]=s;var y=null,p=null,d=null,v=r(h(t,e+=a*Int32Array.BYTES_PER_ELEMENT,s,2),2);if(y=v[0],e=v[1],4===n){var m=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,s,1),2);d=m[0],e=m[1]}if(n>=3){var b=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,s,1),2);p=b[0],e=b[1]}var g=u(y,p,d);if("LineString"===i)return{type:i,positions:{value:g,size:n},pathIndices:{value:f,size:1}};for(var M=[],w=1;w<f.length;w++){var _=f[w-1],x=f[w];l(y.subarray(2*_,2*x))>0&&M.push(_)}return M.push(s),{type:i,positions:{value:g,size:n},primitivePolygonIndices:{value:f,size:1},polygonIndices:{value:new Uint32Array(M),size:1}}}function h(t,e,n,r){var i=t.byteOffset+e,a=n*r*Float64Array.BYTES_PER_ELEMENT;return[new Float64Array(t.buffer.slice(i,i+a)),e+a]}function u(t,e,n){if(!e&&!n)return t;var r=t.length,i=2;n&&n.length&&(r+=n.length,i++),e&&e.length&&(r+=e.length,i++);for(var a=new Float64Array(r),s=0;s<t.length/2;s++)a[i*s]=t[2*s],a[i*s+1]=t[2*s+1];if(n&&n.length)for(var o=0;o<n.length;o++)a[i*o+2]=n[o];if(e&&e.length)for(var h=0;h<e.length;h++)a[i*h+(i-1)]=e[h];return a}function l(t){return Math.sign(function(t){for(var e=0,n=t.length/2-1,r=0;r<n;r++)e+=(t[2*r]+t[2*(r+1)])*(t[2*r+1]-t[2*(r+1)+1]);return e/2}(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseShapefileInBatches=function(t,e,n){return _.apply(this,arguments)},e.parseShapefile=function(t,e,n){return x.apply(this,arguments)},e.loadShapefileSidecarFiles=I,e.replaceExtension=k;var r=n(15),i=n(36),a=n(19),s=n(20),o=n(0),h=n(4);function u(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){u(a,r,i,s,o,"next",t)}function o(t){u(a,r,i,s,o,"throw",t)}s(void 0)}))}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){return new M(t)}function b(t){return function(){return new g(t.apply(this,arguments))}}function g(t){var e,n;function r(e,n){try{var a=t[e](n),s=a.value,o=s instanceof M;Promise.resolve(o?s.wrapped:s).then((function(t){o?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function M(t){this.wrapped=t}function w(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)}function _(){return(_=b(regeneratorRuntime.mark((function t(e,n,r){var i,a,u,l,f,y,p,v,b,g,M,_,x,j,T,E,A,C,N,R,D,B,F,L,U,q,z;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=(null==n?void 0:n.gis)||{},a=i.reproject,u=void 0!==a&&a,l=i._targetCrs,f=void 0===l?"WGS84":l,t.next=3,m(I(n,r));case 3:return y=t.sent,p=y.shx,v=y.cpg,b=y.prj,t.next=9,m(r.parseInBatches(e,o.SHPLoader,n));case 9:return g=t.sent,t.next=12,m(r.fetch(k((null==r?void 0:r.url)||"","dbf")));case 12:if(!(_=t.sent).ok){t.next=17;break}return t.next=16,m(r.parseInBatches(_,h.DBFLoader,d(d({},n),{},{dbf:{encoding:v||"latin1"}})));case 16:M=t.sent;case 17:return t.next=19,m(g.next());case 19:if(!(x=t.sent.value)||"metadata"!==x.batchType){t.next=24;break}return t.next=23,m(g.next());case 23:x=t.sent.value;case 24:if(j={},!M){t.next=33;break}return t.next=28,m(M.next());case 28:if(!(j=t.sent.value)||"metadata"!==j.batchType){t.next=33;break}return t.next=32,m(M.next());case 32:j=t.sent.value;case 33:T=M?(0,s.zipBatchIterators)(g,M):g,E=!0,A=!1,t.prev=36,N=w(T);case 38:return t.next=40,m(N.next());case 40:return R=t.sent,E=R.done,t.next=44,m(R.value);case 44:if(D=t.sent,E){t.next=58;break}return B=D,F=void 0,L=void 0,M?(U=c(B,2),F=U[0],L=U[1]):F=B,q=P(F),z=O(q,L),u&&(z=S(z,b,f)),t.next=55,{encoding:v,prj:b,shx:p,header:x,data:z};case 55:E=!0,t.next=38;break;case 58:t.next=64;break;case 60:t.prev=60,t.t0=t.catch(36),A=!0,C=t.t0;case 64:if(t.prev=64,t.prev=65,E||null==N.return){t.next=69;break}return t.next=69,m(N.return());case 69:if(t.prev=69,!A){t.next=72;break}throw C;case 72:return t.finish(69);case 73:return t.finish(64);case 74:case"end":return t.stop()}}),t,null,[[36,60,64,74],[65,,69,73]])})))).apply(this,arguments)}function x(){return(x=l(regeneratorRuntime.mark((function t(e,n,r){var i,a,s,u,l,c,f,y,p,d,v,m,b,g,M,w;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=(null==n?void 0:n.gis)||{},a=i.reproject,s=void 0!==a&&a,u=i._targetCrs,l=void 0===u?"WGS84":u,t.next=3,I(n,r);case 3:return c=t.sent,f=c.shx,y=c.cpg,p=c.prj,t.next=9,r.parse(e,o.SHPLoader,n);case 9:return d=t.sent,v=d.header,m=d.geometries,b=P(m),g=[],t.next=16,r.fetch(k(r.url,"dbf"));case 16:if(!(M=t.sent).ok){t.next=21;break}return t.next=20,r.parse(M,h.DBFLoader,{dbf:{encoding:y||"latin1"}});case 20:g=t.sent;case 21:return w=O(b,g),s&&(w=S(w,p,l)),t.abrupt("return",{encoding:y,prj:p,shx:f,header:v,data:w});case 24:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(t){var e,n=[],i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=f(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;n.push((0,r.binaryToGeometry)(a))}}catch(t){i.e(t)}finally{i.f()}return n}function O(t,e){for(var n=[],r=0;r<t.length;r++){var i={type:"Feature",geometry:t[r],properties:e&&e[r]||{}};n.push(i)}return n}function S(t,e,n){var a=new i.Proj4Projection({from:e||"WGS84",to:n||"WGS84"});return(0,r.transformGeoJsonCoords)(t,(function(t){return a.project(t)}))}function I(t,e){return j.apply(this,arguments)}function j(){return(j=l(regeneratorRuntime.mark((function t(e,n){var r,i,s,o,h,u,l,c,f,y,p,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.url,i=n.fetch,s=i(k(r,"shx")),o=i(k(r,"cpg")),h=i(k(r,"prj")),t.next=6,Promise.all([s,o,h]);case 6:return t.next=8,s;case 8:if(!(f=t.sent).ok){t.next=14;break}return t.next=12,f.arrayBuffer();case 12:y=t.sent,u=(0,a.parseShx)(y);case 14:return t.next=16,o;case 16:if(!(p=t.sent).ok){t.next=21;break}return t.next=20,p.text();case 20:l=t.sent;case 21:return t.next=23,h;case 23:if(!(d=t.sent).ok){t.next=28;break}return t.next=27,d.text();case 27:c=t.sent;case 28:return t.abrupt("return",{shx:u,cpg:l,prj:c});case 29:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t,e){var n=function(t){var e=t&&t.lastIndexOf(".");if("number"==typeof e)return e>=0?t.substr(0,e):"";return e}(t),r=function(t){var e=t&&t.lastIndexOf(".");if("number"==typeof e)return e>=0?t.substr(e+1):"";return e}(t);return r===r.toUpperCase()&&(e=e.toUpperCase()),"".concat(n,".").concat(e)}g.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},g.prototype.next=function(t){return this._invoke("next",t)},g.prototype.throw=function(t){return this._invoke("throw",t)},g.prototype.return=function(t){return this._invoke("return",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"geojsonToBinary",{enumerable:!0,get:function(){return r.geojsonToBinary}}),Object.defineProperty(e,"binaryToGeojson",{enumerable:!0,get:function(){return i.binaryToGeojson}}),Object.defineProperty(e,"binaryToGeoJson",{enumerable:!0,get:function(){return i.binaryToGeoJson}}),Object.defineProperty(e,"binaryToGeometry",{enumerable:!0,get:function(){return i.binaryToGeometry}}),Object.defineProperty(e,"transformBinaryCoords",{enumerable:!0,get:function(){return a.transformBinaryCoords}}),Object.defineProperty(e,"transformGeoJsonCoords",{enumerable:!0,get:function(){return a.transformGeoJsonCoords}});var r=n(16),i=n(17),a=n(18)},function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=h(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function h(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(e,"__esModule",{value:!0}),e.geojsonToBinary=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c(t);return f(t,n,{coordLength:e.coordLength||n.coordLength,numericPropKeys:e.numericPropKeys||n.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})},e.TEST_EXPORTS=void 0;var l={firstPass:c,secondPass:f};function c(t){var e,n,r=0,i=0,a=0,h=0,u=0,l=0,c=0,f=0,y=0,p=new Set,d={},v=o(t);try{for(v.s();!(e=v.n()).done;){var m=e.value,b=m.geometry;switch(b.type){case"Point":i++,r++,p.add(b.coordinates.length);break;case"MultiPoint":i++,r+=b.coordinates.length;var g,M=o(b.coordinates);try{for(M.s();!(g=M.n()).done;){var w=g.value;p.add(w.length)}}catch(t){M.e(t)}finally{M.f()}break;case"LineString":u++,a+=b.coordinates.length,h++;var x,P=o(b.coordinates);try{for(P.s();!(x=P.n()).done;){var O=x.value;p.add(O.length)}}catch(t){P.e(t)}finally{P.f()}break;case"MultiLineString":u++;var S,I=o(b.coordinates);try{for(I.s();!(S=I.n()).done;){var j=S.value;a+=j.length,h++;var k,T=o(j);try{for(T.s();!(k=T.n()).done;){var E=k.value;p.add(E.length)}}catch(t){T.e(t)}finally{T.f()}}}catch(t){I.e(t)}finally{I.f()}break;case"Polygon":y++,c++,f+=b.coordinates.length,l+=_(b.coordinates).length;var A,C=o(_(b.coordinates));try{for(C.s();!(A=C.n()).done;){var N=A.value;p.add(N.length)}}catch(t){C.e(t)}finally{C.f()}break;case"MultiPolygon":y++;var R,D=o(b.coordinates);try{for(D.s();!(R=D.n()).done;){var B=R.value;c++,f+=B.length,l+=_(B).length;var F,L=o(_(B));try{for(L.s();!(F=L.n()).done;){var U=F.value;p.add(U.length)}}catch(t){L.e(t)}finally{L.f()}}}catch(t){D.e(t)}finally{D.f()}break;default:throw new Error("Unsupported geometry type: ".concat(b.type))}if(m.properties)for(var q in m.properties){var z=m.properties[q];d[q]=d[q]||void 0===d[q]?(n=z,Number.isFinite(n)):d[q]}}}catch(t){v.e(t)}finally{v.f()}return{coordLength:p.size>0?Math.max.apply(Math,s(p)):2,pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:a,linePathsCount:h,lineFeaturesCount:u,polygonPositionsCount:l,polygonObjectsCount:c,polygonRingsCount:f,polygonFeaturesCount:y,numericPropKeys:Object.keys(d).filter((function(t){return d[t]}))}}function f(t,e,n){for(var r=e.pointPositionsCount,a=e.pointFeaturesCount,s=e.linePositionsCount,h=e.linePathsCount,u=e.lineFeaturesCount,l=e.polygonPositionsCount,c=e.polygonObjectsCount,f=e.polygonRingsCount,g=e.polygonFeaturesCount,w=n.coordLength,_=n.numericPropKeys,x=n.PositionDataType,P=void 0===x?Float32Array:x,O=t.length>65535?Uint32Array:Uint16Array,S={positions:new P(r*w),globalFeatureIds:new O(r),featureIds:a>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:Array(),fields:Array()},I={positions:new P(s*w),pathIndices:s>65535?new Uint32Array(h+1):new Uint16Array(h+1),globalFeatureIds:new O(s),featureIds:u>65535?new Uint32Array(s):new Uint16Array(s),numericProps:{},properties:Array(),fields:Array()},j={positions:new P(l*w),polygonIndices:l>65535?new Uint32Array(c+1):new Uint16Array(c+1),primitivePolygonIndices:l>65535?new Uint32Array(f+1):new Uint16Array(f+1),globalFeatureIds:new O(l),featureIds:g>65535?new Uint32Array(l):new Uint16Array(l),numericProps:{},properties:Array(),fields:Array()},k=0,T=[S,I,j];k<T.length;k++){var E,A=T[k],C=o(_||[]);try{for(C.s();!(E=C.n()).done;){var N=E.value;A.numericProps[N]=new Float32Array(A.positions.length/w)}}catch(t){C.e(t)}finally{C.f()}}I.pathIndices[h]=s,j.polygonIndices[c]=l,j.primitivePolygonIndices[f]=l;var R,D={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},B=o(t);try{for(B.s();!(R=B.n()).done;){var F=R.value,L=F.geometry,U=F.properties||{};switch(L.type){case"Point":y(L.coordinates,S,D,w,U),S.properties.push(M(U,_)),D.pointFeature++;break;case"MultiPoint":p(L.coordinates,S,D,w,U),S.properties.push(M(U,_)),D.pointFeature++;break;case"LineString":d(L.coordinates,I,D,w,U),I.properties.push(M(U,_)),D.lineFeature++;break;case"MultiLineString":v(L.coordinates,I,D,w,U),I.properties.push(M(U,_)),D.lineFeature++;break;case"Polygon":m(L.coordinates,j,D,w,U),j.properties.push(M(U,_)),D.polygonFeature++;break;case"MultiPolygon":b(L.coordinates,j,D,w,U),j.properties.push(M(U,_)),D.polygonFeature++;break;default:throw new Error("Invalid geometry type")}D.feature++}}catch(t){B.e(t)}finally{B.f()}return function(t,e,n,r){var a={points:i(i({},t),{},{positions:{value:t.positions,size:r},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},type:"Point"}),lines:i(i({},e),{},{pathIndices:{value:e.pathIndices,size:1},positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},type:"LineString"}),polygons:i(i({},n),{},{polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},positions:{value:n.positions,size:r},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},type:"Polygon"})};for(var s in a)for(var o in a[s].numericProps)a[s].numericProps[o]={value:a[s].numericProps[o],size:1};return a}(S,I,j,w)}function y(t,e,n,r,i){e.positions.set(t,n.pointPosition*r),e.globalFeatureIds[n.pointPosition]=n.feature,e.featureIds[n.pointPosition]=n.pointFeature,g(e,i,n.pointPosition,1),n.pointPosition++}function p(t,e,n,r,i){var a,s=o(t);try{for(s.s();!(a=s.n()).done;){y(a.value,e,n,r,i)}}catch(t){s.e(t)}finally{s.f()}}function d(t,e,n,r,i){e.pathIndices[n.linePath]=n.linePosition,n.linePath++,w(e.positions,t,n.linePosition,r);var a=t.length;g(e,i,n.linePosition,a),e.globalFeatureIds.set(new Uint32Array(a).fill(n.feature),n.linePosition),e.featureIds.set(new Uint32Array(a).fill(n.lineFeature),n.linePosition),n.linePosition+=a}function v(t,e,n,r,i){var a,s=o(t);try{for(s.s();!(a=s.n()).done;){d(a.value,e,n,r,i)}}catch(t){s.e(t)}finally{s.f()}}function m(t,e,n,r,i){e.polygonIndices[n.polygonObject]=n.polygonPosition,n.polygonObject++;var a,s=o(t);try{for(s.s();!(a=s.n()).done;){var h=a.value;e.primitivePolygonIndices[n.polygonRing]=n.polygonPosition,n.polygonRing++,w(e.positions,h,n.polygonPosition,r);var u=h.length;g(e,i,n.polygonPosition,u),e.globalFeatureIds.set(new Uint32Array(u).fill(n.feature),n.polygonPosition),e.featureIds.set(new Uint32Array(u).fill(n.polygonFeature),n.polygonPosition),n.polygonPosition+=u}}catch(t){s.e(t)}finally{s.f()}}function b(t,e,n,r,i){var a,s=o(t);try{for(s.s();!(a=s.n()).done;){m(a.value,e,n,r,i)}}catch(t){s.e(t)}finally{s.f()}}function g(t,e,n,r){for(var i in t.numericProps)i in e&&t.numericProps[i].set(new Array(r).fill(e[i]),n)}function M(t,e){var n={};for(var r in t)e.includes(r)||(n[r]=t[r]);return n}function w(t,e,n,r){var i,a=n*r,s=o(e);try{for(s.s();!(i=s.n()).done;){var h=i.value;t.set(h,a),a+=r}}catch(t){s.e(t)}finally{s.f()}}function _(t){var e;return(e=[]).concat.apply(e,s(t))}e.TEST_EXPORTS=l},function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){return function(t){var e,n=[],r=a(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(0!==i.featureIds.value.length){for(var s=0,o=i.featureIds.value[0],h=0;h<i.featureIds.value.length;h++){var u=i.featureIds.value[h];u!==o&&(n.push(l(i,s,h)),s=h,o=u)}n.push(l(i,s,i.featureIds.value.length))}}}catch(t){r.e(t)}finally{r.f()}return n}(u(t,e))}function h(t,e,n){switch(t.type){case"Point":return function(t,e,n){var r=c(t.positions,e,n);if(r.length>1)return{type:"MultiPoint",coordinates:r};return{type:"Point",coordinates:r[0]}}(t,e,n);case"LineString":return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=t.positions,i=t.pathIndices.value.filter((function(t){return t>=e&&t<=n})),a=i.length>2;if(!a){var s=c(r,i[0],i[1]);return{type:"LineString",coordinates:s}}for(var o=[],h=0;h<i.length-1;h++){var u=c(r,i[h],i[h+1]);o.push(u)}return{type:"MultiLineString",coordinates:o}}(t,e,n);case"Polygon":return function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=e.positions,a=e.polygonIndices.value.filter((function(t){return t>=n&&t<=r})),s=e.primitivePolygonIndices.value.filter((function(t){return t>=n&&t<=r})),o=a.length>2;if(!o){for(var h=[],u=0;u<s.length-1;u++){var l=s[u],f=s[u+1],y=c(i,l,f);h.push(y)}return{type:"Polygon",coordinates:h}}for(var p=[],d=0;d<a.length-1;d++){var v=a[d],m=a[d+1],b=t(e,v,m).coordinates;p.push(b)}return{type:"MultiPolygon",coordinates:p}}(t,e,n);default:var r=t;throw new Error("Unsupported geometry type: ".concat(null==r?void 0:r.type))}}function u(t,e){if(!Boolean(t.points||t.lines||t.polygons))return t.type=e||function(t){if(t.pathIndices)return"LineString";if(t.polygonIndices)return"Polygon";return"Point"}(t),[t];var n=[];return t.points&&(t.points.type="Point",n.push(t.points)),t.lines&&(t.lines.type="LineString",n.push(t.lines)),t.polygons&&(t.polygons.type="Polygon",n.push(t.polygons)),n}function l(t,e,n){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:"Feature",geometry:h(t,e,n),properties:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Object.assign({},t.properties[t.featureIds.value[e]]);for(var r in t.numericProps)n[r]=t.numericProps[r].value[e];return n}(t,e,n)},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.fields&&t.fields[t.featureIds.value[e]]}(t,e,n))}function c(t,e,n){e=e||0,n=n||t.value.length/t.size;for(var r=[],i=e;i<n;i++){for(var a=Array(),s=i*t.size;s<(i+1)*t.size;s++)a.push(Number(t.value[s]));r.push(a)}return r}Object.defineProperty(e,"__esModule",{value:!0}),e.binaryToGeojson=function(t,e){var n=null==e?void 0:e.globalFeatureId;if(void 0!==n)return function(t,e){var n,r=a(u(t));try{for(r.s();!(n=r.n()).done;){for(var i=n.value,s=0,o=i.featureIds.value[0],h=0;h<i.featureIds.value.length;h++){var c=i.featureIds.value[h];if(c!==o){if(e===i.globalFeatureIds.value[s])return l(i,s,h);s=h,o=c}}if(e===i.globalFeatureIds.value[s])return l(i,s,i.featureIds.value.length)}}catch(t){r.e(t)}finally{r.f()}throw new Error("featureId:".concat(e," not found"))}(t,n);return o(t,null==e?void 0:e.type)},e.binaryToGeoJson=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"feature";switch(n){case"feature":return o(t,e);case"geometry":return h(t);default:throw new Error(n)}},e.binaryToGeometry=h},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){for(var n=t.positions,r=0;r<n.value.length;r+=n.size){var i=e(Array.from(n.value.subarray(r,r+n.size)));n.value.set(i,r)}}function a(t,e){return function(t){return Number.isFinite(t[0])&&Number.isFinite(t[1])}(t)?e(t):t.map((function(t){return a(t,e)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.transformBinaryCoords=function(t,e){t.points&&i(t.points,e);t.lines&&i(t.lines,e);t.polygons&&i(t.polygons,e);return t},e.transformGeoJsonCoords=function(t,e){var n,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw s}}}}(t);try{for(i.s();!(n=i.n()).done;){var s=n.value;s.geometry.coordinates=a(s.geometry.coordinates,e)}}catch(t){i.e(t)}finally{i.f()}return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseShx=function(t){for(var e=new DataView(t,0,100),n=(0,r.parseSHPHeader)(e).length-100,i=new DataView(t,100,n),a=new Int32Array(n),s=new Int32Array(n),o=0;o<n/8;o++)a[o]=i.getInt32(8*o,!1),s[o]=i.getInt32(8*o+4,!1);return{offsets:a,lengths:s}};var r=n(3)},function(t,e,n){"use strict";function r(t){return new s(t)}function i(t){return function(){return new a(t.apply(this,arguments))}}function a(t){var e,n;function r(e,n){try{var a=t[e](n),o=a.value,h=o instanceof s;Promise.resolve(h?o.wrapped:o).then((function(t){h?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function s(t){this.wrapped=t}function o(){return(o=i(regeneratorRuntime.mark((function t(e,n){var i,a,s,o,u,l,c,f,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],a=[],s=!1,o=!1;case 4:if(s||o){t.next=27;break}if(0!==i.length||s){t.next=14;break}return t.next=8,r(e.next());case 8:u=t.sent,l=u.value,u.done?s=!0:i=l,t.next=21;break;case 14:if(0!==a.length||o){t.next=21;break}return t.next=17,r(n.next());case 17:c=t.sent,f=c.value,c.done?o=!0:a=f;case 21:if(!(y=h(i,a))){t.next=25;break}return t.next=25,y;case 25:t.next=4;break;case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t,e){var n=Math.min(t.length,e.length);if(0===n)return null;var r=[t.slice(0,n),e.slice(0,n)];return t.splice(0,n),e.splice(0,n),r}Object.defineProperty(e,"__esModule",{value:!0}),e.zipBatchIterators=function(t,e){return o.apply(this,arguments)},a.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},a.prototype.next=function(t){return this._invoke("next",t)},a.prototype.throw=function(t){return this._invoke("throw",t)},a.prototype.return=function(t){return this._invoke("return",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDBF=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dbf||{},r=n.encoding,i=new v({encoding:r});i.write(t),i.end();var a=i.result,s=a.data,o=a.schema;switch(e.tables&&e.tables.format){case"table":return{schema:o,rows:s};case"rows":default:return s}},e.parseDBFInBatches=function(t){return m.apply(this,arguments)};var r,i=n(22),a=(r=n(2))&&r.__esModule?r:{default:r};function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){h=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(h)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return new y(t)}function c(t){return function(){return new f(t.apply(this,arguments))}}function f(t){var e,n;function r(e,n){try{var a=t[e](n),s=a.value,o=s instanceof y;Promise.resolve(o?s.wrapped:s).then((function(t){o?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function y(t){this.wrapped=t}function p(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)}f.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},f.prototype.next=function(t){return this._invoke("next",t)},f.prototype.throw=function(t){return this._invoke("throw",t)},f.prototype.return=function(t){return this._invoke("return",t)};var d;!function(t){t[t.START=0]="START",t[t.FIELD_DESCRIPTORS=1]="FIELD_DESCRIPTORS",t[t.FIELD_PROPERTIES=2]="FIELD_PROPERTIES",t[t.END=3]="END",t[t.ERROR=4]="ERROR"}(d||(d={}));var v=function(){function t(e){var n=e.encoding;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,"binaryReader",new a.default),u(this,"textDecoder",void 0),u(this,"state",d.START),u(this,"result",{data:[]}),this.textDecoder=new TextDecoder(n)}var e,n,r;return e=t,(n=[{key:"write",value:function(t){this.binaryReader.write(t),this.state=b(this.state,this.result,this.binaryReader,this.textDecoder)}},{key:"end",value:function(){this.binaryReader.end(),this.state=b(this.state,this.result,this.binaryReader,this.textDecoder),this.state!==d.END&&(this.state=d.ERROR,this.result.error="DBF incomplete file")}}])&&h(e.prototype,n),r&&h(e,r),t}();function m(){return(m=c(regeneratorRuntime.mark((function t(e){var n,r,i,a,s,o,h,u,c,f,y,d,m=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=m.length>1&&void 0!==m[1]?m[1]:{},r=n.dbf||{},i=r.encoding,a=new v({encoding:i}),s=!1,o=!0,h=!1,t.prev=7,c=p(e);case 9:return t.next=11,l(c.next());case 11:return f=t.sent,o=f.done,t.next=15,l(f.value);case 15:if(y=t.sent,o){t.next=30;break}if(d=y,a.write(d),s||!a.result.dbfHeader){t.next=23;break}return s=!0,t.next=23,a.result.dbfHeader;case 23:if(!(a.result.data.length>0)){t.next=27;break}return t.next=26,a.result.data;case 26:a.result.data=[];case 27:o=!0,t.next=9;break;case 30:t.next=36;break;case 32:t.prev=32,t.t0=t.catch(7),h=!0,u=t.t0;case 36:if(t.prev=36,t.prev=37,o||null==c.return){t.next=41;break}return t.next=41,l(c.return());case 41:if(t.prev=41,!h){t.next=44;break}throw u;case 44:return t.finish(41);case 45:return t.finish(36);case 46:if(a.end(),!(a.result.data.length>0)){t.next=50;break}return t.next=50,a.result.data;case 50:case"end":return t.stop()}}),t,null,[[7,32,36,46],[37,,41,45]])})))).apply(this,arguments)}function b(t,e,n,r){for(;;)try{switch(t){case d.ERROR:case d.END:return t;case d.START:var a=n.getDataView(32,"DBF header");if(!a)return t;e.dbfHeader={year:(p=a).getUint8(1)+1900,month:p.getUint8(2),day:p.getUint8(3),nRecords:p.getUint32(4,!0),headerLength:p.getUint16(8,!0),recordLength:p.getUint16(10,!0),languageDriver:p.getUint8(29)},e.progress={bytesUsed:0,rowsTotal:e.dbfHeader.nRecords,rows:0},t=d.FIELD_DESCRIPTORS;break;case d.FIELD_DESCRIPTORS:var s=n.getDataView(e.dbfHeader.headerLength-32,"DBF field descriptors");if(!s)return t;e.dbfFields=g(s,r),e.schema=new i.Schema(e.dbfFields.map((function(t){return x(t)}))),t=d.FIELD_PROPERTIES,n.skip(1);break;case d.FIELD_PROPERTIES:for(var o=(null==e?void 0:e.dbfHeader)||{},h=o.recordLength,u=void 0===h?0:h,l=o.nRecords,c=void 0===l?0:l;e.data.length<c;){var f=n.getDataView(u-1);if(!f)return t;n.skip(1);var y=M(f,e.dbfFields,r);e.data.push(y),e.progress.rows=e.data.length}t=d.END;break;default:return t=d.ERROR,e.error="illegal parser state ".concat(t),t}}catch(n){return t=d.ERROR,e.error="DBF parsing failed: ".concat(n.message),t}var p}function g(t,e){for(var n=(t.byteLength-1)/32,r=[],i=0,a=0;a<n;a++){var s=e.decode(new Uint8Array(t.buffer,t.byteOffset+i,11)).replace(/\u0000/g,"");r.push({name:s,dataType:String.fromCharCode(t.getUint8(i+11)),fieldLength:t.getUint8(i+16),decimal:t.getUint8(i+17)}),i+=32}return r}function M(t,e,n){var r,i={},a=0,o=s(e);try{for(o.s();!(r=o.n()).done;){var h=r.value,u=n.decode(new Uint8Array(t.buffer,t.byteOffset+a,h.fieldLength));i[h.name]=w(u,h.dataType),a+=h.fieldLength}}catch(t){o.e(t)}finally{o.f()}return i}function w(t,e){switch(e){case"B":return _(t);case"C":return function(t){return t.trim()||null}(t);case"F":case"N":case"O":return _(t);case"D":return r=t,Date.UTC(r.slice(0,4),parseInt(r.slice(4,6),10)-1,r.slice(6,8));case"L":return!/^[nf]$/i.test(n=t)&&(!!/^[yt]$/i.test(n)||null);default:throw new Error("Unsupported data type")}var n,r}function _(t){var e=parseFloat(t);return isNaN(e)?null:e}function x(t){var e=t.name,n=t.dataType;t.fieldLength,t.decimal;switch(n){case"B":return new i.Field(e,new i.Float64,!0);case"C":return new i.Field(e,new i.Utf8,!0);case"F":case"N":case"O":return new i.Field(e,new i.Float64,!0);case"D":return new i.Field(e,new i.TimestampMillisecond,!0);case"L":return new i.Field(e,new i.Bool,!0);default:throw new Error("Unsupported data type")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TableBatchBuilder",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"RowTableBatchAggregator",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"ColumnarTableBatchAggregator",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"convertToObjectRow",{enumerable:!0,get:function(){return s.convertToObjectRow}}),Object.defineProperty(e,"convertToArrayRow",{enumerable:!0,get:function(){return s.convertToArrayRow}}),Object.defineProperty(e,"getMeshSize",{enumerable:!0,get:function(){return o.getMeshSize}}),Object.defineProperty(e,"getMeshBoundingBox",{enumerable:!0,get:function(){return o.getMeshBoundingBox}}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return h.Schema}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return h.Field}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return h.DataType}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return h.Null}}),Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return h.Binary}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return h.Bool}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return h.Int}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return h.Int8}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return h.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return h.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return h.Int64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return h.Uint8}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return h.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return h.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return h.Uint64}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return h.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return h.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return h.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return h.Float64}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return h.Utf8}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return h.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return h.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return h.DateMillisecond}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return h.Time}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return h.TimeMillisecond}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return h.TimeSecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return h.Timestamp}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return h.TimestampSecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return h.TimestampMillisecond}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return h.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return h.TimestampNanosecond}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return h.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return h.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return h.IntervalYearMonth}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return h.FixedSizeList}}),Object.defineProperty(e,"deduceTableSchema",{enumerable:!0,get:function(){return u.deduceTableSchema}}),Object.defineProperty(e,"getTypeInfo",{enumerable:!0,get:function(){return l.getTypeInfo}}),Object.defineProperty(e,"getArrowTypeFromTypedArray",{enumerable:!0,get:function(){return c.getArrowTypeFromTypedArray}}),Object.defineProperty(e,"AsyncQueue",{enumerable:!0,get:function(){return f.default}});var r=y(n(23)),i=y(n(5)),a=y(n(7)),s=n(6),o=n(25),h=n(1),u=n(31),l=n(32),c=n(33),f=y(n(34));function y(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(24)),i=s(n(5)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0},f=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"schema",void 0),l(this,"options",void 0),l(this,"aggregator",null),l(this,"batchCount",0),l(this,"bytesUsed",0),l(this,"isChunkComplete",!1),l(this,"lastBatchEmittedMs",Date.now()),l(this,"totalLength",0),l(this,"totalBytes",0),l(this,"rowBytes",0),this.schema=e,this.options=h(h({},c),n)}var e,n,s;return e=t,(n=[{key:"limitReached",value:function(){var t,e;return!!(Boolean(null===(t=this.options)||void 0===t?void 0:t.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(e=this.options)||void 0===e?void 0:e._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(t){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(t),this.totalBytes+=this.rowBytes,Array.isArray(t)?this.addArrayRow(t):this.addObjectRow(t))}},{key:"addArrayRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addArrayRow(t)}},{key:"addObjectRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addObjectRow(t)}},{key:"chunkComplete",value:function(t){t instanceof ArrayBuffer&&(this.bytesUsed+=t.byteLength),"string"==typeof t&&(this.bytesUsed+=t.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(t){return this._isFull()?this._getBatch(t):null}},{key:"getFinalBatch",value:function(t){return this._getBatch(t)}},{key:"_estimateRowMB",value:function(t){return Array.isArray(t)?8*t.length:8*Object.keys(t).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs||(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),0))}},{key:"_getBatch",value:function(t){if(!this.aggregator)return null;null!=t&&t.bytesUsed&&(this.bytesUsed=t.bytesUsed);var e=this.aggregator.getBatch();return e.count=this.batchCount,e.bytesUsed=this.bytesUsed,Object.assign(e,t),this.batchCount++,this.aggregator=null,e}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return r.default;case"array-row-table":case"object-row-table":return i.default;case"columnar-table":return a.default;case"arrow-table":if(!t.ArrowBatch)throw new Error("TableBatchBuilder");return t.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}])&&u(e.prototype,n),s&&u(e,s),t}();e.default=f,l(f,"ArrowBatch",void 0)},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"schema",void 0),i(this,"options",void 0),i(this,"length",0),i(this,"rows",null),i(this,"cursor",0),i(this,"_headers",[]),this.options=n,this.schema=e,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}var e,n,a;return e=t,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"addObjectRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"getBatch",value:function(){var t=this.rows;return t?(t=t.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}])&&r(e.prototype,n),a&&r(e,a),t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMeshSize=function(t){var e=0;for(var n in t){var r=t[n];ArrayBuffer.isView(r)&&(e+=r.byteLength*r.BYTES_PER_ELEMENT)}return e},e.getMeshBoundingBox=function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,s=-1/0,o=t.POSITION?t.POSITION.value:[],h=o&&o.length,u=0;u<h;u+=3){var l=o[u],c=o[u+1],f=o[u+2];e=l<e?l:e,n=c<n?c:n,r=f<r?f:r,i=l>i?l:i,a=c>a?c:a,s=f>s?f:s}return[[e,n,r],[i,a,s]]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(27);function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw a}}}}function s(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,"fields",void 0),u(this,"metadata",void 0),(0,r.assert)(Array.isArray(e)),function(t){var e,n={},r=a(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.name]&&console.warn("Schema: duplicated field name",i.name,i),n[i.name]=!0}}catch(t){r.e(t)}finally{r.f()}}(e),this.fields=e,this.metadata=n||new Map}var e,n,i;return e=t,(n=[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var a=0,s=r;a<s.length;a++){var o=s[a];e[o]=!0}var h=this.fields.filter((function(t){return e[t.name]}));return new t(h,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=r.map((function(t){return e.fields[t]})).filter(Boolean);return new t(a,this.metadata)}},{key:"assign",value:function(e){var n,r=this.metadata;if(e instanceof t){var i=e;n=i.fields,r=c(c(new Map,this.metadata),i.metadata)}else n=e;var s,o=Object.create(null),h=a(this.fields);try{for(h.s();!(s=h.n()).done;){var u=s.value;o[u.name]=u}}catch(t){h.e(t)}finally{h.f()}var l,f=a(n);try{for(f.s();!(l=f.n()).done;){var y=l.value;o[y.name]=y}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(o),r)}}])&&h(e.prototype,n),i&&h(e,i),t}();function c(t,e){return new Map([].concat(i(t||new Map),i(e||new Map)))}e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;r(this,t),a(this,"name",void 0),a(this,"type",void 0),a(this,"nullable",void 0),a(this,"metadata",void 0),this.name=e,this.type=n,this.nullable=i,this.metadata=s}var e,n,s;return e=t,(n=[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])&&i(e.prototype,n),s&&i(e,s),t}();e.default=s},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Type",{enumerable:!0,get:function(){return c.Type}}),e.FixedSizeList=e.IntervalYearMonth=e.IntervalDayTime=e.Interval=e.TimestampNanosecond=e.TimestampMicrosecond=e.TimestampMillisecond=e.TimestampSecond=e.Timestamp=e.TimeMillisecond=e.TimeSecond=e.Time=e.DateMillisecond=e.DateDay=e.Date=e.Utf8=e.Binary=e.Float64=e.Float32=e.Float16=e.Float=e.Uint64=e.Uint32=e.Uint16=e.Uint8=e.Int64=e.Int32=e.Int16=e.Int8=e.Int=e.Bool=e.Null=e.DataType=void 0;var i,a,s,o,h,u,l,c=n(30);function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?m(t):e}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e,n){return e&&M(t.prototype,e),n&&M(t,n),t}var _=function(){function t(){g(this,t)}return w(t,[{key:"typeId",get:function(){return c.Type.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===c.Type.Null}},{key:"isInt",value:function(t){return t&&t.typeId===c.Type.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===c.Type.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===c.Type.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===c.Type.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===c.Type.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===c.Type.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===c.Type.Date}},{key:"isTime",value:function(t){return t&&t.typeId===c.Type.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===c.Type.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===c.Type.Interval}},{key:"isList",value:function(t){return t&&t.typeId===c.Type.List}},{key:"isStruct",value:function(t){return t&&t.typeId===c.Type.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===c.Type.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===c.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===c.Type.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===c.Type.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===c.Type.Dictionary}}]),t}();e.DataType=_;var x=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.apply(this,arguments)}return w(n,[{key:"typeId",get:function(){return c.Type.Null}},{key:Symbol.toStringTag,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),n}(_);e.Null=x;var P=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.apply(this,arguments)}return w(n,[{key:"typeId",get:function(){return c.Type.Bool}},{key:Symbol.toStringTag,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),n}(_);e.Bool=P,i=Symbol.toStringTag;var O=function(t){y(n,t);var e=d(n);function n(t,r){var i;return g(this,n),f(m(i=e.call(this)),"isSigned",void 0),f(m(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=r,i}return w(n,[{key:"typeId",get:function(){return c.Type.Int}},{key:i,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(_);e.Int=O;var S=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,8)}return n}(O);e.Int8=S;var I=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,16)}return n}(O);e.Int16=I;var j=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,32)}return n}(O);e.Int32=j;var k=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,64)}return n}(O);e.Int64=k;var T=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,8)}return n}(O);e.Uint8=T;var E=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,16)}return n}(O);e.Uint16=E;var A=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,32)}return n}(O);e.Uint32=A;var C=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,64)}return n}(O);e.Uint64=C;var N=16,R=32,D=64;a=Symbol.toStringTag;var B=function(t){y(n,t);var e=d(n);function n(t){var r;return g(this,n),f(m(r=e.call(this)),"precision",void 0),r.precision=t,r}return w(n,[{key:"typeId",get:function(){return c.Type.Float}},{key:a,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(_);e.Float=B;var F=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,N)}return n}(B);e.Float16=F;var L=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,R)}return n}(B);e.Float32=L;var U=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,D)}return n}(B);e.Float64=U;var q=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this)}return w(n,[{key:"typeId",get:function(){return c.Type.Binary}},{key:"toString",value:function(){return"Binary"}},{key:Symbol.toStringTag,get:function(){return"Binary"}}]),n}(_);e.Binary=q;var z=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.apply(this,arguments)}return w(n,[{key:"typeId",get:function(){return c.Type.Utf8}},{key:Symbol.toStringTag,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),n}(_);e.Utf8=z;var G={DAY:0,MILLISECOND:1};s=Symbol.toStringTag;var H=function(t){y(n,t);var e=d(n);function n(t){var r;return g(this,n),f(m(r=e.call(this)),"unit",void 0),r.unit=t,r}return w(n,[{key:"typeId",get:function(){return c.Type.Date}},{key:s,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(G[this.unit],">")}}]),n}(_);e.Date=H;var W=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,G.DAY)}return n}(H);e.DateDay=W;var Q=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,G.MILLISECOND)}return n}(H);e.DateMillisecond=Q;var Y={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};o=Symbol.toStringTag;var V=function(t){y(n,t);var e=d(n);function n(t,r){var i;return g(this,n),f(m(i=e.call(this)),"unit",void 0),f(m(i),"bitWidth",void 0),i.unit=t,i.bitWidth=r,i}return w(n,[{key:"typeId",get:function(){return c.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Y[this.unit],">")}},{key:o,get:function(){return"Time"}}]),n}(_);e.Time=V;var X=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,Y.SECOND,32)}return n}(V);e.TimeSecond=X;var J=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,Y.MILLISECOND,32)}return n}(V);e.TimeMillisecond=J,h=Symbol.toStringTag;var K=function(t){y(n,t);var e=d(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return g(this,n),f(m(r=e.call(this)),"unit",void 0),f(m(r),"timezone",void 0),r.unit=t,r.timezone=i,r}return w(n,[{key:"typeId",get:function(){return c.Type.Timestamp}},{key:h,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(Y[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(_);e.Timestamp=K;var Z=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.SECOND,t)}return n}(K);e.TimestampSecond=Z;var $=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.MILLISECOND,t)}return n}(K);e.TimestampMillisecond=$;var tt=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.MICROSECOND,t)}return n}(K);e.TimestampMicrosecond=tt;var et=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.NANOSECOND,t)}return n}(K);e.TimestampNanosecond=et;var nt={DAY_TIME:0,YEAR_MONTH:1};u=Symbol.toStringTag;var rt=function(t){y(n,t);var e=d(n);function n(t){var r;return g(this,n),f(m(r=e.call(this)),"unit",void 0),r.unit=t,r}return w(n,[{key:"typeId",get:function(){return c.Type.Interval}},{key:u,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat(nt[this.unit],">")}}]),n}(_);e.Interval=rt;var it=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,nt.DAY_TIME)}return n}(rt);e.IntervalDayTime=it;var at=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,nt.YEAR_MONTH)}return n}(rt);e.IntervalYearMonth=at,l=Symbol.toStringTag;var st=function(t){y(n,t);var e=d(n);function n(t,r){var i;return g(this,n),f(m(i=e.call(this)),"listSize",void 0),f(m(i),"children",void 0),i.listSize=t,i.children=[r],i}return w(n,[{key:"typeId",get:function(){return c.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:l,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(_);e.FixedSizeList=st},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Type=void 0,e.Type=r,function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(r||(e.Type=r={}))},function(t,e,n){"use strict";function r(t){return t instanceof Date?Date:t instanceof Number?Float32Array:"string"==typeof t?String:null}Object.defineProperty(e,"__esModule",{value:!0}),e.deduceTableSchema=function(t,e){var n=Array.isArray(t)?function(t){var e={};if(t.length){var n=t[0];for(var i in n){var a=n[i];e[i]=r(a)}}return e}(t):function(t){var e={};for(var n in t){var i=t[n];if(ArrayBuffer.isView(i))e[n]=i.constructor;else if(i.length){var a=i[0];e[n]=r(a)}e[n]=e[n]||null}return e}(t);return Object.assign(n,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTypeInfo=function(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:a(t.typeId),precision:t.precision}};var r=n(1);var i=null;function a(t){if(!i)for(var e in i={},r.Type)i[r.Type[e]]=e;return i[t]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getArrowTypeFromTypedArray=function(t){switch(t.constructor){case Int8Array:return new r.Int8;case Uint8Array:return new r.Uint8;case Int16Array:return new r.Int16;case Uint16Array:return new r.Uint16;case Int32Array:return new r.Int32;case Uint32Array:return new r.Uint32;case Float32Array:return new r.Float32;case Float64Array:return new r.Float64;default:throw new Error("array type not supported")}};var r=n(1)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;function a(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var s=t.apply(e,n);function o(t){a(s,r,i,o,h,"next",t)}function h(t){a(s,r,i,o,h,"throw",t)}o(void 0)}))}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}function c(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){var e="function"==typeof Map?new Map:void 0;return(f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return y(t,arguments,v(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,t)})(t)}function y(t,e,n){return(y=p()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&d(i,n.prototype),i}).apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.takeAsync=function(t){return g.apply(this,arguments)},e.default=void 0;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(i,t);var e,n,r=(e=i,n=p(),function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return c(this,t)});function i(){return h(this,i),r.apply(this,arguments)}return l(i,[{key:"enqueue",value:function(t){return this.push(t)}},{key:"dequeue",value:function(){return this.shift()}}]),i}(f(Array));i=Symbol.asyncIterator;var b=function(){function t(){h(this,t),o(this,"_values",void 0),o(this,"_settlers",void 0),o(this,"_closed",void 0),this._values=new m,this._settlers=new m,this._closed=!1}return l(t,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:i,value:function(){return this}},{key:"enqueue",value:function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}},{key:"next",value:function(){var t=this;if(this._values.length>0){var e=this._values.dequeue();return e instanceof Error?Promise.reject(e):Promise.resolve({value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(e,n){t._settlers.enqueue({resolve:e,reject:n})}))}}]),t}();function g(){return(g=s(regeneratorRuntime.mark((function t(e){var n,r,i,a,s,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=o.length>1&&void 0!==o[1]?o[1]:1/0,r=[],i=e[Symbol.asyncIterator]();case 3:if(!(r.length<n)){t.next=14;break}return t.next=6,i.next();case 6:if(a=t.sent,s=a.value,!a.done){t.next=11;break}return t.abrupt("break",14);case 11:r.push(s),t.next=3;break;case 14:return t.abrupt("return",r);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.default=b},function(t,e){},function(t,e,n){"use strict";n.r(e),n.d(e,"Proj4Projection",(function(){return Ce}));var r=484813681109536e-20,i=Math.PI/2,a=.017453292519943295,s=57.29577951308232,o=Math.PI/4,h=2*Math.PI,u=3.14159265359,l={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},c={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},f=/[\s_\-\/\(\)]/g;function y(t,e){if(t[e])return t[e];for(var n,r=Object.keys(t),i=e.toLowerCase().replace(f,""),a=-1;++a<r.length;)if((n=r[a]).toLowerCase().replace(f,"")===i)return t[n]}var p=function(t){var e,n,r,i={},s=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n=e.split("=");return n.push(!0),t[n[0].toLowerCase()]=n[1],t}),{}),o={proj:"projName",datum:"datumCode",rf:function(t){i.rf=parseFloat(t)},lat_0:function(t){i.lat0=t*a},lat_1:function(t){i.lat1=t*a},lat_2:function(t){i.lat2=t*a},lat_ts:function(t){i.lat_ts=t*a},lon_0:function(t){i.long0=t*a},lon_1:function(t){i.long1=t*a},lon_2:function(t){i.long2=t*a},alpha:function(t){i.alpha=parseFloat(t)*a},lonc:function(t){i.longc=t*a},x_0:function(t){i.x0=parseFloat(t)},y_0:function(t){i.y0=parseFloat(t)},k_0:function(t){i.k0=parseFloat(t)},k:function(t){i.k0=parseFloat(t)},a:function(t){i.a=parseFloat(t)},b:function(t){i.b=parseFloat(t)},r_a:function(){i.R_A=!0},zone:function(t){i.zone=parseInt(t,10)},south:function(){i.utmSouth=!0},towgs84:function(t){i.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){i.to_meter=parseFloat(t)},units:function(t){i.units=t;var e=y(c,t);e&&(i.to_meter=e.to_meter)},from_greenwich:function(t){i.from_greenwich=t*a},pm:function(t){var e=y(l,t);i.from_greenwich=(e||parseFloat(t))*a},nadgrids:function(t){"@null"===t?i.datumCode="none":i.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(i.axis=t)}};for(e in s)n=s[e],e in o?"function"==typeof(r=o[e])?r(n):i[r]=n:i[e]=n;return"string"==typeof i.datumCode&&"WGS84"!==i.datumCode&&(i.datumCode=i.datumCode.toLowerCase()),i},d=function(t){return new w(t).output()},v=/\s/,m=/[A-Za-z]/,b=/[A-Za-z84]/,g=/[,\]]/,M=/[\d\.E\-\+]/;function w(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function _(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var r=e?{}:t,i=n.reduce((function(t,e){return x(e,t),t}),r);e&&(t[e]=i)}function x(t,e){if(Array.isArray(t)){var n=t.shift();if("PARAMETER"===n&&(n=t.shift()),1===t.length)return Array.isArray(t[0])?(e[n]={},void x(t[0],e[n])):void(e[n]=t[0]);if(t.length)if("TOWGS84"!==n){if("AXIS"===n)return n in e||(e[n]=[]),void e[n].push(t);var r;switch(Array.isArray(n)||(e[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[n]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&x(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&x(t[3],e[n]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void _(e,n,t);default:for(r=-1;++r<t.length;)if(!Array.isArray(t[r]))return x(t,e[n]);return _(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}w.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;v.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},w.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(g.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},w.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},w.prototype.number=function(t){if(!M.test(t)){if(g.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},w.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},w.prototype.keyword=function(t){if(b.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!g.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},w.prototype.neutral=function(t){if(m.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(M.test(t))return this.word=t,void(this.state=3);if(!g.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},w.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function P(t){return.017453292519943295*t}var O=function(t){var e=d(t),n=e.shift(),r=e.shift();e.unshift(["name",r]),e.unshift(["type",n]);var i={};return x(e,i),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",n=0,r=t.AXIS.length;n<r;++n){var i=t.AXIS[n][0].toLowerCase();-1!==i.indexOf("north")?e+="n":-1!==i.indexOf("south")?e+="s":-1!==i.indexOf("east")?e+="e":-1!==i.indexOf("west")&&(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;function s(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",P],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",P],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",P],["lat0","latitude_of_origin",P],["lat0","standard_parallel_1",P],["lat1","standard_parallel_1",P],["lat2","standard_parallel_2",P],["azimuth","Azimuth"],["alpha","azimuth",P],["srsCode","name"]].forEach((function(e){return n=t,i=(r=e)[0],a=r[1],void(!(i in n)&&a in n&&(n[i]=n[a],3===r.length&&(n[i]=r[2](n[i]))));var n,r,i,a})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=P(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(i),i};function S(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?S[t]=p(arguments[1]):S[t]=O(arguments[1]):S[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?S.apply(e,t):S(t)}));if("string"==typeof t){if(t in S)return S[t]}else"EPSG"in t?S["EPSG:"+t.EPSG]=t:"ESRI"in t?S["ESRI:"+t.ESRI]=t:"IAU2000"in t?S["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(S);var I=S;var j=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var k=["3857","900913","3785","102113"];var T=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in I}(t))return I[t];if(function(t){return j.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=O(t);if(function(t){var e=y(t,"authority");if(e){var n=y(e,"epsg");return n&&k.indexOf(n)>-1}}(e))return I["EPSG:3857"];var n=function(t){var e=y(t,"extension");if(e)return y(e,"proj4")}(e);return n?p(n):e}return function(t){return"+"===t[0]}(t)?p(t):void 0},E=function(t,e){var n,r;if(t=t||{},!e)return t;for(r in e)void 0!==(n=e[r])&&(t[r]=n);return t},A=function(t,e,n){var r=t*e;return n/Math.sqrt(1-r*r)},C=function(t){return t<0?-1:1},N=function(t){return Math.abs(t)<=u?t:t-C(t)*h},R=function(t,e,n){var r=t*n,a=.5*t;return r=Math.pow((1-r)/(1+r),a),Math.tan(.5*(i-e))/r},D=function(t,e){for(var n,r,a=.5*t,s=i-2*Math.atan(e),o=0;o<=15;o++)if(n=t*Math.sin(s),s+=r=i-2*Math.atan(e*Math.pow((1-n)/(1+n),a))-s,Math.abs(r)<=1e-10)return s;return-9999};function B(t){return t}var F=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=A(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,n,r=t.x,a=t.y;if(a*s>90&&a*s<-90&&r*s>180&&r*s<-180)return null;if(Math.abs(Math.abs(a)-i)<=1e-10)return null;if(this.sphere)e=this.x0+this.a*this.k0*N(r-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(o+.5*a));else{var h=Math.sin(a),u=R(this.e,a,h);e=this.x0+this.a*this.k0*N(r-this.long0),n=this.y0-this.a*this.k0*Math.log(u)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,r=t.x-this.x0,a=t.y-this.y0;if(this.sphere)n=i-2*Math.atan(Math.exp(-a/(this.a*this.k0)));else{var s=Math.exp(-a/(this.a*this.k0));if(-9999===(n=D(this.e,s)))return null}return e=N(this.long0+r/(this.a*this.k0)),t.x=e,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:B,inverse:B,names:["longlat","identity"]}],L={},U=[];function q(t,e){var n=U.length;return t.names?(U[n]=t,t.names.forEach((function(t){L[t.toLowerCase()]=n})),this):(console.log(e),!0)}var z={start:function(){F.forEach(q)},add:q,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==L[e]&&U[L[e]]?U[L[e]]:void 0}},G={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},H=G.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};G.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var W={};W.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},W.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},W.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},W.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},W.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},W.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},W.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},W.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},W.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},W.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},W.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},W.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},W.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},W.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},W.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},W.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},W.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var Q=function(t,e,n,i,a,s){var o={};return o.datum_type=void 0===t||"none"===t?5:4,e&&(o.datum_params=e.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=1),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=r,o.datum_params[4]*=r,o.datum_params[5]*=r,o.datum_params[6]=o.datum_params[6]/1e6+1))),o.a=n,o.b=i,o.es=a,o.ep2=s,o};function Y(t,e){if(!(this instanceof Y))return new Y(t);e=e||function(t){if(t)throw t};var n=T(t);if("object"==typeof n){var r=Y.projections.get(n.projName);if(r){if(n.datumCode&&"none"!==n.datumCode){var i=y(W,n.datumCode);i&&(n.datum_params=i.towgs84?i.towgs84.split(","):null,n.ellps=i.ellipse,n.datumName=i.datumName?i.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84";var a,s,o,h,u,l,c,f=function(t,e,n,r,i){if(!t){var a=y(G,r);a||(a=H),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<1e-10)&&(i=!0,e=t),{a:t,b:e,rf:n,sphere:i}}(n.a,n.b,n.rf,n.ellps,n.sphere),p=(a=f.a,s=f.b,f.rf,o=n.R_A,l=((h=a*a)-(u=s*s))/h,c=0,o?(h=(a*=1-l*(.16666666666666666+l*(.04722222222222222+.022156084656084655*l)))*a,l=0):c=Math.sqrt(l),{es:l,e:c,ep2:(h-u)/u}),d=n.datum||Q(n.datumCode,n.datum_params,f.a,f.b,p.es,p.ep2);E(this,n),E(this,r),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=d,this.init(),e(null,this)}else e(t)}else e(t)}Y.projections=z,Y.projections.start();var V=Y;function X(t,e,n){var r,a,s,o,h=t.x,u=t.y,l=t.z?t.z:0;if(u<-i&&u>-1.001*i)u=-i;else if(u>i&&u<1.001*i)u=i;else{if(u<-i)return{x:-1/0,y:-1/0,z:t.z};if(u>i)return{x:1/0,y:1/0,z:t.z}}return h>Math.PI&&(h-=2*Math.PI),a=Math.sin(u),o=Math.cos(u),s=a*a,{x:((r=n/Math.sqrt(1-e*s))+l)*o*Math.cos(h),y:(r+l)*o*Math.sin(h),z:(r*(1-e)+l)*a}}function J(t,e,n,r){var a,s,o,h,u,l,c,f,y,p,d,v,m,b,g,M=t.x,w=t.y,_=t.z?t.z:0;if(a=Math.sqrt(M*M+w*w),s=Math.sqrt(M*M+w*w+_*_),a/n<1e-12){if(b=0,s/n<1e-12)return i,g=-r,{x:t.x,y:t.y,z:t.z}}else b=Math.atan2(w,M);o=_/s,f=(h=a/s)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*h*h)),y=o*u,m=0;do{m++,l=e*(c=n/Math.sqrt(1-e*y*y))/(c+(g=a*f+_*y-c*(1-e*y*y))),v=(d=o*(u=1/Math.sqrt(1-l*(2-l)*h*h)))*f-(p=h*(1-l)*u)*y,f=p,y=d}while(v*v>1e-24&&m<30);return{x:b,y:Math.atan(d/Math.abs(p)),z:g}}function K(t){return 1===t||2===t}var Z=function(t,e,n){return function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))}(t,e)||5===t.datum_type||5===e.datum_type?n:t.es!==e.es||t.a!==e.a||K(t.datum_type)||K(e.datum_type)?(n=X(n,t.es,t.a),K(t.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(2===e){var r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],h=n[5],u=n[6];return{x:u*(t.x-h*t.y+o*t.z)+r,y:u*(h*t.x+t.y-s*t.z)+i,z:u*(-o*t.x+s*t.y+t.z)+a}}}(n,t.datum_type,t.datum_params)),K(e.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(2===e){var r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],h=n[5],u=n[6],l=(t.x-r)/u,c=(t.y-i)/u,f=(t.z-a)/u;return{x:l+h*c-o*f,y:-h*l+c+s*f,z:o*l-s*c+f}}}(n,e.datum_type,e.datum_params)),J(n,e.es,e.a,e.b)):n},$=function(t,e,n){var r,i,a,s=n.x,o=n.y,h=n.z||0,u={};for(a=0;a<3;a++)if(!e||2!==a||void 0!==n.z)switch(0===a?(r=s,i=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(r=o,i=-1!=="ns".indexOf(t.axis[a])?"y":"x"):(r=h,i="z"),t.axis[a]){case"e":case"w":case"n":case"s":u[i]=r;break;case"u":void 0!==n[i]&&(u.z=r);break;case"d":void 0!==n[i]&&(u.z=-r);break;default:return null}return u},tt=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e};function et(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function nt(t,e,n){var r;if(Array.isArray(n)&&(n=tt(n)),function(t){et(t.x),et(t.y)}(n),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(n=nt(t,r=new V("WGS84"),n),t=r),"enu"!==t.axis&&(n=$(t,!1,n)),"longlat"===t.projName)n={x:n.x*a,y:n.y*a,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;return t.from_greenwich&&(n.x+=t.from_greenwich),n=Z(t.datum,e.datum,n),e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*s,y:n.y*s,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),"enu"!==e.axis?$(e,!0,n):n}var rt=V("WGS84");function it(t,e,n){var r,i,a;return Array.isArray(n)?(r=nt(t,e,n)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(i=nt(t,e,n),2===(a=Object.keys(n)).length||a.forEach((function(r){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===r||"y"===r||"z"===r)return}else if("x"===r||"y"===r)return;i[r]=n[r]})),i)}function at(t){return t instanceof V?t:t.oProj?t.oProj:V(t)}var st=function(t,e,n){t=at(t);var r,i=!1;return void 0===e?(e=t,t=rt,i=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=rt,i=!0),e=at(e),n?it(t,e,n):(r={forward:function(n){return it(t,e,n)},inverse:function(n){return it(e,t,n)}},i&&(r.oProj=e),r)},ot=73,ht=79,ut={forward:lt,inverse:function(t){var e=pt(mt(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:ct};function lt(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,r="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(y=t.easting,p=t.northing,d=t.zoneNumber,v=vt(d),m=Math.floor(y/1e5),b=Math.floor(p/1e5)%20,i=m,a=b,s=v,o=s-1,h="AJSAJS".charCodeAt(o),u="AFAFAF".charCodeAt(o),l=h+i-1,c=u+a,f=!1,l>90&&(l=l-90+65-1,f=!0),(l===ot||h<ot&&l>ot||(l>ot||h<ot)&&f)&&l++,(l===ht||h<ht&&l>ht||(l>ht||h<ht)&&f)&&++l===ot&&l++,l>90&&(l=l-90+65-1),c>86?(c=c-86+65-1,f=!0):f=!1,(c===ot||u<ot&&c>ot||(c>ot||u<ot)&&f)&&c++,(c===ht||u<ht&&c>ht||(c>ht||u<ht)&&f)&&++c===ot&&c++,c>86&&(c=c-86+65-1),String.fromCharCode(l)+String.fromCharCode(c))+n.substr(n.length-5,e)+r.substr(r.length-5,e);var i,a,s,o,h,u,l,c,f;var y,p,d,v,m,b}(function(t){var e,n,r,i,a,s,o,h=t.lat,u=t.lon,l=6378137,c=ft(h),f=ft(u);o=Math.floor((u+180)/6)+1,180===u&&(o=60);h>=56&&h<64&&u>=3&&u<12&&(o=32);h>=72&&h<84&&(u>=0&&u<9?o=31:u>=9&&u<21?o=33:u>=21&&u<33?o=35:u>=33&&u<42&&(o=37));s=ft(6*(o-1)-180+3),.006739496752268451,e=l/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),n=Math.tan(c)*Math.tan(c),r=.006739496752268451*Math.cos(c)*Math.cos(c),i=Math.cos(c)*(f-s),a=l*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var y=.9996*e*(i+(1-n+r)*i*i*i/6+(5-18*n+n*n+72*r-.39089081163157013)*i*i*i*i*i/120)+5e5,p=.9996*(a+e*Math.tan(c)*(i*i/2+(5-n+9*r+4*r*r)*i*i*i*i/24+(61-58*n+n*n+600*r-2.2240339282485886)*i*i*i*i*i*i/720));h<0&&(p+=1e7);return{northing:Math.round(p),easting:Math.round(y),zoneNumber:o,zoneLetter:dt(h)}}({lat:t[1],lon:t[0]}),e)}function ct(t){var e=pt(mt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function ft(t){return t*(Math.PI/180)}function yt(t){return t/Math.PI*180}function pt(t){var e=t.northing,n=t.easting,r=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var a,s,o,h,u,l,c,f,y=6378137,p=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),d=n-5e5,v=e;r<"N"&&(v-=1e7),l=6*(i-1)-180+3,f=(c=v/.9996/6367449.145945056)+(3*p/2-27*p*p*p/32)*Math.sin(2*c)+(21*p*p/16-55*p*p*p*p/32)*Math.sin(4*c)+151*p*p*p/96*Math.sin(6*c),a=y/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),o=.006739496752268451*Math.cos(f)*Math.cos(f),h=.99330562*y/Math.pow(1-.00669438*Math.sin(f)*Math.sin(f),1.5),u=d/(.9996*a);var m=f-a*Math.tan(f)/h*(u*u/2-(5+3*s+10*o-4*o*o-.06065547077041606)*u*u*u*u/24+(61+90*s+298*o+45*s*s-1.6983531815716497-3*o*o)*u*u*u*u*u*u/720);m=yt(m);var b,g=(u-(1+2*s+o)*u*u*u/6+(5-2*o+28*s-3*o*o+.05391597401814761+24*s*s)*u*u*u*u*u/120)/Math.cos(f);if(g=l+yt(g),t.accuracy){var M=pt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:M.lat,right:M.lon,bottom:m,left:g}}else b={lat:m,lon:g};return b}function dt(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function vt(t){var e=t%6;return 0===e&&(e=6),e}function mt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,r=null,i="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,a++}var s=parseInt(i,10);if(0===a||a+3>n)throw"MGRSPoint bad conversion from: "+t;var o=t.charAt(a++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+t;r=t.substring(a,a+=2);for(var h=vt(s),u=function(t,e){var n="AJSAJS".charCodeAt(e-1),r=1e5,i=!1;for(;n!==t.charCodeAt(0);){if(++n===ot&&n++,n===ht&&n++,n>90){if(i)throw"Bad character: "+t;n=65,i=!0}r+=1e5}return r}(r.charAt(0),h),l=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var n="AFAFAF".charCodeAt(e-1),r=0,i=!1;for(;n!==t.charCodeAt(0);){if(++n===ot&&n++,n===ht&&n++,n>86){if(i)throw"Bad character: "+t;n=65,i=!0}r+=1e5}return r}(r.charAt(1),h);l<bt(o);)l+=2e6;var c=n-a;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,y,p,d=c/2,v=0,m=0;return d>0&&(f=1e5/Math.pow(10,d),y=t.substring(a,a+d),v=parseFloat(y)*f,p=t.substring(a+d),m=parseFloat(p)*f),{easting:v+u,northing:m+l,zoneLetter:o,zoneNumber:s,accuracy:f}}function bt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function gt(t,e,n){if(!(this instanceof gt))return new gt(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var r=t.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}gt.fromMGRS=function(t){return new gt(ct(t))},gt.prototype.toMGRS=function(t){return lt([this.x,this.y],t)};var Mt=gt,wt=.01068115234375,_t=function(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+t*wt))),e[1]=t*(.75-t*(.046875+t*(.01953125+t*wt)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e},xt=function(t,e,n,r){return n*=e,e*=e,r[0]*t-n*(r[1]+e*(r[2]+e*(r[3]+e*r[4])))},Pt=function(t,e,n){for(var r=1/(1-e),i=t,a=20;a;--a){var s=Math.sin(i),o=1-e*s*s;if(i-=o=(xt(i,s,Math.cos(i),n)-t)*(o*Math.sqrt(o))*r,Math.abs(o)<1e-10)return i}return i};var Ot={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=_t(this.es),this.ml0=xt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,n,r,i=t.x,a=t.y,s=N(i-this.long0),o=Math.sin(a),h=Math.cos(a);if(this.es){var u=h*s,l=Math.pow(u,2),c=this.ep2*Math.pow(h,2),f=Math.pow(c,2),y=Math.abs(h)>1e-10?Math.tan(a):0,p=Math.pow(y,2),d=Math.pow(p,2);e=1-this.es*Math.pow(o,2),u/=Math.sqrt(e);var v=xt(a,o,h,this.en);n=this.a*(this.k0*u*(1+l/6*(1-p+c+l/20*(5-18*p+d+14*c-58*p*c+l/42*(61+179*d-d*p-479*p)))))+this.x0,r=this.a*(this.k0*(v-this.ml0+o*s*u/2*(1+l/12*(5-p+9*c+4*f+l/30*(61+d-58*p+270*c-330*p*c+l/56*(1385+543*d-d*p-3111*p))))))+this.y0}else{var m=h*Math.sin(s);if(Math.abs(Math.abs(m)-1)<1e-10)return 93;if(n=.5*this.a*this.k0*Math.log((1+m)/(1-m))+this.x0,r=h*Math.cos(s)/Math.sqrt(1-Math.pow(m,2)),(m=Math.abs(r))>=1){if(m-1>1e-10)return 93;r=0}else r=Math.acos(r);a<0&&(r=-r),r=this.a*this.k0*(r-this.lat0)+this.y0}return t.x=n,t.y=r,t},inverse:function(t){var e,n,r,a,s=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,n=Pt(e,this.es,this.en),Math.abs(n)<i){var h=Math.sin(n),u=Math.cos(n),l=Math.abs(u)>1e-10?Math.tan(n):0,c=this.ep2*Math.pow(u,2),f=Math.pow(c,2),y=Math.pow(l,2),p=Math.pow(y,2);e=1-this.es*Math.pow(h,2);var d=s*Math.sqrt(e)/this.k0,v=Math.pow(d,2);r=n-(e*=l)*v/(1-this.es)*.5*(1-v/12*(5+3*y-9*c*y+c-4*f-v/30*(61+90*y-252*c*y+45*p+46*c-v/56*(1385+3633*y+4095*p+1574*p*y)))),a=N(this.long0+d*(1-v/6*(1+2*y+c-v/20*(5+28*y+24*p+8*c*y+6*c-v/42*(61+662*y+1320*p+720*p*y))))/u)}else r=i*C(o),a=0;else{var m=Math.exp(s/this.k0),b=.5*(m-1/m),g=this.lat0+o/this.k0,M=Math.cos(g);e=Math.sqrt((1-Math.pow(M,2))/(1+Math.pow(b,2))),r=Math.asin(e),o<0&&(r=-r),a=0===b&&0===M?0:N(Math.atan2(b,M)+this.long0)}return t.x=a,t.y=r,t},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},St=function(t){var e=Math.exp(t);return e=(e-1/e)/2},It=function(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),r=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(r,2))},jt=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/(It(1,e)+1))),t<0?-e:e},kt=function(t,e){for(var n,r=2*Math.cos(2*e),i=t.length-1,a=t[i],s=0;--i>=0;)n=r*a-s+t[i],s=a,a=n;return e+n*Math.sin(2*e)},Tt=function(t,e,n){for(var r,i,a=Math.sin(e),s=Math.cos(e),o=St(n),h=function(t){var e=Math.exp(t);return e=(e+1/e)/2}(n),u=2*s*h,l=-2*a*o,c=t.length-1,f=t[c],y=0,p=0,d=0;--c>=0;)r=p,i=y,f=u*(p=f)-r-l*(y=d)+t[c],d=l*p-i+u*y;return[(u=a*h)*f-(l=s*o)*d,u*d+l*f]};var Et={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var r=kt(this.cbg,this.lat0);this.Zb=-this.Qn*(r+function(t,e){for(var n,r=2*Math.cos(e),i=t.length-1,a=t[i],s=0;--i>=0;)n=r*a-s+t[i],s=a,a=n;return Math.sin(e)*n}(this.gtu,2*r))},forward:function(t){var e=N(t.x-this.long0),n=t.y;n=kt(this.cbg,n);var r=Math.sin(n),i=Math.cos(n),a=Math.sin(e),s=Math.cos(e);n=Math.atan2(r,s*i),e=Math.atan2(a*i,It(r,i*s)),e=jt(Math.tan(e));var o,h,u=Tt(this.gtu,2*n,2*e);return n+=u[0],e+=u[1],Math.abs(e)<=2.623395162778?(o=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*n+this.Zb)+this.y0):(o=1/0,h=1/0),t.x=o,t.y=h,t},inverse:function(t){var e,n,r=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,r/=this.Qn,Math.abs(r)<=2.623395162778){var a=Tt(this.utg,2*i,2*r);i+=a[0],r+=a[1],r=Math.atan(St(r));var s=Math.sin(i),o=Math.cos(i),h=Math.sin(r),u=Math.cos(r);i=Math.atan2(s*u,It(h,u*o)),r=Math.atan2(h,u*o),e=N(r+this.long0),n=kt(this.cgb,i)}else e=1/0,n=1/0;return t.x=e,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]};var At={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(N(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*a,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Et.init.apply(this),this.forward=Et.forward,this.inverse=Et.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Ct=function(t,e){return Math.pow((1-t)/(1+t),e)};var Nt={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+o)/(Math.pow(Math.tan(.5*this.lat0+o),this.C)*Ct(this.e*t,this.ratexp))},forward:function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+o),this.C)*Ct(this.e*Math.sin(n),this.ratexp))-i,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,n=t.y,r=Math.pow(Math.tan(.5*n+o)/this.K,1/this.C),a=20;a>0&&(n=2*Math.atan(r*Ct(this.e*Math.sin(t.y),-.5*this.e))-i,!(Math.abs(n-t.y)<1e-14));--a)t.y=n;return a?(t.x=e,t.y=n,t):null},names:["gauss"]};var Rt={init:function(){Nt.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,n,r,i;return t.x=N(t.x-this.long0),Nt.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),r=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*r),t.x=i*n*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*n*r),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,n,r,i,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=Math.sqrt(t.x*t.x+t.y*t.y)){var s=2*Math.atan2(a,this.R2);e=Math.sin(s),n=Math.cos(s),i=Math.asin(n*this.sinc0+t.y*e*this.cosc0/a),r=Math.atan2(t.x*e,a*this.cosc0*n-t.y*this.sinc0*e)}else i=this.phic0,r=0;return t.x=r,t.y=i,Nt.inverse.apply(this,[t]),t.x=N(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var Dt={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+C(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*A(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/R(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=A(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-i,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,r,a,s,o,h=t.x,u=t.y,l=Math.sin(u),c=Math.cos(u),f=N(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=1e-10&&Math.abs(u+this.lat0)<=1e-10?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(f)),t.x=this.a*e*c*Math.sin(f)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(f))+this.y0,t):(n=2*Math.atan(this.ssfn_(u,l,this.e))-i,a=Math.cos(n),r=Math.sin(n),Math.abs(this.coslat0)<=1e-10?(s=R(this.e,u*this.con,this.con*l),o=2*this.a*this.k0*s/this.cons,t.x=this.x0+o*Math.sin(h-this.long0),t.y=this.y0-this.con*o*Math.cos(h-this.long0),t):(Math.abs(this.sinlat0)<1e-10?(e=2*this.a*this.k0/(1+a*Math.cos(f)),t.y=e*r):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*r+this.cosX0*a*Math.cos(f))),t.y=e*(this.cosX0*r-this.sinX0*a*Math.cos(f))+this.y0),t.x=e*a*Math.sin(f)+this.x0,t))},inverse:function(t){var e,n,r,a,s;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var h=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,n=this.lat0,o<=1e-10?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(h)*this.sinlat0+t.y*Math.sin(h)*this.coslat0/o),e=Math.abs(this.coslat0)<1e-10?this.lat0>0?N(this.long0+Math.atan2(t.x,-1*t.y)):N(this.long0+Math.atan2(t.x,t.y)):N(this.long0+Math.atan2(t.x*Math.sin(h),o*this.coslat0*Math.cos(h)-t.y*this.sinlat0*Math.sin(h))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=1e-10){if(o<=1e-10)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,r=o*this.cons/(2*this.a*this.k0),n=this.con*D(this.e,r),e=this.con*N(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else a=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=1e-10?s=this.X0:(s=Math.asin(Math.cos(a)*this.sinX0+t.y*Math.sin(a)*this.cosX0/o),e=N(this.long0+Math.atan2(t.x*Math.sin(a),o*this.cosX0*Math.cos(a)-t.y*this.sinX0*Math.sin(a)))),n=-1*D(this.e,Math.tan(.5*(i+s)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,e,n){return e*=n,Math.tan(.5*(i+t))*Math.pow((1-e)/(1+e),.5*n)}};var Bt={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,r=1/this.rf,i=2*r-Math.pow(r,2),a=this.e=Math.sqrt(i);this.R=this.k0*n*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+a*e)/(1-a*e));this.K=s-this.alpha*o+this.alpha*a/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),r=-this.alpha*(e+n)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),s=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),o=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,t.x=this.R*s+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,n=t.y-this.y0,r=e/this.R,i=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),s=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),o=this.lambda0+s/this.alpha,h=0,u=a,l=-1e3,c=0;Math.abs(u-l)>1e-7;){if(++c>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),l=u,u=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=o,t.y=u,t},names:["somerc"]};var Ft={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),e=Math.cos(this.lat0),n=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-n*n);var r,i,a=R(this.e,this.lat0,t),s=this.bl/e*Math.sqrt((1-this.es)/(1-n*n));if(s*s<1&&(s=1),isNaN(this.longc)){var o=R(this.e,this.lat1,Math.sin(this.lat1)),h=R(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(s+Math.sqrt(s*s-1))*Math.pow(a,this.bl):this.el=(s-Math.sqrt(s*s-1))*Math.pow(a,this.bl);var u=Math.pow(o,this.bl),l=Math.pow(h,this.bl);i=.5*((r=this.el/u)-1/r);var c=(this.el*this.el-l*u)/(this.el*this.el+l*u),f=(l-u)/(l+u),y=N(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*y)/f)/this.bl,this.long0=N(this.long0);var p=N(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/i),this.alpha=Math.asin(s*Math.sin(this.gamma0))}else r=this.lat0>=0?s+Math.sqrt(s*s-1):s-Math.sqrt(s*s-1),this.el=r*Math.pow(a,this.bl),i=.5*(r-1/r),this.gamma0=Math.asin(Math.sin(this.alpha)/s),this.long0=this.longc-Math.asin(i*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(s*s-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(s*s-1),Math.cos(this.alpha))},forward:function(t){var e,n,r,a=t.x,s=t.y,h=N(a-this.long0);if(Math.abs(Math.abs(s)-i)<=1e-10)r=s>0?-1:1,n=this.al/this.bl*Math.log(Math.tan(o+r*this.gamma0*.5)),e=-1*r*i*this.al/this.bl;else{var u=R(this.e,s,Math.sin(s)),l=this.el/Math.pow(u,this.bl),c=.5*(l-1/l),f=.5*(l+1/l),y=Math.sin(this.bl*h),p=(c*Math.sin(this.gamma0)-y*Math.cos(this.gamma0))/f;n=Math.abs(Math.abs(p)-1)<=1e-10?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-p)/(1+p))/this.bl,e=Math.abs(Math.cos(this.bl*h))<=1e-10?this.al*this.bl*h:this.al*Math.atan2(c*Math.cos(this.gamma0)+y*Math.sin(this.gamma0),Math.cos(this.bl*h))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+n):(e-=this.uc,t.x=this.x0+n*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-n*Math.sin(this.alpha)),t},inverse:function(t){var e,n;this.no_rot?(n=t.y-this.y0,e=t.x-this.x0):(n=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var r=Math.exp(-1*this.bl*n/this.al),a=.5*(r-1/r),s=.5*(r+1/r),o=Math.sin(this.bl*e/this.al),h=(o*Math.cos(this.gamma0)+a*Math.sin(this.gamma0))/s,u=Math.pow(this.el/Math.sqrt((1+h)/(1-h)),1/this.bl);return Math.abs(h-1)<1e-10?(t.x=this.long0,t.y=i):Math.abs(h+1)<1e-10?(t.x=this.long0,t.y=-1*i):(t.y=D(this.e,u),t.x=N(this.long0-Math.atan2(a*Math.cos(this.gamma0)-o*Math.sin(this.gamma0),Math.cos(this.bl*e/this.al))/this.bl)),t},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]};var Lt={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),r=A(this.e,e,n),i=R(this.e,this.lat1,e),a=Math.sin(this.lat2),s=Math.cos(this.lat2),o=A(this.e,a,s),h=R(this.e,this.lat2,a),u=R(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(r/o)/Math.log(i/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=1e-10&&(n=C(n)*(i-2e-10));var r,a,s=Math.abs(Math.abs(n)-i);if(s>1e-10)r=R(this.e,n,Math.sin(n)),a=this.a*this.f0*Math.pow(r,this.ns);else{if((s=n*this.ns)<=0)return null;a=0}var o=this.ns*N(e-this.long0);return t.x=this.k0*(a*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,t},inverse:function(t){var e,n,r,a,s,o=(t.x-this.x0)/this.k0,h=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+h*h),n=1):(e=-Math.sqrt(o*o+h*h),n=-1);var u=0;if(0!==e&&(u=Math.atan2(n*o,n*h)),0!==e||this.ns>0){if(n=1/this.ns,r=Math.pow(e/(this.a*this.f0),n),-9999===(a=D(this.e,r)))return null}else a=-i;return s=N(u/this.ns+this.long0),t.x=s,t.y=a,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};var Ut={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,n,r,i,a,s,o,h=t.x,u=t.y,l=N(h-this.long0);return e=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/e)-this.s45),r=-l*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),a=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(i)),s=this.n*a,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=o*Math.cos(s)/1,t.x=o*Math.sin(s)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,r,i,a,s,o,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),n=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(e)),t.x=this.long0-n/this.alfa,s=e,o=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-t.y)<1e-10&&(o=1),s=t.y,u+=1}while(0===o&&u<15);return u>=15?null:t},names:["Krovak","krovak"]},qt=function(t,e,n,r,i){return t*i-e*Math.sin(2*i)+n*Math.sin(4*i)-r*Math.sin(6*i)},zt=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Gt=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Ht=function(t){return.05859375*t*t*(1+.75*t)},Wt=function(t){return t*t*t*(35/3072)},Qt=function(t,e,n){var r=e*n;return t/Math.sqrt(1-r*r)},Yt=function(t){return Math.abs(t)<i?t:t-C(t)*Math.PI},Vt=function(t,e,n,r,i){var a,s;a=t/e;for(var o=0;o<15;o++)if(a+=s=(t-(e*a-n*Math.sin(2*a)+r*Math.sin(4*a)-i*Math.sin(6*a)))/(e-2*n*Math.cos(2*a)+4*r*Math.cos(4*a)-6*i*Math.cos(6*a)),Math.abs(s)<=1e-10)return a;return NaN};var Xt={init:function(){this.sphere||(this.e0=zt(this.es),this.e1=Gt(this.es),this.e2=Ht(this.es),this.e3=Wt(this.es),this.ml0=this.a*qt(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,n,r=t.x,i=t.y;if(r=N(r-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(r)),n=this.a*(Math.atan2(Math.tan(i),Math.cos(r))-this.lat0);else{var a=Math.sin(i),s=Math.cos(i),o=Qt(this.a,this.e,a),h=Math.tan(i)*Math.tan(i),u=r*Math.cos(i),l=u*u,c=this.es*s*s/(1-this.es);e=o*u*(1-l*h*(1/6-(8-h+8*c)*l/120)),n=this.a*qt(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+o*a/s*l*(.5+(5-h+6*c)*l/24)}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r=t.x/this.a,a=t.y/this.a;if(this.sphere){var s=a+this.lat0;e=Math.asin(Math.sin(s)*Math.cos(r)),n=Math.atan2(Math.tan(r),Math.cos(s))}else{var o=this.ml0/this.a+a,h=Vt(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(h)-i)<=1e-10)return t.x=this.long0,t.y=i,a<0&&(t.y*=-1),t;var u=Qt(this.a,this.e,Math.sin(h)),l=u*u*u/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(h),2),f=r*this.a/u,y=f*f;e=h-u*Math.tan(h)/l*f*f*(.5-(1+3*c)*f*f/24),n=f*(1-y*(c/3+(1+3*c)*c*y/15))/Math.cos(h)}return t.x=N(n+this.long0),t.y=Yt(e),t},names:["Cassini","Cassini_Soldner","cass"]},Jt=function(t,e){var n;return t>1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e};var Kt={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-i)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Jt(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=.3333333333333333*t,e=t*t,n[0]+=.17222222222222222*e,n[1]=.06388888888888888*e,e*=t,n[0]+=.10257936507936508*e,n[1]+=.0664021164021164*e,n[2]=.016415012942191543*e,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Jt(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,n,r,a,s,h,u,l,c,f,y=t.x,p=t.y;if(y=N(y-this.long0),this.sphere){if(s=Math.sin(p),f=Math.cos(p),r=Math.cos(y),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+f*r:1+this.sinph0*s+this.cosph0*f*r)<=1e-10)return null;e=(n=Math.sqrt(2/n))*f*Math.sin(y),n*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*f*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(p+this.lat0)<1e-10)return null;n=o-.5*p,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(y),n*=r}}else{switch(u=0,l=0,c=0,r=Math.cos(y),a=Math.sin(y),s=Math.sin(p),h=Jt(this.e,s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=h/this.qp,l=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:c=1+this.sinb1*u+this.cosb1*l*r;break;case this.EQUIT:c=1+l*r;break;case this.N_POLE:c=i+p,h=this.qp-h;break;case this.S_POLE:c=p-i,h=this.qp+h}if(Math.abs(c)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),n=this.mode===this.OBLIQ?this.ymf*c*(this.cosb1*u-this.sinb1*l*r):(c=Math.sqrt(2/(1+l*r)))*u*this.ymf,e=this.xmf*c*l*a;break;case this.N_POLE:case this.S_POLE:h>=0?(e=(c=Math.sqrt(h))*a,n=r*(this.mode===this.S_POLE?c:-c)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r,a,s,o,h,u,l,c,f=t.x/this.a,y=t.y/this.a;if(this.sphere){var p,d=0,v=0;if((n=.5*(p=Math.sqrt(f*f+y*y)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(v=Math.sin(n),d=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(p)<=1e-10?0:Math.asin(y*v/p),f*=v,y=d*p;break;case this.OBLIQ:n=Math.abs(p)<=1e-10?this.lat0:Math.asin(d*this.sinph0+y*v*this.cosph0/p),f*=v*this.cosph0,y=(d-Math.sin(n)*this.sinph0)*p;break;case this.N_POLE:y=-y,n=i-n;break;case this.S_POLE:n-=i}e=0!==y||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,y):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,y*=this.dd,(o=Math.sqrt(f*f+y*y))<1e-10)return t.x=this.long0,t.y=this.lat0,t;a=2*Math.asin(.5*o/this.rq),r=Math.cos(a),f*=a=Math.sin(a),this.mode===this.OBLIQ?(h=r*this.sinb1+y*a*this.cosb1/o,s=this.qp*h,y=o*this.cosb1*r-y*this.sinb1*a):(h=y*a/o,s=this.qp*h,y=o*r)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(y=-y),!(s=f*f+y*y))return t.x=this.long0,t.y=this.lat0,t;h=1-s/this.qp,this.mode===this.S_POLE&&(h=-h)}e=Math.atan2(f,y),u=Math.asin(h),l=this.apa,c=u+u,n=u+l[0]*Math.sin(c)+l[1]*Math.sin(c+c)+l[2]*Math.sin(c+c+c)}return t.x=N(this.long0+e),t.y=n,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},Zt=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)};var $t={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=A(this.e3,this.sin_po,this.cos_po),this.qs1=Jt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=A(this.e3,this.sin_po,this.cos_po),this.qs2=Jt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Jt(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var r=Jt(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,a=this.ns0*N(e-this.long0),s=i*Math.sin(a)+this.x0,o=this.rh-i*Math.cos(a)+this.y0;return t.x=s,t.y=o,t},inverse:function(t){var e,n,r,i,a,s;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),r=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),r=-1),i=0,0!==e&&(i=Math.atan2(r*t.x,r*t.y)),r=e*this.ns0/this.a,this.sphere?s=Math.asin((this.c-r*r)/(2*this.ns0)):(n=(this.c-r*r)/this.ns0,s=this.phi1z(this.e3,n)),a=N(i/this.ns0+this.long0),t.x=a,t.y=s,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,r,i,a,s=Zt(.5*e);if(t<1e-10)return s;for(var o=t*t,h=1;h<=25;h++)if(s+=a=.5*(i=1-(r=t*(n=Math.sin(s)))*r)*i/Math.cos(s)*(e/(1-o)-n/i+.5/t*Math.log((1-r)/(1+r))),Math.abs(a)<=1e-7)return s;return null}};var te={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,n,r,i,a,s,o,h=t.x,u=t.y;return r=N(h-this.long0),e=Math.sin(u),n=Math.cos(u),i=Math.cos(r),1,(a=this.sin_p14*e+this.cos_p14*n*i)>0||Math.abs(a)<=1e-10?(s=this.x0+1*this.a*n*Math.sin(r)/a,o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)/a):(s=this.x0+this.infinity_dist*n*Math.sin(r),o=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*i)),t.x=s,t.y=o,t},inverse:function(t){var e,n,r,i,a,s;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),n=Math.sin(i),r=Math.cos(i),s=Zt(r*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.atan2(t.x*n,e*this.cos_p14*r-t.y*this.sin_p14*n),a=N(this.long0+a)):(s=this.phic0,a=0),t.x=a,t.y=s,t},names:["gnom"]};var ee={init:function(){this.sphere||(this.k0=A(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,n,r=t.x,i=t.y,a=N(r-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var s=Jt(this.e,Math.sin(i));e=this.x0+this.a*this.k0*a,n=this.y0+this.a*s*.5/this.k0}return t.x=e,t.y=n,t},inverse:function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=N(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*i:i;for(var r,a,s,o,h=Math.asin(.5*e),u=0;u<30;u++)if(a=Math.sin(h),s=Math.cos(h),o=t*a,h+=r=Math.pow(1-o*o,2)/(2*s)*(e/(1-t*t)-a/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(r)<=1e-10)return h;return NaN}(this.e,2*t.y*this.k0/this.a),e=N(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]};var ne={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,n=t.y,r=N(e-this.long0),i=Yt(n-this.lat0);return t.x=this.x0+this.a*r*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var e=t.x,n=t.y;return t.x=N(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Yt(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var re={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=zt(this.es),this.e1=Gt(this.es),this.e2=Ht(this.es),this.e3=Wt(this.es),this.ml0=this.a*qt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,r,i=t.x,a=t.y,s=N(i-this.long0);if(r=s*Math.sin(a),this.sphere)Math.abs(a)<=1e-10?(e=this.a*s,n=-1*this.a*this.lat0):(e=this.a*Math.sin(r)/Math.tan(a),n=this.a*(Yt(a-this.lat0)+(1-Math.cos(r))/Math.tan(a)));else if(Math.abs(a)<=1e-10)e=this.a*s,n=-1*this.ml0;else{var o=Qt(this.a,this.e,Math.sin(a))/Math.tan(a);e=o*Math.sin(r),n=this.a*qt(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+o*(1-Math.cos(r))}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){var e,n,r,i,a,s,o,h,u;if(r=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=1e-10)e=N(r/this.a+this.long0),n=0;else{var l;for(s=this.lat0+i/this.a,o=r*r/this.a/this.a+s*s,h=s,a=20;a;--a)if(h+=u=-1*(s*(h*(l=Math.tan(h))+1)-h-.5*(h*h+o)*l)/((h-s)/l-1),Math.abs(u)<=1e-10){n=h;break}e=N(this.long0+Math.asin(r*Math.tan(h)/this.a)/Math.sin(n))}else if(Math.abs(i+this.ml0)<=1e-10)n=0,e=N(this.long0+r/this.a);else{var c,f,y,p,d;for(s=(this.ml0+i)/this.a,o=r*r/this.a/this.a+s*s,h=s,a=20;a;--a)if(d=this.e*Math.sin(h),c=Math.sqrt(1-d*d)*Math.tan(h),f=this.a*qt(this.e0,this.e1,this.e2,this.e3,h),y=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=u=(s*(c*(p=f/this.a)+1)-p-.5*c*(p*p+o))/(this.es*Math.sin(2*h)*(p*p+o-2*s*p)/(4*c)+(s-p)*(c*y-2/Math.sin(2*h))-y),Math.abs(u)<=1e-10){n=h;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=N(this.long0+Math.asin(r*c/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},names:["Polyconic","poly"]};var ie={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,n=t.x,i=t.y-this.lat0,a=n-this.long0,s=i/r*1e-5,o=a,h=1,u=0;for(e=1;e<=10;e++)h*=s,u+=this.A[e]*h;var l,c=u,f=o,y=1,p=0,d=0,v=0;for(e=1;e<=6;e++)l=p*c+y*f,y=y*c-p*f,p=l,d=d+this.B_re[e]*y-this.B_im[e]*p,v=v+this.B_im[e]*y+this.B_re[e]*p;return t.x=v*this.a+this.x0,t.y=d*this.a+this.y0,t},inverse:function(t){var e,n,i=t.x,a=t.y,s=i-this.x0,o=(a-this.y0)/this.a,h=s/this.a,u=1,l=0,c=0,f=0;for(e=1;e<=6;e++)n=l*o+u*h,u=u*o-l*h,l=n,c=c+this.C_re[e]*u-this.C_im[e]*l,f=f+this.C_im[e]*u+this.C_re[e]*l;for(var y=0;y<this.iterations;y++){var p,d=c,v=f,m=o,b=h;for(e=2;e<=6;e++)p=v*c+d*f,d=d*c-v*f,v=p,m+=(e-1)*(this.B_re[e]*d-this.B_im[e]*v),b+=(e-1)*(this.B_im[e]*d+this.B_re[e]*v);d=1,v=0;var g=this.B_re[1],M=this.B_im[1];for(e=2;e<=6;e++)p=v*c+d*f,d=d*c-v*f,v=p,g+=e*(this.B_re[e]*d-this.B_im[e]*v),M+=e*(this.B_im[e]*d+this.B_re[e]*v);var w=g*g+M*M;c=(m*g+b*M)/w,f=(b*g-m*M)/w}var _=c,x=f,P=1,O=0;for(e=1;e<=9;e++)P*=_,O+=this.D[e]*P;var S=this.lat0+O*r*1e5,I=this.long0+x;return t.x=I,t.y=S,t},names:["New_Zealand_Map_Grid","nzmg"]};var ae={init:function(){},forward:function(t){var e=t.x,n=t.y,r=N(e-this.long0),i=this.x0+this.a*r,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=i,t.y=a,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=N(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t},names:["Miller_Cylindrical","mill"]};var se={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=_t(this.es)},forward:function(t){var e,n,r=t.x,i=t.y;if(r=N(r-this.long0),this.sphere){if(this.m)for(var a=this.n*Math.sin(i),s=20;s;--s){var o=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=o,Math.abs(o)<1e-10)break}else i=1!==this.n?Math.asin(this.n*Math.sin(i)):i;e=this.a*this.C_x*r*(this.m+Math.cos(i)),n=this.a*this.C_y*i}else{var h=Math.sin(i),u=Math.cos(i);n=this.a*xt(i,h,u,this.en),e=this.a*r*u/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,r,a;return t.x-=this.x0,r=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,r/=this.C_x*(this.m+Math.cos(e)),this.m?e=Zt((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Zt(Math.sin(e)/this.n)),r=N(r+this.long0),e=Yt(e)):(e=Pt(t.y/this.a,this.es,this.en),(a=Math.abs(e))<i?(a=Math.sin(e),n=this.long0+t.x*Math.sqrt(1-this.es*a*a)/(this.a*Math.cos(e)),r=N(n)):a-1e-10<i&&(r=this.long0)),t.x=r,t.y=e,t},names:["Sinusoidal","sinu"]};var oe={init:function(){},forward:function(t){for(var e=t.x,n=t.y,r=N(e-this.long0),i=n,a=Math.PI*Math.sin(n);;){var s=-(i+Math.sin(i)-a)/(1+Math.cos(i));if(i+=s,Math.abs(s)<1e-10)break}i/=2,Math.PI/2-Math.abs(n)<1e-10&&(r=0);var o=.900316316158*this.a*r*Math.cos(i)+this.x0,h=1.4142135623731*this.a*Math.sin(i)+this.y0;return t.x=o,t.y=h,t},inverse:function(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var r=N(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var i=Math.asin(n);return t.x=r,t.y=i,t},names:["Mollweide","moll"]};var he={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=zt(this.es),this.e1=Gt(this.es),this.e2=Ht(this.es),this.e3=Wt(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=A(this.e,this.sinphi,this.cosphi),this.ml1=qt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=A(this.e,this.sinphi,this.cosphi),this.ml2=qt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=qt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,n=t.x,r=t.y;if(this.sphere)e=this.a*(this.g-r);else{var i=qt(this.e0,this.e1,this.e2,this.e3,r);e=this.a*(this.g-i)}var a=this.ns*N(n-this.long0),s=this.x0+e*Math.sin(a),o=this.y0+this.rh-e*Math.cos(a);return t.x=s,t.y=o,t},inverse:function(t){var e,n,r,i;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var a=0;if(0!==n&&(a=Math.atan2(e*t.x,e*t.y)),this.sphere)return i=N(this.long0+a/this.ns),r=Yt(this.g-n/this.a),t.x=i,t.y=r,t;var s=this.g-n/this.a;return r=Vt(s,this.e0,this.e1,this.e2,this.e3),i=N(this.long0+a/this.ns),t.x=i,t.y=r,t},names:["Equidistant_Conic","eqdc"]};var ue={init:function(){this.R=this.a},forward:function(t){var e,n,r=t.x,a=t.y,s=N(r-this.long0);Math.abs(a)<=1e-10&&(e=this.x0+this.R*s,n=this.y0);var o=Zt(2*Math.abs(a/Math.PI));(Math.abs(s)<=1e-10||Math.abs(Math.abs(a)-i)<=1e-10)&&(e=this.x0,n=a>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var h=.5*Math.abs(Math.PI/s-s/Math.PI),u=h*h,l=Math.sin(o),c=Math.cos(o),f=c/(l+c-1),y=f*f,p=f*(2/l-1),d=p*p,v=Math.PI*this.R*(h*(f-d)+Math.sqrt(u*(f-d)*(f-d)-(d+u)*(y-d)))/(d+u);s<0&&(v=-v),e=this.x0+v;var m=u+f;return v=Math.PI*this.R*(p*m-h*Math.sqrt((d+u)*(u+1)-m*m))/(d+u),n=a>=0?this.y0+v:this.y0-v,t.x=e,t.y=n,t},inverse:function(t){var e,n,r,i,a,s,o,h,u,l,c,f;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,a=(r=t.x/c)*r+(i=t.y/c)*i,c=3*(i*i/(h=-2*(s=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(o=s-2*i*i+r*r)*o*o/h/h/h-9*s*o/h/h)/27)/(u=(s-o*o/3/h)/h)/(l=2*Math.sqrt(-u/3)),Math.abs(c)>1&&(c=c>=0?1:-1),f=Math.acos(c)/3,n=t.y>=0?(-l*Math.cos(f+Math.PI/3)-o/3/h)*Math.PI:-(-l*Math.cos(f+Math.PI/3)-o/3/h)*Math.PI,e=Math.abs(r)<1e-10?this.long0:N(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(r*r-i*i)+a*a))/2/r),t.x=e,t.y=n,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var le={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var e,n,r,a,s,o,h,u,l,c,f,y,p,d,v,m,b,g,M,w,_,x,P=t.x,O=t.y,S=Math.sin(t.y),I=Math.cos(t.y),j=N(P-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(t.x=this.x0+this.a*(i-O)*Math.sin(j),t.y=this.y0-this.a*(i-O)*Math.cos(j),t):Math.abs(this.sin_p12+1)<=1e-10?(t.x=this.x0+this.a*(i+O)*Math.sin(j),t.y=this.y0+this.a*(i+O)*Math.cos(j),t):(g=this.sin_p12*S+this.cos_p12*I*Math.cos(j),b=(m=Math.acos(g))?m/Math.sin(m):1,t.x=this.x0+this.a*b*I*Math.sin(j),t.y=this.y0+this.a*b*(this.cos_p12*S-this.sin_p12*I*Math.cos(j)),t):(e=zt(this.es),n=Gt(this.es),r=Ht(this.es),a=Wt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(s=this.a*qt(e,n,r,a,i),o=this.a*qt(e,n,r,a,O),t.x=this.x0+(s-o)*Math.sin(j),t.y=this.y0-(s-o)*Math.cos(j),t):Math.abs(this.sin_p12+1)<=1e-10?(s=this.a*qt(e,n,r,a,i),o=this.a*qt(e,n,r,a,O),t.x=this.x0+(s+o)*Math.sin(j),t.y=this.y0+(s+o)*Math.cos(j),t):(h=S/I,u=Qt(this.a,this.e,this.sin_p12),l=Qt(this.a,this.e,S),c=Math.atan((1-this.es)*h+this.es*u*this.sin_p12/(l*I)),M=0===(f=Math.atan2(Math.sin(j),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(j)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(f)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(j)*Math.cos(c)/Math.sin(f)),y=this.e*this.sin_p12/Math.sqrt(1-this.es),m=u*M*(1-(w=M*M)*(v=(p=this.e*this.cos_p12*Math.cos(f)/Math.sqrt(1-this.es))*p)*(1-v)/6+(_=w*M)/8*(d=y*p)*(1-2*v)+(x=_*M)/120*(v*(4-7*v)-3*y*y*(1-7*v))-x*M/48*d),t.x=this.x0+m*Math.sin(f),t.y=this.y0+m*Math.cos(f),t))},inverse:function(t){var e,n,r,a,s,o,h,u,l,c,f,y,p,d,v,m,b,g,M,w,_,x,P;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*i*this.a)return;return n=e/this.a,r=Math.sin(n),a=Math.cos(n),s=this.long0,Math.abs(e)<=1e-10?o=this.lat0:(o=Zt(a*this.sin_p12+t.y*r*this.cos_p12/e),h=Math.abs(this.lat0)-i,s=Math.abs(h)<=1e-10?this.lat0>=0?N(this.long0+Math.atan2(t.x,-t.y)):N(this.long0-Math.atan2(-t.x,t.y)):N(this.long0+Math.atan2(t.x*r,e*this.cos_p12*a-t.y*this.sin_p12*r))),t.x=s,t.y=o,t}return u=zt(this.es),l=Gt(this.es),c=Ht(this.es),f=Wt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(y=this.a*qt(u,l,c,f,i),e=Math.sqrt(t.x*t.x+t.y*t.y),o=Vt((y-e)/this.a,u,l,c,f),s=N(this.long0+Math.atan2(t.x,-1*t.y)),t.x=s,t.y=o,t):Math.abs(this.sin_p12+1)<=1e-10?(y=this.a*qt(u,l,c,f,i),e=Math.sqrt(t.x*t.x+t.y*t.y),o=Vt((e-y)/this.a,u,l,c,f),s=N(this.long0+Math.atan2(t.x,t.y)),t.x=s,t.y=o,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),v=Math.atan2(t.x,t.y),p=Qt(this.a,this.e,this.sin_p12),m=Math.cos(v),g=-(b=this.e*this.cos_p12*m)*b/(1-this.es),M=3*this.es*(1-g)*this.sin_p12*this.cos_p12*m/(1-this.es),x=1-g*(_=(w=e/p)-g*(1+g)*Math.pow(w,3)/6-M*(1+3*g)*Math.pow(w,4)/24)*_/2-w*_*_*_/6,d=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*m),s=N(this.long0+Math.asin(Math.sin(v)*Math.sin(_)/Math.cos(d))),P=Math.sin(d),o=Math.atan2((P-this.es*x*this.sin_p12)*Math.tan(d),P*(1-this.es)),t.x=s,t.y=o,t)},names:["Azimuthal_Equidistant","aeqd"]};var ce={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,n,r,i,a,s,o,h=t.x,u=t.y;return r=N(h-this.long0),e=Math.sin(u),n=Math.cos(u),i=Math.cos(r),1,((a=this.sin_p14*e+this.cos_p14*n*i)>0||Math.abs(a)<=1e-10)&&(s=1*this.a*n*Math.sin(r),o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)),t.x=s,t.y=o,t},inverse:function(t){var e,n,r,a,s,o,h;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),n=Zt(e/this.a),r=Math.sin(n),a=Math.cos(n),o=this.long0,Math.abs(e)<=1e-10?(h=this.lat0,t.x=o,t.y=h,t):(h=Zt(a*this.sin_p14+t.y*r*this.cos_p14/e),s=Math.abs(this.lat0)-i,Math.abs(s)<=1e-10?(o=this.lat0>=0?N(this.long0+Math.atan2(t.x,-t.y)):N(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=h,t):(o=N(this.long0+Math.atan2(t.x*r,e*this.cos_p14*a-t.y*this.sin_p14*r)),t.x=o,t.y=h,t))},names:["ortho"]},fe=1,ye=2,pe=3,de=4,ve=5,me=6,be=1,ge=2,Me=3,we=4;function _e(t,e,n,r){var a;return t<1e-10?(r.value=be,a=0):(a=Math.atan2(e,n),Math.abs(a)<=o?r.value=be:a>o&&a<=i+o?(r.value=ge,a-=i):a>i+o||a<=-(i+o)?(r.value=Me,a=a>=0?a-u:a+u):(r.value=we,a+=i)),a}function xe(t,e){var n=t+e;return n<-u?n+=h:n>+u&&(n-=h),n}var Pe={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=i-o/2?this.face=ve:this.lat0<=-(i-o/2)?this.face=me:Math.abs(this.long0)<=o?this.face=fe:Math.abs(this.long0)<=i+o?this.face=this.long0>0?ye:de:this.face=pe,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,n,r,a,s,h,l={x:0,y:0},c={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===ve)a=i-e,n>=o&&n<=i+o?(c.value=be,r=n-i):n>i+o||n<=-(i+o)?(c.value=ge,r=n>0?n-u:n+u):n>-(i+o)&&n<=-o?(c.value=Me,r=n+i):(c.value=we,r=n);else if(this.face===me)a=i+e,n>=o&&n<=i+o?(c.value=be,r=-n+i):n<o&&n>=-o?(c.value=ge,r=-n):n<-o&&n>=-(i+o)?(c.value=Me,r=-n-i):(c.value=we,r=n>0?-n+u:-n-u);else{var f,y,p,d,v,m;this.face===ye?n=xe(n,+i):this.face===pe?n=xe(n,+u):this.face===de&&(n=xe(n,-i)),d=Math.sin(e),v=Math.cos(e),m=Math.sin(n),f=v*Math.cos(n),y=v*m,p=d,this.face===fe?r=_e(a=Math.acos(f),p,y,c):this.face===ye?r=_e(a=Math.acos(y),p,-f,c):this.face===pe?r=_e(a=Math.acos(-f),p,-y,c):this.face===de?r=_e(a=Math.acos(-y),p,f,c):(a=r=0,c.value=be)}return h=Math.atan(12/u*(r+Math.acos(Math.sin(r)*Math.cos(o))-i)),s=Math.sqrt((1-Math.cos(a))/(Math.cos(h)*Math.cos(h))/(1-Math.cos(Math.atan(1/Math.cos(r))))),c.value===ge?h+=i:c.value===Me?h+=u:c.value===we&&(h+=1.5*u),l.x=s*Math.cos(h),l.y=s*Math.sin(h),l.x=l.x*this.a+this.x0,l.y=l.y*this.a+this.y0,t.x=l.x,t.y=l.y,t},inverse:function(t){var e,n,r,a,s,o,h,l,c,f,y,p,d={lam:0,phi:0},v={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?v.value=be:t.y>=0&&t.y>=Math.abs(t.x)?(v.value=ge,e-=i):t.x<0&&-t.x>=Math.abs(t.y)?(v.value=Me,e=e<0?e+u:e-u):(v.value=we,e+=i),c=u/12*Math.tan(e),s=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(s),(h=1-(r=Math.cos(e))*r*(a=Math.tan(n))*a*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?h=-1:h>1&&(h=1),this.face===ve)l=Math.acos(h),d.phi=i-l,v.value===be?d.lam=o+i:v.value===ge?d.lam=o<0?o+u:o-u:v.value===Me?d.lam=o-i:d.lam=o;else if(this.face===me)l=Math.acos(h),d.phi=l-i,v.value===be?d.lam=-o+i:v.value===ge?d.lam=-o:v.value===Me?d.lam=-o-i:d.lam=o<0?-o-u:-o+u;else{var m,b,g;c=(m=h)*m,b=(c+=(g=c>=1?0:Math.sqrt(1-c)*Math.sin(o))*g)>=1?0:Math.sqrt(1-c),v.value===ge?(c=b,b=-g,g=c):v.value===Me?(b=-b,g=-g):v.value===we&&(c=b,b=g,g=-c),this.face===ye?(c=m,m=-b,b=c):this.face===pe?(m=-m,b=-b):this.face===de&&(c=m,m=b,b=-c),d.phi=Math.acos(-g)-i,d.lam=Math.atan2(b,m),this.face===ye?d.lam=xe(d.lam,-i):this.face===pe?d.lam=xe(d.lam,-u):this.face===de&&(d.lam=xe(d.lam,+i))}return 0!==this.es&&(f=d.phi<0?1:0,y=Math.tan(d.phi),p=this.b/Math.sqrt(y*y+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),f&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Oe=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Se=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ie=s/5,je=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};var ke={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=N(t.x-this.long0),n=Math.abs(t.y),r=Math.floor(n*Ie);r<0?r=0:r>=18&&(r=17);var i={x:je(Oe[r],n=s*(n-.08726646259971647*r))*e,y:je(Se[r],n)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*.8487+this.x0,i.y=i.y*this.a*1.3523+this.y0,i},inverse:function(t){var e={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(e.y>=1)e.x/=Oe[18][0],e.y=t.y<0?-i:i;else{var n=Math.floor(18*e.y);for(n<0?n=0:n>=18&&(n=17);;)if(Se[n][0]>e.y)--n;else{if(!(Se[n+1][0]<=e.y))break;++n}var r=Se[n],s=5*(e.y-r[0])/(Se[n+1][0]-r[0]);s=function(t,e,n,r){for(var i=e;r;--r){var a=t(i);if(i-=a,Math.abs(a)<n)break}return i}((function(t){return(je(r,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(r,t)}),s,1e-10,100),e.x/=je(Oe[n],s),e.y=(5*n+s)*a,t.y<0&&(e.y=-e.y)}return e.x=N(e.x+this.long0),e},names:["Robinson","robin"]};var Te,Ee={init:function(){this.name="geocent"},forward:function(t){return X(t,this.es,this.a)},inverse:function(t){return J(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};st.defaultDatum="WGS84",st.Proj=V,st.WGS84=new st.Proj("WGS84"),st.Point=Mt,st.toPoint=tt,st.defs=I,st.transform=nt,st.mgrs=ut,st.version="__VERSION__",(Te=st).Proj.projections.add(Ot),Te.Proj.projections.add(Et),Te.Proj.projections.add(At),Te.Proj.projections.add(Rt),Te.Proj.projections.add(Dt),Te.Proj.projections.add(Bt),Te.Proj.projections.add(Ft),Te.Proj.projections.add(Lt),Te.Proj.projections.add(Ut),Te.Proj.projections.add(Xt),Te.Proj.projections.add(Kt),Te.Proj.projections.add($t),Te.Proj.projections.add(te),Te.Proj.projections.add(ee),Te.Proj.projections.add(ne),Te.Proj.projections.add(re),Te.Proj.projections.add(ie),Te.Proj.projections.add(ae),Te.Proj.projections.add(se),Te.Proj.projections.add(oe),Te.Proj.projections.add(he),Te.Proj.projections.add(ue),Te.Proj.projections.add(le),Te.Proj.projections.add(ce),Te.Proj.projections.add(Pe),Te.Proj.projections.add(ke),Te.Proj.projections.add(Ee);var Ae=st;class Ce{static defineProjectionAliases(t){const e=[];for(const n in t)e.push([n,t[n]]);Ae.defs(e)}constructor({from:t="WGS84",to:e="WGS84"}){const n=Ae(t,e);if(!n)throw new Error("Invalid projection");this.project=n.forward,this.unproject=n.inverse}}}]);
|
|
1
|
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHPLoader=e.SHPWorkerLoader=e.SHP_MAGIC_NUMBER=void 0;var r=n(12);function i(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=[0,0,39,10];e.SHP_MAGIC_NUMBER=h;var u={name:"SHP",id:"shp",module:"shapefile",version:"3.0.14",worker:!0,category:"geometry",extensions:["shp"],mimeTypes:["application/octet-stream"],tests:[new Uint8Array(h).buffer],options:{shp:{_maxDimensions:4}}};e.SHPWorkerLoader=u;var l,c,f=s(s({},u),{},{parse:(l=regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,r.parseSHP)(e,n));case 1:case"end":return t.stop()}}),t)})),c=function(){var t=this,e=arguments;return new Promise((function(n,r){var a=l.apply(t,e);function s(t){i(a,n,r,s,o,"next",t)}function o(t){i(a,n,r,s,o,"throw",t)}s(void 0)}))},function(t,e){return c.apply(this,arguments)}),parseSync:r.parseSHP,parseInBatches:r.parseSHPInBatches});e.SHPLoader=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Type",{enumerable:!0,get:function(){return a.Type}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return a.DataType}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return a.Null}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return a.Bool}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return a.Int}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return a.Int8}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return a.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return a.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return a.Int64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return a.Uint8}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return a.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return a.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return a.Uint64}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return a.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return a.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return a.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return a.Float64}}),Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return a.Binary}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return a.Utf8}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return a.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return a.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return a.DateMillisecond}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return a.Time}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return a.TimeSecond}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return a.TimeMillisecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return a.Timestamp}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return a.TimestampSecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return a.TimestampMillisecond}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return a.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return a.TimestampNanosecond}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return a.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return a.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return a.IntervalYearMonth}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return a.FixedSizeList}});var r=s(n(26)),i=s(n(28)),a=n(29);function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw s}}}}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"offset",void 0),h(this,"arrayBuffers",void 0),h(this,"ended",void 0),h(this,"maxRewindBytes",void 0);var n=(e||{}).maxRewindBytes,r=void 0===n?0:n;this.offset=0,this.arrayBuffers=[],this.ended=!1,this.maxRewindBytes=r}var e,n,a;return e=t,(n=[{key:"write",value:function(t){this.arrayBuffers.push(t)}},{key:"end",value:function(){this.arrayBuffers=[],this.ended=!0}},{key:"hasAvailableBytes",value:function(t){var e,n=-this.offset,r=i(this.arrayBuffers);try{for(r.s();!(e=r.n()).done;)if((n+=e.value.byteLength)>=t)return!0}catch(t){r.e(t)}finally{r.f()}return!1}},{key:"findBufferOffsets",value:function(t){for(var e=-this.offset,n=[],r=0;r<this.arrayBuffers.length;r++){var i=this.arrayBuffers[r];if(e+i.byteLength<=0)e+=i.byteLength;else{var a=e<=0?Math.abs(e):0,s=void 0;if(a+t<=i.byteLength)return s=a+t,n.push([r,[a,s]]),n;s=i.byteLength,n.push([r,[a,s]]),t-=i.byteLength-a,e+=i.byteLength}}return null}},{key:"getDataView",value:function(t){var e=this.findBufferOffsets(t);if(!e&&this.ended)throw new Error("binary data exhausted");if(!e)return null;if(1===e.length){var n=r(e[0],2),i=n[0],a=r(n[1],2),s=a[0],o=a[1],h=this.arrayBuffers[i],u=new DataView(h,s,o-s);return this.offset+=t,this.disposeBuffers(),u}var l=new DataView(this._combineArrayBuffers(e));return this.offset+=t,this.disposeBuffers(),l}},{key:"disposeBuffers",value:function(){for(;this.arrayBuffers.length>0&&this.offset-this.maxRewindBytes>=this.arrayBuffers[0].byteLength;)this.offset-=this.arrayBuffers[0].byteLength,this.arrayBuffers.shift()}},{key:"_combineArrayBuffers",value:function(t){var e,n=0,a=i(t);try{for(a.s();!(e=a.n()).done;){var s=r(e.value[1],2),o=s[0];n+=s[1]-o}}catch(t){a.e(t)}finally{a.f()}var h,u=new Uint8Array(n),l=0,c=i(t);try{for(c.s();!(h=c.n()).done;){var f=r(h.value,2),y=f[0],p=r(f[1],2),d=p[0],v=p[1],m=new Uint8Array(this.arrayBuffers[y]);u.set(m.subarray(d,v),l),l+=v-d}}catch(t){c.e(t)}finally{c.f()}return u.buffer}},{key:"skip",value:function(t){this.offset+=t}},{key:"rewind",value:function(t){this.offset-=t}}])&&o(e.prototype,n),a&&o(e,a),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSHPHeader=function(t){var e={magic:t.getInt32(0,!1),length:2*t.getInt32(24,!1),version:t.getInt32(28,!0),type:t.getInt32(32,!0),bbox:{minX:t.getFloat64(36,!0),minY:t.getFloat64(44,!0),minZ:t.getFloat64(68,!0),minM:t.getFloat64(84,!0),maxX:t.getFloat64(52,!0),maxY:t.getFloat64(60,!0),maxZ:t.getFloat64(76,!0),maxM:t.getFloat64(92,!0)}};9994!==e.magic&&console.error("SHP file: bad magic number ".concat(e.magic));1e3!==e.version&&console.error("SHP file: bad version ".concat(e.version));return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DBFLoader=e.DBFWorkerLoader=void 0;var r=n(21);function i(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={name:"DBF",id:"dbf",module:"shapefile",version:"3.0.14",worker:!0,category:"table",extensions:["dbf"],mimeTypes:["application/x-dbf"],options:{dbf:{encoding:"latin1"}}};e.DBFWorkerLoader=h;var u,l,c=s(s({},h),{},{parse:(u=regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,r.parseDBF)(e,n));case 1:case"end":return t.stop()}}),t)})),l=function(){var t=this,e=arguments;return new Promise((function(n,r){var a=u.apply(t,e);function s(t){i(a,n,r,s,o,"next",t)}function o(t){i(a,n,r,s,o,"throw",t)}s(void 0)}))},function(t,e){return l.apply(this,arguments)}),parseSync:r.parseDBF,parseInBatches:r.parseDBFInBatches});e.DBFLoader=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(6);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"schema",void 0),a(this,"options",void 0),a(this,"length",0),a(this,"objectRows",null),a(this,"arrayRows",null),a(this,"cursor",0),a(this,"_headers",[]),this.options=n,this.schema=e,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}var e,n,s;return e=t,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"object-row-table":var n=(0,r.convertToObjectRow)(t,this._headers);this.addObjectRow(n,e);break;case"array-row-table":this.arrayRows=this.arrayRows||new Array(100),this.arrayRows[this.length]=t,this.length++}}},{key:"addObjectRow",value:function(t,e){switch(Number.isFinite(e)&&(this.cursor=e),this.options.shape){case"array-row-table":var n=(0,r.convertToArrayRow)(t,this._headers);this.addArrayRow(n,e);break;case"object-row-table":this.objectRows=this.objectRows||new Array(100),this.objectRows[this.length]=t,this.length++}}},{key:"getBatch",value:function(){var t=this.arrayRows||this.objectRows;return t?(t=t.slice(0,this.length),this.arrayRows=null,this.objectRows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}])&&i(e.prototype,n),s&&i(e,s),t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertToObjectRow=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n},e.convertToArrayRow=function(t,e){if(!t)throw new Error("null row");if(!e)throw new Error("no headers");for(var n=new Array(e.length),r=0;r<e.length;r++)n[r]=t[e[r]];return n}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,"schema",void 0),s(this,"length",0),s(this,"allocated",0),s(this,"columns",{}),this.schema=e,this._reallocateColumns()}var e,n,i;return e=t,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t){this._reallocateColumns();var e=0;for(var n in this.columns)this.columns[n][this.length]=t[e++];this.length++}},{key:"addObjectRow",value:function(t){for(var e in this._reallocateColumns(),t)this.columns[e][this.length]=t[e];this.length++}},{key:"getBatch",value:function(){this._pruneColumns();var t=Array.isArray(this.schema)?this.columns:{};if(!Array.isArray(this.schema))for(var e in this.schema){var n=this.schema[e];t[n.name]=this.columns[n.index]}return this.columns={},{shape:"columnar-table",batchType:"data",data:t,schema:this.schema,length:this.length}}},{key:"_reallocateColumns",value:function(){if(!(this.length<this.allocated))for(var t in this.allocated=this.allocated>0?this.allocated*=2:100,this.columns={},this.schema){var e=this.schema[t],n=e.type||Float32Array,r=this.columns[e.index];if(r&&ArrayBuffer.isView(r)){var i=new n(this.allocated);i.set(r),this.columns[e.index]=i}else r?(r.length=this.allocated,this.columns[e.index]=r):this.columns[e.index]=new n(this.allocated)}}},{key:"_pruneColumns",value:function(){for(var t=0,e=Object.entries(this.columns);t<e.length;t++){var n=r(e[t],2),i=n[0],a=n[1];this.columns[i]=a.slice(0,this.length)}}}])&&a(e.prototype,n),i&&a(e,i),t}();e.default=o},function(t,e,n){"use strict";(function(e){var r=n(10),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,r)}).call(this,n(9))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ShapefileLoader",{enumerable:!0,get:function(){return r.ShapefileLoader}}),Object.defineProperty(e,"DBFLoader",{enumerable:!0,get:function(){return i.DBFLoader}}),Object.defineProperty(e,"DBFWorkerLoader",{enumerable:!0,get:function(){return i.DBFWorkerLoader}}),Object.defineProperty(e,"SHPLoader",{enumerable:!0,get:function(){return a.SHPLoader}}),Object.defineProperty(e,"SHPWorkerLoader",{enumerable:!0,get:function(){return a.SHPWorkerLoader}});var r=n(11),i=n(4),a=n(0)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._typecheckShapefileLoader=e.ShapefileLoader=void 0;var r=n(0),i=n(14),a={name:"Shapefile",id:"shapefile",module:"shapefile",version:"3.0.14",category:"geometry",extensions:["shp"],mimeTypes:["application/octet-stream"],tests:[new Uint8Array(r.SHP_MAGIC_NUMBER).buffer],options:{shapefile:{},shp:{_maxDimensions:4}},parse:i.parseShapefile,parseInBatches:i.parseShapefileInBatches};e.ShapefileLoader=a;var s=a;e._typecheckShapefileLoader=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSHP=function(t,e){var n=new b(e);return n.write(t),n.end(),n.result},e.parseSHPInBatches=function(t,e){return g.apply(this,arguments)};var r,i=(r=n(2))&&r.__esModule?r:{default:r},a=n(3),s=n(13);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return new f(t)}function l(t){return function(){return new c(t.apply(this,arguments))}}function c(t){var e,n;function r(e,n){try{var a=t[e](n),s=a.value,o=s instanceof f;Promise.resolve(o?s.wrapped:s).then((function(t){o?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function f(t){this.wrapped=t}function y(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)}c.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(t){return this._invoke("next",t)},c.prototype.throw=function(t){return this._invoke("throw",t)},c.prototype.return=function(t){return this._invoke("return",t)};var p=0,d=1,v=2,m=3,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"options",{}),h(this,"binaryReader",new i.default({maxRewindBytes:12})),h(this,"state",p),h(this,"result",{geometries:[]}),this.options=e}var e,n,r;return e=t,(n=[{key:"write",value:function(t){this.binaryReader.write(t),this.state=M(this.state,this.result,this.binaryReader,this.options)}},{key:"end",value:function(){this.binaryReader.end(),this.state=M(this.state,this.result,this.binaryReader,this.options),this.state!==v&&(this.state=m,this.result.error="SHP incomplete file")}}])&&o(e.prototype,n),r&&o(e,r),t}();function g(){return(g=l(regeneratorRuntime.mark((function t(e,n){var r,i,a,s,o,h,l,c,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new b(n),i=!1,a=!0,s=!1,t.prev=4,h=y(e);case 6:return t.next=8,u(h.next());case 8:return l=t.sent,a=l.done,t.next=12,u(l.value);case 12:if(c=t.sent,a){t.next=27;break}if(f=c,r.write(f),i||!r.result.header){t.next=20;break}return i=!0,t.next=20,r.result.header;case 20:if(!(r.result.geometries.length>0)){t.next=24;break}return t.next=23,r.result.geometries;case 23:r.result.geometries=[];case 24:a=!0,t.next=6;break;case 27:t.next=33;break;case 29:t.prev=29,t.t0=t.catch(4),s=!0,o=t.t0;case 33:if(t.prev=33,t.prev=34,a||null==h.return){t.next=38;break}return t.next=38,u(h.return());case 38:if(t.prev=38,!s){t.next=41;break}throw o;case 41:return t.finish(38);case 42:return t.finish(33);case 43:if(r.end(),!(r.result.geometries.length>0)){t.next=47;break}return t.next=47,r.result.geometries;case 47:return t.abrupt("return");case 48:case"end":return t.stop()}}),t,null,[[4,29,33,43],[34,,38,42]])})))).apply(this,arguments)}function M(t,e,n,r){for(;;)try{switch(t){case m:case v:return t;case p:var i=n.getDataView(100);if(!i)return t;e.header=(0,a.parseSHPHeader)(i),e.progress={bytesUsed:0,bytesTotal:e.header.length,rows:0},e.currentIndex=1,t=d;break;case d:for(;n.hasAvailableBytes(12);){var o=n.getDataView(12),h={recordNumber:o.getInt32(0,!1),byteLength:2*o.getInt32(4,!1),type:o.getInt32(8,!0)};if(!n.hasAvailableBytes(h.byteLength-4))return n.rewind(12),t;if(h.byteLength<4||h.type!==e.header.type||h.recordNumber!==e.currentIndex)n.rewind(8);else{n.rewind(4);var u=n.getDataView(h.byteLength),l=(0,s.parseRecord)(u,r);e.geometries.push(l),e.currentIndex++,e.progress.rows=e.currentIndex-1}}return n.ended&&(t=v),t;default:return t=m,e.error="illegal parser state ".concat(t),t}}catch(n){return t=m,e.error="SHP parsing failed: ".concat(null==n?void 0:n.message),t}}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(e,"__esModule",{value:!0}),e.parseRecord=function(t,e){var n=((null==e?void 0:e.shp)||{})._maxDimensions,r=0,i=t.getInt32(r,!0);switch(r+=Int32Array.BYTES_PER_ELEMENT,i){case 0:return null;case 1:return a(t,r,Math.min(2,n));case 3:return o(t,r,Math.min(2,n),"LineString");case 5:return o(t,r,Math.min(2,n),"Polygon");case 8:return s(t,r,Math.min(2,n));case 11:return a(t,r,Math.min(4,n));case 13:return o(t,r,Math.min(4,n),"LineString");case 15:return o(t,r,Math.min(4,n),"Polygon");case 18:return s(t,r,Math.min(4,n));case 21:return a(t,r,Math.min(3,n));case 23:return o(t,r,Math.min(3,n),"LineString");case 25:return o(t,r,Math.min(3,n),"Polygon");case 28:return s(t,r,Math.min(3,n));default:throw new Error("unsupported shape type: ".concat(i))}};function a(t,e,n){var i,a=r(h(t,e,1,n),2);return i=a[0],e=a[1],{positions:{value:i,size:n},type:"Point"}}function s(t,e,n){e+=4*Float64Array.BYTES_PER_ELEMENT;var i,a=t.getInt32(e,!0),s=null,o=null,l=r(h(t,e+=Int32Array.BYTES_PER_ELEMENT,a,2),2);if(i=l[0],e=l[1],4===n){var c=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,a,1),2);o=c[0],e=c[1]}if(n>=3){var f=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,a,1),2);s=f[0],e=f[1]}return{positions:{value:u(i,s,o),size:n},type:"Point"}}function o(t,e,n,i){e+=4*Float64Array.BYTES_PER_ELEMENT;var a=t.getInt32(e,!0);e+=Int32Array.BYTES_PER_ELEMENT;var s=t.getInt32(e,!0);e+=Int32Array.BYTES_PER_ELEMENT;var o=t.byteOffset+e,c=a*Int32Array.BYTES_PER_ELEMENT,f=new Int32Array(a+1);f.set(new Int32Array(t.buffer.slice(o,o+c))),f[a]=s;var y=null,p=null,d=null,v=r(h(t,e+=a*Int32Array.BYTES_PER_ELEMENT,s,2),2);if(y=v[0],e=v[1],4===n){var m=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,s,1),2);d=m[0],e=m[1]}if(n>=3){var b=r(h(t,e+=2*Float64Array.BYTES_PER_ELEMENT,s,1),2);p=b[0],e=b[1]}var g=u(y,p,d);if("LineString"===i)return{type:i,positions:{value:g,size:n},pathIndices:{value:f,size:1}};for(var M=[],w=1;w<f.length;w++){var _=f[w-1],x=f[w];l(y.subarray(2*_,2*x))>0&&M.push(_)}return M.push(s),{type:i,positions:{value:g,size:n},primitivePolygonIndices:{value:f,size:1},polygonIndices:{value:new Uint32Array(M),size:1}}}function h(t,e,n,r){var i=t.byteOffset+e,a=n*r*Float64Array.BYTES_PER_ELEMENT;return[new Float64Array(t.buffer.slice(i,i+a)),e+a]}function u(t,e,n){if(!e&&!n)return t;var r=t.length,i=2;n&&n.length&&(r+=n.length,i++),e&&e.length&&(r+=e.length,i++);for(var a=new Float64Array(r),s=0;s<t.length/2;s++)a[i*s]=t[2*s],a[i*s+1]=t[2*s+1];if(n&&n.length)for(var o=0;o<n.length;o++)a[i*o+2]=n[o];if(e&&e.length)for(var h=0;h<e.length;h++)a[i*h+(i-1)]=e[h];return a}function l(t){return Math.sign(function(t){for(var e=0,n=t.length/2-1,r=0;r<n;r++)e+=(t[2*r]+t[2*(r+1)])*(t[2*r+1]-t[2*(r+1)+1]);return e/2}(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseShapefileInBatches=function(t,e,n){return _.apply(this,arguments)},e.parseShapefile=function(t,e,n){return x.apply(this,arguments)},e.loadShapefileSidecarFiles=I,e.replaceExtension=k;var r=n(15),i=n(35),a=n(19),s=n(20),o=n(0),h=n(4);function u(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){u(a,r,i,s,o,"next",t)}function o(t){u(a,r,i,s,o,"throw",t)}s(void 0)}))}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){return new M(t)}function b(t){return function(){return new g(t.apply(this,arguments))}}function g(t){var e,n;function r(e,n){try{var a=t[e](n),s=a.value,o=s instanceof M;Promise.resolve(o?s.wrapped:s).then((function(t){o?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function M(t){this.wrapped=t}function w(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)}function _(){return(_=b(regeneratorRuntime.mark((function t(e,n,r){var i,a,u,l,f,y,p,v,b,g,M,_,x,j,T,E,A,C,N,R,D,B,F,L,U,q,z;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=(null==n?void 0:n.gis)||{},a=i.reproject,u=void 0!==a&&a,l=i._targetCrs,f=void 0===l?"WGS84":l,t.next=3,m(I(n,r));case 3:return y=t.sent,p=y.shx,v=y.cpg,b=y.prj,t.next=9,m(r.parseInBatches(e,o.SHPLoader,n));case 9:return g=t.sent,t.next=12,m(r.fetch(k((null==r?void 0:r.url)||"","dbf")));case 12:if(!(_=t.sent).ok){t.next=17;break}return t.next=16,m(r.parseInBatches(_,h.DBFLoader,d(d({},n),{},{dbf:{encoding:v||"latin1"}})));case 16:M=t.sent;case 17:return t.next=19,m(g.next());case 19:if(!(x=t.sent.value)||"metadata"!==x.batchType){t.next=24;break}return t.next=23,m(g.next());case 23:x=t.sent.value;case 24:if(j={},!M){t.next=33;break}return t.next=28,m(M.next());case 28:if(!(j=t.sent.value)||"metadata"!==j.batchType){t.next=33;break}return t.next=32,m(M.next());case 32:j=t.sent.value;case 33:T=M?(0,s.zipBatchIterators)(g,M):g,E=!0,A=!1,t.prev=36,N=w(T);case 38:return t.next=40,m(N.next());case 40:return R=t.sent,E=R.done,t.next=44,m(R.value);case 44:if(D=t.sent,E){t.next=58;break}return B=D,F=void 0,L=void 0,M?(U=c(B,2),F=U[0],L=U[1]):F=B,q=P(F),z=O(q,L),u&&(z=S(z,b,f)),t.next=55,{encoding:v,prj:b,shx:p,header:x,data:z};case 55:E=!0,t.next=38;break;case 58:t.next=64;break;case 60:t.prev=60,t.t0=t.catch(36),A=!0,C=t.t0;case 64:if(t.prev=64,t.prev=65,E||null==N.return){t.next=69;break}return t.next=69,m(N.return());case 69:if(t.prev=69,!A){t.next=72;break}throw C;case 72:return t.finish(69);case 73:return t.finish(64);case 74:case"end":return t.stop()}}),t,null,[[36,60,64,74],[65,,69,73]])})))).apply(this,arguments)}function x(){return(x=l(regeneratorRuntime.mark((function t(e,n,r){var i,a,s,u,l,c,f,y,p,d,v,m,b,g,M,w;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=(null==n?void 0:n.gis)||{},a=i.reproject,s=void 0!==a&&a,u=i._targetCrs,l=void 0===u?"WGS84":u,t.next=3,I(n,r);case 3:return c=t.sent,f=c.shx,y=c.cpg,p=c.prj,t.next=9,r.parse(e,o.SHPLoader,n);case 9:return d=t.sent,v=d.header,m=d.geometries,b=P(m),g=[],t.next=16,r.fetch(k(r.url,"dbf"));case 16:if(!(M=t.sent).ok){t.next=21;break}return t.next=20,r.parse(M,h.DBFLoader,{dbf:{encoding:y||"latin1"}});case 20:g=t.sent;case 21:return w=O(b,g),s&&(w=S(w,p,l)),t.abrupt("return",{encoding:y,prj:p,shx:f,header:v,data:w});case 24:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(t){var e,n=[],i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=f(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;n.push((0,r.binaryToGeometry)(a))}}catch(t){i.e(t)}finally{i.f()}return n}function O(t,e){for(var n=[],r=0;r<t.length;r++){var i={type:"Feature",geometry:t[r],properties:e&&e[r]||{}};n.push(i)}return n}function S(t,e,n){var a=new i.Proj4Projection({from:e||"WGS84",to:n||"WGS84"});return(0,r.transformGeoJsonCoords)(t,(function(t){return a.project(t)}))}function I(t,e){return j.apply(this,arguments)}function j(){return(j=l(regeneratorRuntime.mark((function t(e,n){var r,i,s,o,h,u,l,c,f,y,p,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.url,i=n.fetch,s=i(k(r,"shx")),o=i(k(r,"cpg")),h=i(k(r,"prj")),t.next=6,Promise.all([s,o,h]);case 6:return t.next=8,s;case 8:if(!(f=t.sent).ok){t.next=14;break}return t.next=12,f.arrayBuffer();case 12:y=t.sent,u=(0,a.parseShx)(y);case 14:return t.next=16,o;case 16:if(!(p=t.sent).ok){t.next=21;break}return t.next=20,p.text();case 20:l=t.sent;case 21:return t.next=23,h;case 23:if(!(d=t.sent).ok){t.next=28;break}return t.next=27,d.text();case 27:c=t.sent;case 28:return t.abrupt("return",{shx:u,cpg:l,prj:c});case 29:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t,e){var n=function(t){var e=t&&t.lastIndexOf(".");if("number"==typeof e)return e>=0?t.substr(0,e):"";return e}(t),r=function(t){var e=t&&t.lastIndexOf(".");if("number"==typeof e)return e>=0?t.substr(e+1):"";return e}(t);return r===r.toUpperCase()&&(e=e.toUpperCase()),"".concat(n,".").concat(e)}g.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},g.prototype.next=function(t){return this._invoke("next",t)},g.prototype.throw=function(t){return this._invoke("throw",t)},g.prototype.return=function(t){return this._invoke("return",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"geojsonToBinary",{enumerable:!0,get:function(){return r.geojsonToBinary}}),Object.defineProperty(e,"binaryToGeojson",{enumerable:!0,get:function(){return i.binaryToGeojson}}),Object.defineProperty(e,"binaryToGeoJson",{enumerable:!0,get:function(){return i.binaryToGeoJson}}),Object.defineProperty(e,"binaryToGeometry",{enumerable:!0,get:function(){return i.binaryToGeometry}}),Object.defineProperty(e,"transformBinaryCoords",{enumerable:!0,get:function(){return a.transformBinaryCoords}}),Object.defineProperty(e,"transformGeoJsonCoords",{enumerable:!0,get:function(){return a.transformGeoJsonCoords}});var r=n(16),i=n(17),a=n(18)},function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=h(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function h(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(e,"__esModule",{value:!0}),e.geojsonToBinary=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c(t);return f(t,n,{coordLength:e.coordLength||n.coordLength,numericPropKeys:e.numericPropKeys||n.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})},e.TEST_EXPORTS=void 0;var l={firstPass:c,secondPass:f};function c(t){var e,n,r=0,i=0,a=0,h=0,u=0,l=0,c=0,f=0,y=0,p=new Set,d={},v=o(t);try{for(v.s();!(e=v.n()).done;){var m=e.value,b=m.geometry;switch(b.type){case"Point":i++,r++,p.add(b.coordinates.length);break;case"MultiPoint":i++,r+=b.coordinates.length;var g,M=o(b.coordinates);try{for(M.s();!(g=M.n()).done;){var w=g.value;p.add(w.length)}}catch(t){M.e(t)}finally{M.f()}break;case"LineString":u++,a+=b.coordinates.length,h++;var x,P=o(b.coordinates);try{for(P.s();!(x=P.n()).done;){var O=x.value;p.add(O.length)}}catch(t){P.e(t)}finally{P.f()}break;case"MultiLineString":u++;var S,I=o(b.coordinates);try{for(I.s();!(S=I.n()).done;){var j=S.value;a+=j.length,h++;var k,T=o(j);try{for(T.s();!(k=T.n()).done;){var E=k.value;p.add(E.length)}}catch(t){T.e(t)}finally{T.f()}}}catch(t){I.e(t)}finally{I.f()}break;case"Polygon":y++,c++,f+=b.coordinates.length,l+=_(b.coordinates).length;var A,C=o(_(b.coordinates));try{for(C.s();!(A=C.n()).done;){var N=A.value;p.add(N.length)}}catch(t){C.e(t)}finally{C.f()}break;case"MultiPolygon":y++;var R,D=o(b.coordinates);try{for(D.s();!(R=D.n()).done;){var B=R.value;c++,f+=B.length,l+=_(B).length;var F,L=o(_(B));try{for(L.s();!(F=L.n()).done;){var U=F.value;p.add(U.length)}}catch(t){L.e(t)}finally{L.f()}}}catch(t){D.e(t)}finally{D.f()}break;default:throw new Error("Unsupported geometry type: ".concat(b.type))}if(m.properties)for(var q in m.properties){var z=m.properties[q];d[q]=d[q]||void 0===d[q]?(n=z,Number.isFinite(n)):d[q]}}}catch(t){v.e(t)}finally{v.f()}return{coordLength:p.size>0?Math.max.apply(Math,s(p)):2,pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:a,linePathsCount:h,lineFeaturesCount:u,polygonPositionsCount:l,polygonObjectsCount:c,polygonRingsCount:f,polygonFeaturesCount:y,numericPropKeys:Object.keys(d).filter((function(t){return d[t]}))}}function f(t,e,n){for(var r=e.pointPositionsCount,a=e.pointFeaturesCount,s=e.linePositionsCount,h=e.linePathsCount,u=e.lineFeaturesCount,l=e.polygonPositionsCount,c=e.polygonObjectsCount,f=e.polygonRingsCount,g=e.polygonFeaturesCount,w=n.coordLength,_=n.numericPropKeys,x=n.PositionDataType,P=void 0===x?Float32Array:x,O=t.length>65535?Uint32Array:Uint16Array,S={positions:new P(r*w),globalFeatureIds:new O(r),featureIds:a>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:Array(),fields:Array()},I={positions:new P(s*w),pathIndices:s>65535?new Uint32Array(h+1):new Uint16Array(h+1),globalFeatureIds:new O(s),featureIds:u>65535?new Uint32Array(s):new Uint16Array(s),numericProps:{},properties:Array(),fields:Array()},j={positions:new P(l*w),polygonIndices:l>65535?new Uint32Array(c+1):new Uint16Array(c+1),primitivePolygonIndices:l>65535?new Uint32Array(f+1):new Uint16Array(f+1),globalFeatureIds:new O(l),featureIds:g>65535?new Uint32Array(l):new Uint16Array(l),numericProps:{},properties:Array(),fields:Array()},k=0,T=[S,I,j];k<T.length;k++){var E,A=T[k],C=o(_||[]);try{for(C.s();!(E=C.n()).done;){var N=E.value;A.numericProps[N]=new Float32Array(A.positions.length/w)}}catch(t){C.e(t)}finally{C.f()}}I.pathIndices[h]=s,j.polygonIndices[c]=l,j.primitivePolygonIndices[f]=l;var R,D={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},B=o(t);try{for(B.s();!(R=B.n()).done;){var F=R.value,L=F.geometry,U=F.properties||{};switch(L.type){case"Point":y(L.coordinates,S,D,w,U),S.properties.push(M(U,_)),D.pointFeature++;break;case"MultiPoint":p(L.coordinates,S,D,w,U),S.properties.push(M(U,_)),D.pointFeature++;break;case"LineString":d(L.coordinates,I,D,w,U),I.properties.push(M(U,_)),D.lineFeature++;break;case"MultiLineString":v(L.coordinates,I,D,w,U),I.properties.push(M(U,_)),D.lineFeature++;break;case"Polygon":m(L.coordinates,j,D,w,U),j.properties.push(M(U,_)),D.polygonFeature++;break;case"MultiPolygon":b(L.coordinates,j,D,w,U),j.properties.push(M(U,_)),D.polygonFeature++;break;default:throw new Error("Invalid geometry type")}D.feature++}}catch(t){B.e(t)}finally{B.f()}return function(t,e,n,r){var a={points:i(i({},t),{},{positions:{value:t.positions,size:r},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},type:"Point"}),lines:i(i({},e),{},{pathIndices:{value:e.pathIndices,size:1},positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},type:"LineString"}),polygons:i(i({},n),{},{polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},positions:{value:n.positions,size:r},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},type:"Polygon"})};for(var s in a)for(var o in a[s].numericProps)a[s].numericProps[o]={value:a[s].numericProps[o],size:1};return a}(S,I,j,w)}function y(t,e,n,r,i){e.positions.set(t,n.pointPosition*r),e.globalFeatureIds[n.pointPosition]=n.feature,e.featureIds[n.pointPosition]=n.pointFeature,g(e,i,n.pointPosition,1),n.pointPosition++}function p(t,e,n,r,i){var a,s=o(t);try{for(s.s();!(a=s.n()).done;){y(a.value,e,n,r,i)}}catch(t){s.e(t)}finally{s.f()}}function d(t,e,n,r,i){e.pathIndices[n.linePath]=n.linePosition,n.linePath++,w(e.positions,t,n.linePosition,r);var a=t.length;g(e,i,n.linePosition,a),e.globalFeatureIds.set(new Uint32Array(a).fill(n.feature),n.linePosition),e.featureIds.set(new Uint32Array(a).fill(n.lineFeature),n.linePosition),n.linePosition+=a}function v(t,e,n,r,i){var a,s=o(t);try{for(s.s();!(a=s.n()).done;){d(a.value,e,n,r,i)}}catch(t){s.e(t)}finally{s.f()}}function m(t,e,n,r,i){e.polygonIndices[n.polygonObject]=n.polygonPosition,n.polygonObject++;var a,s=o(t);try{for(s.s();!(a=s.n()).done;){var h=a.value;e.primitivePolygonIndices[n.polygonRing]=n.polygonPosition,n.polygonRing++,w(e.positions,h,n.polygonPosition,r);var u=h.length;g(e,i,n.polygonPosition,u),e.globalFeatureIds.set(new Uint32Array(u).fill(n.feature),n.polygonPosition),e.featureIds.set(new Uint32Array(u).fill(n.polygonFeature),n.polygonPosition),n.polygonPosition+=u}}catch(t){s.e(t)}finally{s.f()}}function b(t,e,n,r,i){var a,s=o(t);try{for(s.s();!(a=s.n()).done;){m(a.value,e,n,r,i)}}catch(t){s.e(t)}finally{s.f()}}function g(t,e,n,r){for(var i in t.numericProps)i in e&&t.numericProps[i].set(new Array(r).fill(e[i]),n)}function M(t,e){var n={};for(var r in t)e.includes(r)||(n[r]=t[r]);return n}function w(t,e,n,r){var i,a=n*r,s=o(e);try{for(s.s();!(i=s.n()).done;){var h=i.value;t.set(h,a),a+=r}}catch(t){s.e(t)}finally{s.f()}}function _(t){var e;return(e=[]).concat.apply(e,s(t))}e.TEST_EXPORTS=l},function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){return function(t){var e,n=[],r=a(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(0!==i.featureIds.value.length){for(var s=0,o=i.featureIds.value[0],h=0;h<i.featureIds.value.length;h++){var u=i.featureIds.value[h];u!==o&&(n.push(l(i,s,h)),s=h,o=u)}n.push(l(i,s,i.featureIds.value.length))}}}catch(t){r.e(t)}finally{r.f()}return n}(u(t,e))}function h(t,e,n){switch(t.type){case"Point":return function(t,e,n){var r=c(t.positions,e,n);if(r.length>1)return{type:"MultiPoint",coordinates:r};return{type:"Point",coordinates:r[0]}}(t,e,n);case"LineString":return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=t.positions,i=t.pathIndices.value.filter((function(t){return t>=e&&t<=n})),a=i.length>2;if(!a){var s=c(r,i[0],i[1]);return{type:"LineString",coordinates:s}}for(var o=[],h=0;h<i.length-1;h++){var u=c(r,i[h],i[h+1]);o.push(u)}return{type:"MultiLineString",coordinates:o}}(t,e,n);case"Polygon":return function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=e.positions,a=e.polygonIndices.value.filter((function(t){return t>=n&&t<=r})),s=e.primitivePolygonIndices.value.filter((function(t){return t>=n&&t<=r})),o=a.length>2;if(!o){for(var h=[],u=0;u<s.length-1;u++){var l=s[u],f=s[u+1],y=c(i,l,f);h.push(y)}return{type:"Polygon",coordinates:h}}for(var p=[],d=0;d<a.length-1;d++){var v=a[d],m=a[d+1],b=t(e,v,m).coordinates;p.push(b)}return{type:"MultiPolygon",coordinates:p}}(t,e,n);default:var r=t;throw new Error("Unsupported geometry type: ".concat(null==r?void 0:r.type))}}function u(t,e){if(!Boolean(t.points||t.lines||t.polygons))return t.type=e||function(t){if(t.pathIndices)return"LineString";if(t.polygonIndices)return"Polygon";return"Point"}(t),[t];var n=[];return t.points&&(t.points.type="Point",n.push(t.points)),t.lines&&(t.lines.type="LineString",n.push(t.lines)),t.polygons&&(t.polygons.type="Polygon",n.push(t.polygons)),n}function l(t,e,n){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:"Feature",geometry:h(t,e,n),properties:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Object.assign({},t.properties[t.featureIds.value[e]]);for(var r in t.numericProps)n[r]=t.numericProps[r].value[e];return n}(t,e,n)},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.fields&&t.fields[t.featureIds.value[e]]}(t,e,n))}function c(t,e,n){e=e||0,n=n||t.value.length/t.size;for(var r=[],i=e;i<n;i++){for(var a=Array(),s=i*t.size;s<(i+1)*t.size;s++)a.push(Number(t.value[s]));r.push(a)}return r}Object.defineProperty(e,"__esModule",{value:!0}),e.binaryToGeojson=function(t,e){var n=null==e?void 0:e.globalFeatureId;if(void 0!==n)return function(t,e){var n,r=a(u(t));try{for(r.s();!(n=r.n()).done;){for(var i=n.value,s=0,o=i.featureIds.value[0],h=0;h<i.featureIds.value.length;h++){var c=i.featureIds.value[h];if(c!==o){if(e===i.globalFeatureIds.value[s])return l(i,s,h);s=h,o=c}}if(e===i.globalFeatureIds.value[s])return l(i,s,i.featureIds.value.length)}}catch(t){r.e(t)}finally{r.f()}throw new Error("featureId:".concat(e," not found"))}(t,n);return o(t,null==e?void 0:e.type)},e.binaryToGeoJson=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"feature";switch(n){case"feature":return o(t,e);case"geometry":return h(t);default:throw new Error(n)}},e.binaryToGeometry=h},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){for(var n=t.positions,r=0;r<n.value.length;r+=n.size){var i=e(Array.from(n.value.subarray(r,r+n.size)));n.value.set(i,r)}}function a(t,e){return function(t){return Number.isFinite(t[0])&&Number.isFinite(t[1])}(t)?e(t):t.map((function(t){return a(t,e)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.transformBinaryCoords=function(t,e){t.points&&i(t.points,e);t.lines&&i(t.lines,e);t.polygons&&i(t.polygons,e);return t},e.transformGeoJsonCoords=function(t,e){var n,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw s}}}}(t);try{for(i.s();!(n=i.n()).done;){var s=n.value;s.geometry.coordinates=a(s.geometry.coordinates,e)}}catch(t){i.e(t)}finally{i.f()}return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseShx=function(t){for(var e=new DataView(t,0,100),n=(0,r.parseSHPHeader)(e).length-100,i=new DataView(t,100,n),a=new Int32Array(n),s=new Int32Array(n),o=0;o<n/8;o++)a[o]=i.getInt32(8*o,!1),s[o]=i.getInt32(8*o+4,!1);return{offsets:a,lengths:s}};var r=n(3)},function(t,e,n){"use strict";function r(t){return new s(t)}function i(t){return function(){return new a(t.apply(this,arguments))}}function a(t){var e,n;function r(e,n){try{var a=t[e](n),o=a.value,h=o instanceof s;Promise.resolve(h?o.wrapped:o).then((function(t){h?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function s(t){this.wrapped=t}function o(){return(o=i(regeneratorRuntime.mark((function t(e,n){var i,a,s,o,u,l,c,f,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],a=[],s=!1,o=!1;case 4:if(s||o){t.next=27;break}if(0!==i.length||s){t.next=14;break}return t.next=8,r(e.next());case 8:u=t.sent,l=u.value,u.done?s=!0:i=l,t.next=21;break;case 14:if(0!==a.length||o){t.next=21;break}return t.next=17,r(n.next());case 17:c=t.sent,f=c.value,c.done?o=!0:a=f;case 21:if(!(y=h(i,a))){t.next=25;break}return t.next=25,y;case 25:t.next=4;break;case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t,e){var n=Math.min(t.length,e.length);if(0===n)return null;var r=[t.slice(0,n),e.slice(0,n)];return t.splice(0,n),e.splice(0,n),r}Object.defineProperty(e,"__esModule",{value:!0}),e.zipBatchIterators=function(t,e){return o.apply(this,arguments)},a.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},a.prototype.next=function(t){return this._invoke("next",t)},a.prototype.throw=function(t){return this._invoke("throw",t)},a.prototype.return=function(t){return this._invoke("return",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDBF=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dbf||{},r=n.encoding,i=new v({encoding:r});i.write(t),i.end();var a=i.result,s=a.data,o=a.schema;switch(e.tables&&e.tables.format){case"table":return{schema:o,rows:s};case"rows":default:return s}},e.parseDBFInBatches=function(t){return m.apply(this,arguments)};var r,i=n(22),a=(r=n(2))&&r.__esModule?r:{default:r};function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){h=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(h)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return new y(t)}function c(t){return function(){return new f(t.apply(this,arguments))}}function f(t){var e,n;function r(e,n){try{var a=t[e](n),s=a.value,o=s instanceof y;Promise.resolve(o?s.wrapped:s).then((function(t){o?r("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(a,s){var o={key:t,arg:i,resolve:a,reject:s,next:null};n?n=n.next=o:(e=n=o,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function y(t){this.wrapped=t}function p(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)}f.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},f.prototype.next=function(t){return this._invoke("next",t)},f.prototype.throw=function(t){return this._invoke("throw",t)},f.prototype.return=function(t){return this._invoke("return",t)};var d;!function(t){t[t.START=0]="START",t[t.FIELD_DESCRIPTORS=1]="FIELD_DESCRIPTORS",t[t.FIELD_PROPERTIES=2]="FIELD_PROPERTIES",t[t.END=3]="END",t[t.ERROR=4]="ERROR"}(d||(d={}));var v=function(){function t(e){var n=e.encoding;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,"binaryReader",new a.default),u(this,"textDecoder",void 0),u(this,"state",d.START),u(this,"result",{data:[]}),this.textDecoder=new TextDecoder(n)}var e,n,r;return e=t,(n=[{key:"write",value:function(t){this.binaryReader.write(t),this.state=b(this.state,this.result,this.binaryReader,this.textDecoder)}},{key:"end",value:function(){this.binaryReader.end(),this.state=b(this.state,this.result,this.binaryReader,this.textDecoder),this.state!==d.END&&(this.state=d.ERROR,this.result.error="DBF incomplete file")}}])&&h(e.prototype,n),r&&h(e,r),t}();function m(){return(m=c(regeneratorRuntime.mark((function t(e){var n,r,i,a,s,o,h,u,c,f,y,d,m=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=m.length>1&&void 0!==m[1]?m[1]:{},r=n.dbf||{},i=r.encoding,a=new v({encoding:i}),s=!1,o=!0,h=!1,t.prev=7,c=p(e);case 9:return t.next=11,l(c.next());case 11:return f=t.sent,o=f.done,t.next=15,l(f.value);case 15:if(y=t.sent,o){t.next=30;break}if(d=y,a.write(d),s||!a.result.dbfHeader){t.next=23;break}return s=!0,t.next=23,a.result.dbfHeader;case 23:if(!(a.result.data.length>0)){t.next=27;break}return t.next=26,a.result.data;case 26:a.result.data=[];case 27:o=!0,t.next=9;break;case 30:t.next=36;break;case 32:t.prev=32,t.t0=t.catch(7),h=!0,u=t.t0;case 36:if(t.prev=36,t.prev=37,o||null==c.return){t.next=41;break}return t.next=41,l(c.return());case 41:if(t.prev=41,!h){t.next=44;break}throw u;case 44:return t.finish(41);case 45:return t.finish(36);case 46:if(a.end(),!(a.result.data.length>0)){t.next=50;break}return t.next=50,a.result.data;case 50:case"end":return t.stop()}}),t,null,[[7,32,36,46],[37,,41,45]])})))).apply(this,arguments)}function b(t,e,n,r){for(;;)try{switch(t){case d.ERROR:case d.END:return t;case d.START:var a=n.getDataView(32,"DBF header");if(!a)return t;e.dbfHeader={year:(p=a).getUint8(1)+1900,month:p.getUint8(2),day:p.getUint8(3),nRecords:p.getUint32(4,!0),headerLength:p.getUint16(8,!0),recordLength:p.getUint16(10,!0),languageDriver:p.getUint8(29)},e.progress={bytesUsed:0,rowsTotal:e.dbfHeader.nRecords,rows:0},t=d.FIELD_DESCRIPTORS;break;case d.FIELD_DESCRIPTORS:var s=n.getDataView(e.dbfHeader.headerLength-32,"DBF field descriptors");if(!s)return t;e.dbfFields=g(s,r),e.schema=new i.Schema(e.dbfFields.map((function(t){return x(t)}))),t=d.FIELD_PROPERTIES,n.skip(1);break;case d.FIELD_PROPERTIES:for(var o=(null==e?void 0:e.dbfHeader)||{},h=o.recordLength,u=void 0===h?0:h,l=o.nRecords,c=void 0===l?0:l;e.data.length<c;){var f=n.getDataView(u-1);if(!f)return t;n.skip(1);var y=M(f,e.dbfFields,r);e.data.push(y),e.progress.rows=e.data.length}t=d.END;break;default:return t=d.ERROR,e.error="illegal parser state ".concat(t),t}}catch(n){return t=d.ERROR,e.error="DBF parsing failed: ".concat(n.message),t}var p}function g(t,e){for(var n=(t.byteLength-1)/32,r=[],i=0,a=0;a<n;a++){var s=e.decode(new Uint8Array(t.buffer,t.byteOffset+i,11)).replace(/\u0000/g,"");r.push({name:s,dataType:String.fromCharCode(t.getUint8(i+11)),fieldLength:t.getUint8(i+16),decimal:t.getUint8(i+17)}),i+=32}return r}function M(t,e,n){var r,i={},a=0,o=s(e);try{for(o.s();!(r=o.n()).done;){var h=r.value,u=n.decode(new Uint8Array(t.buffer,t.byteOffset+a,h.fieldLength));i[h.name]=w(u,h.dataType),a+=h.fieldLength}}catch(t){o.e(t)}finally{o.f()}return i}function w(t,e){switch(e){case"B":return _(t);case"C":return function(t){return t.trim()||null}(t);case"F":case"N":case"O":return _(t);case"D":return r=t,Date.UTC(r.slice(0,4),parseInt(r.slice(4,6),10)-1,r.slice(6,8));case"L":return!/^[nf]$/i.test(n=t)&&(!!/^[yt]$/i.test(n)||null);default:throw new Error("Unsupported data type")}var n,r}function _(t){var e=parseFloat(t);return isNaN(e)?null:e}function x(t){var e=t.name,n=t.dataType;t.fieldLength,t.decimal;switch(n){case"B":return new i.Field(e,new i.Float64,!0);case"C":return new i.Field(e,new i.Utf8,!0);case"F":case"N":case"O":return new i.Field(e,new i.Float64,!0);case"D":return new i.Field(e,new i.TimestampMillisecond,!0);case"L":return new i.Field(e,new i.Bool,!0);default:throw new Error("Unsupported data type")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TableBatchBuilder",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"RowTableBatchAggregator",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"ColumnarTableBatchAggregator",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"convertToObjectRow",{enumerable:!0,get:function(){return s.convertToObjectRow}}),Object.defineProperty(e,"convertToArrayRow",{enumerable:!0,get:function(){return s.convertToArrayRow}}),Object.defineProperty(e,"getMeshSize",{enumerable:!0,get:function(){return o.getMeshSize}}),Object.defineProperty(e,"getMeshBoundingBox",{enumerable:!0,get:function(){return o.getMeshBoundingBox}}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return h.Schema}}),Object.defineProperty(e,"Field",{enumerable:!0,get:function(){return h.Field}}),Object.defineProperty(e,"DataType",{enumerable:!0,get:function(){return h.DataType}}),Object.defineProperty(e,"Null",{enumerable:!0,get:function(){return h.Null}}),Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return h.Binary}}),Object.defineProperty(e,"Bool",{enumerable:!0,get:function(){return h.Bool}}),Object.defineProperty(e,"Int",{enumerable:!0,get:function(){return h.Int}}),Object.defineProperty(e,"Int8",{enumerable:!0,get:function(){return h.Int8}}),Object.defineProperty(e,"Int16",{enumerable:!0,get:function(){return h.Int16}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return h.Int32}}),Object.defineProperty(e,"Int64",{enumerable:!0,get:function(){return h.Int64}}),Object.defineProperty(e,"Uint8",{enumerable:!0,get:function(){return h.Uint8}}),Object.defineProperty(e,"Uint16",{enumerable:!0,get:function(){return h.Uint16}}),Object.defineProperty(e,"Uint32",{enumerable:!0,get:function(){return h.Uint32}}),Object.defineProperty(e,"Uint64",{enumerable:!0,get:function(){return h.Uint64}}),Object.defineProperty(e,"Float",{enumerable:!0,get:function(){return h.Float}}),Object.defineProperty(e,"Float16",{enumerable:!0,get:function(){return h.Float16}}),Object.defineProperty(e,"Float32",{enumerable:!0,get:function(){return h.Float32}}),Object.defineProperty(e,"Float64",{enumerable:!0,get:function(){return h.Float64}}),Object.defineProperty(e,"Utf8",{enumerable:!0,get:function(){return h.Utf8}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return h.Date}}),Object.defineProperty(e,"DateDay",{enumerable:!0,get:function(){return h.DateDay}}),Object.defineProperty(e,"DateMillisecond",{enumerable:!0,get:function(){return h.DateMillisecond}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return h.Time}}),Object.defineProperty(e,"TimeMillisecond",{enumerable:!0,get:function(){return h.TimeMillisecond}}),Object.defineProperty(e,"TimeSecond",{enumerable:!0,get:function(){return h.TimeSecond}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return h.Timestamp}}),Object.defineProperty(e,"TimestampSecond",{enumerable:!0,get:function(){return h.TimestampSecond}}),Object.defineProperty(e,"TimestampMillisecond",{enumerable:!0,get:function(){return h.TimestampMillisecond}}),Object.defineProperty(e,"TimestampMicrosecond",{enumerable:!0,get:function(){return h.TimestampMicrosecond}}),Object.defineProperty(e,"TimestampNanosecond",{enumerable:!0,get:function(){return h.TimestampNanosecond}}),Object.defineProperty(e,"Interval",{enumerable:!0,get:function(){return h.Interval}}),Object.defineProperty(e,"IntervalDayTime",{enumerable:!0,get:function(){return h.IntervalDayTime}}),Object.defineProperty(e,"IntervalYearMonth",{enumerable:!0,get:function(){return h.IntervalYearMonth}}),Object.defineProperty(e,"FixedSizeList",{enumerable:!0,get:function(){return h.FixedSizeList}}),Object.defineProperty(e,"deduceTableSchema",{enumerable:!0,get:function(){return u.deduceTableSchema}}),Object.defineProperty(e,"getTypeInfo",{enumerable:!0,get:function(){return l.getTypeInfo}}),Object.defineProperty(e,"getArrowTypeFromTypedArray",{enumerable:!0,get:function(){return c.getArrowTypeFromTypedArray}}),Object.defineProperty(e,"AsyncQueue",{enumerable:!0,get:function(){return f.default}});var r=y(n(23)),i=y(n(5)),a=y(n(7)),s=n(6),o=n(25),h=n(1),u=n(31),l=n(32),c=n(33),f=y(n(34));function y(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(24)),i=s(n(5)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={shape:"array-row-table",batchSize:"auto",batchDebounceMs:0,limit:0,_limitMB:0},f=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"schema",void 0),l(this,"options",void 0),l(this,"aggregator",null),l(this,"batchCount",0),l(this,"bytesUsed",0),l(this,"isChunkComplete",!1),l(this,"lastBatchEmittedMs",Date.now()),l(this,"totalLength",0),l(this,"totalBytes",0),l(this,"rowBytes",0),this.schema=e,this.options=h(h({},c),n)}var e,n,s;return e=t,(n=[{key:"limitReached",value:function(){var t,e;return!!(Boolean(null===(t=this.options)||void 0===t?void 0:t.limit)&&this.totalLength>=this.options.limit)||!!(Boolean(null===(e=this.options)||void 0===e?void 0:e._limitMB)&&this.totalBytes/1e6>=this.options._limitMB)}},{key:"addRow",value:function(t){this.limitReached()||(this.totalLength++,this.rowBytes=this.rowBytes||this._estimateRowMB(t),this.totalBytes+=this.rowBytes,Array.isArray(t)?this.addArrayRow(t):this.addObjectRow(t))}},{key:"addArrayRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addArrayRow(t)}},{key:"addObjectRow",value:function(t){if(!this.aggregator){var e=this._getTableBatchType();this.aggregator=new e(this.schema,this.options)}this.aggregator.addObjectRow(t)}},{key:"chunkComplete",value:function(t){t instanceof ArrayBuffer&&(this.bytesUsed+=t.byteLength),"string"==typeof t&&(this.bytesUsed+=t.length),this.isChunkComplete=!0}},{key:"getFullBatch",value:function(t){return this._isFull()?this._getBatch(t):null}},{key:"getFinalBatch",value:function(t){return this._getBatch(t)}},{key:"_estimateRowMB",value:function(t){return Array.isArray(t)?8*t.length:8*Object.keys(t).length}},{key:"_isFull",value:function(){if(!this.aggregator||0===this.aggregator.rowCount())return!1;if("auto"===this.options.batchSize){if(!this.isChunkComplete)return!1}else if(this.options.batchSize>this.aggregator.rowCount())return!1;return!(this.options.batchDebounceMs>Date.now()-this.lastBatchEmittedMs||(this.isChunkComplete=!1,this.lastBatchEmittedMs=Date.now(),0))}},{key:"_getBatch",value:function(t){if(!this.aggregator)return null;null!=t&&t.bytesUsed&&(this.bytesUsed=t.bytesUsed);var e=this.aggregator.getBatch();return e.count=this.batchCount,e.bytesUsed=this.bytesUsed,Object.assign(e,t),this.batchCount++,this.aggregator=null,e}},{key:"_getTableBatchType",value:function(){switch(this.options.shape){case"row-table":return r.default;case"array-row-table":case"object-row-table":return i.default;case"columnar-table":return a.default;case"arrow-table":if(!t.ArrowBatch)throw new Error("TableBatchBuilder");return t.ArrowBatch;default:throw new Error("TableBatchBuilder")}}}])&&u(e.prototype,n),s&&u(e,s),t}();e.default=f,l(f,"ArrowBatch",void 0)},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"schema",void 0),i(this,"options",void 0),i(this,"length",0),i(this,"rows",null),i(this,"cursor",0),i(this,"_headers",[]),this.options=n,this.schema=e,!Array.isArray(e))for(var r in this._headers=[],e)this._headers[e[r].index]=e[r].name}var e,n,a;return e=t,(n=[{key:"rowCount",value:function(){return this.length}},{key:"addArrayRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"addObjectRow",value:function(t,e){Number.isFinite(e)&&(this.cursor=e),this.rows=this.rows||new Array(100),this.rows[this.length]=t,this.length++}},{key:"getBatch",value:function(){var t=this.rows;return t?(t=t.slice(0,this.length),this.rows=null,{shape:this.options.shape,batchType:"data",data:t,length:this.length,schema:this.schema,cursor:this.cursor}):null}}])&&r(e.prototype,n),a&&r(e,a),t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMeshSize=function(t){var e=0;for(var n in t){var r=t[n];ArrayBuffer.isView(r)&&(e+=r.byteLength*r.BYTES_PER_ELEMENT)}return e},e.getMeshBoundingBox=function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,s=-1/0,o=t.POSITION?t.POSITION.value:[],h=o&&o.length,u=0;u<h;u+=3){var l=o[u],c=o[u+1],f=o[u+2];e=l<e?l:e,n=c<n?c:n,r=f<r?f:r,i=l>i?l:i,a=c>a?c:a,s=f>s?f:s}return[[e,n,r],[i,a,s]]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(27);function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){h=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(h)throw a}}}}function s(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,"fields",void 0),u(this,"metadata",void 0),(0,r.assert)(Array.isArray(e)),function(t){var e,n={},r=a(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.name]&&console.warn("Schema: duplicated field name",i.name,i),n[i.name]=!0}}catch(t){r.e(t)}finally{r.f()}}(e),this.fields=e,this.metadata=n||new Map}var e,n,i;return e=t,(n=[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var a=0,s=r;a<s.length;a++){var o=s[a];e[o]=!0}var h=this.fields.filter((function(t){return e[t.name]}));return new t(h,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=r.map((function(t){return e.fields[t]})).filter(Boolean);return new t(a,this.metadata)}},{key:"assign",value:function(e){var n,r=this.metadata;if(e instanceof t){var i=e;n=i.fields,r=c(c(new Map,this.metadata),i.metadata)}else n=e;var s,o=Object.create(null),h=a(this.fields);try{for(h.s();!(s=h.n()).done;){var u=s.value;o[u.name]=u}}catch(t){h.e(t)}finally{h.f()}var l,f=a(n);try{for(f.s();!(l=f.n()).done;){var y=l.value;o[y.name]=y}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(o),r)}}])&&h(e.prototype,n),i&&h(e,i),t}();function c(t,e){return new Map([].concat(i(t||new Map),i(e||new Map)))}e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;r(this,t),a(this,"name",void 0),a(this,"type",void 0),a(this,"nullable",void 0),a(this,"metadata",void 0),this.name=e,this.type=n,this.nullable=i,this.metadata=s}var e,n,s;return e=t,(n=[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])&&i(e.prototype,n),s&&i(e,s),t}();e.default=s},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Type",{enumerable:!0,get:function(){return c.Type}}),e.FixedSizeList=e.IntervalYearMonth=e.IntervalDayTime=e.Interval=e.TimestampNanosecond=e.TimestampMicrosecond=e.TimestampMillisecond=e.TimestampSecond=e.Timestamp=e.TimeMillisecond=e.TimeSecond=e.Time=e.DateMillisecond=e.DateDay=e.Date=e.Utf8=e.Binary=e.Float64=e.Float32=e.Float16=e.Float=e.Uint64=e.Uint32=e.Uint16=e.Uint8=e.Int64=e.Int32=e.Int16=e.Int8=e.Int=e.Bool=e.Null=e.DataType=void 0;var i,a,s,o,h,u,l,c=n(30);function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?m(t):e}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e,n){return e&&M(t.prototype,e),n&&M(t,n),t}var _=function(){function t(){g(this,t)}return w(t,[{key:"typeId",get:function(){return c.Type.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===c.Type.Null}},{key:"isInt",value:function(t){return t&&t.typeId===c.Type.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===c.Type.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===c.Type.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===c.Type.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===c.Type.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===c.Type.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===c.Type.Date}},{key:"isTime",value:function(t){return t&&t.typeId===c.Type.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===c.Type.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===c.Type.Interval}},{key:"isList",value:function(t){return t&&t.typeId===c.Type.List}},{key:"isStruct",value:function(t){return t&&t.typeId===c.Type.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===c.Type.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===c.Type.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===c.Type.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===c.Type.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===c.Type.Dictionary}}]),t}();e.DataType=_;var x=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.apply(this,arguments)}return w(n,[{key:"typeId",get:function(){return c.Type.Null}},{key:Symbol.toStringTag,get:function(){return"Null"}},{key:"toString",value:function(){return"Null"}}]),n}(_);e.Null=x;var P=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.apply(this,arguments)}return w(n,[{key:"typeId",get:function(){return c.Type.Bool}},{key:Symbol.toStringTag,get:function(){return"Bool"}},{key:"toString",value:function(){return"Bool"}}]),n}(_);e.Bool=P,i=Symbol.toStringTag;var O=function(t){y(n,t);var e=d(n);function n(t,r){var i;return g(this,n),f(m(i=e.call(this)),"isSigned",void 0),f(m(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=r,i}return w(n,[{key:"typeId",get:function(){return c.Type.Int}},{key:i,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(_);e.Int=O;var S=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,8)}return n}(O);e.Int8=S;var I=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,16)}return n}(O);e.Int16=I;var j=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,32)}return n}(O);e.Int32=j;var k=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!0,64)}return n}(O);e.Int64=k;var T=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,8)}return n}(O);e.Uint8=T;var E=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,16)}return n}(O);e.Uint16=E;var A=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,32)}return n}(O);e.Uint32=A;var C=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,!1,64)}return n}(O);e.Uint64=C;var N=16,R=32,D=64;a=Symbol.toStringTag;var B=function(t){y(n,t);var e=d(n);function n(t){var r;return g(this,n),f(m(r=e.call(this)),"precision",void 0),r.precision=t,r}return w(n,[{key:"typeId",get:function(){return c.Type.Float}},{key:a,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),n}(_);e.Float=B;var F=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,N)}return n}(B);e.Float16=F;var L=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,R)}return n}(B);e.Float32=L;var U=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,D)}return n}(B);e.Float64=U;var q=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this)}return w(n,[{key:"typeId",get:function(){return c.Type.Binary}},{key:"toString",value:function(){return"Binary"}},{key:Symbol.toStringTag,get:function(){return"Binary"}}]),n}(_);e.Binary=q;var z=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.apply(this,arguments)}return w(n,[{key:"typeId",get:function(){return c.Type.Utf8}},{key:Symbol.toStringTag,get:function(){return"Utf8"}},{key:"toString",value:function(){return"Utf8"}}]),n}(_);e.Utf8=z;var G={DAY:0,MILLISECOND:1};s=Symbol.toStringTag;var H=function(t){y(n,t);var e=d(n);function n(t){var r;return g(this,n),f(m(r=e.call(this)),"unit",void 0),r.unit=t,r}return w(n,[{key:"typeId",get:function(){return c.Type.Date}},{key:s,get:function(){return"Date"}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(G[this.unit],">")}}]),n}(_);e.Date=H;var W=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,G.DAY)}return n}(H);e.DateDay=W;var Q=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,G.MILLISECOND)}return n}(H);e.DateMillisecond=Q;var Y={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9};o=Symbol.toStringTag;var V=function(t){y(n,t);var e=d(n);function n(t,r){var i;return g(this,n),f(m(i=e.call(this)),"unit",void 0),f(m(i),"bitWidth",void 0),i.unit=t,i.bitWidth=r,i}return w(n,[{key:"typeId",get:function(){return c.Type.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Y[this.unit],">")}},{key:o,get:function(){return"Time"}}]),n}(_);e.Time=V;var X=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,Y.SECOND,32)}return n}(V);e.TimeSecond=X;var J=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,Y.MILLISECOND,32)}return n}(V);e.TimeMillisecond=J,h=Symbol.toStringTag;var K=function(t){y(n,t);var e=d(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return g(this,n),f(m(r=e.call(this)),"unit",void 0),f(m(r),"timezone",void 0),r.unit=t,r.timezone=i,r}return w(n,[{key:"typeId",get:function(){return c.Type.Timestamp}},{key:h,get:function(){return"Timestamp"}},{key:"toString",value:function(){return"Timestamp<".concat(Y[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(_);e.Timestamp=K;var Z=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.SECOND,t)}return n}(K);e.TimestampSecond=Z;var $=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.MILLISECOND,t)}return n}(K);e.TimestampMillisecond=$;var tt=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.MICROSECOND,t)}return n}(K);e.TimestampMicrosecond=tt;var et=function(t){y(n,t);var e=d(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return g(this,n),e.call(this,Y.NANOSECOND,t)}return n}(K);e.TimestampNanosecond=et;var nt={DAY_TIME:0,YEAR_MONTH:1};u=Symbol.toStringTag;var rt=function(t){y(n,t);var e=d(n);function n(t){var r;return g(this,n),f(m(r=e.call(this)),"unit",void 0),r.unit=t,r}return w(n,[{key:"typeId",get:function(){return c.Type.Interval}},{key:u,get:function(){return"Interval"}},{key:"toString",value:function(){return"Interval<".concat(nt[this.unit],">")}}]),n}(_);e.Interval=rt;var it=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,nt.DAY_TIME)}return n}(rt);e.IntervalDayTime=it;var at=function(t){y(n,t);var e=d(n);function n(){return g(this,n),e.call(this,nt.YEAR_MONTH)}return n}(rt);e.IntervalYearMonth=at,l=Symbol.toStringTag;var st=function(t){y(n,t);var e=d(n);function n(t,r){var i;return g(this,n),f(m(i=e.call(this)),"listSize",void 0),f(m(i),"children",void 0),i.listSize=t,i.children=[r],i}return w(n,[{key:"typeId",get:function(){return c.Type.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:l,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(_);e.FixedSizeList=st},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Type=void 0,e.Type=r,function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(r||(e.Type=r={}))},function(t,e,n){"use strict";function r(t){return t instanceof Date?Date:t instanceof Number?Float32Array:"string"==typeof t?String:null}Object.defineProperty(e,"__esModule",{value:!0}),e.deduceTableSchema=function(t,e){var n=Array.isArray(t)?function(t){var e={};if(t.length){var n=t[0];for(var i in n){var a=n[i];e[i]=r(a)}}return e}(t):function(t){var e={};for(var n in t){var i=t[n];if(ArrayBuffer.isView(i))e[n]=i.constructor;else if(i.length){var a=i[0];e[n]=r(a)}e[n]=e[n]||null}return e}(t);return Object.assign(n,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTypeInfo=function(t){return{typeId:t.typeId,ArrayType:t.ArrayType,typeName:t.toString(),typeEnumName:a(t.typeId),precision:t.precision}};var r=n(1);var i=null;function a(t){if(!i)for(var e in i={},r.Type)i[r.Type[e]]=e;return i[t]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getArrowTypeFromTypedArray=function(t){switch(t.constructor){case Int8Array:return new r.Int8;case Uint8Array:return new r.Uint8;case Int16Array:return new r.Int16;case Uint16Array:return new r.Uint16;case Int32Array:return new r.Int32;case Uint32Array:return new r.Uint32;case Float32Array:return new r.Float32;case Float64Array:return new r.Float64;default:throw new Error("array type not supported")}};var r=n(1)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;function a(t,e,n,r,i,a,s){try{var o=t[a](s),h=o.value}catch(t){return void n(t)}o.done?e(h):Promise.resolve(h).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var s=t.apply(e,n);function o(t){a(s,r,i,o,h,"next",t)}function h(t){a(s,r,i,o,h,"throw",t)}o(void 0)}))}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}function c(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){var e="function"==typeof Map?new Map:void 0;return(f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return y(t,arguments,v(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,t)})(t)}function y(t,e,n){return(y=p()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&d(i,n.prototype),i}).apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.takeAsync=function(t){return g.apply(this,arguments)},e.default=void 0;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(i,t);var e,n,r=(e=i,n=p(),function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return c(this,t)});function i(){return h(this,i),r.apply(this,arguments)}return l(i,[{key:"enqueue",value:function(t){return this.push(t)}},{key:"dequeue",value:function(){return this.shift()}}]),i}(f(Array));i=Symbol.asyncIterator;var b=function(){function t(){h(this,t),o(this,"_values",void 0),o(this,"_settlers",void 0),o(this,"_closed",void 0),this._values=new m,this._settlers=new m,this._closed=!1}return l(t,[{key:"close",value:function(){for(;this._settlers.length>0;)this._settlers.dequeue().resolve({done:!0});this._closed=!0}},{key:i,value:function(){return this}},{key:"enqueue",value:function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.dequeue();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.enqueue(t)}},{key:"next",value:function(){var t=this;if(this._values.length>0){var e=this._values.dequeue();return e instanceof Error?Promise.reject(e):Promise.resolve({value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0})}return new Promise((function(e,n){t._settlers.enqueue({resolve:e,reject:n})}))}}]),t}();function g(){return(g=s(regeneratorRuntime.mark((function t(e){var n,r,i,a,s,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=o.length>1&&void 0!==o[1]?o[1]:1/0,r=[],i=e[Symbol.asyncIterator]();case 3:if(!(r.length<n)){t.next=14;break}return t.next=6,i.next();case 6:if(a=t.sent,s=a.value,!a.done){t.next=11;break}return t.abrupt("break",14);case 11:r.push(s),t.next=3;break;case 14:return t.abrupt("return",r);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.default=b},function(t,e,n){"use strict";n.r(e),n.d(e,"Proj4Projection",(function(){return Ce}));var r=484813681109536e-20,i=Math.PI/2,a=.017453292519943295,s=57.29577951308232,o=Math.PI/4,h=2*Math.PI,u=3.14159265359,l={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},c={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},f=/[\s_\-\/\(\)]/g;function y(t,e){if(t[e])return t[e];for(var n,r=Object.keys(t),i=e.toLowerCase().replace(f,""),a=-1;++a<r.length;)if((n=r[a]).toLowerCase().replace(f,"")===i)return t[n]}var p=function(t){var e,n,r,i={},s=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n=e.split("=");return n.push(!0),t[n[0].toLowerCase()]=n[1],t}),{}),o={proj:"projName",datum:"datumCode",rf:function(t){i.rf=parseFloat(t)},lat_0:function(t){i.lat0=t*a},lat_1:function(t){i.lat1=t*a},lat_2:function(t){i.lat2=t*a},lat_ts:function(t){i.lat_ts=t*a},lon_0:function(t){i.long0=t*a},lon_1:function(t){i.long1=t*a},lon_2:function(t){i.long2=t*a},alpha:function(t){i.alpha=parseFloat(t)*a},lonc:function(t){i.longc=t*a},x_0:function(t){i.x0=parseFloat(t)},y_0:function(t){i.y0=parseFloat(t)},k_0:function(t){i.k0=parseFloat(t)},k:function(t){i.k0=parseFloat(t)},a:function(t){i.a=parseFloat(t)},b:function(t){i.b=parseFloat(t)},r_a:function(){i.R_A=!0},zone:function(t){i.zone=parseInt(t,10)},south:function(){i.utmSouth=!0},towgs84:function(t){i.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){i.to_meter=parseFloat(t)},units:function(t){i.units=t;var e=y(c,t);e&&(i.to_meter=e.to_meter)},from_greenwich:function(t){i.from_greenwich=t*a},pm:function(t){var e=y(l,t);i.from_greenwich=(e||parseFloat(t))*a},nadgrids:function(t){"@null"===t?i.datumCode="none":i.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(i.axis=t)}};for(e in s)n=s[e],e in o?"function"==typeof(r=o[e])?r(n):i[r]=n:i[e]=n;return"string"==typeof i.datumCode&&"WGS84"!==i.datumCode&&(i.datumCode=i.datumCode.toLowerCase()),i},d=function(t){return new w(t).output()},v=/\s/,m=/[A-Za-z]/,b=/[A-Za-z84]/,g=/[,\]]/,M=/[\d\.E\-\+]/;function w(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function _(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var r=e?{}:t,i=n.reduce((function(t,e){return x(e,t),t}),r);e&&(t[e]=i)}function x(t,e){if(Array.isArray(t)){var n=t.shift();if("PARAMETER"===n&&(n=t.shift()),1===t.length)return Array.isArray(t[0])?(e[n]={},void x(t[0],e[n])):void(e[n]=t[0]);if(t.length)if("TOWGS84"!==n){if("AXIS"===n)return n in e||(e[n]=[]),void e[n].push(t);var r;switch(Array.isArray(n)||(e[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[n]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&x(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&x(t[3],e[n]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void _(e,n,t);default:for(r=-1;++r<t.length;)if(!Array.isArray(t[r]))return x(t,e[n]);return _(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}w.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;v.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},w.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(g.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},w.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},w.prototype.number=function(t){if(!M.test(t)){if(g.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},w.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},w.prototype.keyword=function(t){if(b.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!g.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},w.prototype.neutral=function(t){if(m.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(M.test(t))return this.word=t,void(this.state=3);if(!g.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},w.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function P(t){return.017453292519943295*t}var O=function(t){var e=d(t),n=e.shift(),r=e.shift();e.unshift(["name",r]),e.unshift(["type",n]);var i={};return x(e,i),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",n=0,r=t.AXIS.length;n<r;++n){var i=t.AXIS[n][0].toLowerCase();-1!==i.indexOf("north")?e+="n":-1!==i.indexOf("south")?e+="s":-1!==i.indexOf("east")?e+="e":-1!==i.indexOf("west")&&(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;function s(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",P],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",P],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",P],["lat0","latitude_of_origin",P],["lat0","standard_parallel_1",P],["lat1","standard_parallel_1",P],["lat2","standard_parallel_2",P],["azimuth","Azimuth"],["alpha","azimuth",P],["srsCode","name"]].forEach((function(e){return n=t,i=(r=e)[0],a=r[1],void(!(i in n)&&a in n&&(n[i]=n[a],3===r.length&&(n[i]=r[2](n[i]))));var n,r,i,a})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=P(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(i),i};function S(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?S[t]=p(arguments[1]):S[t]=O(arguments[1]):S[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?S.apply(e,t):S(t)}));if("string"==typeof t){if(t in S)return S[t]}else"EPSG"in t?S["EPSG:"+t.EPSG]=t:"ESRI"in t?S["ESRI:"+t.ESRI]=t:"IAU2000"in t?S["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(S);var I=S;var j=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var k=["3857","900913","3785","102113"];var T=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in I}(t))return I[t];if(function(t){return j.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=O(t);if(function(t){var e=y(t,"authority");if(e){var n=y(e,"epsg");return n&&k.indexOf(n)>-1}}(e))return I["EPSG:3857"];var n=function(t){var e=y(t,"extension");if(e)return y(e,"proj4")}(e);return n?p(n):e}return function(t){return"+"===t[0]}(t)?p(t):void 0},E=function(t,e){var n,r;if(t=t||{},!e)return t;for(r in e)void 0!==(n=e[r])&&(t[r]=n);return t},A=function(t,e,n){var r=t*e;return n/Math.sqrt(1-r*r)},C=function(t){return t<0?-1:1},N=function(t){return Math.abs(t)<=u?t:t-C(t)*h},R=function(t,e,n){var r=t*n,a=.5*t;return r=Math.pow((1-r)/(1+r),a),Math.tan(.5*(i-e))/r},D=function(t,e){for(var n,r,a=.5*t,s=i-2*Math.atan(e),o=0;o<=15;o++)if(n=t*Math.sin(s),s+=r=i-2*Math.atan(e*Math.pow((1-n)/(1+n),a))-s,Math.abs(r)<=1e-10)return s;return-9999};function B(t){return t}var F=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=A(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,n,r=t.x,a=t.y;if(a*s>90&&a*s<-90&&r*s>180&&r*s<-180)return null;if(Math.abs(Math.abs(a)-i)<=1e-10)return null;if(this.sphere)e=this.x0+this.a*this.k0*N(r-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(o+.5*a));else{var h=Math.sin(a),u=R(this.e,a,h);e=this.x0+this.a*this.k0*N(r-this.long0),n=this.y0-this.a*this.k0*Math.log(u)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,r=t.x-this.x0,a=t.y-this.y0;if(this.sphere)n=i-2*Math.atan(Math.exp(-a/(this.a*this.k0)));else{var s=Math.exp(-a/(this.a*this.k0));if(-9999===(n=D(this.e,s)))return null}return e=N(this.long0+r/(this.a*this.k0)),t.x=e,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:B,inverse:B,names:["longlat","identity"]}],L={},U=[];function q(t,e){var n=U.length;return t.names?(U[n]=t,t.names.forEach((function(t){L[t.toLowerCase()]=n})),this):(console.log(e),!0)}var z={start:function(){F.forEach(q)},add:q,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==L[e]&&U[L[e]]?U[L[e]]:void 0}},G={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},H=G.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};G.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var W={};W.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},W.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},W.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},W.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},W.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},W.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},W.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},W.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},W.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},W.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},W.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},W.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},W.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},W.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},W.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},W.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},W.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var Q=function(t,e,n,i,a,s){var o={};return o.datum_type=void 0===t||"none"===t?5:4,e&&(o.datum_params=e.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=1),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=r,o.datum_params[4]*=r,o.datum_params[5]*=r,o.datum_params[6]=o.datum_params[6]/1e6+1))),o.a=n,o.b=i,o.es=a,o.ep2=s,o};function Y(t,e){if(!(this instanceof Y))return new Y(t);e=e||function(t){if(t)throw t};var n=T(t);if("object"==typeof n){var r=Y.projections.get(n.projName);if(r){if(n.datumCode&&"none"!==n.datumCode){var i=y(W,n.datumCode);i&&(n.datum_params=i.towgs84?i.towgs84.split(","):null,n.ellps=i.ellipse,n.datumName=i.datumName?i.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84";var a,s,o,h,u,l,c,f=function(t,e,n,r,i){if(!t){var a=y(G,r);a||(a=H),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<1e-10)&&(i=!0,e=t),{a:t,b:e,rf:n,sphere:i}}(n.a,n.b,n.rf,n.ellps,n.sphere),p=(a=f.a,s=f.b,f.rf,o=n.R_A,l=((h=a*a)-(u=s*s))/h,c=0,o?(h=(a*=1-l*(.16666666666666666+l*(.04722222222222222+.022156084656084655*l)))*a,l=0):c=Math.sqrt(l),{es:l,e:c,ep2:(h-u)/u}),d=n.datum||Q(n.datumCode,n.datum_params,f.a,f.b,p.es,p.ep2);E(this,n),E(this,r),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=d,this.init(),e(null,this)}else e(t)}else e(t)}Y.projections=z,Y.projections.start();var V=Y;function X(t,e,n){var r,a,s,o,h=t.x,u=t.y,l=t.z?t.z:0;if(u<-i&&u>-1.001*i)u=-i;else if(u>i&&u<1.001*i)u=i;else{if(u<-i)return{x:-1/0,y:-1/0,z:t.z};if(u>i)return{x:1/0,y:1/0,z:t.z}}return h>Math.PI&&(h-=2*Math.PI),a=Math.sin(u),o=Math.cos(u),s=a*a,{x:((r=n/Math.sqrt(1-e*s))+l)*o*Math.cos(h),y:(r+l)*o*Math.sin(h),z:(r*(1-e)+l)*a}}function J(t,e,n,r){var a,s,o,h,u,l,c,f,y,p,d,v,m,b,g,M=t.x,w=t.y,_=t.z?t.z:0;if(a=Math.sqrt(M*M+w*w),s=Math.sqrt(M*M+w*w+_*_),a/n<1e-12){if(b=0,s/n<1e-12)return i,g=-r,{x:t.x,y:t.y,z:t.z}}else b=Math.atan2(w,M);o=_/s,f=(h=a/s)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*h*h)),y=o*u,m=0;do{m++,l=e*(c=n/Math.sqrt(1-e*y*y))/(c+(g=a*f+_*y-c*(1-e*y*y))),v=(d=o*(u=1/Math.sqrt(1-l*(2-l)*h*h)))*f-(p=h*(1-l)*u)*y,f=p,y=d}while(v*v>1e-24&&m<30);return{x:b,y:Math.atan(d/Math.abs(p)),z:g}}function K(t){return 1===t||2===t}var Z=function(t,e,n){return function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))}(t,e)||5===t.datum_type||5===e.datum_type?n:t.es!==e.es||t.a!==e.a||K(t.datum_type)||K(e.datum_type)?(n=X(n,t.es,t.a),K(t.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(2===e){var r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],h=n[5],u=n[6];return{x:u*(t.x-h*t.y+o*t.z)+r,y:u*(h*t.x+t.y-s*t.z)+i,z:u*(-o*t.x+s*t.y+t.z)+a}}}(n,t.datum_type,t.datum_params)),K(e.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(2===e){var r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],h=n[5],u=n[6],l=(t.x-r)/u,c=(t.y-i)/u,f=(t.z-a)/u;return{x:l+h*c-o*f,y:-h*l+c+s*f,z:o*l-s*c+f}}}(n,e.datum_type,e.datum_params)),J(n,e.es,e.a,e.b)):n},$=function(t,e,n){var r,i,a,s=n.x,o=n.y,h=n.z||0,u={};for(a=0;a<3;a++)if(!e||2!==a||void 0!==n.z)switch(0===a?(r=s,i=-1!=="ew".indexOf(t.axis[a])?"x":"y"):1===a?(r=o,i=-1!=="ns".indexOf(t.axis[a])?"y":"x"):(r=h,i="z"),t.axis[a]){case"e":case"w":case"n":case"s":u[i]=r;break;case"u":void 0!==n[i]&&(u.z=r);break;case"d":void 0!==n[i]&&(u.z=-r);break;default:return null}return u},tt=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e};function et(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function nt(t,e,n){var r;if(Array.isArray(n)&&(n=tt(n)),function(t){et(t.x),et(t.y)}(n),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(n=nt(t,r=new V("WGS84"),n),t=r),"enu"!==t.axis&&(n=$(t,!1,n)),"longlat"===t.projName)n={x:n.x*a,y:n.y*a,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;return t.from_greenwich&&(n.x+=t.from_greenwich),n=Z(t.datum,e.datum,n),e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*s,y:n.y*s,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),"enu"!==e.axis?$(e,!0,n):n}var rt=V("WGS84");function it(t,e,n){var r,i,a;return Array.isArray(n)?(r=nt(t,e,n)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(i=nt(t,e,n),2===(a=Object.keys(n)).length||a.forEach((function(r){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===r||"y"===r||"z"===r)return}else if("x"===r||"y"===r)return;i[r]=n[r]})),i)}function at(t){return t instanceof V?t:t.oProj?t.oProj:V(t)}var st=function(t,e,n){t=at(t);var r,i=!1;return void 0===e?(e=t,t=rt,i=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=rt,i=!0),e=at(e),n?it(t,e,n):(r={forward:function(n){return it(t,e,n)},inverse:function(n){return it(e,t,n)}},i&&(r.oProj=e),r)},ot=73,ht=79,ut={forward:lt,inverse:function(t){var e=pt(mt(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:ct};function lt(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,r="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(y=t.easting,p=t.northing,d=t.zoneNumber,v=vt(d),m=Math.floor(y/1e5),b=Math.floor(p/1e5)%20,i=m,a=b,s=v,o=s-1,h="AJSAJS".charCodeAt(o),u="AFAFAF".charCodeAt(o),l=h+i-1,c=u+a,f=!1,l>90&&(l=l-90+65-1,f=!0),(l===ot||h<ot&&l>ot||(l>ot||h<ot)&&f)&&l++,(l===ht||h<ht&&l>ht||(l>ht||h<ht)&&f)&&++l===ot&&l++,l>90&&(l=l-90+65-1),c>86?(c=c-86+65-1,f=!0):f=!1,(c===ot||u<ot&&c>ot||(c>ot||u<ot)&&f)&&c++,(c===ht||u<ht&&c>ht||(c>ht||u<ht)&&f)&&++c===ot&&c++,c>86&&(c=c-86+65-1),String.fromCharCode(l)+String.fromCharCode(c))+n.substr(n.length-5,e)+r.substr(r.length-5,e);var i,a,s,o,h,u,l,c,f;var y,p,d,v,m,b}(function(t){var e,n,r,i,a,s,o,h=t.lat,u=t.lon,l=6378137,c=ft(h),f=ft(u);o=Math.floor((u+180)/6)+1,180===u&&(o=60);h>=56&&h<64&&u>=3&&u<12&&(o=32);h>=72&&h<84&&(u>=0&&u<9?o=31:u>=9&&u<21?o=33:u>=21&&u<33?o=35:u>=33&&u<42&&(o=37));s=ft(6*(o-1)-180+3),.006739496752268451,e=l/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),n=Math.tan(c)*Math.tan(c),r=.006739496752268451*Math.cos(c)*Math.cos(c),i=Math.cos(c)*(f-s),a=l*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var y=.9996*e*(i+(1-n+r)*i*i*i/6+(5-18*n+n*n+72*r-.39089081163157013)*i*i*i*i*i/120)+5e5,p=.9996*(a+e*Math.tan(c)*(i*i/2+(5-n+9*r+4*r*r)*i*i*i*i/24+(61-58*n+n*n+600*r-2.2240339282485886)*i*i*i*i*i*i/720));h<0&&(p+=1e7);return{northing:Math.round(p),easting:Math.round(y),zoneNumber:o,zoneLetter:dt(h)}}({lat:t[1],lon:t[0]}),e)}function ct(t){var e=pt(mt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function ft(t){return t*(Math.PI/180)}function yt(t){return t/Math.PI*180}function pt(t){var e=t.northing,n=t.easting,r=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var a,s,o,h,u,l,c,f,y=6378137,p=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),d=n-5e5,v=e;r<"N"&&(v-=1e7),l=6*(i-1)-180+3,f=(c=v/.9996/6367449.145945056)+(3*p/2-27*p*p*p/32)*Math.sin(2*c)+(21*p*p/16-55*p*p*p*p/32)*Math.sin(4*c)+151*p*p*p/96*Math.sin(6*c),a=y/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),o=.006739496752268451*Math.cos(f)*Math.cos(f),h=.99330562*y/Math.pow(1-.00669438*Math.sin(f)*Math.sin(f),1.5),u=d/(.9996*a);var m=f-a*Math.tan(f)/h*(u*u/2-(5+3*s+10*o-4*o*o-.06065547077041606)*u*u*u*u/24+(61+90*s+298*o+45*s*s-1.6983531815716497-3*o*o)*u*u*u*u*u*u/720);m=yt(m);var b,g=(u-(1+2*s+o)*u*u*u/6+(5-2*o+28*s-3*o*o+.05391597401814761+24*s*s)*u*u*u*u*u/120)/Math.cos(f);if(g=l+yt(g),t.accuracy){var M=pt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:M.lat,right:M.lon,bottom:m,left:g}}else b={lat:m,lon:g};return b}function dt(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function vt(t){var e=t%6;return 0===e&&(e=6),e}function mt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,r=null,i="",a=0;!/[A-Z]/.test(e=t.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,a++}var s=parseInt(i,10);if(0===a||a+3>n)throw"MGRSPoint bad conversion from: "+t;var o=t.charAt(a++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+t;r=t.substring(a,a+=2);for(var h=vt(s),u=function(t,e){var n="AJSAJS".charCodeAt(e-1),r=1e5,i=!1;for(;n!==t.charCodeAt(0);){if(++n===ot&&n++,n===ht&&n++,n>90){if(i)throw"Bad character: "+t;n=65,i=!0}r+=1e5}return r}(r.charAt(0),h),l=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var n="AFAFAF".charCodeAt(e-1),r=0,i=!1;for(;n!==t.charCodeAt(0);){if(++n===ot&&n++,n===ht&&n++,n>86){if(i)throw"Bad character: "+t;n=65,i=!0}r+=1e5}return r}(r.charAt(1),h);l<bt(o);)l+=2e6;var c=n-a;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,y,p,d=c/2,v=0,m=0;return d>0&&(f=1e5/Math.pow(10,d),y=t.substring(a,a+d),v=parseFloat(y)*f,p=t.substring(a+d),m=parseFloat(p)*f),{easting:v+u,northing:m+l,zoneLetter:o,zoneNumber:s,accuracy:f}}function bt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function gt(t,e,n){if(!(this instanceof gt))return new gt(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var r=t.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}gt.fromMGRS=function(t){return new gt(ct(t))},gt.prototype.toMGRS=function(t){return lt([this.x,this.y],t)};var Mt=gt,wt=.01068115234375,_t=function(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+t*wt))),e[1]=t*(.75-t*(.046875+t*(.01953125+t*wt)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e},xt=function(t,e,n,r){return n*=e,e*=e,r[0]*t-n*(r[1]+e*(r[2]+e*(r[3]+e*r[4])))},Pt=function(t,e,n){for(var r=1/(1-e),i=t,a=20;a;--a){var s=Math.sin(i),o=1-e*s*s;if(i-=o=(xt(i,s,Math.cos(i),n)-t)*(o*Math.sqrt(o))*r,Math.abs(o)<1e-10)return i}return i};var Ot={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=_t(this.es),this.ml0=xt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,n,r,i=t.x,a=t.y,s=N(i-this.long0),o=Math.sin(a),h=Math.cos(a);if(this.es){var u=h*s,l=Math.pow(u,2),c=this.ep2*Math.pow(h,2),f=Math.pow(c,2),y=Math.abs(h)>1e-10?Math.tan(a):0,p=Math.pow(y,2),d=Math.pow(p,2);e=1-this.es*Math.pow(o,2),u/=Math.sqrt(e);var v=xt(a,o,h,this.en);n=this.a*(this.k0*u*(1+l/6*(1-p+c+l/20*(5-18*p+d+14*c-58*p*c+l/42*(61+179*d-d*p-479*p)))))+this.x0,r=this.a*(this.k0*(v-this.ml0+o*s*u/2*(1+l/12*(5-p+9*c+4*f+l/30*(61+d-58*p+270*c-330*p*c+l/56*(1385+543*d-d*p-3111*p))))))+this.y0}else{var m=h*Math.sin(s);if(Math.abs(Math.abs(m)-1)<1e-10)return 93;if(n=.5*this.a*this.k0*Math.log((1+m)/(1-m))+this.x0,r=h*Math.cos(s)/Math.sqrt(1-Math.pow(m,2)),(m=Math.abs(r))>=1){if(m-1>1e-10)return 93;r=0}else r=Math.acos(r);a<0&&(r=-r),r=this.a*this.k0*(r-this.lat0)+this.y0}return t.x=n,t.y=r,t},inverse:function(t){var e,n,r,a,s=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,n=Pt(e,this.es,this.en),Math.abs(n)<i){var h=Math.sin(n),u=Math.cos(n),l=Math.abs(u)>1e-10?Math.tan(n):0,c=this.ep2*Math.pow(u,2),f=Math.pow(c,2),y=Math.pow(l,2),p=Math.pow(y,2);e=1-this.es*Math.pow(h,2);var d=s*Math.sqrt(e)/this.k0,v=Math.pow(d,2);r=n-(e*=l)*v/(1-this.es)*.5*(1-v/12*(5+3*y-9*c*y+c-4*f-v/30*(61+90*y-252*c*y+45*p+46*c-v/56*(1385+3633*y+4095*p+1574*p*y)))),a=N(this.long0+d*(1-v/6*(1+2*y+c-v/20*(5+28*y+24*p+8*c*y+6*c-v/42*(61+662*y+1320*p+720*p*y))))/u)}else r=i*C(o),a=0;else{var m=Math.exp(s/this.k0),b=.5*(m-1/m),g=this.lat0+o/this.k0,M=Math.cos(g);e=Math.sqrt((1-Math.pow(M,2))/(1+Math.pow(b,2))),r=Math.asin(e),o<0&&(r=-r),a=0===b&&0===M?0:N(Math.atan2(b,M)+this.long0)}return t.x=a,t.y=r,t},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},St=function(t){var e=Math.exp(t);return e=(e-1/e)/2},It=function(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),r=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(r,2))},jt=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/(It(1,e)+1))),t<0?-e:e},kt=function(t,e){for(var n,r=2*Math.cos(2*e),i=t.length-1,a=t[i],s=0;--i>=0;)n=r*a-s+t[i],s=a,a=n;return e+n*Math.sin(2*e)},Tt=function(t,e,n){for(var r,i,a=Math.sin(e),s=Math.cos(e),o=St(n),h=function(t){var e=Math.exp(t);return e=(e+1/e)/2}(n),u=2*s*h,l=-2*a*o,c=t.length-1,f=t[c],y=0,p=0,d=0;--c>=0;)r=p,i=y,f=u*(p=f)-r-l*(y=d)+t[c],d=l*p-i+u*y;return[(u=a*h)*f-(l=s*o)*d,u*d+l*f]};var Et={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var r=kt(this.cbg,this.lat0);this.Zb=-this.Qn*(r+function(t,e){for(var n,r=2*Math.cos(e),i=t.length-1,a=t[i],s=0;--i>=0;)n=r*a-s+t[i],s=a,a=n;return Math.sin(e)*n}(this.gtu,2*r))},forward:function(t){var e=N(t.x-this.long0),n=t.y;n=kt(this.cbg,n);var r=Math.sin(n),i=Math.cos(n),a=Math.sin(e),s=Math.cos(e);n=Math.atan2(r,s*i),e=Math.atan2(a*i,It(r,i*s)),e=jt(Math.tan(e));var o,h,u=Tt(this.gtu,2*n,2*e);return n+=u[0],e+=u[1],Math.abs(e)<=2.623395162778?(o=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*n+this.Zb)+this.y0):(o=1/0,h=1/0),t.x=o,t.y=h,t},inverse:function(t){var e,n,r=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,r/=this.Qn,Math.abs(r)<=2.623395162778){var a=Tt(this.utg,2*i,2*r);i+=a[0],r+=a[1],r=Math.atan(St(r));var s=Math.sin(i),o=Math.cos(i),h=Math.sin(r),u=Math.cos(r);i=Math.atan2(s*u,It(h,u*o)),r=Math.atan2(h,u*o),e=N(r+this.long0),n=kt(this.cgb,i)}else e=1/0,n=1/0;return t.x=e,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]};var At={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(N(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*a,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Et.init.apply(this),this.forward=Et.forward,this.inverse=Et.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Ct=function(t,e){return Math.pow((1-t)/(1+t),e)};var Nt={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+o)/(Math.pow(Math.tan(.5*this.lat0+o),this.C)*Ct(this.e*t,this.ratexp))},forward:function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+o),this.C)*Ct(this.e*Math.sin(n),this.ratexp))-i,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,n=t.y,r=Math.pow(Math.tan(.5*n+o)/this.K,1/this.C),a=20;a>0&&(n=2*Math.atan(r*Ct(this.e*Math.sin(t.y),-.5*this.e))-i,!(Math.abs(n-t.y)<1e-14));--a)t.y=n;return a?(t.x=e,t.y=n,t):null},names:["gauss"]};var Rt={init:function(){Nt.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,n,r,i;return t.x=N(t.x-this.long0),Nt.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),r=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*r),t.x=i*n*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*n*r),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,n,r,i,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=Math.sqrt(t.x*t.x+t.y*t.y)){var s=2*Math.atan2(a,this.R2);e=Math.sin(s),n=Math.cos(s),i=Math.asin(n*this.sinc0+t.y*e*this.cosc0/a),r=Math.atan2(t.x*e,a*this.cosc0*n-t.y*this.sinc0*e)}else i=this.phic0,r=0;return t.x=r,t.y=i,Nt.inverse.apply(this,[t]),t.x=N(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var Dt={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+C(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*A(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/R(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=A(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-i,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,r,a,s,o,h=t.x,u=t.y,l=Math.sin(u),c=Math.cos(u),f=N(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=1e-10&&Math.abs(u+this.lat0)<=1e-10?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(f)),t.x=this.a*e*c*Math.sin(f)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(f))+this.y0,t):(n=2*Math.atan(this.ssfn_(u,l,this.e))-i,a=Math.cos(n),r=Math.sin(n),Math.abs(this.coslat0)<=1e-10?(s=R(this.e,u*this.con,this.con*l),o=2*this.a*this.k0*s/this.cons,t.x=this.x0+o*Math.sin(h-this.long0),t.y=this.y0-this.con*o*Math.cos(h-this.long0),t):(Math.abs(this.sinlat0)<1e-10?(e=2*this.a*this.k0/(1+a*Math.cos(f)),t.y=e*r):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*r+this.cosX0*a*Math.cos(f))),t.y=e*(this.cosX0*r-this.sinX0*a*Math.cos(f))+this.y0),t.x=e*a*Math.sin(f)+this.x0,t))},inverse:function(t){var e,n,r,a,s;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var h=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,n=this.lat0,o<=1e-10?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(h)*this.sinlat0+t.y*Math.sin(h)*this.coslat0/o),e=Math.abs(this.coslat0)<1e-10?this.lat0>0?N(this.long0+Math.atan2(t.x,-1*t.y)):N(this.long0+Math.atan2(t.x,t.y)):N(this.long0+Math.atan2(t.x*Math.sin(h),o*this.coslat0*Math.cos(h)-t.y*this.sinlat0*Math.sin(h))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=1e-10){if(o<=1e-10)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,r=o*this.cons/(2*this.a*this.k0),n=this.con*D(this.e,r),e=this.con*N(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else a=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=1e-10?s=this.X0:(s=Math.asin(Math.cos(a)*this.sinX0+t.y*Math.sin(a)*this.cosX0/o),e=N(this.long0+Math.atan2(t.x*Math.sin(a),o*this.cosX0*Math.cos(a)-t.y*this.sinX0*Math.sin(a)))),n=-1*D(this.e,Math.tan(.5*(i+s)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,e,n){return e*=n,Math.tan(.5*(i+t))*Math.pow((1-e)/(1+e),.5*n)}};var Bt={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,r=1/this.rf,i=2*r-Math.pow(r,2),a=this.e=Math.sqrt(i);this.R=this.k0*n*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+a*e)/(1-a*e));this.K=s-this.alpha*o+this.alpha*a/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),r=-this.alpha*(e+n)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),s=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),o=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,t.x=this.R*s+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,n=t.y-this.y0,r=e/this.R,i=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),s=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),o=this.lambda0+s/this.alpha,h=0,u=a,l=-1e3,c=0;Math.abs(u-l)>1e-7;){if(++c>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),l=u,u=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=o,t.y=u,t},names:["somerc"]};var Ft={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),e=Math.cos(this.lat0),n=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-n*n);var r,i,a=R(this.e,this.lat0,t),s=this.bl/e*Math.sqrt((1-this.es)/(1-n*n));if(s*s<1&&(s=1),isNaN(this.longc)){var o=R(this.e,this.lat1,Math.sin(this.lat1)),h=R(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(s+Math.sqrt(s*s-1))*Math.pow(a,this.bl):this.el=(s-Math.sqrt(s*s-1))*Math.pow(a,this.bl);var u=Math.pow(o,this.bl),l=Math.pow(h,this.bl);i=.5*((r=this.el/u)-1/r);var c=(this.el*this.el-l*u)/(this.el*this.el+l*u),f=(l-u)/(l+u),y=N(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*y)/f)/this.bl,this.long0=N(this.long0);var p=N(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/i),this.alpha=Math.asin(s*Math.sin(this.gamma0))}else r=this.lat0>=0?s+Math.sqrt(s*s-1):s-Math.sqrt(s*s-1),this.el=r*Math.pow(a,this.bl),i=.5*(r-1/r),this.gamma0=Math.asin(Math.sin(this.alpha)/s),this.long0=this.longc-Math.asin(i*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(s*s-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(s*s-1),Math.cos(this.alpha))},forward:function(t){var e,n,r,a=t.x,s=t.y,h=N(a-this.long0);if(Math.abs(Math.abs(s)-i)<=1e-10)r=s>0?-1:1,n=this.al/this.bl*Math.log(Math.tan(o+r*this.gamma0*.5)),e=-1*r*i*this.al/this.bl;else{var u=R(this.e,s,Math.sin(s)),l=this.el/Math.pow(u,this.bl),c=.5*(l-1/l),f=.5*(l+1/l),y=Math.sin(this.bl*h),p=(c*Math.sin(this.gamma0)-y*Math.cos(this.gamma0))/f;n=Math.abs(Math.abs(p)-1)<=1e-10?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-p)/(1+p))/this.bl,e=Math.abs(Math.cos(this.bl*h))<=1e-10?this.al*this.bl*h:this.al*Math.atan2(c*Math.cos(this.gamma0)+y*Math.sin(this.gamma0),Math.cos(this.bl*h))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+n):(e-=this.uc,t.x=this.x0+n*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-n*Math.sin(this.alpha)),t},inverse:function(t){var e,n;this.no_rot?(n=t.y-this.y0,e=t.x-this.x0):(n=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var r=Math.exp(-1*this.bl*n/this.al),a=.5*(r-1/r),s=.5*(r+1/r),o=Math.sin(this.bl*e/this.al),h=(o*Math.cos(this.gamma0)+a*Math.sin(this.gamma0))/s,u=Math.pow(this.el/Math.sqrt((1+h)/(1-h)),1/this.bl);return Math.abs(h-1)<1e-10?(t.x=this.long0,t.y=i):Math.abs(h+1)<1e-10?(t.x=this.long0,t.y=-1*i):(t.y=D(this.e,u),t.x=N(this.long0-Math.atan2(a*Math.cos(this.gamma0)-o*Math.sin(this.gamma0),Math.cos(this.bl*e/this.al))/this.bl)),t},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]};var Lt={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),r=A(this.e,e,n),i=R(this.e,this.lat1,e),a=Math.sin(this.lat2),s=Math.cos(this.lat2),o=A(this.e,a,s),h=R(this.e,this.lat2,a),u=R(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(r/o)/Math.log(i/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=1e-10&&(n=C(n)*(i-2e-10));var r,a,s=Math.abs(Math.abs(n)-i);if(s>1e-10)r=R(this.e,n,Math.sin(n)),a=this.a*this.f0*Math.pow(r,this.ns);else{if((s=n*this.ns)<=0)return null;a=0}var o=this.ns*N(e-this.long0);return t.x=this.k0*(a*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,t},inverse:function(t){var e,n,r,a,s,o=(t.x-this.x0)/this.k0,h=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+h*h),n=1):(e=-Math.sqrt(o*o+h*h),n=-1);var u=0;if(0!==e&&(u=Math.atan2(n*o,n*h)),0!==e||this.ns>0){if(n=1/this.ns,r=Math.pow(e/(this.a*this.f0),n),-9999===(a=D(this.e,r)))return null}else a=-i;return s=N(u/this.ns+this.long0),t.x=s,t.y=a,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};var Ut={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,n,r,i,a,s,o,h=t.x,u=t.y,l=N(h-this.long0);return e=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/e)-this.s45),r=-l*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),a=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(i)),s=this.n*a,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=o*Math.cos(s)/1,t.x=o*Math.sin(s)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,r,i,a,s,o,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),n=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(e)),t.x=this.long0-n/this.alfa,s=e,o=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-t.y)<1e-10&&(o=1),s=t.y,u+=1}while(0===o&&u<15);return u>=15?null:t},names:["Krovak","krovak"]},qt=function(t,e,n,r,i){return t*i-e*Math.sin(2*i)+n*Math.sin(4*i)-r*Math.sin(6*i)},zt=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Gt=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Ht=function(t){return.05859375*t*t*(1+.75*t)},Wt=function(t){return t*t*t*(35/3072)},Qt=function(t,e,n){var r=e*n;return t/Math.sqrt(1-r*r)},Yt=function(t){return Math.abs(t)<i?t:t-C(t)*Math.PI},Vt=function(t,e,n,r,i){var a,s;a=t/e;for(var o=0;o<15;o++)if(a+=s=(t-(e*a-n*Math.sin(2*a)+r*Math.sin(4*a)-i*Math.sin(6*a)))/(e-2*n*Math.cos(2*a)+4*r*Math.cos(4*a)-6*i*Math.cos(6*a)),Math.abs(s)<=1e-10)return a;return NaN};var Xt={init:function(){this.sphere||(this.e0=zt(this.es),this.e1=Gt(this.es),this.e2=Ht(this.es),this.e3=Wt(this.es),this.ml0=this.a*qt(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,n,r=t.x,i=t.y;if(r=N(r-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(r)),n=this.a*(Math.atan2(Math.tan(i),Math.cos(r))-this.lat0);else{var a=Math.sin(i),s=Math.cos(i),o=Qt(this.a,this.e,a),h=Math.tan(i)*Math.tan(i),u=r*Math.cos(i),l=u*u,c=this.es*s*s/(1-this.es);e=o*u*(1-l*h*(1/6-(8-h+8*c)*l/120)),n=this.a*qt(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+o*a/s*l*(.5+(5-h+6*c)*l/24)}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r=t.x/this.a,a=t.y/this.a;if(this.sphere){var s=a+this.lat0;e=Math.asin(Math.sin(s)*Math.cos(r)),n=Math.atan2(Math.tan(r),Math.cos(s))}else{var o=this.ml0/this.a+a,h=Vt(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(h)-i)<=1e-10)return t.x=this.long0,t.y=i,a<0&&(t.y*=-1),t;var u=Qt(this.a,this.e,Math.sin(h)),l=u*u*u/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(h),2),f=r*this.a/u,y=f*f;e=h-u*Math.tan(h)/l*f*f*(.5-(1+3*c)*f*f/24),n=f*(1-y*(c/3+(1+3*c)*c*y/15))/Math.cos(h)}return t.x=N(n+this.long0),t.y=Yt(e),t},names:["Cassini","Cassini_Soldner","cass"]},Jt=function(t,e){var n;return t>1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e};var Kt={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-i)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Jt(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=.3333333333333333*t,e=t*t,n[0]+=.17222222222222222*e,n[1]=.06388888888888888*e,e*=t,n[0]+=.10257936507936508*e,n[1]+=.0664021164021164*e,n[2]=.016415012942191543*e,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Jt(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,n,r,a,s,h,u,l,c,f,y=t.x,p=t.y;if(y=N(y-this.long0),this.sphere){if(s=Math.sin(p),f=Math.cos(p),r=Math.cos(y),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+f*r:1+this.sinph0*s+this.cosph0*f*r)<=1e-10)return null;e=(n=Math.sqrt(2/n))*f*Math.sin(y),n*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*f*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(p+this.lat0)<1e-10)return null;n=o-.5*p,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(y),n*=r}}else{switch(u=0,l=0,c=0,r=Math.cos(y),a=Math.sin(y),s=Math.sin(p),h=Jt(this.e,s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=h/this.qp,l=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:c=1+this.sinb1*u+this.cosb1*l*r;break;case this.EQUIT:c=1+l*r;break;case this.N_POLE:c=i+p,h=this.qp-h;break;case this.S_POLE:c=p-i,h=this.qp+h}if(Math.abs(c)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),n=this.mode===this.OBLIQ?this.ymf*c*(this.cosb1*u-this.sinb1*l*r):(c=Math.sqrt(2/(1+l*r)))*u*this.ymf,e=this.xmf*c*l*a;break;case this.N_POLE:case this.S_POLE:h>=0?(e=(c=Math.sqrt(h))*a,n=r*(this.mode===this.S_POLE?c:-c)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r,a,s,o,h,u,l,c,f=t.x/this.a,y=t.y/this.a;if(this.sphere){var p,d=0,v=0;if((n=.5*(p=Math.sqrt(f*f+y*y)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(v=Math.sin(n),d=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(p)<=1e-10?0:Math.asin(y*v/p),f*=v,y=d*p;break;case this.OBLIQ:n=Math.abs(p)<=1e-10?this.lat0:Math.asin(d*this.sinph0+y*v*this.cosph0/p),f*=v*this.cosph0,y=(d-Math.sin(n)*this.sinph0)*p;break;case this.N_POLE:y=-y,n=i-n;break;case this.S_POLE:n-=i}e=0!==y||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,y):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,y*=this.dd,(o=Math.sqrt(f*f+y*y))<1e-10)return t.x=this.long0,t.y=this.lat0,t;a=2*Math.asin(.5*o/this.rq),r=Math.cos(a),f*=a=Math.sin(a),this.mode===this.OBLIQ?(h=r*this.sinb1+y*a*this.cosb1/o,s=this.qp*h,y=o*this.cosb1*r-y*this.sinb1*a):(h=y*a/o,s=this.qp*h,y=o*r)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(y=-y),!(s=f*f+y*y))return t.x=this.long0,t.y=this.lat0,t;h=1-s/this.qp,this.mode===this.S_POLE&&(h=-h)}e=Math.atan2(f,y),u=Math.asin(h),l=this.apa,c=u+u,n=u+l[0]*Math.sin(c)+l[1]*Math.sin(c+c)+l[2]*Math.sin(c+c+c)}return t.x=N(this.long0+e),t.y=n,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},Zt=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)};var $t={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=A(this.e3,this.sin_po,this.cos_po),this.qs1=Jt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=A(this.e3,this.sin_po,this.cos_po),this.qs2=Jt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Jt(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var r=Jt(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,a=this.ns0*N(e-this.long0),s=i*Math.sin(a)+this.x0,o=this.rh-i*Math.cos(a)+this.y0;return t.x=s,t.y=o,t},inverse:function(t){var e,n,r,i,a,s;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),r=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),r=-1),i=0,0!==e&&(i=Math.atan2(r*t.x,r*t.y)),r=e*this.ns0/this.a,this.sphere?s=Math.asin((this.c-r*r)/(2*this.ns0)):(n=(this.c-r*r)/this.ns0,s=this.phi1z(this.e3,n)),a=N(i/this.ns0+this.long0),t.x=a,t.y=s,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,r,i,a,s=Zt(.5*e);if(t<1e-10)return s;for(var o=t*t,h=1;h<=25;h++)if(s+=a=.5*(i=1-(r=t*(n=Math.sin(s)))*r)*i/Math.cos(s)*(e/(1-o)-n/i+.5/t*Math.log((1-r)/(1+r))),Math.abs(a)<=1e-7)return s;return null}};var te={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,n,r,i,a,s,o,h=t.x,u=t.y;return r=N(h-this.long0),e=Math.sin(u),n=Math.cos(u),i=Math.cos(r),1,(a=this.sin_p14*e+this.cos_p14*n*i)>0||Math.abs(a)<=1e-10?(s=this.x0+1*this.a*n*Math.sin(r)/a,o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)/a):(s=this.x0+this.infinity_dist*n*Math.sin(r),o=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*i)),t.x=s,t.y=o,t},inverse:function(t){var e,n,r,i,a,s;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),n=Math.sin(i),r=Math.cos(i),s=Zt(r*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.atan2(t.x*n,e*this.cos_p14*r-t.y*this.sin_p14*n),a=N(this.long0+a)):(s=this.phic0,a=0),t.x=a,t.y=s,t},names:["gnom"]};var ee={init:function(){this.sphere||(this.k0=A(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,n,r=t.x,i=t.y,a=N(r-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var s=Jt(this.e,Math.sin(i));e=this.x0+this.a*this.k0*a,n=this.y0+this.a*s*.5/this.k0}return t.x=e,t.y=n,t},inverse:function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=N(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*i:i;for(var r,a,s,o,h=Math.asin(.5*e),u=0;u<30;u++)if(a=Math.sin(h),s=Math.cos(h),o=t*a,h+=r=Math.pow(1-o*o,2)/(2*s)*(e/(1-t*t)-a/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(r)<=1e-10)return h;return NaN}(this.e,2*t.y*this.k0/this.a),e=N(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]};var ne={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,n=t.y,r=N(e-this.long0),i=Yt(n-this.lat0);return t.x=this.x0+this.a*r*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var e=t.x,n=t.y;return t.x=N(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Yt(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var re={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=zt(this.es),this.e1=Gt(this.es),this.e2=Ht(this.es),this.e3=Wt(this.es),this.ml0=this.a*qt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,r,i=t.x,a=t.y,s=N(i-this.long0);if(r=s*Math.sin(a),this.sphere)Math.abs(a)<=1e-10?(e=this.a*s,n=-1*this.a*this.lat0):(e=this.a*Math.sin(r)/Math.tan(a),n=this.a*(Yt(a-this.lat0)+(1-Math.cos(r))/Math.tan(a)));else if(Math.abs(a)<=1e-10)e=this.a*s,n=-1*this.ml0;else{var o=Qt(this.a,this.e,Math.sin(a))/Math.tan(a);e=o*Math.sin(r),n=this.a*qt(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+o*(1-Math.cos(r))}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){var e,n,r,i,a,s,o,h,u;if(r=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=1e-10)e=N(r/this.a+this.long0),n=0;else{var l;for(s=this.lat0+i/this.a,o=r*r/this.a/this.a+s*s,h=s,a=20;a;--a)if(h+=u=-1*(s*(h*(l=Math.tan(h))+1)-h-.5*(h*h+o)*l)/((h-s)/l-1),Math.abs(u)<=1e-10){n=h;break}e=N(this.long0+Math.asin(r*Math.tan(h)/this.a)/Math.sin(n))}else if(Math.abs(i+this.ml0)<=1e-10)n=0,e=N(this.long0+r/this.a);else{var c,f,y,p,d;for(s=(this.ml0+i)/this.a,o=r*r/this.a/this.a+s*s,h=s,a=20;a;--a)if(d=this.e*Math.sin(h),c=Math.sqrt(1-d*d)*Math.tan(h),f=this.a*qt(this.e0,this.e1,this.e2,this.e3,h),y=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=u=(s*(c*(p=f/this.a)+1)-p-.5*c*(p*p+o))/(this.es*Math.sin(2*h)*(p*p+o-2*s*p)/(4*c)+(s-p)*(c*y-2/Math.sin(2*h))-y),Math.abs(u)<=1e-10){n=h;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=N(this.long0+Math.asin(r*c/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},names:["Polyconic","poly"]};var ie={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,n=t.x,i=t.y-this.lat0,a=n-this.long0,s=i/r*1e-5,o=a,h=1,u=0;for(e=1;e<=10;e++)h*=s,u+=this.A[e]*h;var l,c=u,f=o,y=1,p=0,d=0,v=0;for(e=1;e<=6;e++)l=p*c+y*f,y=y*c-p*f,p=l,d=d+this.B_re[e]*y-this.B_im[e]*p,v=v+this.B_im[e]*y+this.B_re[e]*p;return t.x=v*this.a+this.x0,t.y=d*this.a+this.y0,t},inverse:function(t){var e,n,i=t.x,a=t.y,s=i-this.x0,o=(a-this.y0)/this.a,h=s/this.a,u=1,l=0,c=0,f=0;for(e=1;e<=6;e++)n=l*o+u*h,u=u*o-l*h,l=n,c=c+this.C_re[e]*u-this.C_im[e]*l,f=f+this.C_im[e]*u+this.C_re[e]*l;for(var y=0;y<this.iterations;y++){var p,d=c,v=f,m=o,b=h;for(e=2;e<=6;e++)p=v*c+d*f,d=d*c-v*f,v=p,m+=(e-1)*(this.B_re[e]*d-this.B_im[e]*v),b+=(e-1)*(this.B_im[e]*d+this.B_re[e]*v);d=1,v=0;var g=this.B_re[1],M=this.B_im[1];for(e=2;e<=6;e++)p=v*c+d*f,d=d*c-v*f,v=p,g+=e*(this.B_re[e]*d-this.B_im[e]*v),M+=e*(this.B_im[e]*d+this.B_re[e]*v);var w=g*g+M*M;c=(m*g+b*M)/w,f=(b*g-m*M)/w}var _=c,x=f,P=1,O=0;for(e=1;e<=9;e++)P*=_,O+=this.D[e]*P;var S=this.lat0+O*r*1e5,I=this.long0+x;return t.x=I,t.y=S,t},names:["New_Zealand_Map_Grid","nzmg"]};var ae={init:function(){},forward:function(t){var e=t.x,n=t.y,r=N(e-this.long0),i=this.x0+this.a*r,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=i,t.y=a,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=N(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t},names:["Miller_Cylindrical","mill"]};var se={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=_t(this.es)},forward:function(t){var e,n,r=t.x,i=t.y;if(r=N(r-this.long0),this.sphere){if(this.m)for(var a=this.n*Math.sin(i),s=20;s;--s){var o=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=o,Math.abs(o)<1e-10)break}else i=1!==this.n?Math.asin(this.n*Math.sin(i)):i;e=this.a*this.C_x*r*(this.m+Math.cos(i)),n=this.a*this.C_y*i}else{var h=Math.sin(i),u=Math.cos(i);n=this.a*xt(i,h,u,this.en),e=this.a*r*u/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,r,a;return t.x-=this.x0,r=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,r/=this.C_x*(this.m+Math.cos(e)),this.m?e=Zt((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Zt(Math.sin(e)/this.n)),r=N(r+this.long0),e=Yt(e)):(e=Pt(t.y/this.a,this.es,this.en),(a=Math.abs(e))<i?(a=Math.sin(e),n=this.long0+t.x*Math.sqrt(1-this.es*a*a)/(this.a*Math.cos(e)),r=N(n)):a-1e-10<i&&(r=this.long0)),t.x=r,t.y=e,t},names:["Sinusoidal","sinu"]};var oe={init:function(){},forward:function(t){for(var e=t.x,n=t.y,r=N(e-this.long0),i=n,a=Math.PI*Math.sin(n);;){var s=-(i+Math.sin(i)-a)/(1+Math.cos(i));if(i+=s,Math.abs(s)<1e-10)break}i/=2,Math.PI/2-Math.abs(n)<1e-10&&(r=0);var o=.900316316158*this.a*r*Math.cos(i)+this.x0,h=1.4142135623731*this.a*Math.sin(i)+this.y0;return t.x=o,t.y=h,t},inverse:function(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var r=N(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var i=Math.asin(n);return t.x=r,t.y=i,t},names:["Mollweide","moll"]};var he={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=zt(this.es),this.e1=Gt(this.es),this.e2=Ht(this.es),this.e3=Wt(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=A(this.e,this.sinphi,this.cosphi),this.ml1=qt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=A(this.e,this.sinphi,this.cosphi),this.ml2=qt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=qt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,n=t.x,r=t.y;if(this.sphere)e=this.a*(this.g-r);else{var i=qt(this.e0,this.e1,this.e2,this.e3,r);e=this.a*(this.g-i)}var a=this.ns*N(n-this.long0),s=this.x0+e*Math.sin(a),o=this.y0+this.rh-e*Math.cos(a);return t.x=s,t.y=o,t},inverse:function(t){var e,n,r,i;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var a=0;if(0!==n&&(a=Math.atan2(e*t.x,e*t.y)),this.sphere)return i=N(this.long0+a/this.ns),r=Yt(this.g-n/this.a),t.x=i,t.y=r,t;var s=this.g-n/this.a;return r=Vt(s,this.e0,this.e1,this.e2,this.e3),i=N(this.long0+a/this.ns),t.x=i,t.y=r,t},names:["Equidistant_Conic","eqdc"]};var ue={init:function(){this.R=this.a},forward:function(t){var e,n,r=t.x,a=t.y,s=N(r-this.long0);Math.abs(a)<=1e-10&&(e=this.x0+this.R*s,n=this.y0);var o=Zt(2*Math.abs(a/Math.PI));(Math.abs(s)<=1e-10||Math.abs(Math.abs(a)-i)<=1e-10)&&(e=this.x0,n=a>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var h=.5*Math.abs(Math.PI/s-s/Math.PI),u=h*h,l=Math.sin(o),c=Math.cos(o),f=c/(l+c-1),y=f*f,p=f*(2/l-1),d=p*p,v=Math.PI*this.R*(h*(f-d)+Math.sqrt(u*(f-d)*(f-d)-(d+u)*(y-d)))/(d+u);s<0&&(v=-v),e=this.x0+v;var m=u+f;return v=Math.PI*this.R*(p*m-h*Math.sqrt((d+u)*(u+1)-m*m))/(d+u),n=a>=0?this.y0+v:this.y0-v,t.x=e,t.y=n,t},inverse:function(t){var e,n,r,i,a,s,o,h,u,l,c,f;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,a=(r=t.x/c)*r+(i=t.y/c)*i,c=3*(i*i/(h=-2*(s=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(o=s-2*i*i+r*r)*o*o/h/h/h-9*s*o/h/h)/27)/(u=(s-o*o/3/h)/h)/(l=2*Math.sqrt(-u/3)),Math.abs(c)>1&&(c=c>=0?1:-1),f=Math.acos(c)/3,n=t.y>=0?(-l*Math.cos(f+Math.PI/3)-o/3/h)*Math.PI:-(-l*Math.cos(f+Math.PI/3)-o/3/h)*Math.PI,e=Math.abs(r)<1e-10?this.long0:N(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(r*r-i*i)+a*a))/2/r),t.x=e,t.y=n,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var le={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var e,n,r,a,s,o,h,u,l,c,f,y,p,d,v,m,b,g,M,w,_,x,P=t.x,O=t.y,S=Math.sin(t.y),I=Math.cos(t.y),j=N(P-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(t.x=this.x0+this.a*(i-O)*Math.sin(j),t.y=this.y0-this.a*(i-O)*Math.cos(j),t):Math.abs(this.sin_p12+1)<=1e-10?(t.x=this.x0+this.a*(i+O)*Math.sin(j),t.y=this.y0+this.a*(i+O)*Math.cos(j),t):(g=this.sin_p12*S+this.cos_p12*I*Math.cos(j),b=(m=Math.acos(g))?m/Math.sin(m):1,t.x=this.x0+this.a*b*I*Math.sin(j),t.y=this.y0+this.a*b*(this.cos_p12*S-this.sin_p12*I*Math.cos(j)),t):(e=zt(this.es),n=Gt(this.es),r=Ht(this.es),a=Wt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(s=this.a*qt(e,n,r,a,i),o=this.a*qt(e,n,r,a,O),t.x=this.x0+(s-o)*Math.sin(j),t.y=this.y0-(s-o)*Math.cos(j),t):Math.abs(this.sin_p12+1)<=1e-10?(s=this.a*qt(e,n,r,a,i),o=this.a*qt(e,n,r,a,O),t.x=this.x0+(s+o)*Math.sin(j),t.y=this.y0+(s+o)*Math.cos(j),t):(h=S/I,u=Qt(this.a,this.e,this.sin_p12),l=Qt(this.a,this.e,S),c=Math.atan((1-this.es)*h+this.es*u*this.sin_p12/(l*I)),M=0===(f=Math.atan2(Math.sin(j),this.cos_p12*Math.tan(c)-this.sin_p12*Math.cos(j)))?Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.abs(Math.abs(f)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(c)-this.sin_p12*Math.cos(c)):Math.asin(Math.sin(j)*Math.cos(c)/Math.sin(f)),y=this.e*this.sin_p12/Math.sqrt(1-this.es),m=u*M*(1-(w=M*M)*(v=(p=this.e*this.cos_p12*Math.cos(f)/Math.sqrt(1-this.es))*p)*(1-v)/6+(_=w*M)/8*(d=y*p)*(1-2*v)+(x=_*M)/120*(v*(4-7*v)-3*y*y*(1-7*v))-x*M/48*d),t.x=this.x0+m*Math.sin(f),t.y=this.y0+m*Math.cos(f),t))},inverse:function(t){var e,n,r,a,s,o,h,u,l,c,f,y,p,d,v,m,b,g,M,w,_,x,P;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*i*this.a)return;return n=e/this.a,r=Math.sin(n),a=Math.cos(n),s=this.long0,Math.abs(e)<=1e-10?o=this.lat0:(o=Zt(a*this.sin_p12+t.y*r*this.cos_p12/e),h=Math.abs(this.lat0)-i,s=Math.abs(h)<=1e-10?this.lat0>=0?N(this.long0+Math.atan2(t.x,-t.y)):N(this.long0-Math.atan2(-t.x,t.y)):N(this.long0+Math.atan2(t.x*r,e*this.cos_p12*a-t.y*this.sin_p12*r))),t.x=s,t.y=o,t}return u=zt(this.es),l=Gt(this.es),c=Ht(this.es),f=Wt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(y=this.a*qt(u,l,c,f,i),e=Math.sqrt(t.x*t.x+t.y*t.y),o=Vt((y-e)/this.a,u,l,c,f),s=N(this.long0+Math.atan2(t.x,-1*t.y)),t.x=s,t.y=o,t):Math.abs(this.sin_p12+1)<=1e-10?(y=this.a*qt(u,l,c,f,i),e=Math.sqrt(t.x*t.x+t.y*t.y),o=Vt((e-y)/this.a,u,l,c,f),s=N(this.long0+Math.atan2(t.x,t.y)),t.x=s,t.y=o,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),v=Math.atan2(t.x,t.y),p=Qt(this.a,this.e,this.sin_p12),m=Math.cos(v),g=-(b=this.e*this.cos_p12*m)*b/(1-this.es),M=3*this.es*(1-g)*this.sin_p12*this.cos_p12*m/(1-this.es),x=1-g*(_=(w=e/p)-g*(1+g)*Math.pow(w,3)/6-M*(1+3*g)*Math.pow(w,4)/24)*_/2-w*_*_*_/6,d=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*m),s=N(this.long0+Math.asin(Math.sin(v)*Math.sin(_)/Math.cos(d))),P=Math.sin(d),o=Math.atan2((P-this.es*x*this.sin_p12)*Math.tan(d),P*(1-this.es)),t.x=s,t.y=o,t)},names:["Azimuthal_Equidistant","aeqd"]};var ce={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,n,r,i,a,s,o,h=t.x,u=t.y;return r=N(h-this.long0),e=Math.sin(u),n=Math.cos(u),i=Math.cos(r),1,((a=this.sin_p14*e+this.cos_p14*n*i)>0||Math.abs(a)<=1e-10)&&(s=1*this.a*n*Math.sin(r),o=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)),t.x=s,t.y=o,t},inverse:function(t){var e,n,r,a,s,o,h;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),n=Zt(e/this.a),r=Math.sin(n),a=Math.cos(n),o=this.long0,Math.abs(e)<=1e-10?(h=this.lat0,t.x=o,t.y=h,t):(h=Zt(a*this.sin_p14+t.y*r*this.cos_p14/e),s=Math.abs(this.lat0)-i,Math.abs(s)<=1e-10?(o=this.lat0>=0?N(this.long0+Math.atan2(t.x,-t.y)):N(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=h,t):(o=N(this.long0+Math.atan2(t.x*r,e*this.cos_p14*a-t.y*this.sin_p14*r)),t.x=o,t.y=h,t))},names:["ortho"]},fe=1,ye=2,pe=3,de=4,ve=5,me=6,be=1,ge=2,Me=3,we=4;function _e(t,e,n,r){var a;return t<1e-10?(r.value=be,a=0):(a=Math.atan2(e,n),Math.abs(a)<=o?r.value=be:a>o&&a<=i+o?(r.value=ge,a-=i):a>i+o||a<=-(i+o)?(r.value=Me,a=a>=0?a-u:a+u):(r.value=we,a+=i)),a}function xe(t,e){var n=t+e;return n<-u?n+=h:n>+u&&(n-=h),n}var Pe={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=i-o/2?this.face=ve:this.lat0<=-(i-o/2)?this.face=me:Math.abs(this.long0)<=o?this.face=fe:Math.abs(this.long0)<=i+o?this.face=this.long0>0?ye:de:this.face=pe,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,n,r,a,s,h,l={x:0,y:0},c={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===ve)a=i-e,n>=o&&n<=i+o?(c.value=be,r=n-i):n>i+o||n<=-(i+o)?(c.value=ge,r=n>0?n-u:n+u):n>-(i+o)&&n<=-o?(c.value=Me,r=n+i):(c.value=we,r=n);else if(this.face===me)a=i+e,n>=o&&n<=i+o?(c.value=be,r=-n+i):n<o&&n>=-o?(c.value=ge,r=-n):n<-o&&n>=-(i+o)?(c.value=Me,r=-n-i):(c.value=we,r=n>0?-n+u:-n-u);else{var f,y,p,d,v,m;this.face===ye?n=xe(n,+i):this.face===pe?n=xe(n,+u):this.face===de&&(n=xe(n,-i)),d=Math.sin(e),v=Math.cos(e),m=Math.sin(n),f=v*Math.cos(n),y=v*m,p=d,this.face===fe?r=_e(a=Math.acos(f),p,y,c):this.face===ye?r=_e(a=Math.acos(y),p,-f,c):this.face===pe?r=_e(a=Math.acos(-f),p,-y,c):this.face===de?r=_e(a=Math.acos(-y),p,f,c):(a=r=0,c.value=be)}return h=Math.atan(12/u*(r+Math.acos(Math.sin(r)*Math.cos(o))-i)),s=Math.sqrt((1-Math.cos(a))/(Math.cos(h)*Math.cos(h))/(1-Math.cos(Math.atan(1/Math.cos(r))))),c.value===ge?h+=i:c.value===Me?h+=u:c.value===we&&(h+=1.5*u),l.x=s*Math.cos(h),l.y=s*Math.sin(h),l.x=l.x*this.a+this.x0,l.y=l.y*this.a+this.y0,t.x=l.x,t.y=l.y,t},inverse:function(t){var e,n,r,a,s,o,h,l,c,f,y,p,d={lam:0,phi:0},v={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?v.value=be:t.y>=0&&t.y>=Math.abs(t.x)?(v.value=ge,e-=i):t.x<0&&-t.x>=Math.abs(t.y)?(v.value=Me,e=e<0?e+u:e-u):(v.value=we,e+=i),c=u/12*Math.tan(e),s=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(s),(h=1-(r=Math.cos(e))*r*(a=Math.tan(n))*a*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?h=-1:h>1&&(h=1),this.face===ve)l=Math.acos(h),d.phi=i-l,v.value===be?d.lam=o+i:v.value===ge?d.lam=o<0?o+u:o-u:v.value===Me?d.lam=o-i:d.lam=o;else if(this.face===me)l=Math.acos(h),d.phi=l-i,v.value===be?d.lam=-o+i:v.value===ge?d.lam=-o:v.value===Me?d.lam=-o-i:d.lam=o<0?-o-u:-o+u;else{var m,b,g;c=(m=h)*m,b=(c+=(g=c>=1?0:Math.sqrt(1-c)*Math.sin(o))*g)>=1?0:Math.sqrt(1-c),v.value===ge?(c=b,b=-g,g=c):v.value===Me?(b=-b,g=-g):v.value===we&&(c=b,b=g,g=-c),this.face===ye?(c=m,m=-b,b=c):this.face===pe?(m=-m,b=-b):this.face===de&&(c=m,m=b,b=-c),d.phi=Math.acos(-g)-i,d.lam=Math.atan2(b,m),this.face===ye?d.lam=xe(d.lam,-i):this.face===pe?d.lam=xe(d.lam,-u):this.face===de&&(d.lam=xe(d.lam,+i))}return 0!==this.es&&(f=d.phi<0?1:0,y=Math.tan(d.phi),p=this.b/Math.sqrt(y*y+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),f&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Oe=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Se=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ie=s/5,je=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};var ke={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=N(t.x-this.long0),n=Math.abs(t.y),r=Math.floor(n*Ie);r<0?r=0:r>=18&&(r=17);var i={x:je(Oe[r],n=s*(n-.08726646259971647*r))*e,y:je(Se[r],n)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*.8487+this.x0,i.y=i.y*this.a*1.3523+this.y0,i},inverse:function(t){var e={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(e.y>=1)e.x/=Oe[18][0],e.y=t.y<0?-i:i;else{var n=Math.floor(18*e.y);for(n<0?n=0:n>=18&&(n=17);;)if(Se[n][0]>e.y)--n;else{if(!(Se[n+1][0]<=e.y))break;++n}var r=Se[n],s=5*(e.y-r[0])/(Se[n+1][0]-r[0]);s=function(t,e,n,r){for(var i=e;r;--r){var a=t(i);if(i-=a,Math.abs(a)<n)break}return i}((function(t){return(je(r,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(r,t)}),s,1e-10,100),e.x/=je(Oe[n],s),e.y=(5*n+s)*a,t.y<0&&(e.y=-e.y)}return e.x=N(e.x+this.long0),e},names:["Robinson","robin"]};var Te,Ee={init:function(){this.name="geocent"},forward:function(t){return X(t,this.es,this.a)},inverse:function(t){return J(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};st.defaultDatum="WGS84",st.Proj=V,st.WGS84=new st.Proj("WGS84"),st.Point=Mt,st.toPoint=tt,st.defs=I,st.transform=nt,st.mgrs=ut,st.version="__VERSION__",(Te=st).Proj.projections.add(Ot),Te.Proj.projections.add(Et),Te.Proj.projections.add(At),Te.Proj.projections.add(Rt),Te.Proj.projections.add(Dt),Te.Proj.projections.add(Bt),Te.Proj.projections.add(Ft),Te.Proj.projections.add(Lt),Te.Proj.projections.add(Ut),Te.Proj.projections.add(Xt),Te.Proj.projections.add(Kt),Te.Proj.projections.add($t),Te.Proj.projections.add(te),Te.Proj.projections.add(ee),Te.Proj.projections.add(ne),Te.Proj.projections.add(re),Te.Proj.projections.add(ie),Te.Proj.projections.add(ae),Te.Proj.projections.add(se),Te.Proj.projections.add(oe),Te.Proj.projections.add(he),Te.Proj.projections.add(ue),Te.Proj.projections.add(le),Te.Proj.projections.add(ce),Te.Proj.projections.add(Pe),Te.Proj.projections.add(ke),Te.Proj.projections.add(Ee);var Ae=st;class Ce{static defineProjectionAliases(t){const e=[];for(const n in t)e.push([n,t[n]]);Ae.defs(e)}constructor({from:t="WGS84",to:e="WGS84"}){const n=Ae(t,e);if(!n)throw new Error("Invalid projection");this.project=n.forward,this.unproject=n.inverse}}}]);
|
|
2
2
|
//# sourceMappingURL=dist.es5.min.js.map
|