@loaders.gl/draco 3.0.10 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.min.js CHANGED
@@ -1,2 +1,2 @@
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 r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},a="object"!=typeof n||"[object process]"!==String(n)||n.browser,s="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(2),r(5))},function(t,e){},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(e){const n=r(6),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,n)}).call(this,r(2))},,function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,d=[],u=!1,l=-1;function h(){u&&c&&(u=!1,c.length?d=c.concat(d):l=-1,d.length&&f())}function f(){if(!u){var t=s(h);u=!0;for(var e=d.length;e;){for(c=d,d=[];++l<e;)c&&c[l].run();l=-1,e=d.length}c=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new y(t,e)),1!==d.length||u||s(f)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";r.r(e),r.d(e,"DracoWriter",(function(){return J})),r.d(e,"DracoWorkerLoader",(function(){return n})),r.d(e,"DracoLoader",(function(){return K})),r.d(e,"_TypecheckDracoLoader",(function(){return Z}));const n={name:"Draco",id:"draco",module:"draco",version:"3.0.10",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{constructor(t,e){i(this,"fields",void 0),i(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new o(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new o(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof o){const n=t;e=n.fields,r=a(a(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const i=Object.values(n);return new o(i,r)}}function a(t,e){return new Map([...t||new Map,...e||new Map])}let s,c,d,u,l,h,f,y;function m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(s||(s={}));class p{static isNull(t){return t&&t.typeId===s.Null}static isInt(t){return t&&t.typeId===s.Int}static isFloat(t){return t&&t.typeId===s.Float}static isBinary(t){return t&&t.typeId===s.Binary}static isUtf8(t){return t&&t.typeId===s.Utf8}static isBool(t){return t&&t.typeId===s.Bool}static isDecimal(t){return t&&t.typeId===s.Decimal}static isDate(t){return t&&t.typeId===s.Date}static isTime(t){return t&&t.typeId===s.Time}static isTimestamp(t){return t&&t.typeId===s.Timestamp}static isInterval(t){return t&&t.typeId===s.Interval}static isList(t){return t&&t.typeId===s.List}static isStruct(t){return t&&t.typeId===s.Struct}static isUnion(t){return t&&t.typeId===s.Union}static isFixedSizeBinary(t){return t&&t.typeId===s.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===s.FixedSizeList}static isMap(t){return t&&t.typeId===s.Map}static isDictionary(t){return t&&t.typeId===s.Dictionary}get typeId(){return s.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;c=Symbol.toStringTag;class b extends p{constructor(t,e){super(),m(this,"isSigned",void 0),m(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return s.Int}get[c](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class w extends b{constructor(){super(!0,8)}}class g extends b{constructor(){super(!0,16)}}class _ extends b{constructor(){super(!0,32)}}class A extends b{constructor(){super(!1,8)}}class T extends b{constructor(){super(!1,16)}}class I extends b{constructor(){super(!1,32)}}const M=32,D=64;d=Symbol.toStringTag;class O extends p{constructor(t){super(),m(this,"precision",void 0),this.precision=t}get typeId(){return s.Float}get[d](){return"Float"}toString(){return"Float"+this.precision}}class S extends O{constructor(){super(M)}}class v extends O{constructor(){super(D)}}Symbol.toStringTag;Symbol.toStringTag;u=Symbol.toStringTag;l=Symbol.toStringTag;h=Symbol.toStringTag;f=Symbol.toStringTag;y=Symbol.toStringTag;class E extends p{constructor(t,e){super(),m(this,"listSize",void 0),m(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return s.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[y](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}function N(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class F{constructor(t,e,r=!1,n=new Map){N(this,"name",void 0),N(this,"type",void 0),N(this,"nullable",void 0),N(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new F(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}function U(t,e,r){const n=r?x(r.metadata):void 0,i=function(t){switch(t.constructor){case Int8Array:return new w;case Uint8Array:return new A;case Int16Array:return new g;case Uint16Array:return new T;case Int32Array:return new _;case Uint32Array:return new I;case Float32Array:return new S;case Float64Array:return new v;default:throw new Error("array type not supported")}}(e.value);return new F(t,new E(e.size,new F("value",i)),!1,n)}function x(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function L(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const z={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},j={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class B{constructor(t){L(this,"draco",void 0),L(this,"decoder",void 0),L(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),i=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const a=this._getDracoLoaderData(i,n,e),s=this._getMeshData(i,a,e),c=function(t){let e=1/0,r=1/0,n=1/0,i=-1/0,o=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],c=s&&s.length;for(let t=0;t<c;t+=3){const c=s[t],d=s[t+1],u=s[t+2];e=c<e?c:e,r=d<r?d:r,n=u<n?u:n,i=c>i?c:i,o=d>o?d:o,a=u>a?u:a}return[[e,r,n],[i,o,a]]}(s.attributes),d=function(t,e,r){const n=x(e.metadata),i=[],a=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=U(e,t[e],a[e]);i.push(r)}if(r){const t=U("indices",r);i.push(t)}return new o(i,n)}(s.attributes,a,s.indices);return{loader:"draco",loaderData:a,header:{vertexCount:i.num_points(),boundingBox:c},...s,schema:d}}finally{this.draco.destroy(r),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:i}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const i=this.decoder.GetAttribute(t,n),o=this._getAttributeMetadata(t,n);r[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:n,metadata:o};const a=this._getQuantizationTransform(i,e);a&&(r[i.unique_id()].quantization_transform=a);const s=this._getOctahedronTransform(i,e);s&&(r[i.unique_id()].octahedron_transform=s)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,r);i.name=t;const{value:o,size:a}=this._getAttributeValues(e,i);n[t]={value:o,size:a,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=j[e.data_type],n=e.num_components,i=t.num_points()*n,o=i*r.BYTES_PER_ELEMENT,a=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let s;const c=this.draco._malloc(o);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,a,o,c),s=new r(this.draco.HEAPF32.buffer,c,i).slice()}finally{this.draco._free(c)}return{value:s,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in z){if(this.draco[t]===n)return z[t]}const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var P=r(0),C=r(1);const R={};async function G(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!P.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.0.10/dist/libs/${t}`;if(P.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),R[t]=R[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!P.b)return C.requireFromFile&&await C.requireFromFile(t);if(P.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!P.b)return C.requireFromString&&C.requireFromString(t,e);if(P.c)return eval.call(P.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await R[t]}let $,q;async function Q(t){const e=t.modules||{};return $=e.draco3d?$||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):$||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await G("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await G("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await G("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await $}async function k(t){const e=t.modules||{};return q=e.draco3d?q||e.draco3d.createEncoderModule({}).then(t=>({draco:t})):q||async function(t){let e=await G("https://raw.githubusercontent.com/google/draco/1.4.1/javascript/draco_encoder.js","draco",t);return e=e||globalThis.DracoEncoderModule,new Promise(t=>{e({onModuleLoaded:e=>t({draco:e})})})}(t),await q}function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const V={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},H=()=>{};class X{constructor(t){W(this,"draco",void 0),W(this,"dracoEncoder",void 0),W(this,"dracoMeshBuilder",void 0),W(this,"dracoMetadataBuilder",void 0),W(this,"log",void 0),this.draco=t,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(t){t&&this.draco.destroy(t)}encodeSync(t,e={}){return this.log=H,this._setOptions(e),e.pointcloud?this._encodePointCloud(t,e):this._encodeMesh(t,e)}_getAttributesFromMesh(t){const e={...t,...t.attributes};return t.indices&&(e.indices=t.indices),e}_encodePointCloud(t,e){const r=new this.draco.PointCloud;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoPointCloud(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodePointCloudToDracoBuffer(r,!1,i);if(!(t>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),Y(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_encodeMesh(t,e){const r=new this.draco.Mesh;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoMesh(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodeMeshToDracoBuffer(r,i);if(t<=0)throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),Y(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_setOptions(t){if("speed"in t&&this.dracoEncoder.SetSpeedOptions(...t.speed),"method"in t){const e=this.draco[t.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(e)}if("quantization"in t)for(const e in t.quantization){const r=t.quantization[e],n=this.draco[e];this.dracoEncoder.SetAttributeQuantization(n,r)}}_createDracoMesh(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=V[r]||r;const a=this._addAttributeToMesh(t,r,o,i);-1!==a&&this._addAttributeMetadata(t,a,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_createDracoPointCloud(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=V[r]||r;const a=this._addAttributeToMesh(t,r,o,i);-1!==a&&this._addAttributeMetadata(t,a,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_addAttributeToMesh(t,e,r,n){if(!ArrayBuffer.isView(r))return-1;const i=this._getDracoAttributeType(e),o=r.length/n;if("indices"===i){const n=r.length/3;return this.log(`Adding attribute ${e}, size ${n}`),this.dracoMeshBuilder.AddFacesToMesh(t,n,r),-1}this.log(`Adding attribute ${e}, size ${o}`);const a=this.dracoMeshBuilder,{buffer:s}=r;switch(r.constructor){case Int8Array:return a.AddInt8Attribute(t,i,n,o,new Int8Array(s));case Int16Array:return a.AddInt16Attribute(t,i,n,o,new Int16Array(s));case Int32Array:return a.AddInt32Attribute(t,i,n,o,new Int32Array(s));case Uint8Array:case Uint8ClampedArray:return a.AddUInt8Attribute(t,i,n,o,new Uint8Array(s));case Uint16Array:return a.AddUInt16Attribute(t,i,n,o,new Uint16Array(s));case Uint32Array:return a.AddUInt32Attribute(t,i,n,o,new Uint32Array(s));case Float32Array:default:return a.AddFloatAttribute(t,i,n,o,new Float32Array(s))}}_getDracoAttributeType(t){switch(t.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(t){for(const e in t){const r=t[e];if(this._getDracoAttributeType(e)===this.draco.POSITION)return r}return null}_addGeometryMetadata(t,e){const r=new this.draco.Metadata;this._populateDracoMetadata(r,e),this.dracoMeshBuilder.AddMetadata(t,r)}_addAttributeMetadata(t,e,r){const n=new this.draco.Metadata;this._populateDracoMetadata(n,r),this.dracoMeshBuilder.SetMetadataForAttribute(t,e,n)}_populateDracoMetadata(t,e){for(const[n,i]of(r=e).entries&&!r.hasOwnProperty("entries")?r.entries():Object.entries(r))switch(typeof i){case"number":Math.trunc(i)===i?this.dracoMetadataBuilder.AddIntEntry(t,n,i):this.dracoMetadataBuilder.AddDoubleEntry(t,n,i);break;case"object":i instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(t,n,i,i.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(t,n,i)}var r}}function Y(t){const e=t.size(),r=new ArrayBuffer(e),n=new Int8Array(r);for(let r=0;r<e;++r)n[r]=t.GetValue(r);return r}const J={name:"DRACO",id:"draco",module:"draco",version:"3.0.10",extensions:["drc"],encode:async function(t,e={}){const{draco:r}=await k(e),n=new X(r);try{return n.encodeSync(t,e.draco)}finally{n.destroy()}},options:{draco:{pointcloud:!1,attributeNameEntry:"name"}}};const K={...n,parse:async function(t,e){const{draco:r}=await Q(e),n=new B(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const Z=K}])}));
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 r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},a="object"!=typeof n||"[object process]"!==String(n)||n.browser,s="function"==typeof importScripts,c=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));c&&parseFloat(c[1])}).call(this,r(2),r(5))},function(t,e){},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(e){const n=r(6),i="undefined"==typeof window?e:window;i.loaders=i.loaders||{},t.exports=Object.assign(i.loaders,n)}).call(this,r(2))},,function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,d=[],u=!1,l=-1;function h(){u&&c&&(u=!1,c.length?d=c.concat(d):l=-1,d.length&&f())}function f(){if(!u){var t=s(h);u=!0;for(var e=d.length;e;){for(c=d,d=[];++l<e;)c&&c[l].run();l=-1,e=d.length}c=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new y(t,e)),1!==d.length||u||s(f)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";r.r(e),r.d(e,"DracoWriter",(function(){return J})),r.d(e,"DracoWorkerLoader",(function(){return n})),r.d(e,"DracoLoader",(function(){return K})),r.d(e,"_TypecheckDracoLoader",(function(){return Z}));const n={name:"Draco",id:"draco",module:"draco",version:"3.0.14",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{constructor(t,e){i(this,"fields",void 0),i(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new o(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new o(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof o){const n=t;e=n.fields,r=a(a(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const i=Object.values(n);return new o(i,r)}}function a(t,e){return new Map([...t||new Map,...e||new Map])}let s,c,d,u,l,h,f,y;function m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(s||(s={}));class p{static isNull(t){return t&&t.typeId===s.Null}static isInt(t){return t&&t.typeId===s.Int}static isFloat(t){return t&&t.typeId===s.Float}static isBinary(t){return t&&t.typeId===s.Binary}static isUtf8(t){return t&&t.typeId===s.Utf8}static isBool(t){return t&&t.typeId===s.Bool}static isDecimal(t){return t&&t.typeId===s.Decimal}static isDate(t){return t&&t.typeId===s.Date}static isTime(t){return t&&t.typeId===s.Time}static isTimestamp(t){return t&&t.typeId===s.Timestamp}static isInterval(t){return t&&t.typeId===s.Interval}static isList(t){return t&&t.typeId===s.List}static isStruct(t){return t&&t.typeId===s.Struct}static isUnion(t){return t&&t.typeId===s.Union}static isFixedSizeBinary(t){return t&&t.typeId===s.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===s.FixedSizeList}static isMap(t){return t&&t.typeId===s.Map}static isDictionary(t){return t&&t.typeId===s.Dictionary}get typeId(){return s.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;c=Symbol.toStringTag;class b extends p{constructor(t,e){super(),m(this,"isSigned",void 0),m(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return s.Int}get[c](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class w extends b{constructor(){super(!0,8)}}class g extends b{constructor(){super(!0,16)}}class _ extends b{constructor(){super(!0,32)}}class A extends b{constructor(){super(!1,8)}}class T extends b{constructor(){super(!1,16)}}class I extends b{constructor(){super(!1,32)}}const M=32,D=64;d=Symbol.toStringTag;class O extends p{constructor(t){super(),m(this,"precision",void 0),this.precision=t}get typeId(){return s.Float}get[d](){return"Float"}toString(){return"Float"+this.precision}}class S extends O{constructor(){super(M)}}class v extends O{constructor(){super(D)}}Symbol.toStringTag;Symbol.toStringTag;u=Symbol.toStringTag;l=Symbol.toStringTag;h=Symbol.toStringTag;f=Symbol.toStringTag;y=Symbol.toStringTag;class E extends p{constructor(t,e){super(),m(this,"listSize",void 0),m(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return s.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[y](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}function N(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class F{constructor(t,e,r=!1,n=new Map){N(this,"name",void 0),N(this,"type",void 0),N(this,"nullable",void 0),N(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new F(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}function U(t,e,r){const n=r?x(r.metadata):void 0,i=function(t){switch(t.constructor){case Int8Array:return new w;case Uint8Array:return new A;case Int16Array:return new g;case Uint16Array:return new T;case Int32Array:return new _;case Uint32Array:return new I;case Float32Array:return new S;case Float64Array:return new v;default:throw new Error("array type not supported")}}(e.value);return new F(t,new E(e.size,new F("value",i)),!1,n)}function x(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function L(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const z={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},j={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class B{constructor(t){L(this,"draco",void 0),L(this,"decoder",void 0),L(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),i=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const a=this._getDracoLoaderData(i,n,e),s=this._getMeshData(i,a,e),c=function(t){let e=1/0,r=1/0,n=1/0,i=-1/0,o=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],c=s&&s.length;for(let t=0;t<c;t+=3){const c=s[t],d=s[t+1],u=s[t+2];e=c<e?c:e,r=d<r?d:r,n=u<n?u:n,i=c>i?c:i,o=d>o?d:o,a=u>a?u:a}return[[e,r,n],[i,o,a]]}(s.attributes),d=function(t,e,r){const n=x(e.metadata),i=[],a=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=U(e,t[e],a[e]);i.push(r)}if(r){const t=U("indices",r);i.push(t)}return new o(i,n)}(s.attributes,a,s.indices);return{loader:"draco",loaderData:a,header:{vertexCount:i.num_points(),boundingBox:c},...s,schema:d}}finally{this.draco.destroy(r),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:i}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const i=this.decoder.GetAttribute(t,n),o=this._getAttributeMetadata(t,n);r[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:n,metadata:o};const a=this._getQuantizationTransform(i,e);a&&(r[i.unique_id()].quantization_transform=a);const s=this._getOctahedronTransform(i,e);s&&(r[i.unique_id()].octahedron_transform=s)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,r);i.name=t;const{value:o,size:a}=this._getAttributeValues(e,i);n[t]={value:o,size:a,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=j[e.data_type],n=e.num_components,i=t.num_points()*n,o=i*r.BYTES_PER_ELEMENT,a=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let s;const c=this.draco._malloc(o);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,a,o,c),s=new r(this.draco.HEAPF32.buffer,c,i).slice()}finally{this.draco._free(c)}return{value:s,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in z){if(this.draco[t]===n)return z[t]}const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var P=r(0),C=r(1);const R={};async function G(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!P.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.0.14/dist/libs/${t}`;if(P.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),R[t]=R[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!P.b)return C.requireFromFile&&await C.requireFromFile(t);if(P.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!P.b)return C.requireFromString&&C.requireFromString(t,e);if(P.c)return eval.call(P.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await R[t]}let $,q;async function Q(t){const e=t.modules||{};return $=e.draco3d?$||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):$||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await G("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await G("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await G("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await $}async function k(t){const e=t.modules||{};return q=e.draco3d?q||e.draco3d.createEncoderModule({}).then(t=>({draco:t})):q||async function(t){let e=await G("https://raw.githubusercontent.com/google/draco/1.4.1/javascript/draco_encoder.js","draco",t);return e=e||globalThis.DracoEncoderModule,new Promise(t=>{e({onModuleLoaded:e=>t({draco:e})})})}(t),await q}function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const V={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},H=()=>{};class X{constructor(t){W(this,"draco",void 0),W(this,"dracoEncoder",void 0),W(this,"dracoMeshBuilder",void 0),W(this,"dracoMetadataBuilder",void 0),W(this,"log",void 0),this.draco=t,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(t){t&&this.draco.destroy(t)}encodeSync(t,e={}){return this.log=H,this._setOptions(e),e.pointcloud?this._encodePointCloud(t,e):this._encodeMesh(t,e)}_getAttributesFromMesh(t){const e={...t,...t.attributes};return t.indices&&(e.indices=t.indices),e}_encodePointCloud(t,e){const r=new this.draco.PointCloud;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoPointCloud(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodePointCloudToDracoBuffer(r,!1,i);if(!(t>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),Y(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_encodeMesh(t,e){const r=new this.draco.Mesh;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoMesh(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodeMeshToDracoBuffer(r,i);if(t<=0)throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),Y(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_setOptions(t){if("speed"in t&&this.dracoEncoder.SetSpeedOptions(...t.speed),"method"in t){const e=this.draco[t.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(e)}if("quantization"in t)for(const e in t.quantization){const r=t.quantization[e],n=this.draco[e];this.dracoEncoder.SetAttributeQuantization(n,r)}}_createDracoMesh(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=V[r]||r;const a=this._addAttributeToMesh(t,r,o,i);-1!==a&&this._addAttributeMetadata(t,a,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_createDracoPointCloud(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=V[r]||r;const a=this._addAttributeToMesh(t,r,o,i);-1!==a&&this._addAttributeMetadata(t,a,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_addAttributeToMesh(t,e,r,n){if(!ArrayBuffer.isView(r))return-1;const i=this._getDracoAttributeType(e),o=r.length/n;if("indices"===i){const n=r.length/3;return this.log(`Adding attribute ${e}, size ${n}`),this.dracoMeshBuilder.AddFacesToMesh(t,n,r),-1}this.log(`Adding attribute ${e}, size ${o}`);const a=this.dracoMeshBuilder,{buffer:s}=r;switch(r.constructor){case Int8Array:return a.AddInt8Attribute(t,i,n,o,new Int8Array(s));case Int16Array:return a.AddInt16Attribute(t,i,n,o,new Int16Array(s));case Int32Array:return a.AddInt32Attribute(t,i,n,o,new Int32Array(s));case Uint8Array:case Uint8ClampedArray:return a.AddUInt8Attribute(t,i,n,o,new Uint8Array(s));case Uint16Array:return a.AddUInt16Attribute(t,i,n,o,new Uint16Array(s));case Uint32Array:return a.AddUInt32Attribute(t,i,n,o,new Uint32Array(s));case Float32Array:default:return a.AddFloatAttribute(t,i,n,o,new Float32Array(s))}}_getDracoAttributeType(t){switch(t.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(t){for(const e in t){const r=t[e];if(this._getDracoAttributeType(e)===this.draco.POSITION)return r}return null}_addGeometryMetadata(t,e){const r=new this.draco.Metadata;this._populateDracoMetadata(r,e),this.dracoMeshBuilder.AddMetadata(t,r)}_addAttributeMetadata(t,e,r){const n=new this.draco.Metadata;this._populateDracoMetadata(n,r),this.dracoMeshBuilder.SetMetadataForAttribute(t,e,n)}_populateDracoMetadata(t,e){for(const[n,i]of(r=e).entries&&!r.hasOwnProperty("entries")?r.entries():Object.entries(r))switch(typeof i){case"number":Math.trunc(i)===i?this.dracoMetadataBuilder.AddIntEntry(t,n,i):this.dracoMetadataBuilder.AddDoubleEntry(t,n,i);break;case"object":i instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(t,n,i,i.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(t,n,i)}var r}}function Y(t){const e=t.size(),r=new ArrayBuffer(e),n=new Int8Array(r);for(let r=0;r<e;++r)n[r]=t.GetValue(r);return r}const J={name:"DRACO",id:"draco",module:"draco",version:"3.0.14",extensions:["drc"],encode:async function(t,e={}){const{draco:r}=await k(e),n=new X(r);try{return n.encodeSync(t,e.draco)}finally{n.destroy()}},options:{draco:{pointcloud:!1,attributeNameEntry:"name"}}};const K={...n,parse:async function(t,e){const{draco:r}=await Q(e),n=new B(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const Z=K}])}));
2
2
  //# sourceMappingURL=dist.min.js.map
@@ -1,2 +1,2 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(28);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){t.exports=r(19)},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return c}));var o=r(8),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},u="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,c="function"==typeof importScripts,s=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));s&&parseFloat(s[1])}).call(this,r(23),r(24))},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(25),o=r(26),i=r(13),a=r(27);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,r){var n=r(20),o=r(21),i=r(13),a=r(22);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(14);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(8).default,o=r(6);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},,,,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function p(){}var y={};y[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(T([])));v&&v!==e&&r.call(v,o)&&(y=v);var m=p.prototype=l.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=m.constructor=p,p.constructor=d,d.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,s=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),1!==s.length||f||u(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(14);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";r.r(e);var n=r(2),o=r.n(n),i=r(5),a=r.n(i),u=r(3),c=r.n(u),s=r(0),f=r.n(s),l=r(4),d=r.n(l),p=r(8),y=r.n(p);function h(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var v=new Map,m=function(){function t(){f()(this,t)}return d()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=v.get(t);e||(e=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=v.get(t);v.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(h(e))o.add(e);else if(h(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"===y()(e))for(var i in e)t(e[i],r,o)}else;return void 0===n?Array.from(o):[]}(e);self.postMessage(r,n)}}}]),t}();function b(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var x=0;function _(t,e){return new Promise((function(r,n){var o=x++;m.addEventListener((function t(e,i){if(i.id===o)switch(e){case"done":m.removeEventListener(t),r(i.result);break;case"error":m.removeEventListener(t),n(i.error)}}));var i={id:o,input:t,options:e};m.postMessage("process",i)}))}function O(t){return T.apply(this,arguments)}function T(){return(T=a()(c.a.mark((function t(e){var r,n,o,i,a,u,s;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,i=e.context,!r.parseSync&&!r.parse){t.next=6;break}a=n,u=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}s=new TextDecoder,a=s.decode(n),u=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=w(w({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,u(a,w({},o),i,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var S={name:"Draco",id:"draco",module:"draco",version:"3.0.10",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"==typeof WebAssembly?"undefined":y()(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}},A=r(9),I=r.n(A),k=r(11),j=r.n(k);function M(t){for(var e=1/0,r=1/0,n=1/0,o=-1/0,i=-1/0,a=-1/0,u=t.POSITION?t.POSITION.value:[],c=u&&u.length,s=0;s<c;s+=3){var f=u[s],l=u[s+1],d=u[s+2];e=f<e?f:e,r=l<r?l:r,n=d<n?d:n,o=f>o?f:o,i=l>i?l:i,a=d>a?d:a}return[[e,r,n],[o,i,a]]}function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var P=function(){function t(e,r){f()(this,t),o()(this,"fields",void 0),o()(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(e)),function(t){var e,r={},n=D(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r[o.name]&&console.warn("Schema: duplicated field name",o.name,o),r[o.name]=!0}}catch(t){n.e(t)}finally{n.f()}}(e),this.fields=e,this.metadata=r||new Map}return d()(t,[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var i=0,a=n;i<a.length;i++){var u=a[i];e[u]=!0}var c=this.fields.filter((function(t){return e[t.name]}));return new t(c,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=n.map((function(t){return e.fields[t]})).filter(Boolean);return new t(i,this.metadata)}},{key:"assign",value:function(e){var r,n=this.metadata;if(e instanceof t){var o=e;r=o.fields,n=L(L(new Map,this.metadata),o.metadata)}else r=e;var i,a=Object.create(null),u=D(this.fields);try{for(u.s();!(i=u.n()).done;){var c=i.value;a[c.name]=c}}catch(t){u.e(t)}finally{u.f()}var s,f=D(r);try{for(f.s();!(s=f.n()).done;){var l=s.value;a[l.name]=l}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(a),n)}}]),t}();function L(t,e){return new Map([].concat(I()(t||new Map),I()(e||new Map)))}var F,N,U,z,B=r(6),G=r.n(B),C=r(1),R=r.n(C),q=r(15),Q=r.n(q),W=r(12),V=r.n(W);function Y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=V()(t);if(e){var o=V()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Q()(this,r)}}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(F||(F={}));var H=function(){function t(){f()(this,t)}return d()(t,[{key:"typeId",get:function(){return F.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===F.Null}},{key:"isInt",value:function(t){return t&&t.typeId===F.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===F.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===F.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===F.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===F.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===F.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===F.Date}},{key:"isTime",value:function(t){return t&&t.typeId===F.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===F.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===F.Interval}},{key:"isList",value:function(t){return t&&t.typeId===F.List}},{key:"isStruct",value:function(t){return t&&t.typeId===F.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===F.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===F.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===F.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===F.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===F.Dictionary}}]),t}();N=Symbol.toStringTag;var $=function(t){R()(r,t);var e=Y(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(G()(i),"isSigned",void 0),o()(G()(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=n,i}return d()(r,[{key:"typeId",get:function(){return F.Int}},{key:N,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),r}(H),X=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!0,8)}return r}($),J=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!0,16)}return r}($),K=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!0,32)}return r}($),Z=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!1,8)}return r}($),tt=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!1,16)}return r}($),et=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!1,32)}return r}($),rt=32,nt=64;U=Symbol.toStringTag;var ot=function(t){R()(r,t);var e=Y(r);function r(t){var n;return f()(this,r),n=e.call(this),o()(G()(n),"precision",void 0),n.precision=t,n}return d()(r,[{key:"typeId",get:function(){return F.Float}},{key:U,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),r}(H),it=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,rt)}return r}(ot),at=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,nt)}return r}(ot);Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;z=Symbol.toStringTag;var ut=function(t){R()(r,t);var e=Y(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(G()(i),"listSize",void 0),o()(G()(i),"children",void 0),i.listSize=t,i.children=[n],i}return d()(r,[{key:"typeId",get:function(){return F.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:z,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),r}(H);var ct=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;f()(this,t),o()(this,"name",void 0),o()(this,"type",void 0),o()(this,"nullable",void 0),o()(this,"metadata",void 0),this.name=e,this.type=r,this.nullable=n,this.metadata=i}return d()(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();function st(t,e,r){var n=lt(e.metadata),o=[],i=function(t){var e={};for(var r in t){var n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(var a in t){var u=ft(a,t[a],i[a]);o.push(u)}if(r){var c=ft("indices",r);o.push(c)}return new P(o,n)}function ft(t,e,r){var n=r?lt(r.metadata):void 0,o=function(t){switch(t.constructor){case Int8Array:return new X;case Uint8Array:return new Z;case Int16Array:return new J;case Uint16Array:return new tt;case Int32Array:return new K;case Uint32Array:return new et;case Float32Array:return new it;case Float64Array:return new at;default:throw new Error("array type not supported")}}(e.value);return new ct(t,new ut(e.size,new ct("value",o)),!1,n)}function lt(t){var e=new Map;for(var r in t)e.set("".concat(r,".string"),JSON.stringify(t[r]));return e}function dt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var vt={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},mt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},bt=function(){function t(e){f()(this,t),o()(this,"draco",void 0),o()(this,"decoder",void 0),o()(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}return d()(t,[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);var n=this.decoder.GetEncodedGeometryType(r),o=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var i;switch(n){case this.draco.TRIANGULAR_MESH:i=this.decoder.DecodeBufferToMesh(r,o);break;case this.draco.POINT_CLOUD:i=this.decoder.DecodeBufferToPointCloud(r,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!i.ok()||!o.ptr){var a="DRACO decompression failed: ".concat(i.error_msg());throw new Error(a)}var u=this._getDracoLoaderData(o,n,e),c=this._getMeshData(o,u,e),s=M(c.attributes),f=st(c.attributes,u,c.indices),l=ht(ht({loader:"draco",loaderData:u,header:{vertexCount:o.num_points(),boundingBox:s}},c),{},{schema:f});return l}finally{this.draco.destroy(r),o&&this.draco.destroy(o)}}},{key:"_getDracoLoaderData",value:function(t,e,r){var n=this._getTopLevelMetadata(t),o=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:o}}},{key:"_getDracoAttributes",value:function(t,e){for(var r={},n=0;n<t.num_attributes();n++){var o=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[o.unique_id()]={unique_id:o.unique_id(),attribute_type:o.attribute_type(),data_type:o.data_type(),num_components:o.num_components(),byte_offset:o.byte_offset(),byte_stride:o.byte_stride(),normalized:o.normalized(),attribute_index:n,metadata:i};var a=this._getQuantizationTransform(o,e);a&&(r[o.unique_id()].quantization_transform=a);var u=this._getOctahedronTransform(o,e);u&&(r[o.unique_id()].octahedron_transform=u)}return r}},{key:"_getMeshData",value:function(t,e,r){var n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}},{key:"_getMeshAttributes",value:function(t,e,r){for(var n={},o=0,i=Object.values(t.attributes);o<i.length;o++){var a=i[o],u=this._deduceAttributeName(a,r);a.name=u;var c=this._getAttributeValues(e,a),s=c.value,f=c.size;n[u]={value:s,size:f,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return n}},{key:"_getTriangleListIndices",value:function(t){var e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}},{key:"_getTriangleStripIndices",value:function(t){var e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}},{key:"_getAttributeValues",value:function(t,e){var r,n=mt[e.data_type],o=e.num_components,i=t.num_points()*o,a=i*n.BYTES_PER_ELEMENT,u=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,n),c=this.draco._malloc(a);try{var s=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,s,u,a,c),r=new n(this.draco.HEAPF32.buffer,c,i).slice()}finally{this.draco._free(c)}return{value:r,size:o}}},{key:"_deduceAttributeName",value:function(t,e){for(var r=t.unique_id,n=0,o=Object.entries(e.extraAttributes||{});n<o.length;n++){var i=j()(o[n],2),a=i[0];if(i[1]===r)return a}var u=t.attribute_type;for(var c in vt){if(this.draco[c]===u)return vt[c]}var s=e.attributeNameEntry||"name";return t.metadata[s]?t.metadata[s].string:"CUSTOM_ATTRIBUTE_".concat(r)}},{key:"_getTopLevelMetadata",value:function(t){var e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}},{key:"_getAttributeMetadata",value:function(t,e){var r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}},{key:"_getDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},r=this.metadataQuerier.NumEntries(t),n=0;n<r;n++){var o=this.metadataQuerier.GetEntryName(t,n);e[o]=this._getDracoMetadataField(t,o)}return e}},{key:"_getDracoMetadataField",value:function(t,e){var r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);var n=function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}},{key:"_disableAttributeTransforms",value:function(t){var e,r=t.quantizedAttributes,n=void 0===r?[]:r,o=t.octahedronAttributes,i=void 0===o?[]:o,a=dt([].concat(I()(n),I()(i)));try{for(a.s();!(e=a.n()).done;){var u=e.value;this.decoder.SkipAttributeTransform(this.draco[u])}}catch(t){a.e(t)}finally{a.f()}}},{key:"_getQuantizationTransform",value:function(t,e){var r=this,n=e.quantizedAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits(),range:a.range(),min_values:new Float32Array([1,2,3]).map((function(t){return a.min_value(t)}))}}finally{this.draco.destroy(a)}}return null}},{key:"_getOctahedronTransform",value:function(t,e){var r=this,n=e.octahedronAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits()}}finally{this.draco.destroy(a)}}return null}}]),t}();var gt=r(7),wt=r(10);var xt={};function _t(t){return Ot.apply(this,arguments)}function Ot(){return(Ot=a()(c.a.mark((function t(e){var r,n,o=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(e=Tt(e,r,n)),xt[e]=xt[e]||St(e),t.next=6,xt[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Tt(t,e,r){if(t.startsWith("http"))return t;var n=r.modules||{};return n[t]?n[t]:gt.b?r.CDN?(function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(e,"@").concat("3.0.10","/dist/libs/").concat(t)):gt.c?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function St(t){return At.apply(this,arguments)}function At(){return(At=a()(c.a.mark((function t(e){var r,n,o;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(gt.b){t.next=14;break}if(t.t0=wt.requireFromFile,!t.t0){t.next=13;break}return t.next=12,wt.requireFromFile(e);case 12:t.t0=t.sent;case 13:return t.abrupt("return",t.t0);case 14:if(!gt.c){t.next=16;break}return t.abrupt("return",importScripts(e));case 16:return t.next=18,fetch(e);case 18:return n=t.sent,t.next=21,n.text();case 21:return o=t.sent,t.abrupt("return",It(o,e));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function It(t,e){if(!gt.b)return wt.requireFromString&&wt.requireFromString(t,e);if(gt.c)return eval.call(gt.a,t),null;var r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}function kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Mt,Dt="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.js"),Et="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_wasm_wrapper.js"),Pt="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js");function Lt(t){return Ft.apply(this,arguments)}function Ft(){return(Ft=a()(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.modules||{},Mt=r.draco3d?Mt||r.draco3d.createDecoderModule({}).then((function(t){return{draco:t}})):Mt||Nt(e),t.next=4,Mt;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nt(t){return Ut.apply(this,arguments)}function Ut(){return(Ut=a()(c.a.mark((function t(e){var r,n,o,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,_t(Dt,"draco",e);case 5:return r=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,_t(Et,"draco",e);case 10:return t.t2=t.sent,t.next=13,_t(Pt,"draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:o=t.sent,i=j()(o,2),r=i[0],n=i[1];case 21:return r=r||globalThis.DracoDecoderModule,t.next=24,zt(r,n);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zt(t,e){var r={};return e&&(r.wasmBinary=e),new Promise((function(e){t(jt(jt({},r),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ct=Gt(Gt({},S),{},{parse:function(t,e){return Rt.apply(this,arguments)}});function Rt(){return(Rt=a()(c.a.mark((function t(e,r){var n,o,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt(r);case 2:return n=t.sent,o=n.draco,i=new bt(o),t.prev=5,t.abrupt("return",i.parseSync(e,null==r?void 0:r.draco));case 7:return t.prev=7,i.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}var qt;qt=Ct,"undefined"!=typeof self&&(m.onmessage=function(){var t=a()(c.a.mark((function t(e,r){var n,o,i,a,u;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,t.next=7,O({loader:qt,arrayBuffer:n,options:i,context:{parse:_}});case 7:a=t.sent,m.postMessage("done",{result:a}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),u=t.t1 instanceof Error?t.t1.message:"",m.postMessage("error",{error:u});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())}]);
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(28);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){t.exports=r(19)},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return c}));var o=r(8),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},u="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,c="function"==typeof importScripts,s=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));s&&parseFloat(s[1])}).call(this,r(23),r(24))},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(25),o=r(26),i=r(13),a=r(27);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,r){var n=r(20),o=r(21),i=r(13),a=r(22);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(14);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(8).default,o=r(6);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},,,,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function p(){}var y={};y[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(T([])));v&&v!==e&&r.call(v,o)&&(y=v);var m=p.prototype=l.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=m.constructor=p,p.constructor=d,d.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,s=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),1!==s.length||f||u(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(14);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";r.r(e);var n=r(2),o=r.n(n),i=r(5),a=r.n(i),u=r(3),c=r.n(u),s=r(0),f=r.n(s),l=r(4),d=r.n(l),p=r(8),y=r.n(p);function h(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var v=new Map,m=function(){function t(){f()(this,t)}return d()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=v.get(t);e||(e=function(e){if(b(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=v.get(t);v.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(h(e))o.add(e);else if(h(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"===y()(e))for(var i in e)t(e[i],r,o)}else;return void 0===n?Array.from(o):[]}(e);self.postMessage(r,n)}}}]),t}();function b(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var x=0;function _(t,e){return new Promise((function(r,n){var o=x++;m.addEventListener((function t(e,i){if(i.id===o)switch(e){case"done":m.removeEventListener(t),r(i.result);break;case"error":m.removeEventListener(t),n(i.error)}}));var i={id:o,input:t,options:e};m.postMessage("process",i)}))}function O(t){return T.apply(this,arguments)}function T(){return(T=a()(c.a.mark((function t(e){var r,n,o,i,a,u,s;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,i=e.context,!r.parseSync&&!r.parse){t.next=6;break}a=n,u=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}s=new TextDecoder,a=s.decode(n),u=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=w(w({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,u(a,w({},o),i,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var S={name:"Draco",id:"draco",module:"draco",version:"3.0.14",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"==typeof WebAssembly?"undefined":y()(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}},A=r(9),I=r.n(A),k=r(11),j=r.n(k);function M(t){for(var e=1/0,r=1/0,n=1/0,o=-1/0,i=-1/0,a=-1/0,u=t.POSITION?t.POSITION.value:[],c=u&&u.length,s=0;s<c;s+=3){var f=u[s],l=u[s+1],d=u[s+2];e=f<e?f:e,r=l<r?l:r,n=d<n?d:n,o=f>o?f:o,i=l>i?l:i,a=d>a?d:a}return[[e,r,n],[o,i,a]]}function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var P=function(){function t(e,r){f()(this,t),o()(this,"fields",void 0),o()(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(e)),function(t){var e,r={},n=D(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r[o.name]&&console.warn("Schema: duplicated field name",o.name,o),r[o.name]=!0}}catch(t){n.e(t)}finally{n.f()}}(e),this.fields=e,this.metadata=r||new Map}return d()(t,[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var i=0,a=n;i<a.length;i++){var u=a[i];e[u]=!0}var c=this.fields.filter((function(t){return e[t.name]}));return new t(c,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=n.map((function(t){return e.fields[t]})).filter(Boolean);return new t(i,this.metadata)}},{key:"assign",value:function(e){var r,n=this.metadata;if(e instanceof t){var o=e;r=o.fields,n=L(L(new Map,this.metadata),o.metadata)}else r=e;var i,a=Object.create(null),u=D(this.fields);try{for(u.s();!(i=u.n()).done;){var c=i.value;a[c.name]=c}}catch(t){u.e(t)}finally{u.f()}var s,f=D(r);try{for(f.s();!(s=f.n()).done;){var l=s.value;a[l.name]=l}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(a),n)}}]),t}();function L(t,e){return new Map([].concat(I()(t||new Map),I()(e||new Map)))}var F,N,U,z,B=r(6),G=r.n(B),C=r(1),R=r.n(C),q=r(15),Q=r.n(q),W=r(12),V=r.n(W);function Y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=V()(t);if(e){var o=V()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Q()(this,r)}}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(F||(F={}));var H=function(){function t(){f()(this,t)}return d()(t,[{key:"typeId",get:function(){return F.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===F.Null}},{key:"isInt",value:function(t){return t&&t.typeId===F.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===F.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===F.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===F.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===F.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===F.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===F.Date}},{key:"isTime",value:function(t){return t&&t.typeId===F.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===F.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===F.Interval}},{key:"isList",value:function(t){return t&&t.typeId===F.List}},{key:"isStruct",value:function(t){return t&&t.typeId===F.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===F.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===F.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===F.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===F.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===F.Dictionary}}]),t}();N=Symbol.toStringTag;var $=function(t){R()(r,t);var e=Y(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(G()(i),"isSigned",void 0),o()(G()(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=n,i}return d()(r,[{key:"typeId",get:function(){return F.Int}},{key:N,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),r}(H),X=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!0,8)}return r}($),J=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!0,16)}return r}($),K=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!0,32)}return r}($),Z=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!1,8)}return r}($),tt=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!1,16)}return r}($),et=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,!1,32)}return r}($),rt=32,nt=64;U=Symbol.toStringTag;var ot=function(t){R()(r,t);var e=Y(r);function r(t){var n;return f()(this,r),n=e.call(this),o()(G()(n),"precision",void 0),n.precision=t,n}return d()(r,[{key:"typeId",get:function(){return F.Float}},{key:U,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),r}(H),it=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,rt)}return r}(ot),at=function(t){R()(r,t);var e=Y(r);function r(){return f()(this,r),e.call(this,nt)}return r}(ot);Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;z=Symbol.toStringTag;var ut=function(t){R()(r,t);var e=Y(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(G()(i),"listSize",void 0),o()(G()(i),"children",void 0),i.listSize=t,i.children=[n],i}return d()(r,[{key:"typeId",get:function(){return F.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:z,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),r}(H);var ct=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;f()(this,t),o()(this,"name",void 0),o()(this,"type",void 0),o()(this,"nullable",void 0),o()(this,"metadata",void 0),this.name=e,this.type=r,this.nullable=n,this.metadata=i}return d()(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();function st(t,e,r){var n=lt(e.metadata),o=[],i=function(t){var e={};for(var r in t){var n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(var a in t){var u=ft(a,t[a],i[a]);o.push(u)}if(r){var c=ft("indices",r);o.push(c)}return new P(o,n)}function ft(t,e,r){var n=r?lt(r.metadata):void 0,o=function(t){switch(t.constructor){case Int8Array:return new X;case Uint8Array:return new Z;case Int16Array:return new J;case Uint16Array:return new tt;case Int32Array:return new K;case Uint32Array:return new et;case Float32Array:return new it;case Float64Array:return new at;default:throw new Error("array type not supported")}}(e.value);return new ct(t,new ut(e.size,new ct("value",o)),!1,n)}function lt(t){var e=new Map;for(var r in t)e.set("".concat(r,".string"),JSON.stringify(t[r]));return e}function dt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pt(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var vt={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},mt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},bt=function(){function t(e){f()(this,t),o()(this,"draco",void 0),o()(this,"decoder",void 0),o()(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}return d()(t,[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);var n=this.decoder.GetEncodedGeometryType(r),o=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var i;switch(n){case this.draco.TRIANGULAR_MESH:i=this.decoder.DecodeBufferToMesh(r,o);break;case this.draco.POINT_CLOUD:i=this.decoder.DecodeBufferToPointCloud(r,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!i.ok()||!o.ptr){var a="DRACO decompression failed: ".concat(i.error_msg());throw new Error(a)}var u=this._getDracoLoaderData(o,n,e),c=this._getMeshData(o,u,e),s=M(c.attributes),f=st(c.attributes,u,c.indices),l=ht(ht({loader:"draco",loaderData:u,header:{vertexCount:o.num_points(),boundingBox:s}},c),{},{schema:f});return l}finally{this.draco.destroy(r),o&&this.draco.destroy(o)}}},{key:"_getDracoLoaderData",value:function(t,e,r){var n=this._getTopLevelMetadata(t),o=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:o}}},{key:"_getDracoAttributes",value:function(t,e){for(var r={},n=0;n<t.num_attributes();n++){var o=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[o.unique_id()]={unique_id:o.unique_id(),attribute_type:o.attribute_type(),data_type:o.data_type(),num_components:o.num_components(),byte_offset:o.byte_offset(),byte_stride:o.byte_stride(),normalized:o.normalized(),attribute_index:n,metadata:i};var a=this._getQuantizationTransform(o,e);a&&(r[o.unique_id()].quantization_transform=a);var u=this._getOctahedronTransform(o,e);u&&(r[o.unique_id()].octahedron_transform=u)}return r}},{key:"_getMeshData",value:function(t,e,r){var n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}},{key:"_getMeshAttributes",value:function(t,e,r){for(var n={},o=0,i=Object.values(t.attributes);o<i.length;o++){var a=i[o],u=this._deduceAttributeName(a,r);a.name=u;var c=this._getAttributeValues(e,a),s=c.value,f=c.size;n[u]={value:s,size:f,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return n}},{key:"_getTriangleListIndices",value:function(t){var e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}},{key:"_getTriangleStripIndices",value:function(t){var e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}},{key:"_getAttributeValues",value:function(t,e){var r,n=mt[e.data_type],o=e.num_components,i=t.num_points()*o,a=i*n.BYTES_PER_ELEMENT,u=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,n),c=this.draco._malloc(a);try{var s=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,s,u,a,c),r=new n(this.draco.HEAPF32.buffer,c,i).slice()}finally{this.draco._free(c)}return{value:r,size:o}}},{key:"_deduceAttributeName",value:function(t,e){for(var r=t.unique_id,n=0,o=Object.entries(e.extraAttributes||{});n<o.length;n++){var i=j()(o[n],2),a=i[0];if(i[1]===r)return a}var u=t.attribute_type;for(var c in vt){if(this.draco[c]===u)return vt[c]}var s=e.attributeNameEntry||"name";return t.metadata[s]?t.metadata[s].string:"CUSTOM_ATTRIBUTE_".concat(r)}},{key:"_getTopLevelMetadata",value:function(t){var e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}},{key:"_getAttributeMetadata",value:function(t,e){var r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}},{key:"_getDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},r=this.metadataQuerier.NumEntries(t),n=0;n<r;n++){var o=this.metadataQuerier.GetEntryName(t,n);e[o]=this._getDracoMetadataField(t,o)}return e}},{key:"_getDracoMetadataField",value:function(t,e){var r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);var n=function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}},{key:"_disableAttributeTransforms",value:function(t){var e,r=t.quantizedAttributes,n=void 0===r?[]:r,o=t.octahedronAttributes,i=void 0===o?[]:o,a=dt([].concat(I()(n),I()(i)));try{for(a.s();!(e=a.n()).done;){var u=e.value;this.decoder.SkipAttributeTransform(this.draco[u])}}catch(t){a.e(t)}finally{a.f()}}},{key:"_getQuantizationTransform",value:function(t,e){var r=this,n=e.quantizedAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits(),range:a.range(),min_values:new Float32Array([1,2,3]).map((function(t){return a.min_value(t)}))}}finally{this.draco.destroy(a)}}return null}},{key:"_getOctahedronTransform",value:function(t,e){var r=this,n=e.octahedronAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits()}}finally{this.draco.destroy(a)}}return null}}]),t}();var gt=r(7),wt=r(10);var xt={};function _t(t){return Ot.apply(this,arguments)}function Ot(){return(Ot=a()(c.a.mark((function t(e){var r,n,o=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(e=Tt(e,r,n)),xt[e]=xt[e]||St(e),t.next=6,xt[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Tt(t,e,r){if(t.startsWith("http"))return t;var n=r.modules||{};return n[t]?n[t]:gt.b?r.CDN?(function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(e,"@").concat("3.0.14","/dist/libs/").concat(t)):gt.c?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function St(t){return At.apply(this,arguments)}function At(){return(At=a()(c.a.mark((function t(e){var r,n,o;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(gt.b){t.next=14;break}if(t.t0=wt.requireFromFile,!t.t0){t.next=13;break}return t.next=12,wt.requireFromFile(e);case 12:t.t0=t.sent;case 13:return t.abrupt("return",t.t0);case 14:if(!gt.c){t.next=16;break}return t.abrupt("return",importScripts(e));case 16:return t.next=18,fetch(e);case 18:return n=t.sent,t.next=21,n.text();case 21:return o=t.sent,t.abrupt("return",It(o,e));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function It(t,e){if(!gt.b)return wt.requireFromString&&wt.requireFromString(t,e);if(gt.c)return eval.call(gt.a,t),null;var r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}function kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Mt,Dt="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.js"),Et="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_wasm_wrapper.js"),Pt="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js");function Lt(t){return Ft.apply(this,arguments)}function Ft(){return(Ft=a()(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.modules||{},Mt=r.draco3d?Mt||r.draco3d.createDecoderModule({}).then((function(t){return{draco:t}})):Mt||Nt(e),t.next=4,Mt;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nt(t){return Ut.apply(this,arguments)}function Ut(){return(Ut=a()(c.a.mark((function t(e){var r,n,o,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,_t(Dt,"draco",e);case 5:return r=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,_t(Et,"draco",e);case 10:return t.t2=t.sent,t.next=13,_t(Pt,"draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:o=t.sent,i=j()(o,2),r=i[0],n=i[1];case 21:return r=r||globalThis.DracoDecoderModule,t.next=24,zt(r,n);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zt(t,e){var r={};return e&&(r.wasmBinary=e),new Promise((function(e){t(jt(jt({},r),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ct=Gt(Gt({},S),{},{parse:function(t,e){return Rt.apply(this,arguments)}});function Rt(){return(Rt=a()(c.a.mark((function t(e,r){var n,o,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt(r);case 2:return n=t.sent,o=n.draco,i=new bt(o),t.prev=5,t.abrupt("return",i.parseSync(e,null==r?void 0:r.draco));case 7:return t.prev=7,i.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}var qt;qt=Ct,"undefined"!=typeof self&&(m.onmessage=function(){var t=a()(c.a.mark((function t(e,r){var n,o,i,a,u;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,t.next=7,O({loader:qt,arrayBuffer:n,options:i,context:{parse:_}});case 7:a=t.sent,m.postMessage("done",{result:a}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),u=t.t1 instanceof Error?t.t1.message:"",m.postMessage("error",{error:u});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())}]);
2
2
  //# sourceMappingURL=draco-worker.js.map