Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/core

Package Overview
Dependencies
Maintainers
9
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/core - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

src/.DS_Store

2

dist/dist.min.js

@@ -1,1 +0,1 @@

!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var n=r();for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(window,function(){return function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=5)}([function(e,r,n){"use strict";(function(e,t){n.d(r,"c",function(){return o}),n.d(r,"e",function(){return i}),n.d(r,"f",function(){return u}),n.d(r,"b",function(){return c}),n.d(r,"a",function(){return a}),n.d(r,"d",function(){return l});const o="object"!=typeof e||"[object process]"!==String(e)||e.browser,s={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},i=s.self||s.window||s.global,u=s.window||s.self||s.global,c=s.global||s.self||s.window,a=s.document||{},f=void 0!==e&&e.version&&e.version.match(/v([0-9]*)/),l=f&&parseFloat(f[1])||0}).call(this,n(6),n(4))},function(e,r){},function(e,r){},function(e,r){},function(e,r){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,r,n){(function(r){const t=n(7),o="undefined"==typeof window?r:window;o.loaders=o.loaders||{},e.exports=Object.assign(o.loaders,t)}).call(this,n(4))},function(e,r){var n,t,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{t="function"==typeof clearTimeout?clearTimeout:i}catch(e){t=i}}();var c,a=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?a=c.concat(a):l=-1,a.length&&y())}function y(){if(!f){var e=u(d);f=!0;for(var r=a.length;r;){for(c=a,a=[];++l<r;)c&&c[l].run();l=-1,r=a.length}c=null,f=!1,function(e){if(t===clearTimeout)return clearTimeout(e);if((t===i||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(e);try{t(e)}catch(r){try{return t.call(null,e)}catch(r){return t.call(this,e)}}}(e)}}function h(e,r){this.fun=e,this.array=r}function p(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];a.push(new h(e,r)),1!==a.length||f||u(y)},h.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=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,n){"use strict";n.r(r);var t={};function o(e,r){if(!e)throw new Error(r||"loader assertion failed.")}function s(e){if(!e)return!1;return Array.isArray(e)&&(e=e[0]),e.parseTextSync||e.parseSync||e.parse||e.loadAndParse||e.parseStream||e.parseInBatches||e.worker}function i(e){let r;return o(s(e)),Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),e.extension&&(e.extensions=e.extensions||e.extension,delete e.extension),Array.isArray(e.extensions)||(e.extensions=[e.extensions]),o(e.extensions&&e.extensions.length>0&&e.extensions[0]),e.parseTextSync&&(e.text=!0),e.text||(e.binary=!0),e}n.r(t),n.d(t,"dirname",function(){return ce});class u{log(){}info(){}warn(){}error(){}}function c(e,r){return null===(e=Object.assign({},r&&r.DEFAULT_OPTIONS,r&&r.defaultOptions,r&&r.options,e,{dataType:"arraybuffer"})).log&&(e.log=new u),"log"in e||(e.log=console),e}const a=e=>"boolean"==typeof e,f=e=>"function"==typeof e,l=e=>null!==e&&"object"==typeof e,d=e=>l(e)&&f(e.then),y=e=>e&&"function"==typeof e[Symbol.iterator],h=e=>e&&"function"==typeof e[Symbol.asyncIterator],p=e=>e&&f(e.next),w=e=>"undefined"!=typeof Response&&e instanceof Response||e.arrayBuffer&&e.text&&e.json,b=e=>(e=>"undefined"!=typeof File&&e instanceof File)(e)||(e=>"undefined"!=typeof Blob&&e instanceof Blob)(e),g=e=>(e=>l(e)&&f(e.tee)&&f(e.cancel)&&f(e.pipeTo)&&f(e.getReader))(e)||(e=>l(e)&&f(e.read)&&f(e.pipe)&&a(e.readable))(e),m=e=>(e=>l(e)&&f(e.abort)&&f(e.getWriter))(e)||(e=>l(e)&&f(e.end)&&f(e.write)&&a(e.writable))(e);var x=n(0);function A(e){if(x.c||x.d>=10){if("function"==typeof e[Symbol.asyncIterator])return e;if("function"==typeof e.getIterator)return e.getIterator()}return x.c?async function*(e){const r=e.getReader();try{for(;;){const{done:e,value:n}=await r.read();if(e)return;yield n}}catch(e){r.releaseLock()}}(e):async function*(e){e=await e;for(;;){const r=e.read();if(null===r){if(e._readableState.ended)return;await S(e)}else yield r}}(e)}async function S(e){return new Promise(r=>{e.once("readable",r)})}class v{constructor(e){this._fileOrBlob=e,this.bodyUsed=!1}get headers(){return new Headers({"Content-Length":this._fileOrBlob.size,"Content-Type":this._fileOrBlob.type})}get ok(){return!0}get status(){return 200}url(){return this._fileOrBlob.name||""}async arrayBuffer(){const{reader:e,promise:r}=this._getFileReader();return e.readAsArrayBuffer(this._fileOrBlob),r}async text(){const{reader:e,promise:r}=this._getFileReader();return e.readAsText(this._fileOrBlob),r}async json(){const e=await this.text();return JSON.parse(e)}_getFileReader(){let e;o(!this.bodyUsed),this.bodyUsed=!0;const r=new Promise((r,n)=>{try{(e=new FileReader).onerror=e=>n(new Error(e)),e.onabort=()=>n(new Error("Read aborted.")),e.onload=()=>r(e.result)}catch(e){n(e)}});return{reader:e,promise:r}}}function T(e,r){return Promise.resolve(new v(e,r))}const B="Cannot convert supplied data type";function k(e,r){if(r.text&&"string"==typeof e)return e;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){const n=e.buffer||e;if(r.text&&!r.binary){return new TextDecoder("utf8").decode(n)}return n}throw new Error(B)}async function j(e,r){const n=(e=await e)instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||n)return k(e,r);if(b(e)&&(e=await T(e)),w(e))return await async function(e){if(!e.ok){let r=`fetch failed ${e.status} `;try{r+=await e.text()}catch(e){}throw new Error(r)}}(e),r.binary?await e.arrayBuffer():await e.text();throw new Error(B)}function _(e){return p(e)?e:w(e)&&e.body?(function(e){if(!e.ok)throw new Error(`fetch failed ${e.status}`)}(e),A(e.body)):g(e)?A(e):h(e)?e[Symbol.asyncIterator]():P(e)}function P(e){if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return function*(){yield e.buffer||e}();if(p(e))return e;if(y(e))return e[Symbol.iterator]();throw new Error(B)}function F(e,r){return{fetch:"undefined"!=typeof window&&window.fetch,...e}}var I=n(3);function O(e){if(I.toArrayBuffer&&(e=Object(I.toArrayBuffer)(e)),e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.buffer;if("string"==typeof e){const r=e;return(new TextEncoder).encode(r).buffer}return o(!1)}function E(e,r=!0,n=[]){if(e){if(e instanceof ArrayBuffer)n.push(e);else if(e.buffer&&e.buffer instanceof ArrayBuffer)n.push(e.buffer);else if(r&&"object"==typeof e)for(const t in e)E(e[t],r,n)}else;return n}const D=new Map;let C=0;function L({data:e,resolve:r}){r(e)}class M{constructor({source:e,name:r=`web-worker-${C++}`,onMessage:n}){const t=function(e){if(o("string"==typeof e,"worker source"),e.startsWith("url(")&&e.endsWith(")"))return e.match(/^url\((.*)\)$/)[1];let r=D.get(e);if(!r){const n=new Blob([e],{type:"application/javascript"});r=URL.createObjectURL(n),D.set(e,r)}return r}(e);this.worker=new Worker(t,{name:r}),this.name=r,this.onMessage=n||L}async process(e){return new Promise((r,n)=>{this.worker.onmessage=e=>this.onMessage({worker:this.worker,data:e.data,resolve:r,reject:n}),this.worker.onerror=e=>n(e);const t=E(e);this.worker.postMessage(e,t)})}destroy(){this.worker.terminate(),this.worker=null}}class R{constructor({source:e,name:r="unnamed",maxConcurrency:n=1,onMessage:t,onDebug:o=(()=>{})}){this.source=e,this.name=r,this.maxConcurrency=n,this.onMessage=t,this.onDebug=o,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}async process(e,r){return new Promise((n,t)=>{this.jobQueue.push({data:e,jobName:r,resolve:n,reject:t}),this._startQueuedJob()})}_startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const r=this.jobQueue.shift();this.onDebug({message:"processing",worker:e.name,job:r.jobName,backlog:this.jobQueue.length}),e.process(r.data).then(e=>r.resolve(e)).catch(e=>r.reject(e)).then(()=>this._onWorkerDone(e))}_onWorkerDone(e){this.isDestroyed?e.destroy():(this.idleQueue.push(e),this._startQueuedJob())}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;const e=`${this.name.toLowerCase()}-worker-${this.count}-of-${this.maxConcurrency}`;return new M({source:this.source,onMessage:this.onMessage,name:e})}return null}}const W=5;class ${constructor({maxConcurrency:e=W,onMessage:r,onDebug:n=(()=>{})}){this.maxConcurrency=e,this.onMessage=r,this.onDebug=n,this.workerPools=new Map}setProps(e){"maxConcurrency"in e&&(this.maxConcurrency=e.maxConcurrency),"onDebug"in e&&(this.onDebug=e.onDebug)}destroy(){this.workerPools.forEach(e=>e.destroy())}async process(e,r,n){return this._getWorkerPool(e,r).process(n)}_getWorkerPool(e,r){let n=this.workerPools.get(r);return n||(n=new R({source:e,name:r,onMessage:this.onMessage,maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(r,n)),n}}let Q=null;async function U({worker:e,data:r,resolve:n,reject:t}){switch(r.type){case"done":n(r.result);break;case"process":try{const n=await X(r.arraybuffer,r.options,r.url);e.postMessage({type:"process-done",id:r.id,result:n},E(n))}catch(n){e.postMessage({type:"process-error",id:r.id,message:n.message})}break;case"error":t(r.message)}}function N(e,r,n,t={},o={}){const s=function(e={}){const r={};return e.maxConcurrency&&(r.maxConcurrency=e.maxConcurrency),e.onDebug&&(r.onDebug=e.onDebug),Q||(Q=new $({onMessage:U})),Q.setProps(r),Q}(t);return t=JSON.parse(JSON.stringify(t)),s.process(e,`loaders.gl-${r}`,{arraybuffer:O(n),options:t,source:"loaders.gl",type:"process"})}let J={};function V(e){e=Array.isArray(e)?e:[e];for(const r of e){const e=i(r);for(const r of e.extensions)J[r]=e}}function q(){J={}}const z=/[^.]+$/;function H(e,r="",n=null,{nothrow:t=!1}={}){if(r=r||"",e&&!Array.isArray(e)){const r=e;return i(r),r}(function(e){for(const r of e)i(r)})(e=e||Object.values(J)),r=r.replace(/\?.*/,"");let o=null;if(!(o=(o=o||function(e,r){const n=r.match(z),t=n&&n[0];return t&&function(e,r){r=r.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===r)return n;return null}(e,t)}(e,r))||function(e,r){if(!r)return null;for(const n of e)if("string"==typeof r){if(G(r,n))return n}else if(ArrayBuffer.isView(r)){if(K(r.buffer,r.byteOffset,n))return n}else if(r instanceof ArrayBuffer){if(K(r,0,n))return n}return null}(e,n))){if(t)return null;throw new Error(`No valid loader found for ${r}`)}return o}function G(e,r){return r.testText&&r.testText(e)}function K(e,r,n){switch(Array.isArray(n.test)?"array":typeof n.test){case"function":return n.test(e,n);case"string":case"array":return(Array.isArray(n.test)?n.test:[n.test]).some(n=>{return n===function(e,r,n){if(e.byteLength<=r+n)return"";const t=new DataView(e);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(t.getUint8(r+e));return o}(e,r,n.length)});default:return!1}}async function X(e,r,n,t){!r||Array.isArray(r)||s(r)||(t=n,n=r,r=null),n=n||{};const i=function(e,r){return w(e)?r=r||e.url:b(r)&&(r=r.name),"string"==typeof r?r.replace(/\?.*/,""):r}(e,t),u=H(r,i,e);n=c(n,u);const a=F({url:i,parse:X});return await async function(e,r,n,t){if(r=await j(r,e),e.parseTextSync&&"string"==typeof r)return n.dataType="text",e.parseTextSync(r,n,t,e);if(e.parse)return await e.parse(r,n,t,e);if(e.parseSync)return e.parseSync(r,n,t,e);if(e.worker)return await N(e.worker,e.name,r,n,t);return o(!1)}(u,e,n,a)}function Y(e,r,n,t){Array.isArray(r)||s(r)||(t=n,n=r,r=null);const o=H(r,t,e);return o?function(e,r,n,t){if(r=k(r,e),e.parseTextSync&&"string"==typeof r)return e.parseTextSync(r,n,t,e);if(e.parseSync)return e.parseSync(r,n,t,e);throw new Error(`Could not parse ${t.url||"data"} using ${e.name} loader`)}(o,e,n=c(n,o),F({url:t,parseSync:Y})):null}let Z="";const ee={};function re(e){Z=e}function ne(){return Z}function te(e){for(const r in ee)if(e.startsWith(r)){const n=ee[r];return e.replace(r,n)}return e+=Z}async function oe(e,r){return b(e)?T(e,r):(e=te(e),fetch(e,r))}async function se(e,r,n,t){Array.isArray(r)||s(r)||(t=n,n=r,r=null);const o=H(r,t,null);return function(e,r,n,t){if(e.parseInBatches){const o=_(r);return e.parseInBatches(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=c(n,o),F({url:t}))}async function ie(e,r,n){return se(await oe(e,n),r,n,e)}async function ue(e,r,n){Array.isArray(r)||s(r)||(n=r,r=null);const t=H(r,b(e)?e.name:e,null,{nothrow:!0});if(t&&t.loadAndParse){const r=c(n,t);return await t.loadAndParse(e,r)}let o=e;return(b(o)||"string"==typeof o)&&(o=await oe(e,n)),X(o,r,n,e)}function ce(e){const r=e&&e.lastIndexOf("/");return r>=0?e.substr(0,r):""}var ae=n(2);const fe={dataType:"arraybuffer",nothrow:!0},le=e=>e.startsWith("data:");function de(e,r){return r=function(e={}){return(e=Object.assign({},fe,e)).responseType=e.responseType||e.dataType,e}(r),le(e),r.nothrow||o(!1),null}function ye(e,r={}){return e=te(e),!x.c&&ae.readFileSync?ae.readFileSync(e,r):de(e,r)}var he=n(1);function pe(e,r,n){return e=te(e),!x.c&&he.writeFile?he.writeFile(e,r,n):o(!1)}function we(e,r,n){return e=te(e),!x.c&&he.writeFileSync?he.writeFileSync(e,r,n):o(!1)}function be(e){return`Failed to fetch resource ${e.url}(${e.status}): ${e.statusText} `}async function ge(e){let r=`Failed to fetch resource ${e.url} (${e.status}): `;try{e.headers.get("Content-Type").includes("application/json")?r+=await e.text():r+=e.statusText}catch(e){return r}return r}async function me(e,r,n,t){Array.isArray(r)||s(r)||(t=n,n=r,r=null);const o=H(r,t,null);return function(e,r,n,t){if(e.parseInBatchesSync){const o=P(r);return e.parseInBatchesSync(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=c(n,o),F({url:t}))}function xe(e,r,n,t){if(r.encode)return r.encode(e,n);if(r.encodeSync)return Promise.resolve(r.encodeSync(e,n));throw new Error("Writer could not encode data")}function Ae(e,r,n,t){if(r.encodeSync)return r.encodeSync(e,n);throw new Error("Writer could not synchronously encode data")}function Se(e,r,n,t){if(r.encodeInBatches)return r.encodeInBatches(e,n);throw new Error("Writer could not encode data in batches")}function ve(e,r,n,t){return pe(r,xe(e,n,t))}function Te(e,r,n,t){return we(r,Ae(e,n,t))}function Be(e,r){const n=e instanceof ArrayBuffer?new Uint8Array(e):e,t=r instanceof ArrayBuffer?new Uint8Array(r):r,o=new Uint8Array(n.byteLength+t.byteLength);return o.set(n,0),o.set(t,n.byteLength),o}async function ke(e,r){for(;;){const{done:n,value:t}=await e.next();if(n)return void e.return();if(r(t))return}}async function je(e){let r=new ArrayBuffer,n="";for await(const t of e)"string"==typeof t?n+=t:r=Be(r,t);return n||r}async function*_e(e,r){const n=new TextDecoder(r);for await(const r of e)yield"string"==typeof r?r:n.decode(r,{stream:!0})}async function*Pe(e){let r="";for await(const n of e){let e;for(r+=n;(e=r.indexOf("\n"))>=0;){const n=r.slice(0,e+1);r=r.slice(e+1),yield n}}r.length>0&&(yield r)}async function*Fe(e){let r=1;for await(const n of e)yield{counter:r,line:n},r++}async function Ie(e,r,n=(()=>{}),t=(()=>{})){if(!(e=await e).ok)return e;if(!e.body)return e;const o=e.headers.get("content-length"),s=o&&parseInt(o,10);if(!(o>0))return e;if("undefined"==typeof ReadableStream)return e;const i=new ReadableStream({start(o){!async function e(r,n,t,o,s,i,u){try{const{done:c,value:a}=await n.read();if(c)return i(),void r.close();t+=a.byteLength;const f=Math.round(t/o*100);s(f,{loadedBytes:t,totalBytes:o}),r.enqueue(a),await e(r,n,t,o,s,i,u)}catch(e){r.error(e),u(e)}}(o,e.body.getReader(),0,s,r,n,t)}});return new Response(i)}n.d(r,"TextEncoder",function(){return Oe}),n.d(r,"TextDecoder",function(){return Ee}),n.d(r,"createReadStream",function(){return De}),n.d(r,"parseFile",function(){return Ce}),n.d(r,"parseFileSync",function(){return Le}),n.d(r,"loadFile",function(){return Me}),n.d(r,"path",function(){return t}),n.d(r,"setPathPrefix",function(){return re}),n.d(r,"getPathPrefix",function(){return ne}),n.d(r,"resolvePath",function(){return te}),n.d(r,"fetchFile",function(){return oe}),n.d(r,"readFileSync",function(){return ye}),n.d(r,"writeFile",function(){return pe}),n.d(r,"writeFileSync",function(){return we}),n.d(r,"_getErrorMessageFromResponseSync",function(){return be}),n.d(r,"_getErrorMessageFromResponse",function(){return ge}),n.d(r,"registerLoaders",function(){return V}),n.d(r,"parse",function(){return X}),n.d(r,"parseSync",function(){return Y}),n.d(r,"parseInBatches",function(){return se}),n.d(r,"parseInBatchesSync",function(){return me}),n.d(r,"load",function(){return ue}),n.d(r,"loadInBatches",function(){return ie}),n.d(r,"encode",function(){return xe}),n.d(r,"encodeSync",function(){return Ae}),n.d(r,"encodeInBatches",function(){return Se}),n.d(r,"save",function(){return ve}),n.d(r,"saveSync",function(){return Te}),n.d(r,"isPromise",function(){return d}),n.d(r,"isIterable",function(){return y}),n.d(r,"isAsyncIterable",function(){return h}),n.d(r,"isIterator",function(){return p}),n.d(r,"isFetchResponse",function(){return w}),n.d(r,"isReadableStream",function(){return g}),n.d(r,"isWritableStream",function(){return m}),n.d(r,"toArrayBuffer",function(){return O}),n.d(r,"getStreamIterator",function(){return A}),n.d(r,"forEach",function(){return ke}),n.d(r,"concatenateAsyncIterator",function(){return je}),n.d(r,"lineAsyncIterator",function(){return Pe}),n.d(r,"textDecoderAsyncIterator",function(){return _e}),n.d(r,"numberedLineAsyncIterator",function(){return Fe}),n.d(r,"isBrowser",function(){return x.c}),n.d(r,"self",function(){return x.e}),n.d(r,"window",function(){return x.f}),n.d(r,"global",function(){return x.b}),n.d(r,"document",function(){return x.a}),n.d(r,"assert",function(){return o}),n.d(r,"_selectLoader",function(){return H}),n.d(r,"_WorkerThread",function(){return M}),n.d(r,"_WorkerFarm",function(){return $}),n.d(r,"_WorkerPool",function(){return R}),n.d(r,"_fetchProgress",function(){return Ie}),n.d(r,"_unregisterLoaders",function(){return q});const Oe=x.b.TextEncoder,Ee=x.b.TextDecoder;async function De(e,r){return console.warn("createReadStream() deprecated, use fetch().then(resp => resp.body)"),e=te(e),(await oe(e,r)).body}function Ce(...e){return console.warn("parse() deprecated, use parse()"),X(...e)}function Le(...e){return console.warn("parseSync() deprecated, use parseSync()"),Y(...e)}function Me(...e){return console.warn("loadFile() deprecated, use load()"),ue(...e)}}])});
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var n=r();for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(window,function(){return function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=5)}([function(e,r,n){"use strict";(function(e,t){n.d(r,"c",function(){return o}),n.d(r,"e",function(){return s}),n.d(r,"f",function(){return u}),n.d(r,"b",function(){return c}),n.d(r,"a",function(){return a}),n.d(r,"d",function(){return l});const o="object"!=typeof e||"[object process]"!==String(e)||e.browser,i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},s=i.self||i.window||i.global,u=i.window||i.self||i.global,c=i.global||i.self||i.window,a=i.document||{},f=void 0!==e&&e.version&&e.version.match(/v([0-9]*)/),l=f&&parseFloat(f[1])||0}).call(this,n(6),n(4))},function(e,r){},function(e,r){},function(e,r){},function(e,r){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,r,n){(function(r){const t=n(7),o="undefined"==typeof window?r:window;o.loaders=o.loaders||{},e.exports=Object.assign(o.loaders,t)}).call(this,n(4))},function(e,r){var n,t,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{t="function"==typeof clearTimeout?clearTimeout:s}catch(e){t=s}}();var c,a=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?a=c.concat(a):l=-1,a.length&&y())}function y(){if(!f){var e=u(d);f=!0;for(var r=a.length;r;){for(c=a,a=[];++l<r;)c&&c[l].run();l=-1,r=a.length}c=null,f=!1,function(e){if(t===clearTimeout)return clearTimeout(e);if((t===s||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(e);try{t(e)}catch(r){try{return t.call(null,e)}catch(r){return t.call(this,e)}}}(e)}}function h(e,r){this.fun=e,this.array=r}function p(){}o.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];a.push(new h(e,r)),1!==a.length||f||u(y)},h.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=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,r,n){"use strict";n.r(r);var t={};function o(e,r){if(!e)throw new Error(r||"loader assertion failed.")}function i(e){if(!e)return!1;return Array.isArray(e)&&(e=e[0]),e.parseTextSync||e.parseSync||e.parse||e.loadAndParse||e.parseStream||e.parseInBatches||e.worker}function s(e){let r;return o(i(e)),Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),e.extension&&(e.extensions=e.extensions||e.extension,delete e.extension),Array.isArray(e.extensions)||(e.extensions=[e.extensions]),o(e.extensions&&e.extensions.length>0&&e.extensions[0]),e.parseTextSync&&(e.text=!0),e.text||(e.binary=!0),e}n.r(t),n.d(t,"dirname",function(){return ce});class u{log(){}info(){}warn(){}error(){}}function c(e,r){return null===(e=Object.assign({},r&&r.DEFAULT_OPTIONS,r&&r.defaultOptions,r&&r.options,e,{dataType:"arraybuffer"})).log&&(e.log=new u),"log"in e||(e.log=console),e}const a=e=>"boolean"==typeof e,f=e=>"function"==typeof e,l=e=>null!==e&&"object"==typeof e,d=e=>l(e)&&f(e.then),y=e=>e&&"function"==typeof e[Symbol.iterator],h=e=>e&&"function"==typeof e[Symbol.asyncIterator],p=e=>e&&f(e.next),w=e=>"undefined"!=typeof Response&&e instanceof Response||e.arrayBuffer&&e.text&&e.json,b=e=>(e=>"undefined"!=typeof File&&e instanceof File)(e)||(e=>"undefined"!=typeof Blob&&e instanceof Blob)(e),g=e=>(e=>l(e)&&f(e.tee)&&f(e.cancel)&&f(e.pipeTo)&&f(e.getReader))(e)||(e=>l(e)&&f(e.read)&&f(e.pipe)&&a(e.readable))(e),m=e=>(e=>l(e)&&f(e.abort)&&f(e.getWriter))(e)||(e=>l(e)&&f(e.end)&&f(e.write)&&a(e.writable))(e);var x=n(0);function A(e){if(x.c||x.d>=10){if("function"==typeof e[Symbol.asyncIterator])return e;if("function"==typeof e.getIterator)return e.getIterator()}return x.c?async function*(e){const r=e.getReader();try{for(;;){const{done:e,value:n}=await r.read();if(e)return;yield n}}catch(e){r.releaseLock()}}(e):async function*(e){e=await e;for(;;){const r=e.read();if(null===r){if(e._readableState.ended)return;await S(e)}else yield r}}(e)}async function S(e){return new Promise(r=>{e.once("readable",r)})}class v{constructor(e){this._fileOrBlob=e,this.bodyUsed=!1}get headers(){return new Headers({"Content-Length":this._fileOrBlob.size,"Content-Type":this._fileOrBlob.type})}get ok(){return!0}get status(){return 200}url(){return this._fileOrBlob.name||""}async arrayBuffer(){const{reader:e,promise:r}=this._getFileReader();return e.readAsArrayBuffer(this._fileOrBlob),r}async text(){const{reader:e,promise:r}=this._getFileReader();return e.readAsText(this._fileOrBlob),r}async json(){const e=await this.text();return JSON.parse(e)}_getFileReader(){let e;o(!this.bodyUsed),this.bodyUsed=!0;const r=new Promise((r,n)=>{try{(e=new FileReader).onerror=e=>n(new Error(e)),e.onabort=()=>n(new Error("Read aborted.")),e.onload=()=>r(e.result)}catch(e){n(e)}});return{reader:e,promise:r}}}function T(e,r){return Promise.resolve(new v(e,r))}const B="Cannot convert supplied data type";function k(e,r){if(r.text&&"string"==typeof e)return e;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){const n=e.buffer||e;if(r.text&&!r.binary){return new TextDecoder("utf8").decode(n)}return n}throw new Error(B)}async function j(e,r){const n=(e=await e)instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||n)return k(e,r);if(b(e)&&(e=await T(e)),w(e))return await async function(e){if(!e.ok){let r=`fetch failed ${e.status} `;try{r+=await e.text()}catch(e){}throw new Error(r)}}(e),r.binary?await e.arrayBuffer():await e.text();throw new Error(B)}function _(e){return p(e)?e:w(e)&&e.body?(function(e){if(!e.ok)throw new Error(`fetch failed ${e.status}`)}(e),A(e.body)):g(e)?A(e):h(e)?e[Symbol.asyncIterator]():P(e)}function P(e){if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return function*(){yield e.buffer||e}();if(p(e))return e;if(y(e))return e[Symbol.iterator]();throw new Error(B)}function F(e,r){return{fetch:"undefined"!=typeof window&&window.fetch,...e}}var I=n(3);function E(e){if(I.toArrayBuffer&&(e=Object(I.toArrayBuffer)(e)),e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.buffer;if("string"==typeof e){const r=e;return(new TextEncoder).encode(r).buffer}return o(!1)}function O(e,r=!0,n=[]){if(e){if(e instanceof ArrayBuffer)n.push(e);else if(e.buffer&&e.buffer instanceof ArrayBuffer)n.push(e.buffer);else if(r&&"object"==typeof e)for(const t in e)O(e[t],r,n)}else;return n}const D=new Map;let C=0;function L({data:e,resolve:r}){r(e)}class M{constructor({source:e,name:r=`web-worker-${C++}`,onMessage:n}){const t=function(e){if(o("string"==typeof e,"worker source"),e.startsWith("url(")&&e.endsWith(")"))return e.match(/^url\((.*)\)$/)[1];let r=D.get(e);if(!r){const n=new Blob([e],{type:"application/javascript"});r=URL.createObjectURL(n),D.set(e,r)}return r}(e);this.worker=new Worker(t,{name:r}),this.name=r,this.onMessage=n||L}async process(e){return new Promise((r,n)=>{this.worker.onmessage=e=>this.onMessage({worker:this.worker,data:e.data,resolve:r,reject:n}),this.worker.onerror=e=>n(e);const t=O(e);this.worker.postMessage(e,t)})}destroy(){this.worker.terminate(),this.worker=null}}class R{constructor({source:e,name:r="unnamed",maxConcurrency:n=1,onMessage:t,onDebug:o=(()=>{})}){this.source=e,this.name=r,this.maxConcurrency=n,this.onMessage=t,this.onDebug=o,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}async process(e,r){return new Promise((n,t)=>{this.jobQueue.push({data:e,jobName:r,resolve:n,reject:t}),this._startQueuedJob()})}_startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const r=this.jobQueue.shift();this.onDebug({message:"processing",worker:e.name,job:r.jobName,backlog:this.jobQueue.length}),e.process(r.data).then(e=>r.resolve(e)).catch(e=>r.reject(e)).then(()=>this._onWorkerDone(e))}_onWorkerDone(e){this.isDestroyed?e.destroy():(this.idleQueue.push(e),this._startQueuedJob())}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;const e=`${this.name.toLowerCase()}-worker-${this.count}-of-${this.maxConcurrency}`;return new M({source:this.source,onMessage:this.onMessage,name:e})}return null}}const W=5;class ${constructor({maxConcurrency:e=W,onMessage:r,onDebug:n=(()=>{})}){this.maxConcurrency=e,this.onMessage=r,this.onDebug=n,this.workerPools=new Map}setProps(e){"maxConcurrency"in e&&(this.maxConcurrency=e.maxConcurrency),"onDebug"in e&&(this.onDebug=e.onDebug)}destroy(){this.workerPools.forEach(e=>e.destroy())}async process(e,r,n){return this._getWorkerPool(e,r).process(n)}_getWorkerPool(e,r){let n=this.workerPools.get(r);return n||(n=new R({source:e,name:r,onMessage:this.onMessage,maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(r,n)),n}}let Q=null;async function U({worker:e,data:r,resolve:n,reject:t}){switch(r.type){case"done":n(r.result);break;case"process":try{const n=await X(r.arraybuffer,r.options,r.url);e.postMessage({type:"process-done",id:r.id,result:n},O(n))}catch(n){e.postMessage({type:"process-error",id:r.id,message:n.message})}break;case"error":t(r.message)}}function N(e,r,n,t={},o={}){const i=function(e={}){const r={};return e.maxConcurrency&&(r.maxConcurrency=e.maxConcurrency),e.onDebug&&(r.onDebug=e.onDebug),Q||(Q=new $({onMessage:U})),Q.setProps(r),Q}(t);return t=JSON.parse(JSON.stringify(t)),i.process(e,`loaders.gl-${r}`,{arraybuffer:E(n),options:t,source:"loaders.gl",type:"process"})}let J=[];function V(e){e=Array.isArray(e)?e:[e];for(const r of e){const e=s(r);J.find(r=>e===r)||J.unshift(e)}}function q(){J=[]}const z=/[^.]+$/;function H(e,r="",n=null,{nothrow:t=!1}={}){if(r=r||"",e&&!Array.isArray(e)){const r=e;return s(r),r}(function(e){for(const r of e)s(r)})(e=e||J),r=r.replace(/\?.*/,"");let o=null;if(!(o=(o=o||function(e,r){const n=r.match(z),t=n&&n[0];return t&&function(e,r){r=r.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===r)return n;return null}(e,t)}(e,r))||function(e,r){if(!r)return null;for(const n of e)if("string"==typeof r){if(G(r,n))return n}else if(ArrayBuffer.isView(r)){if(K(r.buffer,r.byteOffset,n))return n}else if(r instanceof ArrayBuffer){if(K(r,0,n))return n}return null}(e,n))){if(t)return null;throw new Error(`No valid loader found for ${r}`)}return o}function G(e,r){return r.testText&&r.testText(e)}function K(e,r,n){switch(Array.isArray(n.test)?"array":typeof n.test){case"function":return n.test(e,n);case"string":case"array":return(Array.isArray(n.test)?n.test:[n.test]).some(n=>{return n===function(e,r,n){if(e.byteLength<=r+n)return"";const t=new DataView(e);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(t.getUint8(r+e));return o}(e,r,n.length)});default:return!1}}async function X(e,r,n,t){!r||Array.isArray(r)||i(r)||(t=n,n=r,r=null),n=n||{};const s=function(e,r){return w(e)?r=r||e.url:b(r)&&(r=r.name),"string"==typeof r?r.replace(/\?.*/,""):r}(e,t),u=H(r,s,e);n=c(n,u);const a=F({url:s,parse:X});return await async function(e,r,n,t){if(r=await j(r,e),e.parseTextSync&&"string"==typeof r)return n.dataType="text",e.parseTextSync(r,n,t,e);if(e.parse)return await e.parse(r,n,t,e);if(e.parseSync)return e.parseSync(r,n,t,e);if(e.worker)return await N(e.worker,e.name,r,n,t);return o(!1)}(u,e,n,a)}function Y(e,r,n,t){Array.isArray(r)||i(r)||(t=n,n=r,r=null);const o=H(r,t,e);return o?function(e,r,n,t){if(r=k(r,e),e.parseTextSync&&"string"==typeof r)return e.parseTextSync(r,n,t,e);if(e.parseSync)return e.parseSync(r,n,t,e);throw new Error(`Could not parse ${t.url||"data"} using ${e.name} loader`)}(o,e,n=c(n,o),F({url:t,parseSync:Y})):null}let Z="";const ee={};function re(e){Z=e}function ne(){return Z}function te(e){for(const r in ee)if(e.startsWith(r)){const n=ee[r];return e.replace(r,n)}return e+=Z}async function oe(e,r){return b(e)?T(e,r):(e=te(e),fetch(e,r))}async function ie(e,r,n,t){Array.isArray(r)||i(r)||(t=n,n=r,r=null);const o=H(r,t,null);return function(e,r,n,t){if(e.parseInBatches){const o=_(r);return e.parseInBatches(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=c(n,o),F({url:t}))}async function se(e,r,n){return ie(await oe(e,n),r,n,e)}async function ue(e,r,n){Array.isArray(r)||i(r)||(n=r,r=null);const t=H(r,b(e)?e.name:e,null,{nothrow:!0});if(t&&t.loadAndParse){const r=c(n,t);return await t.loadAndParse(e,r)}let o=e;return(b(o)||"string"==typeof o)&&(o=await oe(e,n)),X(o,r,n,e)}function ce(e){const r=e&&e.lastIndexOf("/");return r>=0?e.substr(0,r):""}var ae=n(2);const fe={dataType:"arraybuffer",nothrow:!0},le=e=>e.startsWith("data:");function de(e,r){return r=function(e={}){return(e=Object.assign({},fe,e)).responseType=e.responseType||e.dataType,e}(r),le(e),r.nothrow||o(!1),null}function ye(e,r={}){return e=te(e),!x.c&&ae.readFileSync?ae.readFileSync(e,r):de(e,r)}var he=n(1);function pe(e,r,n){return e=te(e),!x.c&&he.writeFile?he.writeFile(e,r,n):o(!1)}function we(e,r,n){return e=te(e),!x.c&&he.writeFileSync?he.writeFileSync(e,r,n):o(!1)}function be(e){return`Failed to fetch resource ${e.url}(${e.status}): ${e.statusText} `}async function ge(e){let r=`Failed to fetch resource ${e.url} (${e.status}): `;try{e.headers.get("Content-Type").includes("application/json")?r+=await e.text():r+=e.statusText}catch(e){return r}return r}async function me(e,r,n,t){Array.isArray(r)||i(r)||(t=n,n=r,r=null);const o=H(r,t,null);return function(e,r,n,t){if(e.parseInBatchesSync){const o=P(r);return e.parseInBatchesSync(o,n,t,e)}throw new Error("parseWithLoaderInBatchesSync not available")}(o,e,n=c(n,o),F({url:t}))}function xe(e,r,n,t){if(r.encode)return r.encode(e,n);if(r.encodeSync)return Promise.resolve(r.encodeSync(e,n));throw new Error("Writer could not encode data")}function Ae(e,r,n,t){if(r.encodeSync)return r.encodeSync(e,n);throw new Error("Writer could not synchronously encode data")}function Se(e,r,n,t){if(r.encodeInBatches)return r.encodeInBatches(e,n);throw new Error("Writer could not encode data in batches")}function ve(e,r,n,t){return pe(r,xe(e,n,t))}function Te(e,r,n,t){return we(r,Ae(e,n,t))}function Be(e,r){const n=e instanceof ArrayBuffer?new Uint8Array(e):e,t=r instanceof ArrayBuffer?new Uint8Array(r):r,o=new Uint8Array(n.byteLength+t.byteLength);return o.set(n,0),o.set(t,n.byteLength),o}async function ke(e,r){for(;;){const{done:n,value:t}=await e.next();if(n)return void e.return();if(r(t))return}}async function je(e){let r=new ArrayBuffer,n="";for await(const t of e)"string"==typeof t?n+=t:r=Be(r,t);return n||r}async function*_e(e,r){const n=new TextDecoder(r);for await(const r of e)yield"string"==typeof r?r:n.decode(r,{stream:!0})}async function*Pe(e){let r="";for await(const n of e){let e;for(r+=n;(e=r.indexOf("\n"))>=0;){const n=r.slice(0,e+1);r=r.slice(e+1),yield n}}r.length>0&&(yield r)}async function*Fe(e){let r=1;for await(const n of e)yield{counter:r,line:n},r++}async function Ie(e,r,n=(()=>{}),t=(()=>{})){if(!(e=await e).ok)return e;if(!e.body)return e;const o=e.headers.get("content-length"),i=o&&parseInt(o,10);if(!(o>0))return e;if("undefined"==typeof ReadableStream)return e;const s=new ReadableStream({start(o){!async function e(r,n,t,o,i,s,u){try{const{done:c,value:a}=await n.read();if(c)return s(),void r.close();t+=a.byteLength;const f=Math.round(t/o*100);i(f,{loadedBytes:t,totalBytes:o}),r.enqueue(a),await e(r,n,t,o,i,s,u)}catch(e){r.error(e),u(e)}}(o,e.body.getReader(),0,i,r,n,t)}});return new Response(s)}n.d(r,"TextEncoder",function(){return Ee}),n.d(r,"TextDecoder",function(){return Oe}),n.d(r,"createReadStream",function(){return De}),n.d(r,"parseFile",function(){return Ce}),n.d(r,"parseFileSync",function(){return Le}),n.d(r,"loadFile",function(){return Me}),n.d(r,"path",function(){return t}),n.d(r,"setPathPrefix",function(){return re}),n.d(r,"getPathPrefix",function(){return ne}),n.d(r,"resolvePath",function(){return te}),n.d(r,"fetchFile",function(){return oe}),n.d(r,"readFileSync",function(){return ye}),n.d(r,"writeFile",function(){return pe}),n.d(r,"writeFileSync",function(){return we}),n.d(r,"_getErrorMessageFromResponseSync",function(){return be}),n.d(r,"_getErrorMessageFromResponse",function(){return ge}),n.d(r,"registerLoaders",function(){return V}),n.d(r,"parse",function(){return X}),n.d(r,"parseSync",function(){return Y}),n.d(r,"parseInBatches",function(){return ie}),n.d(r,"parseInBatchesSync",function(){return me}),n.d(r,"load",function(){return ue}),n.d(r,"loadInBatches",function(){return se}),n.d(r,"encode",function(){return xe}),n.d(r,"encodeSync",function(){return Ae}),n.d(r,"encodeInBatches",function(){return Se}),n.d(r,"save",function(){return ve}),n.d(r,"saveSync",function(){return Te}),n.d(r,"isPromise",function(){return d}),n.d(r,"isIterable",function(){return y}),n.d(r,"isAsyncIterable",function(){return h}),n.d(r,"isIterator",function(){return p}),n.d(r,"isFetchResponse",function(){return w}),n.d(r,"isReadableStream",function(){return g}),n.d(r,"isWritableStream",function(){return m}),n.d(r,"toArrayBuffer",function(){return E}),n.d(r,"getStreamIterator",function(){return A}),n.d(r,"forEach",function(){return ke}),n.d(r,"concatenateAsyncIterator",function(){return je}),n.d(r,"lineAsyncIterator",function(){return Pe}),n.d(r,"textDecoderAsyncIterator",function(){return _e}),n.d(r,"numberedLineAsyncIterator",function(){return Fe}),n.d(r,"isBrowser",function(){return x.c}),n.d(r,"self",function(){return x.e}),n.d(r,"window",function(){return x.f}),n.d(r,"global",function(){return x.b}),n.d(r,"document",function(){return x.a}),n.d(r,"assert",function(){return o}),n.d(r,"_selectLoader",function(){return H}),n.d(r,"_WorkerThread",function(){return M}),n.d(r,"_WorkerFarm",function(){return $}),n.d(r,"_WorkerPool",function(){return R}),n.d(r,"_fetchProgress",function(){return Ie}),n.d(r,"_unregisterLoaders",function(){return q});const Ee=x.b.TextEncoder,Oe=x.b.TextDecoder;async function De(e,r){return console.warn("createReadStream() deprecated, use fetch().then(resp => resp.body)"),e=te(e),(await oe(e,r)).body}function Ce(...e){return console.warn("parse() deprecated, use parse()"),X(...e)}function Le(...e){return console.warn("parseSync() deprecated, use parseSync()"),Y(...e)}function Me(...e){return console.warn("loadFile() deprecated, use load()"),ue(...e)}}])});

@@ -12,3 +12,3 @@ "use strict";

var registeredLoaders = {};
var registeredLoaders = [];

@@ -22,28 +22,15 @@ function registerLoaders(loaders) {

try {
for (var _iterator = loaders[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var _loop = function _loop() {
var loader = _step.value;
var normalizedLoader = (0, _normalizeLoader.normalizeLoader)(loader);
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = normalizedLoader.extensions[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var extension = _step2.value;
registeredLoaders[extension] = normalizedLoader;
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
if (!registeredLoaders.find(function (registeredLoader) {
return normalizedLoader === registeredLoader;
})) {
registeredLoaders.unshift(normalizedLoader);
}
};
for (var _iterator = loaders[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
_loop();
}

@@ -67,8 +54,8 @@ } catch (err) {

function getRegisteredLoaders() {
return Object.values(registeredLoaders);
return registeredLoaders;
}
function _unregisterLoaders() {
registeredLoaders = {};
registeredLoaders = [];
}
//# sourceMappingURL=register-loaders.js.map
import { normalizeLoader } from './loader-utils/normalize-loader';
let registeredLoaders = {};
let registeredLoaders = [];
export function registerLoaders(loaders) {

@@ -9,4 +9,4 @@ loaders = Array.isArray(loaders) ? loaders : [loaders];

for (const extension of normalizedLoader.extensions) {
registeredLoaders[extension] = normalizedLoader;
if (!registeredLoaders.find(registeredLoader => normalizedLoader === registeredLoader)) {
registeredLoaders.unshift(normalizedLoader);
}

@@ -16,7 +16,7 @@ }

export function getRegisteredLoaders() {
return Object.values(registeredLoaders);
return registeredLoaders;
}
export function _unregisterLoaders() {
registeredLoaders = {};
registeredLoaders = [];
}
//# sourceMappingURL=register-loaders.js.map
import { normalizeLoader } from './loader-utils/normalize-loader';
var registeredLoaders = {};
var registeredLoaders = [];
export function registerLoaders(loaders) {

@@ -10,28 +10,15 @@ loaders = Array.isArray(loaders) ? loaders : [loaders];

try {
for (var _iterator = loaders[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var _loop = function _loop() {
var loader = _step.value;
var normalizedLoader = normalizeLoader(loader);
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = normalizedLoader.extensions[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var extension = _step2.value;
registeredLoaders[extension] = normalizedLoader;
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
if (!registeredLoaders.find(function (registeredLoader) {
return normalizedLoader === registeredLoader;
})) {
registeredLoaders.unshift(normalizedLoader);
}
};
for (var _iterator = loaders[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
_loop();
}

@@ -54,7 +41,7 @@ } catch (err) {

export function getRegisteredLoaders() {
return Object.values(registeredLoaders);
return registeredLoaders;
}
export function _unregisterLoaders() {
registeredLoaders = {};
registeredLoaders = [];
}
//# sourceMappingURL=register-loaders.js.map
{
"name": "@loaders.gl/core",
"version": "1.3.1",
"version": "1.3.2",
"description": "Framework-independent loaders for 3D graphics formats",

@@ -29,2 +29,14 @@ "license": "MIT",

"./src/node/read-file-sync.node.js": false,
"./dist/es5/node/utils/to-array-buffer.node.js": false,
"./dist/es5/node/utils/to-buffer.node.js": false,
"./dist/es5/node/write-file.node.js": false,
"./dist/es5/node/read-file-sync.node.js": false,
"./dist/esm/node/utils/to-array-buffer.node.js": false,
"./dist/esm/node/utils/to-buffer.node.js": false,
"./dist/esm/node/write-file.node.js": false,
"./dist/esm/node/read-file-sync.node.js": false,
"./dist/es6/node/utils/to-array-buffer.node.js": false,
"./dist/es6/node/utils/to-buffer.node.js": false,
"./dist/es6/node/write-file.node.js": false,
"./dist/es6/node/read-file-sync.node.js": false,
"fs": false

@@ -44,3 +56,3 @@ },

},
"gitHead": "d1e0103b82f81c574f7acba46b645ab9d74e3f06"
"gitHead": "752b1c06ebdfdb1daf4bc54a5bfb6c2b8c877065"
}
import {normalizeLoader} from './loader-utils/normalize-loader';
let registeredLoaders = {};
let registeredLoaders = [];
export function registerLoaders(loaders) {
loaders = Array.isArray(loaders) ? loaders : [loaders];
for (const loader of loaders) {
const normalizedLoader = normalizeLoader(loader);
for (const extension of normalizedLoader.extensions) {
registeredLoaders[extension] = normalizedLoader;
if (!registeredLoaders.find(registeredLoader => normalizedLoader === registeredLoader)) {
// add to the beginning of the registeredLoaders, so the last registeredLoader get picked
registeredLoaders.unshift(normalizedLoader);
}

@@ -16,3 +18,3 @@ }

export function getRegisteredLoaders() {
return Object.values(registeredLoaders);
return registeredLoaders;
}

@@ -22,3 +24,3 @@

export function _unregisterLoaders() {
registeredLoaders = {};
registeredLoaders = [];
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc