@loaders.gl/mvt 3.1.0-alpha.2 → 4.0.0-alpha.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loaders.gl/mvt",
3
3
  "description": "Loader for Mapbox Vector Tiles",
4
- "version": "3.1.0-alpha.2",
4
+ "version": "4.0.0-alpha.3",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -28,17 +28,17 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "pre-build": "npm run build-worker && npm run build-worker --env.dev && npm run build-bundle",
31
- "build-worker": "webpack --entry ./src/workers/mvt-worker.ts --output ./dist/mvt-worker.js --config ../../scripts/webpack/worker.js",
32
- "build-bundle": "webpack --display=minimal --config ../../scripts/webpack/bundle.js"
31
+ "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/bundle.js",
32
+ "build-worker": "esbuild src/workers/mvt-worker.ts --bundle --outfile=dist/mvt-worker.js"
33
33
  },
34
34
  "dependencies": {
35
- "@loaders.gl/gis": "3.1.0-alpha.2",
36
- "@loaders.gl/loader-utils": "3.1.0-alpha.2",
35
+ "@loaders.gl/gis": "4.0.0-alpha.3",
36
+ "@loaders.gl/loader-utils": "4.0.0-alpha.3",
37
37
  "@math.gl/polygon": "^3.5.1",
38
38
  "pbf": "^3.2.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/pbf": "^3.0.2"
42
42
  },
43
- "gitHead": "ca83b8f05a6874db93051d446266d9ea360affb2"
43
+ "gitHead": "ded84630d02ba4fc97277ebecea3e42ae1bc2616"
44
44
  }
package/src/bundle.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  // @ts-nocheck
2
2
  const moduleExports = require('./index');
3
- const _global = typeof window === 'undefined' ? global : window;
4
- _global.loaders = _global.loaders || {};
5
- module.exports = Object.assign(_global.loaders, moduleExports);
3
+ globalThis.loaders = globalThis.loaders || {};
4
+ module.exports = Object.assign(globalThis.loaders, moduleExports);
package/dist/dist.min.js DELETED
@@ -1,4 +0,0 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=2)}([function(t,e,i){"use strict";t.exports=r;var n=i(4);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var o="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function s(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function h(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function l(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function f(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function p(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function c(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function d(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function y(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function x(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function g(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function v(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function w(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,t(r,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,o=i.buf;if(r=o[i.pos++],n=(112&r)>>4,r<128)return a(t,n,e);if(r=o[i.pos++],n|=(127&r)<<3,r<128)return a(t,n,e);if(r=o[i.pos++],n|=(127&r)<<10,r<128)return a(t,n,e);if(r=o[i.pos++],n|=(127&r)<<17,r<128)return a(t,n,e);if(r=o[i.pos++],n|=(127&r)<<24,r<128)return a(t,n,e);if(r=o[i.pos++],n|=(1&r)<<31,r<128)return a(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,i){return o.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r<i;){var o,s,a,u=t[r],h=null,l=u>239?4:u>223?3:u>191?2:1;if(r+l>i)break;1===l?u<128&&(h=u):2===l?128==(192&(o=t[r+1]))&&(h=(31&u)<<6|63&o)<=127&&(h=null):3===l?(o=t[r+1],s=t[r+2],128==(192&o)&&128==(192&s)&&((h=(15&u)<<12|(63&o)<<6|63&s)<=2047||h>=55296&&h<=57343)&&(h=null)):4===l&&(o=t[r+1],s=t[r+2],a=t[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,l=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=l}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var i=s(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==r.Bytes)return t.push(this.readSVarint());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==r.Bytes)return t.push(this.readBoolean());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==r.Bytes)return t.push(this.readFloat());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==r.Bytes)return t.push(this.readDouble());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed32());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed32());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed64());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed64());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===r.Varint)for(;this.buf[this.pos++]>127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),w(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),w(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),w(this.buf,-1&t,this.pos),w(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),w(this.buf,-1&t,this.pos),w(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,n;t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;if(e.buf[e.pos++]|=i|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&u(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);var n=this.pos-i;n>=128&&u(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,r.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,x,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,g,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},,function(t,e,i){(function(e){const n=i(5),r="undefined"==typeof window?e:window;r.loaders=r.loaders||{},t.exports=Object.assign(r.loaders,n)}).call(this,i(3))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){
2
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3
- e.read=function(t,e,i,n,r){var o,s,a=8*r-n-1,u=(1<<a)-1,h=u>>1,l=-7,f=i?r-1:0,p=i?-1:1,c=t[e+f];for(f+=p,o=c&(1<<-l)-1,c>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=p,l-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(c?-1:1);s+=Math.pow(2,n),o-=h}return(c?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,i,n,r,o){var s,a,u,h=8*o-r-1,l=(1<<h)-1,f=l>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,r),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,r),s=0));r>=8;t[i+c]=255&a,c+=d,a/=256,r-=8);for(s=s<<r|a,h+=r;h>0;t[i+c]=255&s,c+=d,s/=256,h-=8);t[i+c-d]|=128*y}},function(t,e,i){"use strict";function n(t){let e=0;for(let i,n,r=0,o=t.length-1;r<t.length;o=r++)i=t[r],n=t[o],e+=(n[0]-i[0])*(i[1]+n[1]);return e}function r(t,e,i){e&&i&&(1===t?e.id=i.readVarint():2===t?function(t,e){const i=t.readVarint()+t.pos;for(;t.pos<i;){const i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(i,e):3===t?e.type=i.readVarint():4===t&&(e._geometry=i.pos))}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.r(e),i.d(e,"MVTLoader",(function(){return wt})),i.d(e,"MVTWorkerLoader",(function(){return vt}));class s{static get types(){return["Unknown","Point","LineString","Polygon"]}constructor(t,e,i,n,s){o(this,"properties",void 0),o(this,"extent",void 0),o(this,"type",void 0),o(this,"id",void 0),o(this,"_pbf",void 0),o(this,"_geometry",void 0),o(this,"_keys",void 0),o(this,"_values",void 0),this.properties={},this.extent=i,this.type=0,this.id=null,this._pbf=t,this._geometry=-1,this._keys=n,this._values=s,t.readFields(r,this,e)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos;let i=1,n=0,r=0,o=0;const s=[];let a;for(;t.pos<e;){if(n<=0){const e=t.readVarint();i=7&e,n=e>>3}if(n--,1===i||2===i)r+=t.readSVarint(),o+=t.readSVarint(),1===i&&(a&&s.push(a),a=[]),a&&a.push([r,o]);else{if(7!==i)throw new Error("unknown command "+i);a&&a.push(a[0].slice())}}return a&&s.push(a),s}bbox(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos;let i=1,n=0,r=0,o=0,s=1/0,a=-1/0,u=1/0,h=-1/0;for(;t.pos<e;){if(n<=0){const e=t.readVarint();i=7&e,n=e>>3}if(n--,1===i||2===i)r+=t.readSVarint(),o+=t.readSVarint(),r<s&&(s=r),r>a&&(a=r),o<u&&(u=o),o>h&&(h=o);else if(7!==i)throw new Error("unknown command "+i)}return[s,u,a,h]}_toGeoJSON(t){let e,i,r=this.loadGeometry(),o=s.types[this.type];switch(this.type){case 1:const o=[];for(e=0;e<r.length;e++)o[e]=r[e][0];r=o,t(r,this);break;case 2:for(e=0;e<r.length;e++)t(r[e],this);break;case 3:for(r=function(t){const e=t.length;if(e<=1)return[t];const i=[];let r,o;for(let s=0;s<e;s++){const e=n(t[s]);0!==e&&(void 0===o&&(o=e<0),o===e<0?(r&&i.push(r),r=[t[s]]):r&&r.push(t[s]))}return r&&i.push(r),i}(r),e=0;e<r.length;e++)for(i=0;i<r[e].length;i++)t(r[e][i],this)}1===r.length?r=r[0]:o="Multi"+o;const a={type:"Feature",geometry:{type:o,coordinates:r},properties:this.properties};return null!==this.id&&(a.id=this.id),a}toGeoJSON(t){if("function"==typeof t)return this._toGeoJSON(t);const{x:e,y:i,z:n}=t,r=this.extent*Math.pow(2,n),o=this.extent*e,s=this.extent*i;return this._toGeoJSON((function(t){for(let e=0;e<t.length;e++){const i=t[e];i[0]=360*(i[0]+o)/r-180;const n=180-360*(i[1]+s)/r;i[1]=360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90}}))}}function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class u{constructor(t,e){a(this,"version",void 0),a(this,"name",void 0),a(this,"extent",void 0),a(this,"length",void 0),a(this,"_pbf",void 0),a(this,"_keys",void 0),a(this,"_values",void 0),a(this,"_features",void 0),this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(h,this,e),this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const e=this._pbf.readVarint()+this._pbf.pos;return new s(this._pbf,e,this.extent,this._keys,this._values)}}function h(t,e,i){e&&i&&(15===t?e.version=i.readVarint():1===t?e.name=i.readString():5===t?e.extent=i.readVarint():2===t?e._features.push(i.pos):3===t?e._keys.push(i.readString()):4===t&&e._values.push(function(t){let e=null;const i=t.readVarint()+t.pos;for(;t.pos<i;){const i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(i)))}class l{constructor(t,e){var i,n,r;r=void 0,(n="layers")in(i=this)?Object.defineProperty(i,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[n]=r,this.layers=t.readFields(f,{},e)}}function f(t,e,i){if(3===t&&i){const t=new u(i,i.readVarint()+i.pos);t.length&&e&&(e[t.name]=t)}}Math.PI,Math.PI;const p={};p.EPSILON=1e-12,p.debug=!1,p.precision=4,p.printTypes=!1,p.printDegrees=!1,p.printRowMajor=!0;function c(t,e={}){const{start:i=0,end:n=t.length}=e,r=e.size||2;let o=0;for(let e=i,s=n-r;e<n;e+=r)o+=(t[e]-t[s])*(t[e+1]+t[s+1]),s=e;return o/2}function d(t,e,i,n){i=i||2;const r=e&&e.length,o=r?e[0]*i:t.length;let s=y(t,0,o,i,!0,n&&n[0]);const a=[];if(!s||s.next===s.prev)return a;let u,h,l,f,p,c,d;if(r&&(s=function(t,e,i,n,r){const o=[];let s,a,u,h,l;for(s=0,a=e.length;s<a;s++)u=e[s]*n,h=s<a-1?e[s+1]*n:t.length,l=y(t,u,h,n,!1,r&&r[s+1]),l===l.next&&(l.steiner=!0),o.push(S(l));for(o.sort(F),s=0;s<o.length;s++)m(o[s],i),i=x(i,i.next);return i}(t,e,s,i,n)),t.length>80*i){f=h=t[0],p=l=t[1];for(let e=i;e<o;e+=i)c=t[e],d=t[e+1],c<f&&(f=c),d<p&&(p=d),c>h&&(h=c),d>l&&(l=d);u=Math.max(h-f,l-p),u=0!==u?1/u:0}return g(s,a,i,f,p,u),a}function y(t,e,i,n,r,o){let s,a;if(void 0===o&&(o=c(t,{start:e,end:i,size:n})),r===o<0)for(s=e;s<i;s+=n)a=j(s,t[s],t[s+1],a);else for(s=i-n;s>=e;s-=n)a=j(s,t[s],t[s+1],a);return a&&B(a,a.next)&&(A(a),a=a.next),a}function x(t,e){if(!t)return t;e||(e=t);let i,n=t;do{if(i=!1,n.steiner||!B(n,n.next)&&0!==I(n.prev,n,n.next))n=n.next;else{if(A(n),n=e=n.prev,n===n.next)break;i=!0}}while(i||n!==e);return e}function g(t,e,i,n,r,o,s){if(!t)return;!s&&o&&function(t,e,i,n){let r=t;do{null===r.z&&(r.z=V(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,i,n,r,o,s,a,u,h=1;do{for(r=t,t=null,u=null,n=0;r;){for(n++,s=r,o=0,i=0;i<h&&(o++,s=s.nextZ,s);i++);for(a=h;o>0||a>0&&s;)0!==o&&(0===a||!s||r.z<=s.z)?(e=r,r=r.nextZ,o--):(e=s,s=s.nextZ,a--),u?u.nextZ=e:t=e,e.prevZ=u,u=e;r=s}u.nextZ=null,h*=2}while(n>1)}(r)}(t,n,r,o);let a,u,h=t;for(;t.prev!==t.next;)if(a=t.prev,u=t.next,o?w(t,n,r,o):v(t))e.push(a.i/i),e.push(t.i/i),e.push(u.i/i),A(t),t=u.next,h=u.next;else if((t=u)===h){s?1===s?g(t=b(x(t),e,i),e,i,n,r,o,2):2===s&&P(t,e,i,n,r,o):g(x(t),e,i,n,r,o,1);break}}function v(t){const e=t.prev,i=t,n=t.next;if(I(e,i,n)>=0)return!1;let r=t.next.next;for(;r!==t.prev;){if(M(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&I(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function w(t,e,i,n){const r=t.prev,o=t,s=t.next;if(I(r,o,s)>=0)return!1;const a=r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,u=r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,h=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,l=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,f=V(a,u,e,i,n),p=V(h,l,e,i,n);let c=t.prevZ,d=t.nextZ;for(;c&&c.z>=f&&d&&d.z<=p;){if(c!==t.prev&&c!==t.next&&M(r.x,r.y,o.x,o.y,s.x,s.y,c.x,c.y)&&I(c.prev,c,c.next)>=0)return!1;if(c=c.prevZ,d!==t.prev&&d!==t.next&&M(r.x,r.y,o.x,o.y,s.x,s.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;c&&c.z>=f;){if(c!==t.prev&&c!==t.next&&M(r.x,r.y,o.x,o.y,s.x,s.y,c.x,c.y)&&I(c.prev,c,c.next)>=0)return!1;c=c.prevZ}for(;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&M(r.x,r.y,o.x,o.y,s.x,s.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function b(t,e,i){let n=t;do{const r=n.prev,o=n.next.next;!B(r,o)&&C(r,n,n.next,o)&&O(r,o)&&O(o,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(o.i/i),A(n),A(n.next),n=t=o),n=n.next}while(n!==t);return x(n)}function P(t,e,i,n,r,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&k(s,t)){let a=Z(s,t);return s=x(s,s.next),a=x(a,a.next),g(s,e,i,n,r,o),void g(a,e,i,n,r,o)}t=t.next}s=s.next}while(s!==t)}function F(t,e){return t.x-e.x}function m(t,e){if(e=function(t,e){let i=e;const n=t.x,r=t.y;let o,s=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){const t=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=n&&t>s){if(s=t,t===n){if(r===i.y)return i;if(r===i.next.y)return i.next}o=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!o)return null;if(n===s)return o;const a=o,u=o.x,h=o.y;let l,f=1/0;i=o;do{n>=i.x&&i.x>=u&&n!==i.x&&M(r<h?n:s,r,u,h,r<h?s:n,r,i.x,i.y)&&(l=Math.abs(r-i.y)/(n-i.x),O(i,t)&&(l<f||l===f&&(i.x>o.x||i.x===o.x&&_(o,i)))&&(o=i,f=l)),i=i.next}while(i!==a);return o}(t,e)){const i=Z(e,t);x(e,e.next),x(i,i.next)}}function _(t,e){return I(t.prev,t,e.prev)<0&&I(e.next,t,t.next)<0}function V(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function S(t){let e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function M(t,e,i,n,r,o,s,a){return(r-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(n-a)-(i-s)*(e-a)>=0&&(i-s)*(o-a)-(r-s)*(n-a)>=0}function k(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&C(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(O(t,e)&&O(e,t)&&function(t,e){let i=t,n=!1;const r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(I(t.prev,t,e.prev)||I(t,e.prev,e))||B(t,e)&&I(t.prev,t,t.next)>0&&I(e.prev,e,e.next)>0)}function I(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function B(t,e){return t.x===e.x&&t.y===e.y}function C(t,e,i,n){const r=z(I(t,e,i)),o=z(I(t,e,n)),s=z(I(i,n,t)),a=z(I(i,n,e));return r!==o&&s!==a||(!(0!==r||!D(t,i,e))||(!(0!==o||!D(t,n,e))||(!(0!==s||!D(i,t,n))||!(0!==a||!D(i,e,n)))))}function D(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function z(t){return t>0?1:t<0?-1:0}function O(t,e){return I(t.prev,t,t.next)<0?I(t,e,t.next)>=0&&I(t,t.prev,e)>=0:I(t,e,t.prev)<0||I(t,t.next,e)<0}function Z(t,e){const i=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function j(t,e,i,n){const r=new T(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function N(t){const e=t.lines.length;if(e<=1)return{data:t.data,areas:[[c(t.data)]],lines:[t.lines]};const i=[],n=[];let r,o=[],s=[],a=0;for(let u,h,l=0;l<e;l++){h=t.lines[l]-a,u=t.lines[l+1]-a||t.data.length;const e=c(t.data.slice(h,u));if(0!==e)void 0===r&&(r=e<0),r===e<0?(s.length&&(i.push(o),n.push(s)),s=[h],o=[e]):(o.push(e),s.push(h));else{const e=t.data.slice(0,h),i=t.data.slice(u);t.data=e.concat(i),a+=u-h}}return o&&i.push(o),s.length&&n.push(s),{areas:i,lines:n,data:t.data}}function U(t,e,i,n){for(let r=0,o=t.length;r<o;r+=2){t[r]=360*(t[r]+e)/n-180;const o=180-360*(t[r+1]+i)/n;t[r+1]=360/Math.PI*Math.atan(Math.exp(o*Math.PI/180))-90}}function L(t,e,i){e&&i&&(1===t?e.id=i.readVarint():2===t?function(t,e){const i=t.readVarint()+t.pos;for(;t.pos<i;){const i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(i,e):3===t?e.type=i.readVarint():4===t&&(e._geometry=i.pos))}function E(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let G,R,J,K,W,q,H;class Q{static get types(){return["Unknown","Point","LineString","Polygon"]}constructor(t,e,i,n,r,o){E(this,"properties",void 0),E(this,"extent",void 0),E(this,"type",void 0),E(this,"id",void 0),E(this,"_pbf",void 0),E(this,"_geometry",void 0),E(this,"_keys",void 0),E(this,"_values",void 0),E(this,"_firstPassData",void 0),this.properties={},this.extent=i,this.type=0,this.id=null,this._pbf=t,this._geometry=-1,this._keys=n,this._values=r,this._firstPassData=o,t.readFields(L,this,e)}loadGeometry(){const t=this._pbf;t.pos=this._geometry,G=t.readVarint()+t.pos,R=1,K=0,W=0,q=0,H=0;const e=[],i=[];for(;t.pos<G;)if(K<=0&&(J=t.readVarint(),R=7&J,K=J>>3),K--,1===R||2===R)W+=t.readSVarint(),q+=t.readSVarint(),1===R&&e.push(H),i.push(W,q),H+=2;else{if(7!==R)throw new Error("unknown command "+R);if(H>0){const t=e[e.length-1];i.push(i[t],i[t+1]),H+=2}}return{data:i,lines:e}}_toBinaryCoordinates(t){let e=this.loadGeometry();t(e.data,this);switch(this.type){case 1:this._firstPassData.pointFeaturesCount++,this._firstPassData.pointPositionsCount+=e.lines.length;break;case 2:this._firstPassData.lineFeaturesCount++,this._firstPassData.linePathsCount+=e.lines.length,this._firstPassData.linePositionsCount+=e.data.length/2;break;case 3:const t=N(e);this._firstPassData.polygonFeaturesCount++,this._firstPassData.polygonObjectsCount+=t.lines.length;for(const e of t.lines)this._firstPassData.polygonRingsCount+=e.length;this._firstPassData.polygonPositionsCount+=t.data.length/2,e=t}e.type=Q.types[this.type],e.lines.length>1&&(e.type="Multi"+e.type);const i={type:"Feature",geometry:e,properties:this.properties};return null!==this.id&&(i.id=this.id),i}toBinaryCoordinates(t){return"function"==typeof t?this._toBinaryCoordinates(t):this._toBinaryCoordinates(U)}}function X(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class Y{constructor(t,e){X(this,"version",void 0),X(this,"name",void 0),X(this,"extent",void 0),X(this,"length",void 0),X(this,"_pbf",void 0),X(this,"_keys",void 0),X(this,"_values",void 0),X(this,"_features",void 0),this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields($,this,e),this.length=this._features.length}feature(t,e){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const i=this._pbf.readVarint()+this._pbf.pos;return new Q(this._pbf,i,this.extent,this._keys,this._values,e)}}function $(t,e,i){e&&i&&(15===t?e.version=i.readVarint():1===t?e.name=i.readString():5===t?e.extent=i.readVarint():2===t?e._features.push(i.pos):3===t?e._keys.push(i.readString()):4===t&&e._values.push(function(t){let e=null;const i=t.readVarint()+t.pos;for(;t.pos<i;){const i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(i)))}class tt{constructor(t,e){var i,n,r;r=void 0,(n="layers")in(i=this)?Object.defineProperty(i,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[n]=r,this.layers=t.readFields(et,{},e)}}function et(t,e,i){if(3===t&&i){const t=new Y(i,i.readVarint()+i.pos);t.length&&e&&(e[t.name]=t)}}function it(t){const e={};for(const i of t)if(i.properties)for(const t in i.properties){const n=e[t];if(n||void 0===n){const n=i.properties[t];e[t]=lt(n)}}return Object.keys(e).filter(t=>e[t])}function nt(t,e,i){const{pointPositionsCount:n,pointFeaturesCount:r,linePositionsCount:o,linePathsCount:s,lineFeaturesCount:a,polygonPositionsCount:u,polygonObjectsCount:h,polygonRingsCount:l,polygonFeaturesCount:f}=e,{numericPropKeys:p,PositionDataType:c=Float32Array}=i,d=t[0]&&"id"in t[0],y=t.length>65535?Uint32Array:Uint16Array,x={positions:new c(2*n),globalFeatureIds:new y(n),featureIds:r>65535?new Uint32Array(n):new Uint16Array(n),numericProps:{},properties:[],fields:[]},g={pathIndices:o>65535?new Uint32Array(s+1):new Uint16Array(s+1),positions:new c(2*o),globalFeatureIds:new y(o),featureIds:a>65535?new Uint32Array(o):new Uint16Array(o),numericProps:{},properties:[],fields:[]},v={polygonIndices:u>65535?new Uint32Array(h+1):new Uint16Array(h+1),primitivePolygonIndices:u>65535?new Uint32Array(l+1):new Uint16Array(l+1),positions:new c(2*u),triangles:[],globalFeatureIds:new y(u),featureIds:f>65535?new Uint32Array(u):new Uint16Array(u),numericProps:{},properties:[],fields:[]};for(const t of[x,g,v])for(const e of p)t.numericProps[e]=new Float32Array(t.positions.length/2);g.pathIndices[s]=o,v.polygonIndices[h]=u,v.primitivePolygonIndices[l]=u;const w={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0};for(const e of t){const t=e.geometry,i=e.properties||{};switch(t.type){case"Point":case"MultiPoint":rt(t,x,w,2,i),x.properties.push(ht(i,p)),d&&x.fields.push({id:e.id}),w.pointFeature++;break;case"LineString":case"MultiLineString":ot(t,g,w,2,i),g.properties.push(ht(i,p)),d&&g.fields.push({id:e.id}),w.lineFeature++;break;case"Polygon":case"MultiPolygon":st(t,v,w,2,i),v.properties.push(ht(i,p)),d&&v.fields.push({id:e.id}),w.polygonFeature++;break;default:throw new Error("Invalid geometry type")}w.feature++}return function(t,e,i,n){const r={points:{...t,positions:{value:t.positions,size:n},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1}},lines:{...e,pathIndices:{value:e.pathIndices,size:1},positions:{value:e.positions,size:n},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1}},polygons:{...i,polygonIndices:{value:i.polygonIndices,size:1},primitivePolygonIndices:{value:i.primitivePolygonIndices,size:1},positions:{value:i.positions,size:n},triangles:{value:new Uint32Array(i.triangles),size:1},globalFeatureIds:{value:i.globalFeatureIds,size:1},featureIds:{value:i.featureIds,size:1}}};for(const t in r)for(const e in r[t].numericProps)r[t].numericProps[e]={value:r[t].numericProps[e],size:1};return r}(x,g,v,2)}function rt(t,e,i,n,r){e.positions.set(t.data,i.pointPosition*n);const o=t.data.length/n;ut(e,r,i.pointPosition,o),e.globalFeatureIds.fill(i.feature,i.pointPosition,i.pointPosition+o),e.featureIds.fill(i.pointFeature,i.pointPosition,i.pointPosition+o),i.pointPosition+=o}function ot(t,e,i,n,r){e.positions.set(t.data,i.linePosition*n);const o=t.data.length/n;ut(e,r,i.linePosition,o),e.globalFeatureIds.fill(i.feature,i.linePosition,i.linePosition+o),e.featureIds.fill(i.lineFeature,i.linePosition,i.linePosition+o);for(let r=0,o=t.lines.length;r<o;++r){const s=t.lines[r],a=r===o-1?t.data.length:t.lines[r+1];e.pathIndices[i.linePath++]=i.linePosition,i.linePosition+=(a-s)/n}}function st(t,e,i,n,r){e.positions.set(t.data,i.polygonPosition*n);const o=t.data.length/n;ut(e,r,i.polygonPosition,o),e.globalFeatureIds.fill(i.feature,i.polygonPosition,i.polygonPosition+o),e.featureIds.fill(i.polygonFeature,i.polygonPosition,i.polygonPosition+o);for(let r=0,o=t.lines.length;r<o;++r){const o=i.polygonPosition;e.polygonIndices[i.polygonObject++]=o;const s=t.areas[r],a=t.lines[r],u=t.lines[r+1];for(let r=0,o=a.length;r<o;++r){const s=a[r],h=r===o-1?void 0===u?t.data.length:u[0]:a[r+1];e.primitivePolygonIndices[i.polygonRing++]=i.polygonPosition,i.polygonPosition+=(h-s)/n}at(e,s,a,{startPosition:o,endPosition:i.polygonPosition,coordLength:n})}}function at(t,e,i,{startPosition:n,endPosition:r,coordLength:o}){const s=n*o,a=r*o,u=t.positions.subarray(s,a),h=i[0],l=d(u,i.slice(1).map(t=>(t-h)/o),o,e);for(let e=0,i=l.length;e<i;++e)t.triangles.push(n+l[e])}function ut(t,e,i,n){for(const r in t.numericProps)r in e&&t.numericProps[r].fill(e[r],i,i+n)}function ht(t,e){const i={};for(const n in t)e.includes(n)||(i[n]=t[n]);return i}function lt(t){return Number.isFinite(t)}var ft=i(0),pt=i.n(ft);function ct(t,e){e=function(t){if(t){const e="wgs84"===(t={...t,mvt:t.mvt||{},gis:t.gis||{}}).coordinates,{tileIndex:i}=t,n=i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.z);if(e&&!n)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property. Check documentation.")}return t}(e);const i=[];if(e){const n="binary"===e.gis.format,r={pointPositionsCount:0,pointFeaturesCount:0,linePositionsCount:0,linePathsCount:0,lineFeaturesCount:0,polygonPositionsCount:0,polygonObjectsCount:0,polygonRingsCount:0,polygonFeaturesCount:0};if(t.byteLength>0){const o=n?new tt(new pt.a(t)):new l(new pt.a(t)),s=e.mvt;(Array.isArray(s.layers)?s.layers:Object.keys(o.layers)).forEach(t=>{const e=o.layers[t],a={...s,layerName:t};if(e)for(let t=0;t<e.length;t++){const o=e.feature(t,r),s=n?yt(o,a):dt(o,a);i.push(s)}})}if(n){const e=function(t,e,i){return nt(t,e,{numericPropKeys:i?i.numericPropKeys:it(t),PositionDataType:i?i.PositionDataType:Float32Array})}(i,r);return e.byteLength=t.byteLength,e}}return i}function dt(t,e){const i=t.toGeoJSON("wgs84"===e.coordinates?e.tileIndex:xt);return e.layerProperty&&(i.properties[e.layerProperty]=e.layerName),i}function yt(t,e){const i=t.toBinaryCoordinates("wgs84"===e.coordinates?e.tileIndex:gt);return e.layerProperty&&(i.properties[e.layerProperty]=e.layerName),i}function xt(t,e){const{extent:i}=e;for(let e=0;e<t.length;e++){const n=t[e];n[0]/=i,n[1]/=i}}function gt(t,e){const{extent:i}=e;for(let e=0,n=t.length;e<n;++e)t[e]/=i}const vt={name:"Mapbox Vector Tile",id:"mvt",module:"mvt",version:"3.1.0-alpha.2",extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","application/x-protobuf"],worker:!0,category:"geometry",options:{mvt:{coordinates:"local",layerProperty:"layerName",layers:null,tileIndex:null}}},wt={...vt,parse:async(t,e)=>ct(t,e),parseSync:ct,binary:!0}}])}));
4
- //# sourceMappingURL=dist.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:////home/user/apps/loaders.gl/node_modules/pbf/index.js","webpack:///./src/bundle.ts","webpack:///(webpack)/buildin/global.js","webpack:////home/user/apps/loaders.gl/node_modules/ieee754/index.js","webpack:///./src/helpers/mapbox-util-functions.ts","webpack:///./src/lib/mapbox-vector-tile/vector-tile-feature.ts","webpack:///./src/lib/mapbox-vector-tile/vector-tile-layer.ts","webpack:///./src/lib/mapbox-vector-tile/vector-tile.ts","webpack:////home/user/apps/loaders.gl/node_modules/@math.gl/core/dist/esm/lib/common.js","webpack:////home/user/apps/loaders.gl/node_modules/@math.gl/polygon/dist/esm/polygon-utils.js","webpack:////home/user/apps/loaders.gl/node_modules/@math.gl/polygon/dist/esm/earcut.js","webpack:///./src/helpers/binary-util-functions.ts","webpack:///./src/lib/binary-vector-tile/vector-tile-feature.ts","webpack:///./src/lib/binary-vector-tile/vector-tile-layer.ts","webpack:///./src/lib/binary-vector-tile/vector-tile.ts","webpack:///./src/lib/binary-vector-tile/features-to-binary.ts","webpack:///./src/lib/parse-mvt.ts","webpack:///./src/mvt-loader.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Pbf","ieee754","buf","this","ArrayBuffer","isView","Uint8Array","pos","type","length","Varint","Fixed64","Bytes","Fixed32","utf8TextDecoder","TextDecoder","readPackedEnd","pbf","readVarint","toNum","low","high","isSigned","makeRoomForExtraLength","startPos","len","extraLen","Math","floor","log","LN2","realloc","writePackedVarint","arr","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","val","readInt32","destroy","readFields","readField","result","end","tag","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readFloat","read","readDouble","b","h","Error","readVarintRemainder","readVarint64","readSVarint","num","readBoolean","Boolean","readString","decode","subarray","readUtf8TextDecoder","str","b1","b2","b3","b0","bytesPerSequence","String","fromCharCode","readUtf8","readBytes","buffer","readPackedVarint","push","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","min","set","finish","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","charCodeAt","writeUtf8","write","writeBytes","writeRawMessage","fn","obj","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","moduleExports","require","_global","global","loaders","assign","g","Function","e","offset","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","Infinity","pow","rt","abs","isNaN","signedArea","ring","sum","p1","p2","j","readFeature","feature","id","_keys","_values","properties","readTag","_geometry","VectorTileFeature","constructor","extent","keys","values","_pbf","loadGeometry","cmd","x","y","lines","line","cmdLen","slice","bbox","x1","x2","y1","y2","_toGeoJSON","transform","coords","types","points","rings","polygons","polygon","ccw","area","undefined","classifyRings","geometry","coordinates","toGeoJSON","options","z","size","x0","y0","PI","atan","exp","VectorTileLayer","version","_features","readLayer","layer","readValueMessage","VectorTile","layers","readTile","config","EPSILON","debug","precision","printTypes","printDegrees","printRowMajor","getPolygonSignedArea","start","dim","earcut","data","holeIndices","areas","hasHoles","outerLen","outerNode","linkedList","triangles","next","prev","invSize","maxX","maxY","minX","minY","queue","list","steiner","getLeftmost","sort","compareX","eliminateHole","filterPoints","eliminateHoles","max","earcutLinked","clockwise","last","insertNode","removeNode","again","ear","pass","zOrder","prevZ","nextZ","numMerges","pSize","q","qSize","tail","inSize","sortLinked","indexCurve","stop","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","maxZ","intersects","locallyInside","isValidDiagonal","splitPolygon","hole","hx","hy","qx","mx","my","tan","tanMin","sectorContainsSector","findHoleBridge","leftmost","ax","ay","bx","by","cx","cy","px","py","intersectsPolygon","inside","middleInside","q1","q2","o1","sign","o2","o3","o4","onSegment","a2","Node","an","bp","geom","ringAreas","endIndex","startIndex","before","after","concat","project","jl","endPos","firstPassData","_firstPassData","_toBinaryCoordinates","pointFeaturesCount","pointPositionsCount","lineFeaturesCount","linePathsCount","linePositionsCount","classified","polygonFeaturesCount","polygonObjectsCount","polygonRingsCount","polygonPositionsCount","toBinaryCoordinates","extractNumericPropKeys","features","numericPropKeys","numericSoFar","isNumeric","filter","k","fillArrays","PositionDataType","Float32Array","hasGlobalId","GlobalFeatureIdsDataType","Uint32Array","Uint16Array","positions","globalFeatureIds","featureIds","numericProps","fields","pathIndices","polygonIndices","primitivePolygonIndices","propName","indexMap","pointPosition","pointFeature","linePosition","linePath","lineFeature","polygonPosition","polygonObject","polygonRing","polygonFeature","handlePoint","keepStringProperties","handleLineString","handlePolygon","coordLength","returnObj","geomType","numericProp","makeAccessorObjects","nPositions","fillNumericProperties","fill","il","ll","startPosition","nextLines","triangulatePolygon","endPosition","polygonPositions","indices","map","tl","index","numericPropName","numericKeys","props","includes","Number","isFinite","parseMVT","arrayBuffer","wgs84Coordinates","mvt","gis","tileIndex","hasTileIndex","normalizeOptions","binary","format","byteLength","tile","BinaryVectorTile","Protobuf","loaderOptions","Array","isArray","forEach","layerName","vectorTileLayer","featureOptions","vectorTileFeature","decodedFeature","getDecodedFeatureBinary","getDecodedFeature","featuresToBinary","transformToLocalCoordinates","layerProperty","transformToLocalCoordinatesBinary","MVTWorkerLoader","extensions","mimeTypes","worker","category","MVTLoader","parse","async","parseSync"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EA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6L,GAAI,MACJ5M,OAAQ,MACR6P,QATc,gBAWdqO,WAAY,CAAC,MAAO,OACpBC,UAAW,CACT,qCACA,0BAGFC,QAAQ,EACRC,SAAU,WACVjP,QAAS,CACPmN,IAAK,CACHrN,YAAa,QACb6O,cAAe,YACf5N,OAAQ,KACRsM,UAAW,QAQJ6B,GAA8B,IACtCL,GACHM,MAAOC,MAAOnC,EAAajN,IAAYgN,GAASC,EAAajN,GAC7DqP,UAAWrC,GACXQ,QAAQ","file":"dist.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos;\n var pos = this.pos;\n this.pos = end;\n\n if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n // longer strings are fast with the built-in browser TextDecoder API\n return readUtf8TextDecoder(this.buf, pos, end);\n }\n // short strings are fast with our custom implementation\n return readUtf8(this.buf, pos, end);\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","// @ts-nocheck\nconst moduleExports = require('./index');\nconst _global = typeof window === 'undefined' ? global : window;\n_global.loaders = _global.loaders || {};\nmodule.exports = Object.assign(_global.loaders, moduleExports);\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","import Protobuf from 'pbf';\nimport {MvtMapboxGeometry} from '../lib/types';\nimport VectorTileFeature from '../lib/mapbox-vector-tile/vector-tile-feature';\n\n/**\n * Classifies an array of rings into polygons with outer rings and holes\n * @param rings\n * @returns polygons\n */\nexport function classifyRings(rings: MvtMapboxGeometry) {\n const len = rings.length;\n\n if (len <= 1) return [rings];\n\n const polygons: number[][][] = [];\n let polygon: number[][] | undefined;\n let ccw: boolean | undefined;\n\n for (let i = 0; i < len; i++) {\n const area = signedArea(rings[i]);\n if (area === 0) continue; // eslint-disable-line no-continue\n\n if (ccw === undefined) ccw = area < 0;\n\n if (ccw === area < 0) {\n if (polygon) polygons.push(polygon);\n polygon = [rings[i]];\n } else if (polygon) polygon.push(rings[i]);\n }\n if (polygon) polygons.push(polygon);\n\n return polygons;\n}\n\n/**\n *\n * @param ring\n * @returns sum\n */\nexport function signedArea(ring: number[][]) {\n let sum = 0;\n for (let i = 0, j = ring.length - 1, p1: number[], p2: number[]; i < ring.length; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2[0] - p1[0]) * (p1[1] + p2[1]);\n }\n return sum;\n}\n\n/**\n *\n * @param tag\n * @param feature\n * @param pbf\n */\nexport function readFeature(tag: number, feature?: VectorTileFeature, pbf?: Protobuf): void {\n if (feature && pbf) {\n if (tag === 1) feature.id = pbf.readVarint();\n else if (tag === 2) readTag(pbf, feature);\n else if (tag === 3) feature.type = pbf.readVarint();\n else if (tag === 4) feature._geometry = pbf.pos;\n }\n}\n\n/**\n *\n * @param pbf\n * @param feature\n */\nexport function readTag(pbf: Protobuf, feature: VectorTileFeature): void {\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const key = feature._keys[pbf.readVarint()];\n const value = feature._values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\nimport Protobuf from 'pbf';\nimport {MvtMapboxCoordinates, MvtMapboxGeometry} from '../types';\nimport {readFeature, classifyRings} from '../../helpers/mapbox-util-functions';\n\nexport default class VectorTileFeature {\n properties: {[x: string]: string | number | boolean | null};\n extent: any;\n type: number;\n id: number | null;\n _pbf: Protobuf;\n _geometry: number;\n _keys: string[];\n _values: (string | number | boolean | null)[];\n static get types() {\n return ['Unknown', 'Point', 'LineString', 'Polygon'];\n }\n\n constructor(\n pbf: Protobuf,\n end: number,\n extent: any,\n keys: string[],\n values: (string | number | boolean | null)[]\n ) {\n // Public\n this.properties = {};\n this.extent = extent;\n this.type = 0;\n this.id = null;\n\n // Private\n this._pbf = pbf;\n this._geometry = -1;\n this._keys = keys;\n this._values = values;\n\n pbf.readFields(readFeature, this, end);\n }\n\n // eslint-disable-next-line complexity, max-statements\n loadGeometry(): MvtMapboxGeometry {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n let cmd = 1;\n let length = 0;\n let x = 0;\n let y = 0;\n const lines: number[][][] = [];\n let line: number[][] | undefined;\n\n while (pbf.pos < end) {\n if (length <= 0) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) {\n // moveTo\n if (line) lines.push(line);\n line = [];\n }\n if (line) line.push([x, y]);\n } else if (cmd === 7) {\n // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90\n if (line) {\n line.push(line[0].slice()); // closePolygon\n }\n } else {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n if (line) lines.push(line);\n\n return lines;\n }\n\n // eslint-disable-next-line max-statements\n bbox() {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n let cmd = 1;\n let length = 0;\n let x = 0;\n let y = 0;\n let x1 = Infinity;\n let x2 = -Infinity;\n let y1 = Infinity;\n let y2 = -Infinity;\n\n while (pbf.pos < end) {\n if (length <= 0) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n if (x < x1) x1 = x;\n if (x > x2) x2 = x;\n if (y < y1) y1 = y;\n if (y > y2) y2 = y;\n } else if (cmd !== 7) {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n return [x1, y1, x2, y2];\n }\n\n _toGeoJSON(transform) {\n let coords = this.loadGeometry();\n let type = VectorTileFeature.types[this.type];\n let i: number;\n let j: number;\n\n // eslint-disable-next-line default-case\n switch (this.type) {\n case 1:\n const points: number[] = [];\n for (i = 0; i < coords.length; i++) {\n points[i] = coords[i][0];\n }\n coords = points;\n transform(coords, this);\n break;\n\n case 2:\n for (i = 0; i < coords.length; i++) {\n transform(coords[i], this);\n }\n break;\n\n case 3:\n coords = classifyRings(coords);\n for (i = 0; i < coords.length; i++) {\n for (j = 0; j < coords[i].length; j++) {\n transform(coords[i][j], this);\n }\n }\n break;\n }\n\n if (coords.length === 1) {\n coords = coords[0];\n } else {\n type = `Multi${type}`;\n }\n\n const result: MvtMapboxCoordinates = {\n type: 'Feature',\n geometry: {\n type,\n coordinates: coords\n },\n properties: this.properties\n };\n\n if (this.id !== null) {\n result.id = this.id;\n }\n\n return result;\n }\n\n toGeoJSON(\n options: {x: number; y: number; z: number} | ((data: number[], feature: {extent: any}) => void)\n ): MvtMapboxCoordinates {\n if (typeof options === 'function') {\n return this._toGeoJSON(options);\n }\n const {x, y, z} = options;\n const size = this.extent * Math.pow(2, z);\n const x0 = this.extent * x;\n const y0 = this.extent * y;\n\n function project(line: number[]) {\n for (let j = 0; j < line.length; j++) {\n const p = line[j];\n p[0] = ((p[0] + x0) * 360) / size - 180;\n const y2 = 180 - ((p[1] + y0) * 360) / size;\n p[1] = (360 / Math.PI) * Math.atan(Math.exp((y2 * Math.PI) / 180)) - 90;\n }\n }\n return this._toGeoJSON(project);\n }\n}\n","/* eslint-disable indent */\n// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport Protobuf from 'pbf';\nimport VectorTileFeature from './vector-tile-feature';\n\nexport default class VectorTileLayer {\n version: number;\n name: string;\n extent: number;\n length: number;\n _pbf: Protobuf;\n _keys: string[];\n _values: (string | number | boolean | null)[];\n _features: number[];\n constructor(pbf: Protobuf, end: number) {\n // Public\n this.version = 1;\n this.name = '';\n this.extent = 4096;\n this.length = 0;\n\n // Private\n this._pbf = pbf;\n this._keys = [];\n this._values = [];\n this._features = [];\n\n pbf.readFields(readLayer, this, end);\n\n this.length = this._features.length;\n }\n\n /**\n * return feature `i` from this layer as a `VectorTileFeature`\n * @param index\n * @returns feature\n */\n\n feature(i: number): VectorTileFeature {\n if (i < 0 || i >= this._features.length) {\n throw new Error('feature index out of bounds');\n }\n\n this._pbf.pos = this._features[i];\n\n const end = this._pbf.readVarint() + this._pbf.pos;\n return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values);\n }\n}\n\n/**\n *\n * @param tag\n * @param layer\n * @param pbf\n */\nfunction readLayer(tag: number, layer?: VectorTileLayer, pbf?: Protobuf): void {\n if (layer && pbf) {\n if (tag === 15) layer.version = pbf.readVarint();\n else if (tag === 1) layer.name = pbf.readString();\n else if (tag === 5) layer.extent = pbf.readVarint();\n else if (tag === 2) layer._features.push(pbf.pos);\n else if (tag === 3) layer._keys.push(pbf.readString());\n else if (tag === 4) layer._values.push(readValueMessage(pbf));\n }\n}\n\n/**\n *\n * @param pbf\n * @returns value\n */\nfunction readValueMessage(pbf: Protobuf) {\n let value: string | number | boolean | null = null;\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const tag = pbf.readVarint() >> 3;\n\n value =\n tag === 1\n ? pbf.readString()\n : tag === 2\n ? pbf.readFloat()\n : tag === 3\n ? pbf.readDouble()\n : tag === 4\n ? pbf.readVarint64()\n : tag === 5\n ? pbf.readVarint()\n : tag === 6\n ? pbf.readSVarint()\n : tag === 7\n ? pbf.readBoolean()\n : null;\n }\n\n return value;\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileLayer from './vector-tile-layer';\nimport Protobuf from 'pbf';\n\nexport default class VectorTile {\n layers: {[x: string]: VectorTileLayer};\n constructor(pbf: Protobuf, end?: number) {\n this.layers = pbf.readFields(readTile, {}, end);\n }\n}\n\n/**\n *\n * @param tag\n * @param layers\n * @param pbf\n */\nfunction readTile(tag: number, layers?: {[x: string]: VectorTileLayer}, pbf?: Protobuf): void {\n if (tag === 3) {\n if (pbf) {\n const layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);\n if (layer.length && layers) {\n layers[layer.name] = layer;\n }\n }\n }\n}\n","import assert from './assert';\nconst RADIANS_TO_DEGREES = 1 / Math.PI * 180;\nconst DEGREES_TO_RADIANS = 1 / 180 * Math.PI;\nconst config = {};\nconfig.EPSILON = 1e-12;\nconfig.debug = false;\nconfig.precision = 4;\nconfig.printTypes = false;\nconfig.printDegrees = false;\nconfig.printRowMajor = true;\nexport { config };\nexport function configure(options = {}) {\n for (const key in options) {\n assert(key in config);\n config[key] = options[key];\n }\n\n return config;\n}\n\nfunction round(value) {\n return Math.round(value / config.EPSILON) * config.EPSILON;\n}\n\nexport function formatValue(value, {\n precision = config.precision || 4\n} = {}) {\n value = round(value);\n return \"\".concat(parseFloat(value.toPrecision(precision)));\n}\nexport function isArray(value) {\n return Array.isArray(value) || ArrayBuffer.isView(value) && !(value instanceof DataView);\n}\n\nfunction duplicateArray(array) {\n return array.clone ? array.clone() : new Array(array.length);\n}\n\nexport function clone(array) {\n return array.clone ? array.clone() : new Array(...array);\n}\n\nfunction map(value, func, result) {\n if (isArray(value)) {\n result = result || duplicateArray(value);\n\n for (let i = 0; i < result.length && i < value.length; ++i) {\n result[i] = func(value[i], i, result);\n }\n\n return result;\n }\n\n return func(value);\n}\n\nexport function toRadians(degrees) {\n return radians(degrees);\n}\nexport function toDegrees(radians) {\n return degrees(radians);\n}\nexport function radians(degrees, result) {\n return map(degrees, degrees => degrees * DEGREES_TO_RADIANS, result);\n}\nexport function degrees(radians, result) {\n return map(radians, radians => radians * RADIANS_TO_DEGREES, result);\n}\nexport function sin(radians) {\n return map(radians, angle => Math.sin(angle));\n}\nexport function cos(radians) {\n return map(radians, angle => Math.cos(angle));\n}\nexport function tan(radians) {\n return map(radians, angle => Math.tan(angle));\n}\nexport function asin(radians) {\n return map(radians, angle => Math.asin(angle));\n}\nexport function acos(radians) {\n return map(radians, angle => Math.acos(angle));\n}\nexport function atan(radians) {\n return map(radians, angle => Math.atan(angle));\n}\nexport function clamp(value, min, max) {\n return map(value, value => Math.max(min, Math.min(max, value)));\n}\nexport function lerp(a, b, t) {\n if (isArray(a)) {\n return a.map((ai, i) => lerp(ai, b[i], t));\n }\n\n return t * b + (1 - t) * a;\n}\nexport function equals(a, b, epsilon) {\n const oldEpsilon = config.EPSILON;\n\n if (epsilon) {\n config.EPSILON = epsilon;\n }\n\n try {\n if (a === b) {\n return true;\n }\n\n if (isArray(a) && isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; ++i) {\n if (!equals(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n if (a && a.equals) {\n return a.equals(b);\n }\n\n if (b && b.equals) {\n return b.equals(a);\n }\n\n if (Number.isFinite(a) && Number.isFinite(b)) {\n return Math.abs(a - b) <= config.EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n }\n\n return false;\n } finally {\n config.EPSILON = oldEpsilon;\n }\n}\nexport function exactEquals(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a && typeof a === 'object' && b && typeof b === 'object') {\n if (a.constructor !== b.constructor) {\n return false;\n }\n\n if (a.exactEquals) {\n return a.exactEquals(b);\n }\n }\n\n if (isArray(a) && isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; ++i) {\n if (!exactEquals(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n}\nexport function withEpsilon(EPSILON, func) {\n const oldPrecision = config.EPSILON;\n config.EPSILON = EPSILON;\n let value;\n\n try {\n value = func();\n } finally {\n config.EPSILON = oldPrecision;\n }\n\n return value;\n}\n//# sourceMappingURL=common.js.map","import { equals } from '@math.gl/core';\nexport const WINDING = {\n CLOCKWISE: 1,\n COUNTER_CLOCKWISE: -1\n};\nexport function modifyPolygonWindingDirection(points, direction, options = {}) {\n const windingDirection = getPolygonWindingDirection(points, options);\n\n if (windingDirection !== direction) {\n reversePolygon(points, options);\n return true;\n }\n\n return false;\n}\nexport function getPolygonWindingDirection(points, options = {}) {\n return Math.sign(getPolygonSignedArea(points, options));\n}\nexport function getPolygonSignedArea(points, options = {}) {\n const {\n start = 0,\n end = points.length\n } = options;\n const dim = options.size || 2;\n let area = 0;\n\n for (let i = start, j = end - dim; i < end; i += dim) {\n area += (points[i] - points[j]) * (points[i + 1] + points[j + 1]);\n j = i;\n }\n\n return area / 2;\n}\nexport function forEachSegmentInPolygon(points, visitor, options = {}) {\n const {\n start = 0,\n end = points.length,\n size = 2,\n isClosed\n } = options;\n const numPoints = (end - start) / size;\n\n for (let i = 0; i < numPoints - 1; ++i) {\n visitor(points[start + i * size], points[start + i * size + 1], points[start + (i + 1) * size], points[start + (i + 1) * size + 1], i, i + 1);\n }\n\n const endPointIndex = start + (numPoints - 1) * size;\n const isClosedEx = isClosed || equals(points[start], points[endPointIndex]) && equals(points[start + 1], points[endPointIndex + 1]);\n\n if (!isClosedEx) {\n visitor(points[endPointIndex], points[endPointIndex + 1], points[start], points[start + 1], numPoints - 1, 0);\n }\n}\n\nfunction reversePolygon(points, options) {\n const {\n start = 0,\n end = points.length,\n size = 2\n } = options;\n const numPoints = (end - start) / size;\n const numSwaps = Math.floor(numPoints / 2);\n\n for (let i = 0; i < numSwaps; ++i) {\n const b1 = start + i * size;\n const b2 = start + (numPoints - 1 - i) * size;\n\n for (let j = 0; j < size; ++j) {\n const tmp = points[b1 + j];\n points[b1 + j] = points[b2 + j];\n points[b2 + j] = tmp;\n }\n }\n}\n\nexport function modifyPolygonWindingDirectionPoints(points, direction, options = {}) {\n const currentDirection = getPolygonWindingDirectionPoints(points, options);\n\n if (currentDirection !== direction) {\n points.reverse();\n return true;\n }\n\n return false;\n}\nexport function getPolygonWindingDirectionPoints(points, options = {}) {\n return Math.sign(getPolygonSignedAreaPoints(points, options));\n}\nexport function getPolygonSignedAreaPoints(points, options = {}) {\n const {\n start = 0,\n end = points.length\n } = options;\n let area = 0;\n\n for (let i = start, j = end - 1; i < end; ++i) {\n area += (points[i][0] - points[j][0]) * (points[i][1] + points[j][1]);\n j = i;\n }\n\n return area / 2;\n}\nexport function forEachSegmentInPolygonPoints(points, visitor, options = {}) {\n const {\n start = 0,\n end = points.length,\n isClosed\n } = options;\n\n for (let i = start; i < end - 1; ++i) {\n visitor(points[i], points[i + 1], i, i + 1);\n }\n\n const isClosedEx = isClosed || equals(points[end - 1], points[0]);\n\n if (!isClosedEx) {\n visitor(points[end - 1], points[0], end - 1, 0);\n }\n}\n//# sourceMappingURL=polygon-utils.js.map","import { getPolygonSignedArea } from './polygon-utils';\nexport function earcut(data, holeIndices, dim, areas) {\n dim = dim || 2;\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n let outerNode = linkedList(data, 0, outerLen, dim, true, areas && areas[0]);\n const triangles = [];\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n let invSize;\n let maxX;\n let maxY;\n let minX;\n let minY;\n let x;\n let y;\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim, areas);\n\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (let i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n return triangles;\n}\n\nfunction linkedList(data, start, end, dim, clockwise, area) {\n let i;\n let last;\n\n if (area === undefined) {\n area = getPolygonSignedArea(data, {\n start,\n end,\n size: dim\n });\n }\n\n if (clockwise === area < 0) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n let p = start;\n let again;\n\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n let stop = ear;\n let prev;\n let next;\n\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n removeNode(ear);\n ear = next.next;\n stop = next.next;\n continue;\n }\n\n ear = next;\n\n if (ear === stop) {\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\nfunction isEar(ear) {\n const a = ear.prev;\n const b = ear;\n const c = ear.next;\n if (area(a, b, c) >= 0) return false;\n let p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n const a = ear.prev;\n const b = ear;\n const c = ear.next;\n if (area(a, b, c) >= 0) return false;\n const minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x;\n const minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y;\n const maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x;\n const maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y;\n const minZ = zOrder(minTX, minTY, minX, minY, invSize);\n const maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n let p = ear.prevZ;\n let n = ear.nextZ;\n\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\nfunction cureLocalIntersections(start, triangles, dim) {\n let p = start;\n\n do {\n const a = p.prev;\n const b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n removeNode(p);\n removeNode(p.next);\n p = start = b;\n }\n\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n let a = start;\n\n do {\n let b = a.next.next;\n\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n let c = splitPolygon(a, b);\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n\n b = b.next;\n }\n\n a = a.next;\n } while (a !== start);\n}\n\nfunction eliminateHoles(data, holeIndices, outerNode, dim, areas) {\n const queue = [];\n let i;\n let len;\n let start;\n let end;\n let list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false, areas && areas[i + 1]);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n\n if (outerNode) {\n const b = splitPolygon(outerNode, hole);\n filterPoints(outerNode, outerNode.next);\n filterPoints(b, b.next);\n }\n}\n\nfunction findHoleBridge(hole, outerNode) {\n let p = outerNode;\n const hx = hole.x;\n const hy = hole.y;\n let qx = -Infinity;\n let m;\n\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n\n if (x <= hx && x > qx) {\n qx = x;\n\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n\n m = p.x < p.next.x ? p : p.next;\n }\n }\n\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n if (hx === qx) return m;\n const stop = m;\n const mx = m.x;\n const my = m.y;\n let tanMin = Infinity;\n let tan;\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n tan = Math.abs(hy - p.y) / (hx - p.x);\n\n if (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\nfunction indexCurve(start, minX, minY, invSize) {\n let p = start;\n\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n sortLinked(p);\n}\n\nfunction sortLinked(list) {\n let e;\n let i;\n let inSize = 1;\n let numMerges;\n let p;\n let pSize;\n let q;\n let qSize;\n let tail;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n\n qSize = inSize;\n\n while (pSize > 0 || qSize > 0 && q) {\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;else list = e;\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n } while (numMerges > 1);\n\n return list;\n}\n\nfunction zOrder(x, y, minX, minY, invSize) {\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n x = (x | x << 8) & 0x00ff00ff;\n x = (x | x << 4) & 0x0f0f0f0f;\n x = (x | x << 2) & 0x33333333;\n x = (x | x << 1) & 0x55555555;\n y = (y | y << 8) & 0x00ff00ff;\n y = (y | y << 4) & 0x0f0f0f0f;\n y = (y | y << 2) & 0x33333333;\n y = (y | y << 1) & 0x55555555;\n return x | y << 1;\n}\n\nfunction getLeftmost(start) {\n let p = start;\n let leftmost = start;\n\n do {\n if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);\n}\n\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\nfunction intersects(p1, q1, p2, q2) {\n const o1 = sign(area(p1, q1, p2));\n const o2 = sign(area(p1, q1, q2));\n const o3 = sign(area(p2, q2, p1));\n const o4 = sign(area(p2, q2, q1));\n if (o1 !== o2 && o3 !== o4) return true;\n if (o1 === 0 && onSegment(p1, p2, q1)) return true;\n if (o2 === 0 && onSegment(p1, q2, q1)) return true;\n if (o3 === 0 && onSegment(p2, p1, q2)) return true;\n if (o4 === 0 && onSegment(p2, q1, q2)) return true;\n return false;\n}\n\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\nfunction intersectsPolygon(a, b) {\n let p = a;\n\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\nfunction middleInside(a, b) {\n let p = a;\n let inside = false;\n const px = (a.x + b.x) / 2;\n const py = (a.y + b.y) / 2;\n\n do {\n if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x) inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\nfunction splitPolygon(a, b) {\n const a2 = new Node(a.i, a.x, a.y);\n const b2 = new Node(b.i, b.x, b.y);\n const an = a.next;\n const bp = b.prev;\n a.next = b;\n b.prev = a;\n a2.next = an;\n an.prev = a2;\n b2.next = a2;\n a2.prev = b2;\n bp.next = b2;\n b2.prev = bp;\n return b2;\n}\n\nfunction insertNode(i, x, y, last) {\n const p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n this.i = i;\n this.x = x;\n this.y = y;\n this.prev = null;\n this.next = null;\n this.z = null;\n this.prevZ = null;\n this.nextZ = null;\n this.steiner = false;\n}\n//# sourceMappingURL=earcut.js.map","import Protobuf from 'pbf';\nimport {getPolygonSignedArea} from '@math.gl/polygon';\nimport {MvtBinaryGeometry} from '../lib/types';\nimport VectorTileFeature from '../lib/binary-vector-tile/vector-tile-feature';\n\n/**\n * Classifies an array of rings into polygons with outer rings and holes\n * The function also detects holes which have zero area and\n * removes them. In doing so it modifies the input\n * `geom.data` array to remove the unneeded data\n *\n * @param geometry\n * @returns object\n */\n// eslint-disable-next-line max-statements\nexport function classifyRings(geom: MvtBinaryGeometry) {\n const len = geom.lines.length;\n\n if (len <= 1) {\n return {\n data: geom.data,\n areas: [[getPolygonSignedArea(geom.data)]],\n lines: [geom.lines]\n };\n }\n\n const areas: any[] = [];\n const polygons: any[] = [];\n let ringAreas: number[] = [];\n let polygon: number[] = [];\n let ccw: boolean | undefined;\n let offset = 0;\n\n for (let endIndex: number, i = 0, startIndex: number; i < len; i++) {\n startIndex = geom.lines[i] - offset;\n\n endIndex = geom.lines[i + 1] - offset || geom.data.length;\n const shape = geom.data.slice(startIndex, endIndex);\n const area = getPolygonSignedArea(shape);\n\n if (area === 0) {\n // This polygon has no area, so remove it from the shape\n // Remove the section from the data array\n const before = geom.data.slice(0, startIndex);\n const after = geom.data.slice(endIndex);\n geom.data = before.concat(after);\n\n // Need to offset any remaining indices as we have\n // modified the data buffer\n offset += endIndex - startIndex;\n\n // Do not add this index to the output and process next shape\n continue; // eslint-disable-line no-continue\n }\n\n if (ccw === undefined) ccw = area < 0;\n\n if (ccw === area < 0) {\n if (polygon.length) {\n areas.push(ringAreas);\n polygons.push(polygon);\n }\n polygon = [startIndex];\n ringAreas = [area];\n } else {\n ringAreas.push(area);\n polygon.push(startIndex);\n }\n }\n if (ringAreas) areas.push(ringAreas);\n if (polygon.length) polygons.push(polygon);\n\n return {areas, lines: polygons, data: geom.data};\n}\n\n/**\n *\n * @param data\n * @param x0\n * @param y0\n * @param size\n */\nexport function project(data: number[], x0: number, y0: number, size: number): void {\n for (let j = 0, jl = data.length; j < jl; j += 2) {\n data[j] = ((data[j] + x0) * 360) / size - 180;\n const y2 = 180 - ((data[j + 1] + y0) * 360) / size;\n data[j + 1] = (360 / Math.PI) * Math.atan(Math.exp((y2 * Math.PI) / 180)) - 90;\n }\n}\n\n/**\n * All code below is unchanged from the original Mapbox implemenation\n *\n * @param tag\n * @param feature\n * @param pbf\n */\nexport function readFeature(tag: number, feature?: VectorTileFeature, pbf?: Protobuf): void {\n if (feature && pbf) {\n if (tag === 1) feature.id = pbf.readVarint();\n else if (tag === 2) readTag(pbf, feature);\n else if (tag === 3) feature.type = pbf.readVarint();\n else if (tag === 4) feature._geometry = pbf.pos;\n }\n}\n\n/**\n * @param pbf\n * @param feature\n */\nexport function readTag(pbf: Protobuf, feature: VectorTileFeature): void {\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const key = feature._keys[pbf.readVarint()];\n const value = feature._values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport Protobuf from 'pbf';\nimport {MvtBinaryCoordinates, MvtBinaryGeometry, MvtFirstPassedData} from '../types';\nimport {classifyRings, project, readFeature} from '../../helpers/binary-util-functions';\n\n// Reduce GC by reusing variables\nlet endPos: number;\nlet cmd: number;\nlet cmdLen: number;\nlet length: number;\nlet x: number;\nlet y: number;\nlet i: number;\n\nexport const TEST_EXPORTS = {\n classifyRings\n};\n\nexport default class VectorTileFeature {\n properties: {[x: string]: string | number | boolean | null};\n extent: any;\n type: number;\n id: number | null;\n _pbf: Protobuf;\n _geometry: number;\n _keys: string[];\n _values: (string | number | boolean | null)[];\n _firstPassData: MvtFirstPassedData;\n static get types() {\n return ['Unknown', 'Point', 'LineString', 'Polygon'];\n }\n\n // eslint-disable-next-line max-params\n constructor(\n pbf: Protobuf,\n end: number,\n extent: any,\n keys: string[],\n values: (string | number | boolean | null)[],\n firstPassData: MvtFirstPassedData\n ) {\n // Public\n this.properties = {};\n this.extent = extent;\n this.type = 0;\n this.id = null;\n\n // Private\n this._pbf = pbf;\n this._geometry = -1;\n this._keys = keys;\n this._values = values;\n this._firstPassData = firstPassData;\n\n pbf.readFields(readFeature, this, end);\n }\n\n // eslint-disable-next-line complexity, max-statements\n loadGeometry(): MvtBinaryGeometry {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n endPos = pbf.readVarint() + pbf.pos;\n cmd = 1;\n length = 0;\n x = 0;\n y = 0;\n i = 0;\n\n // Note: I attempted to replace the `data` array with a\n // Float32Array, but performance was worse, both using\n // `set()` and direct index access. Also, we cannot\n // know how large the buffer should be, so it would\n // increase memory usage\n const lines: number[] = []; // Indices where lines start\n const data: number[] = []; // Flat array of coordinate data\n\n while (pbf.pos < endPos) {\n if (length <= 0) {\n cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) {\n // New line\n lines.push(i);\n }\n data.push(x, y);\n i += 2;\n } else if (cmd === 7) {\n // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90\n if (i > 0) {\n const start = lines[lines.length - 1]; // start index of polygon\n data.push(data[start], data[start + 1]); // closePolygon\n i += 2;\n }\n } else {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n return {data, lines};\n }\n\n /**\n *\n * @param transform\n * @returns result\n */\n _toBinaryCoordinates(transform) {\n // Expands the protobuf data to an intermediate `lines`\n // data format, which maps closely to the binary data buffers.\n // It is similar to GeoJSON, but rather than storing the coordinates\n // in multidimensional arrays, we have a 1D `data` with all the\n // coordinates, and then index into this using the `lines`\n // parameter, e.g.\n //\n // geometry: {\n // type: 'Point', data: [1,2], lines: [0]\n // }\n // geometry: {\n // type: 'LineString', data: [1,2,3,4,...], lines: [0]\n // }\n // geometry: {\n // type: 'Polygon', data: [1,2,3,4,...], lines: [[0, 2]]\n // }\n // Thus the lines member lets us look up the relevant range\n // from the data array.\n // The Multi* versions of the above types share the same data\n // structure, just with multiple elements in the lines array\n let geom = this.loadGeometry();\n\n // Apply the supplied transformation to data\n transform(geom.data, this);\n\n const coordLength = 2;\n\n // eslint-disable-next-line default-case\n switch (this.type) {\n case 1: // Point\n this._firstPassData.pointFeaturesCount++;\n this._firstPassData.pointPositionsCount += geom.lines.length;\n break;\n\n case 2: // LineString\n this._firstPassData.lineFeaturesCount++;\n this._firstPassData.linePathsCount += geom.lines.length;\n this._firstPassData.linePositionsCount += geom.data.length / coordLength;\n break;\n\n case 3: // Polygon\n const classified = classifyRings(geom);\n\n // Unlike Point & LineString geom.lines is a 2D array, thanks\n // to the classifyRings method\n this._firstPassData.polygonFeaturesCount++;\n this._firstPassData.polygonObjectsCount += classified.lines.length;\n\n for (const lines of classified.lines) {\n this._firstPassData.polygonRingsCount += lines.length;\n }\n this._firstPassData.polygonPositionsCount += classified.data.length / coordLength;\n\n geom = classified;\n break;\n }\n\n geom.type = VectorTileFeature.types[this.type];\n if (geom.lines.length > 1) {\n geom.type = `Multi${geom.type}`;\n }\n\n const result: MvtBinaryCoordinates = {\n type: 'Feature',\n geometry: geom,\n properties: this.properties\n };\n\n if (this.id !== null) {\n result.id = this.id;\n }\n\n return result;\n }\n\n toBinaryCoordinates(\n options: {x: number; y: number; z: number} | ((data: number[], feature: {extent: any}) => void)\n ): MvtBinaryCoordinates {\n if (typeof options === 'function') {\n return this._toBinaryCoordinates(options);\n }\n return this._toBinaryCoordinates(project);\n }\n}\n","/* eslint-disable indent */\n// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileFeature from './vector-tile-feature';\nimport Protobuf from 'pbf';\nimport {MvtFirstPassedData} from '../types';\n\nexport default class VectorTileLayer {\n version: number;\n name: string;\n extent: number;\n length: number;\n _pbf: Protobuf;\n _keys: string[];\n _values: (string | number | boolean | null)[];\n _features: number[];\n constructor(pbf: Protobuf, end: number) {\n // Public\n this.version = 1;\n this.name = '';\n this.extent = 4096;\n this.length = 0;\n\n // Private\n this._pbf = pbf;\n this._keys = [];\n this._values = [];\n this._features = [];\n\n pbf.readFields(readLayer, this, end);\n\n this.length = this._features.length;\n }\n\n /**\n * return feature `i` from this layer as a `VectorTileFeature`\n *\n * @param index\n * @param firstPassData\n * @returns {VectorTileFeature}\n */\n feature(i: number, firstPassData: MvtFirstPassedData): VectorTileFeature {\n if (i < 0 || i >= this._features.length) {\n throw new Error('feature index out of bounds');\n }\n\n this._pbf.pos = this._features[i];\n\n const end = this._pbf.readVarint() + this._pbf.pos;\n return new VectorTileFeature(\n this._pbf,\n end,\n this.extent,\n this._keys,\n this._values,\n firstPassData\n );\n }\n}\n\n/**\n *\n * @param tag\n * @param layer\n * @param pbf\n */\nfunction readLayer(tag: number, layer?: VectorTileLayer, pbf?: Protobuf): void {\n if (layer && pbf) {\n if (tag === 15) layer.version = pbf.readVarint();\n else if (tag === 1) layer.name = pbf.readString();\n else if (tag === 5) layer.extent = pbf.readVarint();\n else if (tag === 2) layer._features.push(pbf.pos);\n else if (tag === 3) layer._keys.push(pbf.readString());\n else if (tag === 4) layer._values.push(readValueMessage(pbf));\n }\n}\n\n/**\n *\n * @param pbf\n * @returns value\n */\nfunction readValueMessage(pbf: Protobuf) {\n let value: string | number | boolean | null = null;\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const tag = pbf.readVarint() >> 3;\n\n value =\n tag === 1\n ? pbf.readString()\n : tag === 2\n ? pbf.readFloat()\n : tag === 3\n ? pbf.readDouble()\n : tag === 4\n ? pbf.readVarint64()\n : tag === 5\n ? pbf.readVarint()\n : tag === 6\n ? pbf.readSVarint()\n : tag === 7\n ? pbf.readBoolean()\n : null;\n }\n\n return value;\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileLayer from './vector-tile-layer';\nimport Protobuf from 'pbf';\n\nexport default class VectorTile {\n layers: {[x: string]: VectorTileLayer};\n constructor(pbf: Protobuf, end?: number) {\n this.layers = pbf.readFields(readTile, {}, end);\n }\n}\n\n/**\n *\n * @param tag\n * @param layers\n * @param pbf\n */\nfunction readTile(tag: number, layers?: {[x: string]: VectorTileLayer}, pbf?: Protobuf): void {\n if (tag === 3) {\n if (pbf) {\n const layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);\n if (layer.length && layers) {\n layers[layer.name] = layer;\n }\n }\n }\n}\n","/* eslint-disable indent */\nimport {earcut} from '@math.gl/polygon';\nimport {\n MvtBinaryCoordinates,\n MvtBinaryGeometry,\n MvtBinaryOptions,\n MvtFirstPassedData,\n MvtLines,\n MvtPoints,\n MvtPolygons\n} from '../types';\n\n/**\n * Convert binary features to flat binary arrays. Similar to\n * `geojsonToBinary` helper function, except that it expects\n * a binary representation of the feature data, which enables\n * 2X-3X speed increase in parse speed, compared to using\n * geoJSON. See `binary-vector-tile/VectorTileFeature` for\n * data format detais\n *\n * @param features\n * @param firstPassData\n * @param options\n * @returns filled arrays\n */\nexport function featuresToBinary(\n features: MvtBinaryCoordinates[],\n firstPassData: MvtFirstPassedData,\n options?: MvtBinaryOptions\n) {\n return fillArrays(features, firstPassData, {\n numericPropKeys: options ? options.numericPropKeys : extractNumericPropKeys(features),\n PositionDataType: options ? options.PositionDataType : Float32Array\n });\n}\n\nexport const TEST_EXPORTS = {\n extractNumericPropKeys,\n fillArrays\n};\n\n/**\n * Extracts properties that are always numeric\n *\n * @param features\n * @returns object with numeric keys\n */\nfunction extractNumericPropKeys(features: MvtBinaryCoordinates[]): string[] {\n const numericPropKeys = {};\n for (const feature of features) {\n if (feature.properties) {\n for (const key in feature.properties) {\n // If property has not been seen before, or if property has been numeric\n // in all previous features, check if numeric in this feature\n // If not numeric, false is stored to prevent rechecking in the future\n const numericSoFar = numericPropKeys[key];\n if (numericSoFar || numericSoFar === undefined) {\n const val = feature.properties[key];\n numericPropKeys[key] = isNumeric(val);\n }\n }\n }\n }\n\n return Object.keys(numericPropKeys).filter((k) => numericPropKeys[k]);\n}\n\n/**\n * Fills coordinates into pre-allocated typed arrays\n *\n * @param features\n * @param firstPassData\n * @param options\n * @returns an accessor object with value and size keys\n */\n// eslint-disable-next-line complexity\nfunction fillArrays(\n features: MvtBinaryCoordinates[],\n firstPassData: MvtFirstPassedData,\n options: MvtBinaryOptions\n) {\n const {\n pointPositionsCount,\n pointFeaturesCount,\n linePositionsCount,\n linePathsCount,\n lineFeaturesCount,\n polygonPositionsCount,\n polygonObjectsCount,\n polygonRingsCount,\n polygonFeaturesCount\n } = firstPassData;\n const {numericPropKeys, PositionDataType = Float32Array} = options;\n const hasGlobalId = features[0] && 'id' in features[0];\n const coordLength = 2;\n const GlobalFeatureIdsDataType = features.length > 65535 ? Uint32Array : Uint16Array;\n const points: MvtPoints = {\n positions: new PositionDataType(pointPositionsCount * coordLength),\n globalFeatureIds: new GlobalFeatureIdsDataType(pointPositionsCount),\n featureIds:\n pointFeaturesCount > 65535\n ? new Uint32Array(pointPositionsCount)\n : new Uint16Array(pointPositionsCount),\n numericProps: {},\n properties: [],\n fields: []\n };\n const lines: MvtLines = {\n pathIndices:\n linePositionsCount > 65535\n ? new Uint32Array(linePathsCount + 1)\n : new Uint16Array(linePathsCount + 1),\n positions: new PositionDataType(linePositionsCount * coordLength),\n globalFeatureIds: new GlobalFeatureIdsDataType(linePositionsCount),\n featureIds:\n lineFeaturesCount > 65535\n ? new Uint32Array(linePositionsCount)\n : new Uint16Array(linePositionsCount),\n numericProps: {},\n properties: [],\n fields: []\n };\n const polygons: MvtPolygons = {\n polygonIndices:\n polygonPositionsCount > 65535\n ? new Uint32Array(polygonObjectsCount + 1)\n : new Uint16Array(polygonObjectsCount + 1),\n primitivePolygonIndices:\n polygonPositionsCount > 65535\n ? new Uint32Array(polygonRingsCount + 1)\n : new Uint16Array(polygonRingsCount + 1),\n positions: new PositionDataType(polygonPositionsCount * coordLength),\n triangles: [],\n globalFeatureIds: new GlobalFeatureIdsDataType(polygonPositionsCount),\n featureIds:\n polygonFeaturesCount > 65535\n ? new Uint32Array(polygonPositionsCount)\n : new Uint16Array(polygonPositionsCount),\n numericProps: {},\n properties: [],\n fields: []\n };\n\n // Instantiate numeric properties arrays; one value per vertex\n for (const object of [points, lines, polygons]) {\n for (const propName of numericPropKeys) {\n // If property has been numeric in all previous features in which the property existed, check\n // if numeric in this feature\n object.numericProps[propName] = new Float32Array(object.positions.length / coordLength);\n }\n }\n\n // Set last element of path/polygon indices as positions length\n lines.pathIndices[linePathsCount] = linePositionsCount;\n polygons.polygonIndices[polygonObjectsCount] = polygonPositionsCount;\n polygons.primitivePolygonIndices[polygonRingsCount] = polygonPositionsCount;\n\n const indexMap = {\n pointPosition: 0,\n pointFeature: 0,\n linePosition: 0,\n linePath: 0,\n lineFeature: 0,\n polygonPosition: 0,\n polygonObject: 0,\n polygonRing: 0,\n polygonFeature: 0,\n feature: 0\n };\n\n for (const feature of features) {\n const geometry = feature.geometry;\n const properties = feature.properties || {};\n\n switch (geometry.type) {\n case 'Point':\n case 'MultiPoint':\n handlePoint(geometry, points, indexMap, coordLength, properties);\n points.properties.push(keepStringProperties(properties, numericPropKeys));\n if (hasGlobalId) {\n points.fields.push({id: feature.id});\n }\n indexMap.pointFeature++;\n break;\n case 'LineString':\n case 'MultiLineString':\n handleLineString(geometry, lines, indexMap, coordLength, properties);\n lines.properties.push(keepStringProperties(properties, numericPropKeys));\n if (hasGlobalId) {\n lines.fields.push({id: feature.id});\n }\n indexMap.lineFeature++;\n break;\n case 'Polygon':\n case 'MultiPolygon':\n handlePolygon(geometry, polygons, indexMap, coordLength, properties);\n polygons.properties.push(keepStringProperties(properties, numericPropKeys));\n if (hasGlobalId) {\n polygons.fields.push({id: feature.id});\n }\n indexMap.polygonFeature++;\n break;\n default:\n throw new Error('Invalid geometry type');\n }\n\n indexMap.feature++;\n }\n\n // Wrap each array in an accessor object with value and size keys\n return makeAccessorObjects(points, lines, polygons, coordLength);\n}\n\n/**\n * Fills (Multi)Point coordinates into points object of arrays\n *\n * @param geometry\n * @param points\n * @param indexMap\n * @param coordLength\n * @param properties\n */\nfunction handlePoint(\n geometry: MvtBinaryGeometry,\n points: MvtPoints,\n indexMap: {\n pointPosition: number;\n pointFeature: number;\n linePosition?: number;\n linePath?: number;\n lineFeature?: number;\n polygonPosition?: number;\n polygonObject?: number;\n polygonRing?: number;\n polygonFeature?: number;\n feature: number;\n },\n coordLength: number,\n properties: {[x: string]: string | number | boolean | null}\n): void {\n points.positions.set(geometry.data, indexMap.pointPosition * coordLength);\n\n const nPositions = geometry.data.length / coordLength;\n fillNumericProperties(points, properties, indexMap.pointPosition, nPositions);\n points.globalFeatureIds.fill(\n indexMap.feature,\n indexMap.pointPosition,\n indexMap.pointPosition + nPositions\n );\n points.featureIds.fill(\n indexMap.pointFeature,\n indexMap.pointPosition,\n indexMap.pointPosition + nPositions\n );\n\n indexMap.pointPosition += nPositions;\n}\n\n/**\n * Fills (Multi)LineString coordinates into lines object of arrays\n *\n * @param geometry\n * @param lines\n * @param indexMap\n * @param coordLength\n * @param properties\n */\nfunction handleLineString(\n geometry: MvtBinaryGeometry,\n lines: MvtLines,\n indexMap: {\n pointPosition?: number;\n pointFeature?: number;\n linePosition: number;\n linePath: number;\n lineFeature: number;\n polygonPosition?: number;\n polygonObject?: number;\n polygonRing?: number;\n polygonFeature?: number;\n feature: number;\n },\n coordLength: number,\n properties: {[x: string]: string | number | boolean | null}\n): void {\n lines.positions.set(geometry.data, indexMap.linePosition * coordLength);\n\n const nPositions = geometry.data.length / coordLength;\n fillNumericProperties(lines, properties, indexMap.linePosition, nPositions);\n\n lines.globalFeatureIds.fill(\n indexMap.feature,\n indexMap.linePosition,\n indexMap.linePosition + nPositions\n );\n lines.featureIds.fill(\n indexMap.lineFeature,\n indexMap.linePosition,\n indexMap.linePosition + nPositions\n );\n\n for (let i = 0, il = geometry.lines.length; i < il; ++i) {\n // Extract range of data we are working with, defined by start\n // and end indices (these index into the geometry.data array)\n const start = geometry.lines[i];\n const end =\n i === il - 1\n ? geometry.data.length // last line, so read to end of data\n : geometry.lines[i + 1]; // start index for next line\n\n lines.pathIndices[indexMap.linePath++] = indexMap.linePosition;\n indexMap.linePosition += (end - start) / coordLength;\n }\n}\n\n/**\n * Fills (Multi)Polygon coordinates into polygons object of arrays\n *\n * @param geometry\n * @param polygons\n * @param indexMap\n * @param coordLength\n * @param properties\n */\nfunction handlePolygon(\n geometry: MvtBinaryGeometry,\n polygons: MvtPolygons,\n indexMap: {\n pointPosition?: number;\n pointFeature?: number;\n linePosition?: number;\n linePath?: number;\n lineFeature?: number;\n polygonPosition: number;\n polygonObject: number;\n polygonRing: number;\n polygonFeature: number;\n feature: number;\n },\n coordLength: number,\n properties: {[x: string]: string | number | boolean | null}\n): void {\n polygons.positions.set(geometry.data, indexMap.polygonPosition * coordLength);\n\n const nPositions = geometry.data.length / coordLength;\n fillNumericProperties(polygons, properties, indexMap.polygonPosition, nPositions);\n polygons.globalFeatureIds.fill(\n indexMap.feature,\n indexMap.polygonPosition,\n indexMap.polygonPosition + nPositions\n );\n polygons.featureIds.fill(\n indexMap.polygonFeature,\n indexMap.polygonPosition,\n indexMap.polygonPosition + nPositions\n );\n\n // Unlike Point & LineString geometry.lines is a 2D array\n for (let l = 0, ll = geometry.lines.length; l < ll; ++l) {\n const startPosition = indexMap.polygonPosition;\n polygons.polygonIndices[indexMap.polygonObject++] = startPosition;\n\n const areas = geometry.areas![l];\n const lines = geometry.lines[l];\n const nextLines = geometry.lines[l + 1];\n\n for (let i = 0, il = lines.length; i < il; ++i) {\n const start = lines[i];\n const end =\n i === il - 1\n ? // last line, so either read to:\n nextLines === undefined\n ? geometry.data.length // end of data (no next lines)\n : nextLines[0] // start of first line in nextLines\n : lines[i + 1]; // start index for next line\n\n polygons.primitivePolygonIndices[indexMap.polygonRing++] = indexMap.polygonPosition;\n indexMap.polygonPosition += (end - start) / coordLength;\n }\n\n const endPosition = indexMap.polygonPosition;\n triangulatePolygon(polygons, areas, lines, {startPosition, endPosition, coordLength});\n }\n}\n\n/**\n * Triangulate polygon using earcut\n *\n * @param polygons\n * @param areas\n * @param lines\n * @param param3\n */\nfunction triangulatePolygon(\n polygons: MvtPolygons,\n areas: number,\n lines: number[],\n {\n startPosition,\n endPosition,\n coordLength\n }: {startPosition: number; endPosition: number; coordLength: number}\n): void {\n const start = startPosition * coordLength;\n const end = endPosition * coordLength;\n\n // Extract positions and holes for just this polygon\n const polygonPositions = polygons.positions.subarray(start, end);\n\n // Holes are referenced relative to outer polygon\n const offset = lines[0];\n const holes = lines.slice(1).map((n: number) => (n - offset) / coordLength);\n\n // Compute triangulation\n const indices = earcut(polygonPositions, holes, coordLength, areas);\n\n // Indices returned by triangulation are relative to start\n // of polygon, so we need to offset\n for (let t = 0, tl = indices.length; t < tl; ++t) {\n polygons.triangles.push(startPosition + indices[t]);\n }\n}\n\n/**\n * Wrap each array in an accessor object with value and size keys\n *\n * @param points\n * @param lines\n * @param polygons\n * @param coordLength\n * @returns object\n */\nfunction makeAccessorObjects(\n points: MvtPoints,\n lines: MvtLines,\n polygons: MvtPolygons,\n coordLength: number\n) {\n const returnObj = {\n points: {\n ...points,\n positions: {value: points.positions, size: coordLength},\n globalFeatureIds: {value: points.globalFeatureIds, size: 1},\n featureIds: {value: points.featureIds, size: 1}\n },\n lines: {\n ...lines,\n pathIndices: {value: lines.pathIndices, size: 1},\n positions: {value: lines.positions, size: coordLength},\n globalFeatureIds: {value: lines.globalFeatureIds, size: 1},\n featureIds: {value: lines.featureIds, size: 1}\n },\n polygons: {\n ...polygons,\n polygonIndices: {value: polygons.polygonIndices, size: 1},\n primitivePolygonIndices: {value: polygons.primitivePolygonIndices, size: 1},\n positions: {value: polygons.positions, size: coordLength},\n triangles: {value: new Uint32Array(polygons.triangles), size: 1},\n globalFeatureIds: {value: polygons.globalFeatureIds, size: 1},\n featureIds: {value: polygons.featureIds, size: 1}\n }\n };\n\n for (const geomType in returnObj) {\n for (const numericProp in returnObj[geomType].numericProps) {\n returnObj[geomType].numericProps[numericProp] = {\n value: returnObj[geomType].numericProps[numericProp],\n size: 1\n };\n }\n }\n return returnObj;\n}\n\n/**\n * Add numeric properties to object\n *\n * @param object\n * @param properties\n * @param index\n * @param length\n */\nfunction fillNumericProperties(\n object: MvtPoints,\n properties: {[x: string]: string | number | boolean | null},\n index: number,\n length: number\n): void {\n for (const numericPropName in object.numericProps) {\n if (numericPropName in properties) {\n object.numericProps[numericPropName].fill(properties[numericPropName], index, index + length);\n }\n }\n}\n\n/**\n * Keep string properties in object\n *\n * @param properties\n * @param numericKeys\n * @returns object\n */\nfunction keepStringProperties(\n properties: {[x: string]: string | number | boolean | null},\n numericKeys: string[]\n) {\n const props = {};\n for (const key in properties) {\n if (!numericKeys.includes(key)) {\n props[key] = properties[key];\n }\n }\n return props;\n}\n\nfunction isNumeric(x: unknown) {\n return Number.isFinite(x);\n}\n","// import {VectorTile} from '@mapbox/vector-tile';\nimport VectorTile from './mapbox-vector-tile/vector-tile';\nimport BinaryVectorTile from './binary-vector-tile/vector-tile';\n\nimport {featuresToBinary} from './binary-vector-tile/features-to-binary';\nimport Protobuf from 'pbf';\nimport {MvtBinaryCoordinates, MvtMapboxCoordinates, MvtOptions} from '../lib/types';\nimport VectorTileFeatureBinary from './binary-vector-tile/vector-tile-feature';\nimport VectorTileFeatureMapBox from './mapbox-vector-tile/vector-tile-feature';\nimport {LoaderOptions} from '@loaders.gl/loader-utils/';\n\n/**\n * Parse MVT arrayBuffer and return GeoJSON.\n *\n * @param arrayBuffer A MVT arrayBuffer\n * @param options\n * @returns A GeoJSON geometry object or a binary representation\n */\nexport default function parseMVT(arrayBuffer: ArrayBuffer, options?: LoaderOptions) {\n options = normalizeOptions(options);\n const features: (MvtBinaryCoordinates | MvtMapboxCoordinates)[] = [];\n\n if (options) {\n const binary = options.gis.format === 'binary';\n const firstPassData = {\n pointPositionsCount: 0,\n pointFeaturesCount: 0,\n linePositionsCount: 0,\n linePathsCount: 0,\n lineFeaturesCount: 0,\n polygonPositionsCount: 0,\n polygonObjectsCount: 0,\n polygonRingsCount: 0,\n polygonFeaturesCount: 0\n };\n\n if (arrayBuffer.byteLength > 0) {\n const tile = binary\n ? new BinaryVectorTile(new Protobuf(arrayBuffer))\n : new VectorTile(new Protobuf(arrayBuffer));\n const loaderOptions = options.mvt;\n\n const selectedLayers = Array.isArray(loaderOptions.layers)\n ? loaderOptions.layers\n : Object.keys(tile.layers);\n\n selectedLayers.forEach((layerName: string) => {\n const vectorTileLayer = tile.layers[layerName];\n const featureOptions = {...loaderOptions, layerName};\n\n if (!vectorTileLayer) {\n return;\n }\n\n for (let i = 0; i < vectorTileLayer.length; i++) {\n const vectorTileFeature = vectorTileLayer.feature(i, firstPassData);\n\n const decodedFeature = binary\n ? getDecodedFeatureBinary(vectorTileFeature as VectorTileFeatureBinary, featureOptions)\n : getDecodedFeature(vectorTileFeature as VectorTileFeatureMapBox, featureOptions);\n features.push(decodedFeature);\n }\n });\n }\n\n if (binary) {\n const data = featuresToBinary(features as MvtBinaryCoordinates[], firstPassData);\n // Add the original byteLength (as a reasonable approximation of the size of the binary data)\n // TODO decide where to store extra fields like byteLength (header etc) and document\n // @ts-ignore\n data.byteLength = arrayBuffer.byteLength;\n return data;\n }\n }\n return features;\n}\n\n/**\n * @param options\n * @returns options\n */\nfunction normalizeOptions(options: LoaderOptions | undefined) {\n if (options) {\n options = {\n ...options,\n mvt: options.mvt || {},\n gis: options.gis || {}\n };\n\n // Validate\n const wgs84Coordinates = options.coordinates === 'wgs84';\n const {tileIndex} = options;\n const hasTileIndex =\n tileIndex &&\n Number.isFinite(tileIndex.x) &&\n Number.isFinite(tileIndex.y) &&\n Number.isFinite(tileIndex.z);\n\n if (wgs84Coordinates && !hasTileIndex) {\n throw new Error(\n 'MVT Loader: WGS84 coordinates need tileIndex property. Check documentation.'\n );\n }\n }\n return options;\n}\n\n/**\n * @param feature\n * @param options\n * @returns decoded feature\n */\nfunction getDecodedFeature(\n feature: VectorTileFeatureMapBox,\n options: MvtOptions\n): MvtMapboxCoordinates {\n const decodedFeature = feature.toGeoJSON(\n options.coordinates === 'wgs84' ? options.tileIndex : transformToLocalCoordinates\n );\n\n // Add layer name to GeoJSON properties\n if (options.layerProperty) {\n decodedFeature.properties[options.layerProperty] = options.layerName;\n }\n\n return decodedFeature;\n}\n\n/**\n * @param feature\n * @param options\n * @returns decoded binary feature\n */\nfunction getDecodedFeatureBinary(\n feature: VectorTileFeatureBinary,\n options: MvtOptions\n): MvtBinaryCoordinates {\n const decodedFeature = feature.toBinaryCoordinates(\n options.coordinates === 'wgs84' ? options.tileIndex : transformToLocalCoordinatesBinary\n );\n\n // Add layer name to GeoJSON properties\n if (options.layerProperty) {\n decodedFeature.properties[options.layerProperty] = options.layerName;\n }\n\n return decodedFeature;\n}\n\n/**\n * @param line\n * @param feature\n */\nfunction transformToLocalCoordinates(line: number[], feature: {extent: any}): void {\n // This function transforms local coordinates in a\n // [0 - bufferSize, this.extent + bufferSize] range to a\n // [0 - (bufferSize / this.extent), 1 + (bufferSize / this.extent)] range.\n // The resulting extent would be 1.\n const {extent} = feature;\n for (let i = 0; i < line.length; i++) {\n const p = line[i];\n p[0] /= extent;\n p[1] /= extent;\n }\n}\n\nfunction transformToLocalCoordinatesBinary(data: number[], feature: {extent: any}) {\n // For the binary code path, the feature data is just\n // one big flat array, so we just divide each value\n const {extent} = feature;\n for (let i = 0, il = data.length; i < il; ++i) {\n data[i] /= extent;\n }\n}\n","import type {Loader, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport parseMVT from './lib/parse-mvt';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Worker loader for the Mapbox Vector Tile format\n */\nexport const MVTWorkerLoader: Loader = {\n name: 'Mapbox Vector Tile',\n id: 'mvt',\n module: 'mvt',\n version: VERSION,\n // Note: ArcGIS uses '.pbf' extension and 'application/octet-stream'\n extensions: ['mvt', 'pbf'],\n mimeTypes: [\n 'application/vnd.mapbox-vector-tile',\n 'application/x-protobuf'\n // 'application/octet-stream'\n ],\n worker: true,\n category: 'geometry',\n options: {\n mvt: {\n coordinates: 'local',\n layerProperty: 'layerName',\n layers: null,\n tileIndex: null\n }\n }\n};\n\n/**\n * Loader for the Mapbox Vector Tile format\n */\nexport const MVTLoader: LoaderWithParser = {\n ...MVTWorkerLoader,\n parse: async (arrayBuffer, options) => parseMVT(arrayBuffer, options),\n parseSync: parseMVT,\n binary: true\n};\n"],"sourceRoot":""}