@loaders.gl/core 5.0.0-alpha.10 → 5.0.0-alpha.11

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
@@ -4,13 +4,13 @@
4
4
  else if (typeof define === 'function' && define.amd) define([], factory);
5
5
  else if (typeof exports === 'object') exports['loaders'] = factory();
6
6
  else root['loaders'] = factory();})(globalThis, function () {
7
- "use strict";var __exports__=(()=>{var gr=Object.defineProperty;var ln=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var dn=Object.prototype.hasOwnProperty;var _t=(e,r)=>{for(var t in r)gr(e,t,{get:r[t],enumerable:!0})},pn=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of hn(r))!dn.call(e,n)&&n!==t&&gr(e,n,{get:()=>r[n],enumerable:!(o=ln(r,n))||o.enumerable});return e};var mn=e=>pn(gr({},"__esModule",{value:!0}),e);var Ys={};_t(Ys,{FetchError:()=>Re,JSONLoader:()=>st,NullLoader:()=>cn,NullWorkerLoader:()=>an,RequestScheduler:()=>Ee,_BrowserFileSystem:()=>yr,_fetchProgress:()=>un,_selectSource:()=>on,_unregisterLoaders:()=>Io,assert:()=>be,concatenateArrayBuffersAsync:()=>ee,coreApi:()=>we,createDataSource:()=>tn,document:()=>Tr,encode:()=>Yo,encodeInBatches:()=>rn,encodeSync:()=>At,encodeTable:()=>Tt,encodeTableAsText:()=>Ko,encodeTableInBatches:()=>kt,encodeText:()=>Xo,encodeTextSync:()=>en,encodeURLtoURL:()=>St,fetchFile:()=>I,forEach:()=>Yr,getLoaderOptions:()=>P,getPathPrefix:()=>ot,global:()=>xr,isAsyncIterable:()=>he,isBrowser:()=>k,isIterable:()=>Z,isIterator:()=>Ae,isPromise:()=>Ce,isPureObject:()=>W,isReadableStream:()=>z,isResponse:()=>w,isWorker:()=>kr,isWritableStream:()=>Br,load:()=>ge,loadInBatches:()=>ae,makeIterator:()=>me,makeLineIterator:()=>Kr,makeNumberedLineIterator:()=>Zr,makeStream:()=>nn,makeTextDecoderIterator:()=>Gr,makeTextEncoderIterator:()=>Jr,parse:()=>g,parseFile:()=>ne,parseInBatches:()=>E,parseSync:()=>ie,preload:()=>Go,preloadSync:()=>Jo,readArrayBuffer:()=>xo,registerLoaders:()=>Ro,resolvePath:()=>re,selectLoader:()=>v,selectLoaderSync:()=>O,self:()=>wr,setLoaderOptions:()=>ut,setPathPrefix:()=>tt,window:()=>br});function be(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var $={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},wr=$.self||$.window||$.global||{},br=$.window||$.self||$.global||{},xr=$.global||$.self||$.window||{},Tr=$.document||{};var k=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),kr=typeof importScripts=="function",Et=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),yn=Et&&parseFloat(Et[1])||0;var Ye=globalThis,gn=globalThis.document||{},Xe=globalThis.process||{},wn=globalThis.console,ti=globalThis.navigator||{};function Rt(e){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;let r=typeof navigator<"u"&&navigator.userAgent,t=e||r;return!!(t&&t.indexOf("Electron")>=0)}function fe(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||Rt()}var Ar="4.1.1";function xe(e,r){if(!e)throw new Error(r||"Assertion failed")}function Sr(e){if(!e)return 0;let r;switch(typeof e){case"number":r=e;break;case"object":r=e.logLevel||e.priority||0;break;default:return 0}return xe(Number.isFinite(r)&&r>=0),r}function Bt(e){let{logLevel:r,message:t}=e;e.logLevel=Sr(r);let o=e.args?Array.from(e.args):[];for(;o.length&&o.shift()!==t;);switch(typeof r){case"string":case"function":t!==void 0&&o.unshift(t),e.message=r;break;case"object":Object.assign(e,r);break;default:}typeof e.message=="function"&&(e.message=e.message());let n=typeof e.message;return xe(n==="string"||n==="object"),Object.assign(e,{args:o},e.opts)}var le=()=>{},er=class{constructor({level:r=0}={}){this.userData={},this._onceCache=new Set,this._level=r}set level(r){this.setLevel(r)}get level(){return this.getLevel()}setLevel(r){return this._level=r,this}getLevel(){return this._level}warn(r,...t){return this._log("warn",0,r,t,{once:!0})}error(r,...t){return this._log("error",0,r,t)}log(r,t,...o){return this._log("log",r,t,o)}info(r,t,...o){return this._log("info",r,t,o)}once(r,t,...o){return this._log("once",r,t,o,{once:!0})}_log(r,t,o,n,s={}){let a=Bt({logLevel:t,message:o,args:this._buildArgs(t,o,n),opts:s});return this._createLogFunction(r,a,s)}_buildArgs(r,t,o){return[r,t,...o]}_createLogFunction(r,t,o){if(!this._shouldLog(t.logLevel))return le;let n=this._getOnceTag(o.tag??t.tag??t.message);if((o.once||t.once)&&n!==void 0){if(this._onceCache.has(n))return le;this._onceCache.add(n)}return this._emit(r,t)}_shouldLog(r){return this.getLevel()>=Sr(r)}_getOnceTag(r){if(r!==void 0)try{return typeof r=="string"?r:String(r)}catch{return}}};function xn(e){try{let r=window[e],t="__storage_test__";return r.setItem(t,t),r.removeItem(t),r}catch{return null}}var rr=class{constructor(r,t,o="sessionStorage"){this.storage=xn(o),this.id=r,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(r){if(Object.assign(this.config,r),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let r={};if(this.storage){let t=this.storage.getItem(this.id);r=t?JSON.parse(t):{}}return Object.assign(this.config,r),this}};function It(e){let r;return e<10?r=`${e.toFixed(2)}ms`:e<100?r=`${e.toFixed(1)}ms`:e<1e3?r=`${e.toFixed(0)}ms`:r=`${(e/1e3).toFixed(2)}s`,r}function Ct(e,r=8){let t=Math.max(r-e.length,0);return`${" ".repeat(t)}${e}`}var tr;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(tr||(tr={}));var Tn=10;function Wt(e){return typeof e!="string"?e:(e=e.toUpperCase(),tr[e]||tr.WHITE)}function Pt(e,r,t){return!fe&&typeof e=="string"&&(r&&(e=`\x1B[${Wt(r)}m${e}\x1B[39m`),t&&(e=`\x1B[${Wt(t)+Tn}m${e}\x1B[49m`)),e}function Ot(e,r=["constructor"]){let t=Object.getPrototypeOf(e),o=Object.getOwnPropertyNames(t),n=e;for(let s of o){let a=n[s];typeof a=="function"&&(r.find(i=>s===i)||(n[s]=a.bind(e)))}}function Te(){let e;if(fe()&&Ye.performance)e=Ye?.performance?.now?.();else if("hrtime"in Xe){let r=Xe?.hrtime?.();e=r[0]*1e3+r[1]/1e6}else e=Date.now();return e}var ke={debug:fe()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Lr={enabled:!0,level:0},U=class extends er{constructor({id:r}={id:""}){super({level:0}),this.VERSION=Ar,this._startTs=Te(),this._deltaTs=Te(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=r,this.userData={},this._storage=new rr(`__probe-${this.id}__`,{[this.id]:Lr}),this.timeStamp(`${this.id} started`),Ot(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((Te()-this._startTs).toPrecision(10))}getDelta(){return Number((Te()-this._deltaTs).toPrecision(10))}set priority(r){this.level=r}get priority(){return this.level}getPriority(){return this.level}enable(r=!0){return this._updateConfiguration({enabled:r}),this}setLevel(r){return this._updateConfiguration({level:r}),this}get(r){return this._getConfiguration()[r]}set(r,t){this._updateConfiguration({[r]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(r,t){if(!r)throw new Error(t||"Assertion failed")}warn(r,...t){return this._log("warn",0,r,t,{method:ke.warn,once:!0})}error(r,...t){return this._log("error",0,r,t,{method:ke.error})}deprecated(r,t){return this.warn(`\`${r}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(r,t){return this.error(`\`${r}\` has been removed. Use \`${t}\` instead`)}probe(r,t,...o){return this._log("log",r,t,o,{method:ke.log,time:!0,once:!0})}log(r,t,...o){return this._log("log",r,t,o,{method:ke.debug})}info(r,t,...o){return this._log("info",r,t,o,{method:console.info})}once(r,t,...o){return this._log("once",r,t,o,{method:ke.debug||ke.info,once:!0})}table(r,t,o){return t?this._log("table",r,t,o&&[o]||[],{method:console.table||le,tag:An(t)}):le}time(r,t){return this._log("time",r,t,[],{method:console.time?console.time:console.info})}timeEnd(r,t){return this._log("time",r,t,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(r,t){return this._log("time",r,t,[],{method:console.timeStamp||le})}group(r,t,o={collapsed:!1}){let n=(o.collapsed?console.groupCollapsed:console.group)||console.info;return this._log("group",r,t,[],{method:n})}groupCollapsed(r,t,o={}){return this.group(r,t,Object.assign({},o,{collapsed:!0}))}groupEnd(r){return this._log("groupEnd",r,"",[],{method:console.groupEnd||le})}withGroup(r,t,o){this.group(r,t)();try{o()}finally{this.groupEnd(r)()}}trace(){console.trace&&console.trace()}_shouldLog(r){return this.isEnabled()&&super._shouldLog(r)}_emit(r,t){let o=t.method;xe(o),t.total=this.getTotal(),t.delta=this.getDelta(),this._deltaTs=Te();let n=kn(this.id,t.message,t);return o.bind(console,n,...t.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(Lr),this._storage.config[this.id]}_updateConfiguration(r){let t=this._storage.config[this.id]||{...Lr};this._storage.setConfiguration({[this.id]:{...t,...r}})}};U.VERSION=Ar;function kn(e,r,t){if(typeof r=="string"){let o=t.time?Ct(It(t.total)):"";r=t.time?`${e}: ${o} ${r}`:`${e}: ${r}`,r=Pt(r,t.color,t.background)}return r}function An(e){for(let r in e)for(let t in e[r])return t||"untitled";return"empty"}globalThis.probe={};var Wi=new U({id:"@probe.gl/log"});var _r="5.0.0-alpha.10",Sn=_r[0]>="0"&&_r[0]<="9"?`v${_r}`:"";function Ln(){let e=new U({id:"loaders.gl"});return globalThis.loaders||={},globalThis.loaders.log=e,globalThis.loaders.version=Sn,globalThis.probe||={},globalThis.probe.loaders=e,e}var Er=Ln();var vt=e=>typeof e=="boolean",A=e=>typeof e=="function",L=e=>e!==null&&typeof e=="object",W=e=>L(e)&&e.constructor==={}.constructor;var Rr=e=>typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer,K=e=>L(e)&&typeof e.byteLength=="number"&&typeof e.slice=="function",Ce=e=>L(e)&&"then"in e&&A(e.then),Z=e=>!!e&&A(e[Symbol.iterator]),he=e=>!!e&&A(e[Symbol.asyncIterator]),Ae=e=>!!e&&A(e.next),w=e=>typeof Response<"u"&&e instanceof Response||L(e)&&A(e.arrayBuffer)&&A(e.text)&&A(e.json);var m=e=>typeof Blob<"u"&&e instanceof Blob;var Ft=e=>L(e)&&A(e.abort)&&A(e.getWriter),Ut=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||L(e)&&A(e.tee)&&A(e.cancel)&&A(e.getReader),Mt=e=>L(e)&&A(e.end)&&A(e.write)&&vt(e.writable),$t=e=>L(e)&&A(e.read)&&A(e.pipe)&&vt(e.readable),z=e=>Ut(e)||$t(e),Br=e=>Ft(e)||Mt(e);function Y(e,r){return Nt(e||{},r)}function Nt(e,r,t=0){if(t>3)return r;let o={...e};for(let[n,s]of Object.entries(r))W(s)?o[n]=Nt(o[n]||{},r[n],t+1):o[n]=r[n];return o}function Ir(e){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,e)}var jt="latest";function _n(){return globalThis._loadersgl_?.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="5.0.0-alpha.10"),globalThis._loadersgl_.version}var We=_n();function q(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var N={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},Vi=N.self||N.window||N.global||{},Hi=N.window||N.self||N.global||{},Qi=N.global||N.self||N.window||{},Gi=N.document||{};var S=typeof process!="object"||String(process)!=="[object process]"||process.browser;var zt=typeof window<"u"&&typeof window.orientation<"u",Dt=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Ji=Dt&&parseFloat(Dt[1])||0;var Pe=class{name;workerThread;isRunning=!0;result;_resolve=()=>{};_reject=()=>{};constructor(r,t){this.name=r,this.workerThread=t,this.result=new Promise((o,n)=>{this._resolve=o,this._reject=n})}postMessage(r,t){this.workerThread.postMessage({source:"loaders.gl",type:r,payload:t})}done(r){this.isRunning&&(this.isRunning=!1,this._resolve(r))}error(r){this.isRunning&&(this.isRunning=!1,this._reject(r))}abort(r){if(!this.isRunning)return;let t=r??En(`Worker job "${this.name}" was aborted`);this.workerThread.destroy(),this.error(t)}};function En(e){let r=new Error(e);return r.name="AbortError",r}var Se=class{constructor(...r){let o=globalThis.process?.getBuiltinModule?.("node:worker_threads").Worker;if(o)return new o(...r)}terminate(){}};var Cr=new Map;function qt(e){q(e.source&&!e.url||!e.source&&e.url);let r=Cr.get(e.source||e.url);return r||(e.url&&(r=Rn(e.url),Cr.set(e.url,r)),e.source&&(r=Vt(e.source),Cr.set(e.source,r))),q(r),r}function Rn(e){if(!e.startsWith("http"))return e;let r=Bn(e);return Vt(r)}function Vt(e){let r=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(r)}function Bn(e){return`try {
7
+ "use strict";var __exports__=(()=>{var gr=Object.defineProperty;var ln=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var dn=Object.prototype.hasOwnProperty;var _t=(e,r)=>{for(var t in r)gr(e,t,{get:r[t],enumerable:!0})},pn=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of hn(r))!dn.call(e,n)&&n!==t&&gr(e,n,{get:()=>r[n],enumerable:!(o=ln(r,n))||o.enumerable});return e};var mn=e=>pn(gr({},"__esModule",{value:!0}),e);var Ys={};_t(Ys,{FetchError:()=>Re,JSONLoader:()=>st,NullLoader:()=>cn,NullWorkerLoader:()=>an,RequestScheduler:()=>Ee,_BrowserFileSystem:()=>yr,_fetchProgress:()=>un,_selectSource:()=>on,_unregisterLoaders:()=>Io,assert:()=>be,concatenateArrayBuffersAsync:()=>ee,coreApi:()=>we,createDataSource:()=>tn,document:()=>Tr,encode:()=>Yo,encodeInBatches:()=>rn,encodeSync:()=>At,encodeTable:()=>Tt,encodeTableAsText:()=>Ko,encodeTableInBatches:()=>kt,encodeText:()=>Xo,encodeTextSync:()=>en,encodeURLtoURL:()=>St,fetchFile:()=>I,forEach:()=>Yr,getLoaderOptions:()=>P,getPathPrefix:()=>ot,global:()=>xr,isAsyncIterable:()=>he,isBrowser:()=>k,isIterable:()=>Z,isIterator:()=>Ae,isPromise:()=>Ce,isPureObject:()=>W,isReadableStream:()=>z,isResponse:()=>w,isWorker:()=>kr,isWritableStream:()=>Br,load:()=>ge,loadInBatches:()=>ae,makeIterator:()=>me,makeLineIterator:()=>Kr,makeNumberedLineIterator:()=>Zr,makeStream:()=>nn,makeTextDecoderIterator:()=>Gr,makeTextEncoderIterator:()=>Jr,parse:()=>g,parseFile:()=>ne,parseInBatches:()=>E,parseSync:()=>ie,preload:()=>Go,preloadSync:()=>Jo,readArrayBuffer:()=>xo,registerLoaders:()=>Ro,resolvePath:()=>re,selectLoader:()=>v,selectLoaderSync:()=>O,self:()=>wr,setLoaderOptions:()=>ut,setPathPrefix:()=>tt,window:()=>br});function be(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var $={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},wr=$.self||$.window||$.global||{},br=$.window||$.self||$.global||{},xr=$.global||$.self||$.window||{},Tr=$.document||{};var k=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),kr=typeof importScripts=="function",Et=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),yn=Et&&parseFloat(Et[1])||0;var Ye=globalThis,gn=globalThis.document||{},Xe=globalThis.process||{},wn=globalThis.console,ti=globalThis.navigator||{};function Rt(e){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;let r=typeof navigator<"u"&&navigator.userAgent,t=e||r;return!!(t&&t.indexOf("Electron")>=0)}function fe(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||Rt()}var Ar="4.1.1";function xe(e,r){if(!e)throw new Error(r||"Assertion failed")}function Sr(e){if(!e)return 0;let r;switch(typeof e){case"number":r=e;break;case"object":r=e.logLevel||e.priority||0;break;default:return 0}return xe(Number.isFinite(r)&&r>=0),r}function Bt(e){let{logLevel:r,message:t}=e;e.logLevel=Sr(r);let o=e.args?Array.from(e.args):[];for(;o.length&&o.shift()!==t;);switch(typeof r){case"string":case"function":t!==void 0&&o.unshift(t),e.message=r;break;case"object":Object.assign(e,r);break;default:}typeof e.message=="function"&&(e.message=e.message());let n=typeof e.message;return xe(n==="string"||n==="object"),Object.assign(e,{args:o},e.opts)}var le=()=>{},er=class{constructor({level:r=0}={}){this.userData={},this._onceCache=new Set,this._level=r}set level(r){this.setLevel(r)}get level(){return this.getLevel()}setLevel(r){return this._level=r,this}getLevel(){return this._level}warn(r,...t){return this._log("warn",0,r,t,{once:!0})}error(r,...t){return this._log("error",0,r,t)}log(r,t,...o){return this._log("log",r,t,o)}info(r,t,...o){return this._log("info",r,t,o)}once(r,t,...o){return this._log("once",r,t,o,{once:!0})}_log(r,t,o,n,s={}){let a=Bt({logLevel:t,message:o,args:this._buildArgs(t,o,n),opts:s});return this._createLogFunction(r,a,s)}_buildArgs(r,t,o){return[r,t,...o]}_createLogFunction(r,t,o){if(!this._shouldLog(t.logLevel))return le;let n=this._getOnceTag(o.tag??t.tag??t.message);if((o.once||t.once)&&n!==void 0){if(this._onceCache.has(n))return le;this._onceCache.add(n)}return this._emit(r,t)}_shouldLog(r){return this.getLevel()>=Sr(r)}_getOnceTag(r){if(r!==void 0)try{return typeof r=="string"?r:String(r)}catch{return}}};function xn(e){try{let r=window[e],t="__storage_test__";return r.setItem(t,t),r.removeItem(t),r}catch{return null}}var rr=class{constructor(r,t,o="sessionStorage"){this.storage=xn(o),this.id=r,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(r){if(Object.assign(this.config,r),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let r={};if(this.storage){let t=this.storage.getItem(this.id);r=t?JSON.parse(t):{}}return Object.assign(this.config,r),this}};function It(e){let r;return e<10?r=`${e.toFixed(2)}ms`:e<100?r=`${e.toFixed(1)}ms`:e<1e3?r=`${e.toFixed(0)}ms`:r=`${(e/1e3).toFixed(2)}s`,r}function Ct(e,r=8){let t=Math.max(r-e.length,0);return`${" ".repeat(t)}${e}`}var tr;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(tr||(tr={}));var Tn=10;function Wt(e){return typeof e!="string"?e:(e=e.toUpperCase(),tr[e]||tr.WHITE)}function Pt(e,r,t){return!fe&&typeof e=="string"&&(r&&(e=`\x1B[${Wt(r)}m${e}\x1B[39m`),t&&(e=`\x1B[${Wt(t)+Tn}m${e}\x1B[49m`)),e}function Ot(e,r=["constructor"]){let t=Object.getPrototypeOf(e),o=Object.getOwnPropertyNames(t),n=e;for(let s of o){let a=n[s];typeof a=="function"&&(r.find(i=>s===i)||(n[s]=a.bind(e)))}}function Te(){let e;if(fe()&&Ye.performance)e=Ye?.performance?.now?.();else if("hrtime"in Xe){let r=Xe?.hrtime?.();e=r[0]*1e3+r[1]/1e6}else e=Date.now();return e}var ke={debug:fe()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Lr={enabled:!0,level:0},U=class extends er{constructor({id:r}={id:""}){super({level:0}),this.VERSION=Ar,this._startTs=Te(),this._deltaTs=Te(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=r,this.userData={},this._storage=new rr(`__probe-${this.id}__`,{[this.id]:Lr}),this.timeStamp(`${this.id} started`),Ot(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((Te()-this._startTs).toPrecision(10))}getDelta(){return Number((Te()-this._deltaTs).toPrecision(10))}set priority(r){this.level=r}get priority(){return this.level}getPriority(){return this.level}enable(r=!0){return this._updateConfiguration({enabled:r}),this}setLevel(r){return this._updateConfiguration({level:r}),this}get(r){return this._getConfiguration()[r]}set(r,t){this._updateConfiguration({[r]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(r,t){if(!r)throw new Error(t||"Assertion failed")}warn(r,...t){return this._log("warn",0,r,t,{method:ke.warn,once:!0})}error(r,...t){return this._log("error",0,r,t,{method:ke.error})}deprecated(r,t){return this.warn(`\`${r}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(r,t){return this.error(`\`${r}\` has been removed. Use \`${t}\` instead`)}probe(r,t,...o){return this._log("log",r,t,o,{method:ke.log,time:!0,once:!0})}log(r,t,...o){return this._log("log",r,t,o,{method:ke.debug})}info(r,t,...o){return this._log("info",r,t,o,{method:console.info})}once(r,t,...o){return this._log("once",r,t,o,{method:ke.debug||ke.info,once:!0})}table(r,t,o){return t?this._log("table",r,t,o&&[o]||[],{method:console.table||le,tag:An(t)}):le}time(r,t){return this._log("time",r,t,[],{method:console.time?console.time:console.info})}timeEnd(r,t){return this._log("time",r,t,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(r,t){return this._log("time",r,t,[],{method:console.timeStamp||le})}group(r,t,o={collapsed:!1}){let n=(o.collapsed?console.groupCollapsed:console.group)||console.info;return this._log("group",r,t,[],{method:n})}groupCollapsed(r,t,o={}){return this.group(r,t,Object.assign({},o,{collapsed:!0}))}groupEnd(r){return this._log("groupEnd",r,"",[],{method:console.groupEnd||le})}withGroup(r,t,o){this.group(r,t)();try{o()}finally{this.groupEnd(r)()}}trace(){console.trace&&console.trace()}_shouldLog(r){return this.isEnabled()&&super._shouldLog(r)}_emit(r,t){let o=t.method;xe(o),t.total=this.getTotal(),t.delta=this.getDelta(),this._deltaTs=Te();let n=kn(this.id,t.message,t);return o.bind(console,n,...t.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(Lr),this._storage.config[this.id]}_updateConfiguration(r){let t=this._storage.config[this.id]||{...Lr};this._storage.setConfiguration({[this.id]:{...t,...r}})}};U.VERSION=Ar;function kn(e,r,t){if(typeof r=="string"){let o=t.time?Ct(It(t.total)):"";r=t.time?`${e}: ${o} ${r}`:`${e}: ${r}`,r=Pt(r,t.color,t.background)}return r}function An(e){for(let r in e)for(let t in e[r])return t||"untitled";return"empty"}globalThis.probe={};var Wi=new U({id:"@probe.gl/log"});var _r="5.0.0-alpha.11",Sn=_r[0]>="0"&&_r[0]<="9"?`v${_r}`:"";function Ln(){let e=new U({id:"loaders.gl"});return globalThis.loaders||={},globalThis.loaders.log=e,globalThis.loaders.version=Sn,globalThis.probe||={},globalThis.probe.loaders=e,e}var Er=Ln();var vt=e=>typeof e=="boolean",A=e=>typeof e=="function",L=e=>e!==null&&typeof e=="object",W=e=>L(e)&&e.constructor==={}.constructor;var Rr=e=>typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer,K=e=>L(e)&&typeof e.byteLength=="number"&&typeof e.slice=="function",Ce=e=>L(e)&&"then"in e&&A(e.then),Z=e=>!!e&&A(e[Symbol.iterator]),he=e=>!!e&&A(e[Symbol.asyncIterator]),Ae=e=>!!e&&A(e.next),w=e=>typeof Response<"u"&&e instanceof Response||L(e)&&A(e.arrayBuffer)&&A(e.text)&&A(e.json);var m=e=>typeof Blob<"u"&&e instanceof Blob;var Ft=e=>L(e)&&A(e.abort)&&A(e.getWriter),Ut=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||L(e)&&A(e.tee)&&A(e.cancel)&&A(e.getReader),Mt=e=>L(e)&&A(e.end)&&A(e.write)&&vt(e.writable),$t=e=>L(e)&&A(e.read)&&A(e.pipe)&&vt(e.readable),z=e=>Ut(e)||$t(e),Br=e=>Ft(e)||Mt(e);function Y(e,r){return Nt(e||{},r)}function Nt(e,r,t=0){if(t>3)return r;let o={...e};for(let[n,s]of Object.entries(r))W(s)?o[n]=Nt(o[n]||{},r[n],t+1):o[n]=r[n];return o}function Ir(e){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,e)}var jt="latest";function _n(){return globalThis._loadersgl_?.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="5.0.0-alpha.11"),globalThis._loadersgl_.version}var We=_n();function q(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var N={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},Vi=N.self||N.window||N.global||{},Hi=N.window||N.self||N.global||{},Qi=N.global||N.self||N.window||{},Gi=N.document||{};var S=typeof process!="object"||String(process)!=="[object process]"||process.browser;var zt=typeof window<"u"&&typeof window.orientation<"u",Dt=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Ji=Dt&&parseFloat(Dt[1])||0;var Pe=class{name;workerThread;isRunning=!0;result;_resolve=()=>{};_reject=()=>{};constructor(r,t){this.name=r,this.workerThread=t,this.result=new Promise((o,n)=>{this._resolve=o,this._reject=n})}postMessage(r,t){this.workerThread.postMessage({source:"loaders.gl",type:r,payload:t})}done(r){this.isRunning&&(this.isRunning=!1,this._resolve(r))}error(r){this.isRunning&&(this.isRunning=!1,this._reject(r))}abort(r){if(!this.isRunning)return;let t=r??En(`Worker job "${this.name}" was aborted`);this.workerThread.destroy(),this.error(t)}};function En(e){let r=new Error(e);return r.name="AbortError",r}var Se=class{constructor(...r){let o=globalThis.process?.getBuiltinModule?.("node:worker_threads").Worker;if(o)return new o(...r)}terminate(){}};var Cr=new Map;function qt(e){q(e.source&&!e.url||!e.source&&e.url);let r=Cr.get(e.source||e.url);return r||(e.url&&(r=Rn(e.url),Cr.set(e.url,r)),e.source&&(r=Vt(e.source),Cr.set(e.source,r))),q(r),r}function Rn(e){if(!e.startsWith("http"))return e;let r=Bn(e);return Vt(r)}function Vt(e){let r=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(r)}function Bn(e){return`try {
8
8
  importScripts('${e}');
9
9
  } catch (error) {
10
10
  console.error(error);
11
11
  throw error;
12
12
  }`}function Wr(e,r=!0,t){let o=t||new Set;if(e){if(Ht(e))o.add(e);else if(Ht(e.buffer))o.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let n in e)Wr(e[n],r,o)}}return t===void 0?Array.from(o):[]}function Ht(e){return e?e instanceof ArrayBuffer||typeof MessagePort<"u"&&e instanceof MessagePort||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas:!1}function Le(e){if(e===null)return{};let r=Object.assign({},e);return Object.keys(r).forEach(t=>{typeof e[t]=="object"&&!ArrayBuffer.isView(e[t])&&!(e[t]instanceof Array)?r[t]=Le(e[t]):typeof r[t]=="function"||r[t]instanceof RegExp?r[t]={}:r[t]=e[t]}),r}var Pr=()=>{},X=class{name;source;url;getUrl;loadWorker;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&S||typeof Se<"u"&&!S}constructor(r){let{name:t,source:o,url:n,getUrl:s,loadWorker:a}=r;q(o||n||s||a),this.name=t,this.source=o,this.url=n,this.getUrl=s,this.loadWorker=a,this.onMessage=Pr,this.onError=i=>console.log(i),this.worker=S?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=Pr,this.onError=Pr,this.worker.terminate(),this.terminated=!0}unref(){!S&&typeof this.worker.unref=="function"&&this.worker.unref()}ref(){!S&&typeof this.worker.ref=="function"&&this.worker.ref()}get isRunning(){return!!this.onMessage}postMessage(r,t){t=t||Wr(r),this.worker.postMessage(r,t)}_getErrorFromErrorEvent(r){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url||"built-in worker factory"}. `,r.message&&(t+=`${r.message} in `),r.lineno&&(t+=`:${r.lineno}:${r.colno}`),new Error(t)}_createBrowserWorker(){if(this.loadWorker)try{let o=this.loadWorker();if(o)return this._initializeBrowserWorker(o)}catch(o){if(!this.source&&!this.url&&!this.getUrl)throw o}let r=this.url||this.getUrl?.();this._loadableURL=qt({source:this.source,url:r});let t=new Worker(this._loadableURL,{name:this.name});return this._initializeBrowserWorker(t)}_initializeBrowserWorker(r){return r.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},r.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},r.onmessageerror=t=>console.error(t),r}_createNodeWorker(){let r;if(this.url){let o=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`,n=o.startsWith("file:")?new URL(o):o,s=this.url.endsWith(".ts")||this.url.endsWith(".mjs")?"module":"commonjs";r=new Se(n,{eval:!1,type:s})}else if(this.source)r=new Se(this.source,{eval:!0});else throw new Error("no worker");return r.on("message",t=>{this.onMessage(t)}),r.on("error",t=>{this.onError(t)}),r.on("exit",t=>{}),r}};var Oe=class{name="unnamed";source;url;getUrl;loadWorker;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];activeJobs=new Set;count=0;isDestroyed=!1;static isSupported(){return X.isSupported()}constructor(r){this.source=r.source,this.url=r.url,this.getUrl=r.getUrl,this.loadWorker=r.loadWorker,this.setProps(r)}destroy(r=new Error("Worker pool was destroyed")){this.activeJobs.forEach(o=>o.abort(r)),this.jobQueue.splice(0).forEach(o=>o.onReject(r)),this.idleQueue.forEach(o=>o.destroy()),this.isDestroyed=!0}setProps(r){this.props={...this.props,...r},r.name!==void 0&&(this.name=r.name),r.maxConcurrency!==void 0&&(this.maxConcurrency=r.maxConcurrency),r.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=r.maxMobileConcurrency),r.reuseWorkers!==void 0&&(this.reuseWorkers=r.reuseWorkers),r.onDebug!==void 0&&(this.onDebug=r.onDebug)}async startJob(r,t=(n,s,a)=>n.done(a),o=(n,s)=>n.error(s)){if(this.isDestroyed)return Promise.reject(new Error("Worker pool was destroyed"));let n=new Promise((s,a)=>(this.jobQueue.push({name:r,onMessage:t,onError:o,onStart:s,onReject:a}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;let r=this._getAvailableWorker();if(!r)return;let t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:r,backlog:this.jobQueue.length});let o=new Pe(t.name,r);this.activeJobs.add(o),r.ref(),r.onMessage=n=>t.onMessage(o,n.type,n.payload),r.onError=n=>t.onError(o,n),t.onStart(o);try{await o.result}catch{}finally{this.activeJobs.delete(o),this.returnWorkerToQueue(r)}}}returnWorkerToQueue(r){r.terminated||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(r.terminated||r.destroy(),this.count--):(r.unref(),this.idleQueue.push(r)),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;let r=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new X({name:r,source:this.source,url:this.url,getUrl:this.getUrl,loadWorker:this.loadWorker})}return null}_getMaxConcurrency(){return zt?this.maxMobileConcurrency:this.maxConcurrency}};var In={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},Qt=new WeakMap,Cn=1,j=class e{props;workerPools=new Map;static _workerFarm;static isSupported(){return X.isSupported()}static getWorkerFarm(r={}){return e._workerFarm=e._workerFarm||new e({}),e._workerFarm.setProps(r),e._workerFarm}constructor(r){this.props={...In},this.setProps(r),this.workerPools=new Map}destroy(r){for(let t of this.workerPools.values())t.destroy(r);this.workerPools=new Map}setProps(r){this.props={...this.props,...r};for(let t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(r){let{name:t,source:o,url:n,getUrl:s,loadWorker:a}=r,i=Wn(r),c=this.workerPools.get(i);return c||(c=new Oe({name:t,source:o,url:n,getUrl:s,loadWorker:a}),c.setProps(this._getWorkerPoolProps()),this.workerPools.set(i,c)),c}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}};function Wn(e){let{name:r,source:t,url:o,urlKey:n,loadWorker:s}=e,a=t?`source:${t}`:"",i=o||n?`url:${o||n}`:"",c=s?`loadWorker:${Pn(s)}`:"";return[r,a,i,c].filter(Boolean).join("|")}function Pn(e){let r=Qt.get(e);return r||(r=Cn++,Qt.set(e,r)),r}var ve=class{_values;_settlers;_closed;constructor(){this._values=[],this._settlers=[],this._closed=!1}[Symbol.asyncIterator](){return this}push(r){return this.enqueue(r)}enqueue(r){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");let t=this._settlers.shift();r instanceof Error?t.reject(r):t.resolve({value:r})}else this._values.push(r)}close(){for(;this._settlers.length>0;)this._settlers.shift().resolve({done:!0});this._closed=!0}next(){if(this._values.length>0){let r=this._values.shift();return r instanceof Error?Promise.reject(r):Promise.resolve({done:!1,value:r})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((r,t)=>{this._settlers.push({resolve:r,reject:t})})}};var Gt=new Set;function Or(e){let r=e.version!==We?` (worker-utils@${We})`:"";return`${e.name}@${e.version}${r}`}function vr(e,r={}){let t=r[e.id]||{},o=S?e.workerFile||`${e.id}-worker.js`:e.workerNode||`${e.id}-worker-node.js`,n=t.workerUrl;!n&&e.id==="compression"&&(n=r.workerUrl);let s=r._workerType||r?.core?._workerType;return!n&&s==="test"&&(S?n=`modules/${e.module}/dist/${o}`:n=`modules/${e.module}/src/workers/${e.id}-worker-node.ts`),n||null}function Fr(e,r={}){let t=vr(e,r),o=typeof e.worker=="string"?e.worker:null,n=t||o||Ur(e,!0);return q(n),n}function Ur(e,r=!1){let t=S?e.workerFile||`${e.id}-worker.js`:e.workerNode||`${e.id}-worker-node.js`,o=e.version;o==="latest"&&(o=jt);let n=o?`@${o}`:"",s=`https://unpkg.com/@loaders.gl/${e.module}${n}/dist/${t}`;return r&&On(e,s),s}function On(e,r){if(e.version!=="latest")return;let t=`${e.module}:${e.id}`;Gt.has(t)||(Gt.add(t),console.warn(`loaders.gl: ${e.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${r} from CDN.`))}function Mr(e,r){if(!j.isSupported())return!1;let t=r?.[e.id];return!!((e.worker||e.loadWorker||t?.workerUrl)&&r?.worker)}async function Fe(e,r,t={},o={},n={}){Jt(t.signal);let s=Or(e),i=j.getWorkerFarm(t).getWorkerPool(Zt(e,t,s)),c=t.jobName||e.name,u=await i.startJob(c,Yt.bind(null,o)),l=()=>u.abort(Nr(t.signal));t.signal?.addEventListener("abort",l,{once:!0}),t.signal?.aborted&&l();try{let{signal:f,...h}=t,d=Le(h),x=Le(n);return u.isRunning&&u.postMessage("process",{input:r,options:d,context:x}),(await u.result).result}finally{t.signal?.removeEventListener("abort",l)}}function $r(e,r,t={},o={},n={}){return vn(e,r,t,o,n)}async function*vn(e,r,t,o,n){Jt(t.signal);let s=Or(e),i=j.getWorkerFarm(t).getWorkerPool(Zt(e,t,s)),c=new ve,u=Fn(r),l=!1,f=!1,h=Promise.resolve(),d=new Error("Worker batch job failed"),x=()=>{l||(l=!0,c.close())},T=R=>{l||(l=!0,c.enqueue(d),c.close())},p=await i.startJob(t.jobName||e.name,(R,D,F)=>{switch(D){case"input-request":h=h.then(async()=>{let B=await u.next();R.isRunning&&(B.done?(f=!0,R.postMessage("input-done",{})):R.postMessage("input-batch",{input:B.value}))}).catch(B=>R.abort(B));break;case"output-batch":c.push(F.result);break;case"done":R.done(F),x();break;case"error":{let B=new Error(F.error||"Worker batch processing failed");R.error(B),T(B);break}case"process":Yt(o,R,D,F);break;default:{let B=new Error(`Unexpected worker batch message: ${D}`);R.error(B),T(B);break}}}),ce=()=>p.abort(Nr(t.signal));t.signal?.addEventListener("abort",ce,{once:!0}),t.signal?.aborted&&ce(),p.result.catch(T);try{let{signal:R,...D}=t;p.isRunning&&p.postMessage("process-in-batches",{options:Le(D),context:Le(n)});try{for await(let F of c)yield F,p.isRunning&&p.postMessage("output-ack",{})}catch(F){throw F===d&&await p.result,F}await p.result}finally{t.signal?.removeEventListener("abort",ce),p.isRunning&&p.abort(Kt("Worker batch iterator was closed")),f||Un(u)}}function Jt(e){if(e?.aborted)throw Nr(e)}function Nr(e){return e?.reason??Kt("Worker job was aborted")}function Kt(e){let r=new Error(e);return r.name="AbortError",r}function Fn(e){return Symbol.asyncIterator in e?e[Symbol.asyncIterator]():(async function*(){yield*e})()}function Un(e){try{Promise.resolve(e.return?.()).catch(()=>{})}catch{}}function Zt(e,r,t){if(r.source)return{name:t,source:r.source};let o=vr(e,r);return o?{name:t,url:o}:S&&e.loadWorker?{name:t,loadWorker:e.loadWorker,getUrl:()=>Fr(e,r),urlKey:Ur(e)}:{name:t,url:Fr(e,r)}}async function Yt(e,r,t,o){switch(t){case"done":r.done(o);break;case"error":r.error(new Error(o.error));break;case"process":let{id:n,input:s,options:a}=o;try{if(!e.process){r.postMessage("error",{id:n,error:"Worker not set up to process on main thread"});return}let i=await e.process(s,a,void 0,o.context||{});r.postMessage("done",{id:n,result:i})}catch(i){let c=i instanceof Error?i.message:"unknown error";r.postMessage("error",{id:n,error:c})}break;default:console.warn(`process-on-worker: unknown message ${t}`)}}function Ue(e,r=We){q(e,"no worker provided");let t=e.version;return!(!r||!t)}function or(e,r){if(r?.core?.credentials?.some(n=>n.type==="request"||"token"in n&&typeof n.token=="function"))return!1;let t=qr(r),o=t._nodeWorkers;return!S&&!o||e.id==="las"&&(r?.las?.shape??"arrow-table")==="arrow-table"||e.id==="csv"&&!Mn(r)?!1:!!Mr(e,t)}function jr(e,r,t,o,n=e){if(!or(e,t))return!1;if(t?.core?.worker!=="auto"||!n.getWorkerEstimate)return!0;try{let s=n.getWorkerEstimate(r,t,o);return s===void 0||!Number.isFinite(s)||s<0||s>1?!0:s>=(t.core?.workerThreshold??.1)}catch{return!0}}async function Dr(e,r,t,o,n,s){let a=s||Xt(t),i=await Fe(e,r,{...qr(t,e),signal:a},{process:async(c,u,l,f)=>{if(!n)throw new Error("Worker not set up to parse on main thread");let{_loaderIds:h,_loaderIsArray:d,...x}=f||{},T=o||f?{...o,...x}:void 0;return await eo(n,c,u,T,ro(e,h,d,o,t))}},to(o));return $n(e)?e.deserializeWorkerResult(i,t,o):i}async function*zr(e,r,t,o,n,s){let a=s||Xt(t),i=$r(e,r,{...qr(t),signal:a},{process:async(c,u,l,f)=>{if(!n)throw new Error("Worker not set up to parse on main thread");let{_loaderIds:h,_loaderIsArray:d,...x}=f||{},T=o||f?{...o,...x}:void 0;return await eo(n,c,u,T,ro(e,h,d,o,t))}},to(o));for await(let c of i)yield e.deserializeWorkerBatch?e.deserializeWorkerBatch(c,t,o):c}function Xt(e){let r=e?.parquet?.signal;if(typeof AbortSignal<"u"&&r instanceof AbortSignal)return r}function eo(e,r,t,o,n){return!n&&e.length<=2?e(r,t):e(r,n,t,o)}function ro(e,r,t,o,n){if(!r)return;let s=new Map,a=new Set;for(let u of[e,...o?.loaders||[]])c(u);let i=r.map(u=>{let l=s.get(u);if(!l)throw new Error(`Worker requested unknown loader "${u}". Declare it in loader.subloaders or pass it in context.loaders.`);return l});return t?i:i[0];function c(u){if(!a.has(u)){a.add(u),s.set(u.id,u);for(let[l,f]of Object.entries(u.subloaders||{})){let h=n?.core?.subloaders?.[l]||f;c(h),s.set(f.id,h)}}}}function qr(e={},r){let t=JSON.parse(JSON.stringify({...e,...e.core?{core:{...e.core,authentications:void 0}}:{}})),o={...t.core,...t};return o.worker==="auto"&&(o.worker=!0),r&&(o._workerLoaderId=r.id),o}function to(e){if(!e)return{};let{fetch:r,loaders:t,coreApi:o,_parse:n,_parseSync:s,_parseInBatches:a,...i}=e;return JSON.parse(JSON.stringify(i))}function Mn(e){let r=e;return(r?.csv?.shape??r?.core?.shape)==="arrow-table"}function $n(e){return typeof e.deserializeWorkerResult=="function"}function Vr(e,r){if(!j.isSupported())return!1;let t=r?._nodeWorkers??r?.core?._nodeWorkers,o=r?.worker??r?.core?.worker;return!k&&!t?!1:!!(e.worker&&o)}function Hr(e,r,t){if(t=t||e.byteLength,e.byteLength<t||r.byteLength<t)return!1;let o=new Uint8Array(e),n=new Uint8Array(r);for(let s=0;s<o.length;++s)if(o[s]!==n[s])return!1;return!0}function Me(...e){return oo(e)}function oo(e){let r=e.map(s=>s instanceof ArrayBuffer?new Uint8Array(s):s),t=r.reduce((s,a)=>s+a.byteLength,0),o=new Uint8Array(t),n=0;for(let s of r)o.set(s,n),n+=s.byteLength;return o.buffer}function Qr(e){let r=new Uint8Array(e),t=[],o=3*4096;for(let n=0;n<r.length;n+=o)t.push(btoa(String.fromCharCode(...r.subarray(n,n+o))));return t.join("")}async function*Gr(e,r={}){let t=new TextDecoder(void 0,r);for await(let o of e)yield typeof o=="string"?o:t.decode(o,{stream:!0})}async function*Jr(e){let r=new TextEncoder;for await(let t of e)yield typeof t=="string"?r.encode(t).buffer:t}async function*Kr(e){let r="";for await(let t of e){r+=t;let o;for(o=r.indexOf(`
13
13
  `);o>=0;){let n=r.slice(0,o+1);r=r.slice(o+1),yield n,o=r.indexOf(`
14
- `)}}r.length>0&&(yield r)}async function*Zr(e){let r=1;for await(let t of e)yield{counter:r,line:t},r++}async function Yr(e,r){let t=jn(e);for(;;){let{done:o,value:n}=await t.next();if(o){t.return&&t.return();return}if(r(n))return}}async function ee(e){let r=[];for await(let t of e)r.push(Nn(t));return Me(...r)}function Nn(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:t,byteLength:o}=e;return no(r,t,o)}return no(e)}function no(e,r=0,t=e.byteLength-r){let o=new Uint8Array(e,r,t),n=new Uint8Array(o.length);return n.set(o),n.buffer}function jn(e){if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();if(typeof e[Symbol.iterator]=="function"){let r=e[Symbol.iterator]();return Dn(r)}return e}function Dn(e){return{next(r){return Promise.resolve(e.next(r))},return(r){return typeof e.return=="function"?Promise.resolve(e.return(r)):Promise.resolve({done:!0,value:r})},throw(r){return typeof e.throw=="function"?Promise.resolve(e.throw(r)):Promise.reject(r)}}}function $e(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let r=process.hrtime();e=r[0]*1e3+r[1]/1e6}else e=Date.now();return e}var de=class{constructor(r,t){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=r,this.type=t,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(r){return this.sampleSize=r,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(r){return this._count+=r,this._samples++,this._checkSampling(),this}subtractCount(r){return this._count-=r,this._samples++,this._checkSampling(),this}addTime(r){return this._time+=r,this.lastTiming=r,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=$e(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime($e()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}};var _e=class{constructor(r){this.stats={},this.id=r.id,this.stats={},this._initializeStats(r.stats),Object.seal(this)}get(r,t="count"){return this._getOrCreate({name:r,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(let r of Object.values(this.stats))r.reset();return this}forEach(r){for(let t of Object.values(this.stats))r(t)}getTable(){let r={};return this.forEach(t=>{r[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),r}_initializeStats(r=[]){r.forEach(t=>this._getOrCreate(t))}_getOrCreate(r){let{name:t,type:o}=r,n=this.stats[t];return n||(r instanceof de?n=r:n=new de(t,o),this.stats[t]=n),n}};var zn="Queued Requests",qn="Active Requests",Vn="Cancelled Requests",Hn="Queued Requests Ever",Qn="Active Requests Ever",Gn={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},Ee=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(r={}){this.props={...Gn,...r},this.stats=new _e({id:this.props.id}),this.stats.get(zn),this.stats.get(qn),this.stats.get(Vn),this.stats.get(Hn),this.stats.get(Qn)}setProps(r){r.throttleRequests!==void 0&&(this.props.throttleRequests=r.throttleRequests),r.maxRequests!==void 0&&(this.props.maxRequests=r.maxRequests),r.debounceTime!==void 0&&(this.props.debounceTime=r.debounceTime)}scheduleRequest(r,t=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(r))return this.requestMap.get(r);let o={handle:r,priority:0,getPriority:t},n=new Promise(s=>(o.resolve=s,o));return this.requestQueue.push(o),this.requestMap.set(r,n),this._issueNewRequests(),n}_issueRequest(r){let{handle:t,resolve:o}=r,n=!1,s=()=>{n||(n=!0,this.requestMap.delete(t),this.activeRequestCount--,this.scheduleRefill())};return this.activeRequestCount++,o?o({done:s}):Promise.resolve({done:s})}scheduleRefill(){this.updateTimer===null&&(this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;let r=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(r!==0){this._updateAllRequests();for(let t=0;t<r;++t){let o=this.requestQueue.shift();o&&this._issueRequest(o)}}}_updateAllRequests(){let r=this.requestQueue;for(let t=0;t<r.length;++t){let o=r[t];this._updateRequest(o)||(r.splice(t,1),this.requestMap.delete(o.handle),t--)}r.sort((t,o)=>t.priority-o.priority)}_updateRequest(r){return r.priority=r.getPriority(r.handle),r.priority<0?(r.resolve(null),!1):!0}};function sr(e,r=[]){return e.every(nr)?e:e.map((t,o)=>{if(nr(t))return t;let n=r.find(a=>a.type===t?.type);if(!n)throw new Error(`No authentication class registered for credential at index ${o}.`);let s;try{s=new n(t)}catch{throw new Error(`Invalid authentication configuration at index ${o}.`)}if(!nr(s))throw new Error(`Authentication class returned an invalid credential at index ${o}.`);return s})}function pe(e){if(!e.core?.credentials?.length)return e;let r=sr(e.core.credentials,e.core.authentications);return r===e.core.credentials?e:{...e,core:{...e.core,credentials:r}}}async function _(e,r,t){if(!t.core?.credentials?.length||t.core.credentials.every(nr))return t;let o=await e?.getAuthentications?.(r,t);return o?.length?pe({...t,core:{...t.core,authentications:[...t.core?.authentications||[],...o]}}):pe(t)}function nr(e){return!e||typeof e!="object"||typeof e.id!="string"||!Array.isArray(e.origins)?!1:e.type==="request"?typeof e.authenticate=="function":(e.type==="header"||e.type==="query-parameter")&&typeof e.name=="string"&&(typeof e.token=="string"||typeof e.token=="function")&&Array.isArray(e.refreshStatusCodes)}var so=Symbol("loaders.gl.authenticated-fetch"),Xr=new WeakMap;function et(e){let r=e.fetch||((f,h)=>fetch(f,h)),t=r[so],o=new Map(t?.credentialResolutions),n=sr(e.credentials.map(f=>o.get(f)||f),e.authentications);if(e.credentials.forEach((f,h)=>{o.set(f,n[h])}),!e.fetchOptions&&(!n.length||t?.credentials.length===n.length&&n.every((f,h)=>f===t.credentials[h])))return r;let s=t?.fetch||r,a=t?[...new Set([...n,...t.credentials])]:n,i=io(t?.fetchOptions||{},e.fetchOptions),c=a.filter(f=>f.type!=="request"),u=a.filter(f=>f.type==="request");for(let f of u)fo(f.origins);let l=async(f,h={})=>{if(h=io(i,h),h.signal?.aborted)throw Ne();if(!a.length)return s(f,h);let d=Zn(f),x=d?await co(d,h,c):{url:f,options:h,credentials:[]},T=await ao(x,u,"request"),p=await s(T.url,T.options),ce=[];for(let ue of x.credentials){let{credential:J}=ue;typeof J.token=="function"&&(ir(h)||J.canReplayRequest?.(f,h))&&(ir(T.options)||J.canReplayRequest?.(T.url,T.options))&&(J.refreshStatusCodes.includes(p.status)||await J.shouldRefresh?.(p))&&ce.push(ue)}let R=ir(h)&&ir(T.options)&&T.credentials.some(ue=>ue.refreshStatusCodes?.includes(p.status));if(!ce.length&&!R)return p;if(h.signal?.aborted)throw Ne();let D=new Map;if(await Promise.all(ce.map(async({credential:ue})=>{let J=await Jn(ue,f,p);J&&D.set(ue,J)})),!D.size&&!R)return p;if(await p.body?.cancel().catch(()=>{}),h.signal?.aborted)throw Ne();let F=d?await co(d,h,c,D,x.credentials):{url:f,options:h},B=await ao(F,u,"retry",p);return s(B.url,B.options)};return Object.defineProperty(l,so,{value:{fetch:s,credentials:a,credentialResolutions:o,fetchOptions:i}}),l}function io(e,r){let t={...e,...r};if(e.headers||r?.headers){let o=new Headers(e.headers);new Headers(r?.headers).forEach((n,s)=>o.set(s,n)),t.headers=o}return t}async function ao(e,r,t,o){let n=[],s=e.options.signal;for(let a of r){let i=uo(e.url);if(!i||!fo(a.origins).includes(i))continue;if(s?.aborted)throw Ne();let c=await a.authenticate({url:e.url,options:{...e.options,headers:new Headers(e.options.headers)},reason:t,response:o?{status:o.status,headers:new Headers(o.headers)}:void 0});if(!c||typeof c.url!="string"||!c.options||typeof c.options!="object")throw new Error("Authentication callback returned an invalid request.");e={url:c.url,options:{...c.options,...s?{signal:s}:{}}},n.push(a)}if(s?.aborted)throw Ne();return{...e,credentials:n}}function uo(e){try{let r=new URL(e);return!r.host||r.username||r.password?null:r.origin!=="null"?r.origin:`${r.protocol}//${r.host}`}catch{return null}}function fo(e){if(!e.length)throw new Error("Request authentication requires at least one exact origin.");return e.map(r=>{let t=uo(r),o;try{o=new URL(r)}catch{throw new Error("Invalid request authentication origin.")}if(!t||o.pathname&&o.pathname!=="/"||o.search||o.hash)throw new Error("Invalid request authentication origin.");return t})}async function co(e,r,t,o=new Map,n=[]){let s=new URL(e),a=new Headers(r.headers),i=[],c=new Map(n.map(({credential:u,token:l})=>[u,l]));for(let u of t){if(!u.origins.includes(s.origin))continue;let l=o.get(u),f=c.get(u),h=u.type==="query-parameter"&&f!==void 0,d=u.type==="header"&&f!==void 0;if(u.type==="query-parameter"&&s.searchParams.has(u.name)&&!h||u.type==="header"&&a.has(u.name)&&!d)continue;let x=l??f??await Kn(u.token,{url:e.toString(),reason:"request"});x&&(u.type==="query-parameter"?s.searchParams.set(u.name,x):a.set(u.name,`${u.prefix||""}${x}`),i.push({credential:u,token:x}))}return{url:s.toString(),options:{...r,headers:a},credentials:i}}async function Jn(e,r,t){let o=Xr.get(e);if(o)return o;let n=e.token,s=Promise.resolve(n({url:r,reason:"refresh",response:{status:t.status,headers:t.headers}})).finally(()=>Xr.delete(e));return Xr.set(e,s),s}async function Kn(e,r){return typeof e=="function"?e(r):e}function Zn(e){try{let r=new URL(e);return["http:","https:"].includes(r.protocol)?r:null}catch{return null}}function ir(e){let r=(e.method||"GET").toUpperCase();return["GET","HEAD","OPTIONS","PUT","DELETE"].includes(r)?!(e.body&&typeof ReadableStream<"u"&&e.body instanceof ReadableStream):!1}function Ne(){return new DOMException("The operation was aborted.","AbortError")}var rt="",lo={};function tt(e){rt=e}function ot(){return rt}function re(e){for(let r in lo)if(e.startsWith(r)){let t=lo[r];e=e.replace(r,t)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${rt}${e}`),e}var V={};_t(V,{dirname:()=>Xn,filename:()=>Yn,join:()=>es,resolve:()=>rs});function ho(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let e=globalThis.location?.pathname;return e?.slice(0,e.lastIndexOf("/")+1)||""}function Yn(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):e}function Xn(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function es(...e){return e=e.map((t,o)=>(o&&(t=t.replace(new RegExp("^/"),"")),o!==e.length-1&&(t=t.replace(new RegExp("/$"),"")),t)),e.join("/")}function rs(...e){let r=[];for(let s=0;s<e.length;s++)r[s]=e[s];let t="",o=!1,n;for(let s=r.length-1;s>=-1&&!o;s--){let a;s>=0?a=r[s]:(n===void 0&&(n=ho()),a=n),a.length!==0&&(t=`${a}/${t}`,o=a.charCodeAt(0)===je)}return t=ts(t,!o),o?`/${t}`:t.length>0?t:"."}var je=47,nt=46;function ts(e,r){let t="",o=-1,n=0,s,a=!1;for(let i=0;i<=e.length;++i){if(i<e.length)s=e.charCodeAt(i);else{if(s===je)break;s=je}if(s===je){if(!(o===i-1||n===1))if(o!==i-1&&n===2){if(t.length<2||!a||t.charCodeAt(t.length-1)!==nt||t.charCodeAt(t.length-2)!==nt){if(t.length>2){let c=t.length-1,u=c;for(;u>=0&&t.charCodeAt(u)!==je;--u);if(u!==c){t=u===-1?"":t.slice(0,u),o=i,n=0,a=!1;continue}}else if(t.length===2||t.length===1){t="",o=i,n=0,a=!1;continue}}r&&(t.length>0?t+="/..":t="..",a=!0)}else{let c=e.slice(o+1,i);t.length>0?t+=`/${c}`:t=c,a=!1}o=i,n=0}else s===nt&&n!==-1?++n:n=-1}return t}var os="5.0.0-alpha.10",st={dataType:null,batchType:null,name:"JSON",id:"json",module:"json",version:os,encoding:"json",format:"json",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:po,parse:async e=>po(new TextDecoder().decode(e)),options:{}};function po(e){return JSON.parse(e)}function cr(e){return e&&typeof e=="object"&&e.isBuffer}function H(e){if(cr(e))return e;if(e instanceof ArrayBuffer)return e;if(Rr(e))return ar(e);if(ArrayBuffer.isView(e)){let r=e.buffer;return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?r:r.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function Q(e){if(e instanceof ArrayBuffer)return e;if(Rr(e))return ar(e);let{buffer:r,byteOffset:t,byteLength:o}=e;return r instanceof ArrayBuffer&&t===0&&o===r.byteLength?r:ar(r,t,o)}function ar(e,r=0,t=e.byteLength-r){let o=new Uint8Array(e,r,t),n=new Uint8Array(o.length);return n.set(o),n.buffer}function ur(e){return ArrayBuffer.isView(e)?e:new Uint8Array(e)}var De=class{handle;size;bigsize;url;constructor(r){this.handle=r instanceof ArrayBuffer?new Blob([r]):r,this.size=r instanceof ArrayBuffer?r.byteLength:r.size,this.bigsize=BigInt(this.size),this.url=r instanceof File?r.name:""}async close(){}async stat(){return{size:this.handle.size,bigsize:BigInt(this.handle.size),isDirectory:!1}}async read(r,t,o){if(o?.aborted)throw new Error("Request aborted");let n=await this.handle.slice(Number(r),Number(r)+Number(t)).arrayBuffer();if(o?.aborted)throw new Error("Request aborted");return n}};var ze=new Error("Not implemented"),qe=class{handle;size=0;bigsize=0n;url="";constructor(r,t,o){if(globalThis.loaders?.NodeFile)return new globalThis.loaders.NodeFile(r,t,o);throw k?new Error("Can't instantiate NodeFile in browser."):new Error("Can't instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.")}async read(r,t){throw ze}async write(r,t,o){throw ze}async stat(){throw ze}async truncate(r){throw ze}async append(r){throw ze}async close(){}};function y(e){return!!(e&&typeof e=="object"&&"createDataSource"in e)}var Re=class extends Error{constructor(r,t){super(r),this.reason=t.reason,this.url=t.url,this.response=t.response}reason;url;response};var ns=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,ss=/^([-\w.]+\/[-\w.+]+)/;function it(e,r){return e.toLowerCase()===r.toLowerCase()}function mo(e){let r=ss.exec(e);return r?r[1]:e}function at(e){let r=ns.exec(e);return r?r[1]:""}var yo=/\?.*/;function go(e){let r=e.match(yo);return r&&r[0]}function te(e){return e.replace(yo,"")}function wo(e){if(e.length<50)return e;let r=e.slice(e.length-15);return`${e.substr(0,32)}...${r}`}function M(e){return w(e)?e.url:m(e)?("name"in e?e.name:"")||"":typeof e=="string"?e:""}function Be(e){if(w(e)){let r=e.headers.get("content-type")||"",t=te(e.url);return mo(r)||at(t)}return m(e)?e.type||"":typeof e=="string"?at(e):""}function bo(e){return w(e)?e.headers["content-length"]||-1:m(e)?e.size:typeof e=="string"?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}async function Ve(e){if(w(e))return e;let r={},t=bo(e);t>=0&&(r["content-length"]=String(t));let o=M(e),n=Be(e);n&&(r["content-type"]=n);let s=await as(e);s&&(r["x-first-bytes"]=s),typeof e=="string"&&(e=new TextEncoder().encode(e));let a=new Response(e,{headers:r});return Object.defineProperty(a,"url",{value:o}),a}async function fr(e){if(!e.ok)throw await is(e)}async function is(e){let r=wo(e.url),t=`Failed to fetch resource (${e.status}) ${e.statusText}: ${r}`;t=t.length>100?`${t.slice(0,100)}...`:t;let o={reason:e.statusText,url:e.url,response:e};try{let n=e.headers.get("Content-Type");o.reason=!e.bodyUsed&&n?.includes("application/json")?await e.json():await e.text()}catch{}return new Re(t,o)}async function as(e){if(typeof e=="string")return`data:,${e.slice(0,5)}`;if(e instanceof Blob){let t=e.slice(0,5);return await new Promise(o=>{let n=new FileReader;n.onload=s=>o(s?.target?.result),n.readAsDataURL(t)})}if(e instanceof ArrayBuffer){let t=e.slice(0,5);return`data:base64,${Qr(t)}`}return null}function cs(e){return!us(e)&&!fs(e)}function us(e){return e.startsWith("http:")||e.startsWith("https:")}function fs(e){return e.startsWith("data:")}async function I(e,r){if(typeof e=="string"){let t=re(e);return cs(t)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(t,r):await fetch(t,r)}return await Ve(e)}async function xo(e,r,t){e instanceof Blob||(e=new Blob([e]));let o=e.slice(r,r+t);return await ls(o)}async function ls(e){return await new Promise((r,t)=>{let o=new FileReader;o.onload=n=>r(n?.target?.result),o.onerror=n=>t(n),o.readAsArrayBuffer(e)})}var He=new U({id:"loaders.gl"}),lr=class{log(){return()=>{}}info(){return()=>{}}once(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},hr=class{console;onceMessages=new Set;constructor(){this.console=console}log(...r){return this.console.log.bind(this.console,...r)}info(...r){return this.console.info.bind(this.console,...r)}once(...r){let t=String(r[0]);return this.onceMessages.has(t)?()=>{}:(this.onceMessages.add(t),this.console.info.bind(this.console,...r))}warn(...r){return this.console.warn.bind(this.console,...r)}error(...r){return this.console.error.bind(this.console,...r)}};var dr={searchParams:void 0,core:{baseUrl:void 0,fetch:null,mimeType:void 0,fallbackMimeType:void 0,ignoreRegisteredLoaders:void 0,nothrow:!1,shape:void 0,log:new hr,useLocalLibraries:!1,subloaders:void 0,CDN:"https://unpkg.com/@loaders.gl",worker:!0,workerThreshold:.1,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:k,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]}},To={baseUri:"core.baseUrl",fetch:"core.fetch",mimeType:"core.mimeType",fallbackMimeType:"core.fallbackMimeType",ignoreRegisteredLoaders:"core.ignoreRegisteredLoaders",nothrow:"core.nothrow",log:"core.log",useLocalLibraries:"core.useLocalLibraries",CDN:"core.CDN",worker:"core.worker",maxConcurrency:"core.maxConcurrency",maxMobileConcurrency:"core.maxMobileConcurrency",reuseWorkers:"core.reuseWorkers",_nodeWorkers:"core.nodeWorkers",_workerType:"core._workerType",_worker:"core._workerType",limit:"core.limit",_limitMB:"core._limitMB",shape:"core.shape",batchSize:"core.batchSize",batchDebounceMs:"core.batchDebounceMs",metadata:"core.metadata",transforms:"core.transforms",throws:"nothrow",dataType:"(no longer used)",uri:"core.baseUrl",method:"core.fetch.method",headers:"core.fetch.headers",body:"core.fetch.body",mode:"core.fetch.mode",credentials:"core.fetch.credentials",cache:"core.fetch.cache",redirect:"core.fetch.redirect",referrer:"core.fetch.referrer",referrerPolicy:"core.fetch.referrerPolicy",integrity:"core.fetch.integrity",keepalive:"core.fetch.keepalive",signal:"core.fetch.signal"};var ct=["baseUrl","fetch","mimeType","fallbackMimeType","ignoreRegisteredLoaders","nothrow","log","useLocalLibraries","CDN","worker","workerThreshold","maxConcurrency","maxMobileConcurrency","reuseWorkers","workerTransferBufferCopy","_nodeWorkers","_workerType","limit","_limitMB","shape","batchSize","batchDebounceMs","metadata","transforms"];function Qe(e,r){let t=r?.searchParams;if(!t||Object.keys(t).length===0||/^(?:data|blob):/i.test(e))return e;let o=e.indexOf("#"),n=o>=0?e.slice(o):"",s=o>=0?e.slice(0,o):e,a=s.indexOf("?"),i=a>=0?s.slice(0,a):s,c=a>=0?s.slice(a+1):"",u=new URLSearchParams(c),l=new URLSearchParams;for(let[h,d]of Object.entries(t))u.has(h)||l.set(h,String(d));let f=l.toString();return`${i}${a>=0?`?${c}`:""}${f?`${a>=0?"&":"?"}${f}`:""}${n}`}function Ge(){globalThis.loaders=globalThis.loaders||{};let{loaders:e}=globalThis;return e._state||(e._state={}),e._state}function P(){let e=Ge();return e.globalOptions=e.globalOptions||{...dr,core:{...dr.core}},G(e.globalOptions)}function ut(e){let r=Ge(),t=P();r.globalOptions=Lo(t,e),Ir(e.modules)}function oe(e,r,t,o){t=t||[],t=Array.isArray(t)?t:[t],hs(e,t),ko(e);let n=G(Lo(r,e,o));return ko(n),n}function G(e){let r=ys(e);_o(r);for(let t of ct)r.core&&r.core[t]!==void 0&&delete r[t];return r.core&&r.core._workerType!==void 0&&delete r._worker,r}function hs(e,r){Ao(e,null,dr,To,r);for(let t of r){let o=e&&e[t.id]||{},n=t.options&&t.options[t.id]||{},s=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};Ao(o,t.id,n,s,r)}}function ko(e){let r=e.core?.workerThreshold;if(r!==void 0&&(!Number.isFinite(r)||r<0||r>1))throw new Error("core.workerThreshold must be a finite number between 0 and 1")}function Ao(e,r,t,o,n){let s=r||"Top level",a=r?`${r}.`:"";for(let i in e){let c=!r&&L(e[i]),u=i==="baseUri"&&!r,l=i==="workerUrl"&&r;if(!(i in t)&&!u&&!l){if(i in o)He.level>0&&He.warn(`${s} loader option '${a}${i}' no longer supported, use '${o[i]}'`)();else if(!c&&He.level>0){let f=ds(i,n);He.warn(`${s} loader option '${a}${i}' not recognized. ${f}`)()}}}}function ds(e,r){let t=e.toLowerCase(),o="";for(let n of r)for(let s in n.options){if(e===s)return`Did you mean '${n.id}.${s}'?`;let a=s.toLowerCase();(t.startsWith(a)||a.startsWith(t))&&(o=o||`Did you mean '${n.id}.${s}'?`)}return o}function Lo(e,r,t){let o=e.options||{},n={...o};o.core&&(n.core={...o.core}),_o(n),n.core?.log===null&&(n.core={...n.core,log:new lr}),So(n,G(P()));let s=G(r);return So(n,s),ps(n,s,e),ms(n,t),gs(n),n}function ps(e,r,t){let o=e.core?.shape;if(o===void 0)return;let n=t.options?.[t.id];if(!W(n)||!("shape"in n))return;let s=P()[t.id];if(W(s)&&"shape"in s)return;let a=r[t.id];if(W(a)&&"shape"in a)return;let i=e[t.id];e[t.id]={...W(i)?i:{},shape:o}}function So(e,r){for(let t in r)if(t in r){let o=r[t];W(o)&&W(e[t])?e[t]={...e[t],...r[t]}:e[t]=r[t]}}function ms(e,r){if(!r)return;e.core?.baseUrl!==void 0||(e.core||={},e.core.baseUrl=V.dirname(te(r)))}function ys(e){let r={...e};return e.core&&(r.core={...e.core}),r}function _o(e){e.baseUri!==void 0&&(e.core||={},e.core.baseUrl===void 0&&(e.core.baseUrl=e.baseUri));for(let t of ct)if(e[t]!==void 0){e.core||={};let n=e.core;n[t]===void 0&&(n[t]=e[t])}let r=e._worker;r!==void 0&&(e.core||={},e.core._workerType===void 0&&(e.core._workerType=r))}function gs(e){let r=e.core;if(r)for(let t of ct)r[t]!==void 0&&(e[t]=r[t])}function C(e){return e?(Array.isArray(e)&&(e=e[0]),Array.isArray(e?.extensions)):!1}function Je(e){be(e,"null loader"),be(C(e),"invalid loader");let r;return Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),(e?.parseTextSync||e?.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}var Eo=()=>{let e=Ge();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function Ro(e){let r=Eo();e=Array.isArray(e)?e:[e];for(let t of e){let o=Je(t);r.find(n=>o===n)||r.unshift(o)}}function Bo(){return Eo()}function Io(){let e=Ge();e.loaderRegistry=[]}var ws=/\.([^.]+)$/;async function v(e,r=[],t,o){if(!Po(e))return null;let n=G(t||{});if(n.core||={},e instanceof Response&&Co(e)){let a=await e.clone().text(),i=O(a,r,{...n,core:{...n.core,nothrow:!0}},o);if(i)return i}let s=O(e,r,{...n,core:{...n.core,nothrow:!0}},o);if(s)return s;if(m(e)&&(e=await e.slice(0,10).arrayBuffer(),s=O(e,r,n,o)),!s&&e instanceof Response&&Co(e)){let a=await e.clone().text();s=O(a,r,n,o)}if(!s&&!n.core.nothrow)throw new Error(Oo(e));return s}function Co(e){let r=Be(e);return!!(r&&(r.startsWith("text/")||r==="application/json"||r.endsWith("+json")))}function O(e,r=[],t,o){if(!Po(e))return null;let n=G(t||{});if(n.core||={},r&&!Array.isArray(r))return Je(r);let s=[];r&&(s=s.concat(r)),n.core.ignoreRegisteredLoaders||s.push(...Bo()),xs(s);let a=bs(e,s,n,o);if(!a&&!n.core.nothrow)throw new Error(Oo(e));return a}function bs(e,r,t,o){let n=M(e),s=Be(e),a=te(n)||o?.url,i=null,c="",u=t?.core&&"type"in t.core?t.core.type:void 0;return u&&u!=="auto"&&(i=As(r,u),c=i?`match forced by supplied source type ${u}`:""),t?.core?.mimeType&&(i=ft(r,t?.core?.mimeType),c=`match forced by supplied MIME type ${t?.core?.mimeType}`),i=i||Ss(r,a),c=c||(i?`matched source url ${a}`:""),i=i||Ts(r,a),c=c||(i?`matched url ${a}`:""),i=i||ft(r,s),c=c||(i?`matched MIME type ${s}`:""),i=i||_s(r,e),c=c||(i?`matched initial data ${vo(e)}`:""),!i&&m(e)&&(i=Ls(r,e),c=c||(i?"matched source testData":"")),t?.core?.fallbackMimeType&&(i=i||ft(r,t?.core?.fallbackMimeType),c=c||(i?`matched fallback MIME type ${s}`:"")),c&&Er.log(1,`selectLoader selected ${i?.name}: ${c}.`),i}function Po(e){return!(e instanceof Response&&e.status===204)}function Oo(e){let r=M(e),t=Be(e),o="No valid loader found (";o+=r?`${V.filename(r)}, `:"no url provided, ",o+=`MIME type: ${t?`"${t}"`:"not provided"}, `;let n=e?vo(e):"";return o+=n?` first bytes: "${n}"`:"first bytes: not available",o+=")",o}function xs(e){for(let r of e)Je(r)}function Ts(e,r){let t=r&&ws.exec(r),o=t&&t[1];return o?ks(e,o):null}function ks(e,r){r=r.toLowerCase();for(let t of e)for(let o of t.extensions)if(o.toLowerCase()===r)return t;return null}function As(e,r){for(let t of e)if(y(t)&&t.type===r)return t;return null}function Ss(e,r){if(!r)return null;for(let t of e)if(y(t)&&t.testURL(r))return t;return null}function Ls(e,r){for(let t of e)if(y(t)&&t.testData?.(r))return t;return null}function ft(e,r){for(let t of e)if(t.mimeTypes?.some(o=>it(r,o))||it(r,`application/x.${t.id}`))return t;return null}function _s(e,r){if(!r)return null;for(let t of e)if(typeof r=="string"){if(Es(r,t))return t}else if(ArrayBuffer.isView(r)){if(Wo(r.buffer,r.byteOffset,t))return t}else if(r instanceof ArrayBuffer&&Wo(r,0,t))return t;return null}function Es(e,r){return r.testText?r.testText(e):(Array.isArray(r.tests)?r.tests:[r.tests]).some(o=>e.startsWith(o))}function Wo(e,r,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(n=>Rs(e,r,t,n))}function Rs(e,r,t,o){if(K(o))return Hr(o,e,o.byteLength);switch(typeof o){case"function":return o(Q(e));case"string":let n=lt(e,r,o.length);return o===n;default:return!1}}function vo(e,r=5){return typeof e=="string"?e.slice(0,r):ArrayBuffer.isView(e)?lt(e.buffer,e.byteOffset,r):e instanceof ArrayBuffer?lt(e,0,r):""}function lt(e,r,t){if(e.byteLength<r+t)return"";let o=new DataView(e),n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o.getUint8(r+s));return n}var Bs=256*1024;function*Fo(e,r){let t=r?.chunkSize||Bs,o=0,n=new TextEncoder;for(;o<e.length;){let s=Math.min(e.length-o,t),a=e.slice(o,o+s);o+=s,yield Q(n.encode(a))}}function*Uo(e,r={}){let{chunkSize:t=262144}=r,o=0;for(;o<e.byteLength;){let n=Math.min(e.byteLength-o,t),s=new ArrayBuffer(n),a=new Uint8Array(e,o,n);new Uint8Array(s).set(a),o+=n,yield s}}async function*Mo(e,r){let t=r?.chunkSize||1048576,o=0;for(;o<e.size;){let n=o+t,s=await e.slice(o,n).arrayBuffer();o=n,yield s}}function ht(e,r){return k?Is(e,r):Cs(e,r)}async function*Is(e,r){let t=e.getReader(),o,n=!1,s=!1,a=!1;try{for(;;){let i=o||t.read();o=void 0;let c;try{c=await i}catch(f){throw s=!0,f}let{done:u,value:l}=c;if(u){n=!0;return}r?._streamReadAhead&&(o=t.read(),o.catch(()=>{})),yield H(l)}}catch(i){throw a=!0,i}finally{let i=!1,c;if(!n&&!s)try{await t.cancel()}catch(u){i=!0,c=u}try{t.releaseLock()}catch(u){i||(i=!0,c=u)}if(!a&&i)throw c}}async function*Cs(e,r){for await(let t of e)yield H(t)}function me(e,r){if(typeof e=="string")return Fo(e,r);if(e instanceof ArrayBuffer)return Uo(e,r);if(m(e))return Mo(e,r);if(z(e))return ht(e,r);if(w(e)){let t=e.body;if(!t)throw new Error("Readable stream not available on Response");return ht(t,r)}throw new Error("makeIterator")}var Ke="Cannot convert supplied data type";function dt(e,r,t){if(r.text&&typeof e=="string")return e;if(cr(e)&&(e=e.buffer),K(e)){let o=ur(e);return r.text&&!r.binary?new TextDecoder("utf8").decode(o):H(o)}throw new Error(Ke)}async function $o(e,r,t){if(typeof e=="string"||K(e))return dt(e,r,t);if(m(e)&&(e=await Ve(e)),w(e))return await fr(e),r.binary?await e.arrayBuffer():await e.text();if(z(e)&&(e=me(e,t)),Z(e)||he(e))return ee(e);throw new Error(Ke)}async function No(e,r){if(typeof e=="string")return new TextEncoder().encode(e).buffer;if(K(e))return H(ur(e));if(m(e)&&(e=await Ve(e)),w(e))return await fr(e),await e.arrayBuffer();if(z(e)&&(e=me(e,r)),Z(e)||he(e))return ee(e);throw new Error(Ke)}async function jo(e,r){if(Ce(e)&&(e=await e),Ae(e))return e;if(w(e)){await fr(e);let t=await e.body;if(!t)throw new Error(Ke);return me(t,r)}return m(e)||z(e)?me(e,r):he(e)||Z(e)?e:Ws(e)}function Ws(e){if(ArrayBuffer.isView(e))return(function*(){yield H(e)})();if(K(e))return(function*(){yield H(e)})();if(Ae(e))return e;if(Z(e))return e[Symbol.iterator]();throw new Error(Ke)}function ye(e,r){let t=P(),o=e||t,n=o.fetch??o.core?.fetch,s;return typeof n=="function"?s=n:L(n)?s=r?.fetch||I:r?.fetch?s=r.fetch:s=I,et({fetch:s,credentials:o.core?.credentials||[],authentications:o.core?.authentications,fetchOptions:L(n)?n:void 0})}var pt=new Map,pr=new Map;async function b(e,r,t){if(y(e)){let i=e.preload?await e.preload(t||"",r):e;if(!y(i))throw new Error(`${e.id} source loader preload() did not return a runtime source loader`);return i}if(Ze(e))return e;let o=Do(e,r),n=pr.get(e)?.get(o);if(n)return n;let s=pt.get(e);s||(s=new Map,pt.set(e,s));let a=s.get(o);return a||(a=Ps(e,r,t).then(i=>{let c=pr.get(e);return c||(c=new Map,pr.set(e,c)),c.set(o,i),i}).catch(i=>{throw s.delete(o),s.size===0&&pt.delete(e),i}),s.set(o,a)),await a}function mr(e){if(e.subloaders&&!yt.has(e)){let t=zo.get(e);if(t)return t;if(!Ze(e))return null}if(Ze(e))return e;let r=Do(e);return pr.get(e)?.get(r)||null}function Ze(e){let r=e;return!!(r.parse||r.parseSync||r.parseInBatches||r.parseText||r.parseTextSync||r.parseFile||r.parseFileInBatches)}async function Ps(e,r,t){if(e.preload){let n=await e.preload(t||"",r);if(Ze(n))return n;throw new Error(`${e.id} loader preload() did not return a parser-bearing loader`)}let o=Os(e,r);return await vs(o,e.id)}function Os(e,r){if((r?._workerType||r?.core?._workerType)==="test"){let o=`modules/${e.module}/src/${e.id}-loader.ts`;return typeof window<"u"?`/${o}`:typeof process<"u"&&process.cwd?new URL(o,`file://${process.cwd()}/`).toString():o}throw new Error(`${e.id} loader does not provide a parser implementation. Import a parser-bearing loader directly, or use preload() before parse/load.`)}function Do(e,r){let t=r?.[e.id],o=e.options?.[e.id];return String(t?.backend||o?.backend||"")}async function vs(e,r){let t=await import(e);for(let o of Object.values(t))if(o&&typeof o=="object"&&o.id===r&&Ze(o))return o;throw new Error(`Could not find parser implementation for ${r} in ${e}`)}var yt=new WeakSet,zo=new WeakMap,mt=new WeakMap;async function qo(e,r,t){return yt.has(e)?await b(e,r,t):(Fs(e,r),await Vo(e,r,t))}async function Vo(e,r,t){if(!r){let s=mt.get(e);if(s)return await s}let o=Us(e,r,t);r||(mt.set(e,o),o.catch(()=>mt.delete(e)));let n=await o;return r||zo.set(e,n),n}function Ho(e,r){let t=r?.core?.subloaders||{};return Object.fromEntries(Object.entries(e.subloaders||{}).map(([o,n])=>[o,Object.hasOwn(t,o)?t[o]:n]))}function Fs(e,r){t(e,[]);function t(o,n){if(n.includes(o))throw new Error(`Subloader cycle: ${[...n,o].map(s=>s.id).join(" -> ")}`);for(let s of Object.values(Ho(o,r)))t(s,[...n,o])}}async function Us(e,r,t){let[o,n]=await Promise.all([b(e,r,t),Promise.all(Object.entries(Ho(e,r)).map(async([c,u])=>[c,await Vo(u,r,t)]))]),s=Object.fromEntries(n),a=Y(o.options,r||{});a.core={...a.core,worker:!1};let i={...o,options:a,subloaders:s};delete i.preload,i.worker=!1;for(let c of["parseBlob","createDataSource","parse","parseSync","parseText","parseTextSync","parseInBatches","parseFile","parseFileInBatches","parseUrl"]){let u=o[c];typeof u=="function"&&(i[c]=(l,f,h)=>{let d=Y(r,f||{});return u.call(o,l,{...d,core:{...d.core,subloaders:r?.core?.subloaders||f?.core?.subloaders,worker:!1},[e.id]:{...d[e.id],subloaders:s}},h)})}return yt.add(i),i}async function ne(e,r,t,o){r&&!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),t=t||{};let n=e.url||"",a=Ie(r,o),i=await v(n,a,t);if(!i)return null;if(y(i))throw new Error(`${i.id} is a SourceLoader. Use load() to create a runtime source object instead of parseFile().`);let c=oe(t,i,a,n),u=!i.getAuthentications&&c.core?.credentials?.length?await b(i,c,n||o?.url):i,l=await _(u,n,c);return o=se({url:n,_parse:g,loaders:a},l,o||null),await Ms(i,e,l,o)}async function Ms(e,r,t,o){Ue(e),t=Y(e.options,t);let n=await b(e,t,o.url);if(n.parseFile)return await n.parseFile(r,t,o);if(n.parse){let a=r.bigsize>0n?Number(r.bigsize):r.size;if(!a)throw new Error(`${e.id} loader - cannot fall back to parse without a file size`);let i=await r.read(0n,a);return await g(i,n,t,o)}throw new Error(`${e.id} loader - no file parser found`)}function ie(e,r,t,o){!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),t=t||{};let s=Ie(r,o),a=O(e,s,t);if(!a)return null;if(y(a))throw new Error(`${a.id} is a SourceLoader. Use load() to create a runtime source object instead of parseSync().`);let i=oe(t,a,s),c=M(e),u=()=>{throw new Error("parseSync called parse (which is async")};o=se({url:c,_parseSync:u,_parse:u,loaders:r},i,o||null);let l=mr(a);return $s(l||a,e,i,o)}function $s(e,r,t,o){if(r=dt(r,e,t),e.parseTextSync&&typeof r=="string")return e.parseTextSync(r,t);if(e.parseSync&&r instanceof ArrayBuffer)return e.parseSync(r,t,o);throw e.preload?new Error(`${e.name} loader: 'parseSync' requires a parser-bearing loader. Import the loader implementation directly, or call preload(loader) before parseSync(). ${o.url||""}`):new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${o.url||""}`)}function gt(e){switch(typeof e=="object"&&e?.shape){case"array-row-table":case"object-row-table":return Array.isArray(e.data);case"geojson-table":return Array.isArray(e.features);case"columnar-table":return!!(e.data&&typeof e.data=="object");case"arrow-table":return e?.data?.numRows!==void 0;default:return!1}}function wt(e){switch(e.shape){case"array-row-table":case"object-row-table":return e.data.length;case"geojson-table":return e.features.length;case"arrow-table":return e.data.numRows;case"columnar-table":for(let t of Object.values(e.data))return t.length||0;return 0;default:throw new Error("table")}}function bt(e){return{...e,length:wt(e),batchType:"data"}}async function E(e,r,t,o){let n=Array.isArray(r)?r:void 0;!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),e=await e,t=t||{};let s=M(e),a=await v(e,r,t);if(!a)return[];let i=oe(t,a,n,s),c=!a.getAuthentications&&i.core?.credentials?.length?await b(a,i,s||o?.url):a,u=await _(c,s||"",i);o=se({url:s,_parseInBatches:E,_parse:g,loaders:n},u,o||null);let l=await b(a,u,o.url);return await Ns(a,l,e,u,o)}async function Ns(e,r,t,o,n){let s=await js(r,t,o,n);if(!o?.core?.metadata)return s;let a={shape:"metadata",batchType:"metadata",metadata:{_loader:e,_context:n},data:[],bytesUsed:0};async function*i(c){yield a,yield*c}return i(s)}async function js(e,r,t,o){let n=await jo(r,t),s=await qs(n,t?.core?.transforms||[]);return e.parseInBatches?e.id==="csv"&&k&&or(e,t)?zr(e,s,t,o,g):e.parseInBatches(s,t,o):Ds(s,e,t,o)}async function*Ds(e,r,t,o){let n=await ee(e),s=await g(n,r,{...t,core:{...t?.core,mimeType:r.mimeTypes[0]}},o);yield zs(s,r)}function zs(e,r){let t=gt(e)?bt(e):{shape:"unknown",batchType:"data",data:e,length:Array.isArray(e)?e.length:1};return t.mimeType=r.mimeTypes[0],t}async function qs(e,r=[]){let t=e;for await(let o of r)t=o(t);return t}function ae(e,r,t,o){let n;return!Array.isArray(r)&&!C(r)?(o=void 0,t=r,n=void 0):n=r,Array.isArray(e)?e.map(a=>Qo(a,n,t||{})):Qo(e,n,t||{})}async function Qo(e,r,t){if(typeof e=="string"){let o=e,n=await v(o,r,{...t,core:{...t.core,nothrow:!0}}),s=n&&!n.getAuthentications&&t.core?.credentials?.length?await b(n,t,o):n;t=await _(s,o,t);let i=await ye(t)(Qe(o,t));return Array.isArray(r)?await E(i,r,t):await E(i,r,t)}return Array.isArray(r)?await E(e,r,t):await E(e,r,t)}async function ge(e,r,t,o){let n,s;if(!Array.isArray(r)&&!C(r)?(n=[],s=r,o=void 0):(n=r,s=t),s||=P(),!Array.isArray(n)&&y(n)){let c=await xt(n,e,s);s=await _(n.getAuthentications?n:c,typeof e=="string"?e:"",s||{});let u={fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae};return c.createDataSource(e,s||{},u)}if(Array.isArray(n)&&n.length===1&&y(n[0])){let c=await xt(n[0],e,s);s=await _(n[0].getAuthentications?n[0]:c,typeof e=="string"?e:"",s||{});let u={fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae};return c.createDataSource(e,s||{},u)}if(typeof e=="string"||m(e)){let c=await v(e,n,{...s,core:{...s?.core,nothrow:!0}});if(c&&y(c)){let u=await xt(c,e,s);return s=await _(c.getAuthentications?c:u,typeof e=="string"?e:"",s||{}),u.createDataSource(e,s||{},{fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae})}if(c&&typeof e=="string"){let u=await b(c,s,e);s=await _(c.getAuthentications?c:u,e,s||{});let l=u.parseUrl;if(l){let f=Qe(e,s);return await l(f,s,o)}}}s&&(s=pe(s));let a=ye(s),i=e;return typeof e=="string"&&(i=await a(Qe(e,s))),m(e)&&(i=await a(e)),typeof e=="string"&&(G(s||{}).core?.baseUrl||(s={...s,core:{...s?.core,baseUrl:e}})),Array.isArray(n)?await g(i,n,s,o):await g(i,n,s,o)}async function xt(e,r,t){if(!e.preload)return e;let o=await e.preload(typeof r=="string"?r:"",t);if(!y(o))throw new Error(`${e.id} source loader preload() did not return a runtime source loader`);return o}var we=Object.freeze({fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae});function se(e,r,t){if(t)return{...t,coreApi:t.coreApi||e.coreApi||we,_parse:t._parse||e._parse,fetch:ye(r,t)};let o={...e,fetch:ye(r,e),coreApi:e.coreApi||we};if(o.url){let n=te(o.url);o.baseUrl=n,o.queryString=go(o.url),o.filename=V.filename(n),o.baseUrl=V.dirname(n)}return Array.isArray(o.loaders)||(o.loaders=null),o}function Ie(e,r){if(e&&!Array.isArray(e))return e;let t;if(e&&(t=Array.isArray(e)?e:[e]),r&&r.loaders){let o=Array.isArray(r.loaders)?r.loaders:[r.loaders];t=t?[...t,...o]:o}return t&&t.length?t:void 0}async function g(e,r,t,o){r&&!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),e=await e,t=t||{};let n=M(e),a=Ie(r,o),i=await v(e,a,t);if(!i)return null;if(y(i))throw new Error(`${i.id} is a SourceLoader. Use load() to create a runtime source object instead of parse().`);let c=oe(t,i,a,n),u=!i.getAuthentications&&c.core?.credentials?.length?await b(i,c,n||o?.url):i,l=await _(u,n||"",c);return o=se({url:n,_parse:g,loaders:a},l,o||null),await Vs(i,e,l,o)}async function Vs(e,r,t,o){if(Ue(e),t=Y(e.options,t),w(r)){let{ok:s,redirected:a,status:i,statusText:c,type:u,url:l}=r,f=Object.fromEntries(r.headers.entries());o.response={headers:f,ok:s,redirected:a,status:i,statusText:c,type:u,url:l}}let n=await b(e,t,o.url);return jr(n,r,t,o,e)?(r=await No(r,t),await Dr(n,r,t,o,g)):m(r)&&n.parseBlob?await n.parseBlob(r,t,o):(r=await $o(r,e,t),await Hs(n,r,t,o))}async function Hs(e,r,t,o){if(e.parseText&&typeof r=="string")return await e.parseText(r,t,o);if(e.parseTextSync&&typeof r=="string")return e.parseTextSync(r,t,o);if(e.parse)return await e.parse(r,t,o);throw e.parseSync?new Error(`${e.name} loader: 'parse' not available on parser-bearing sync loader. Add an async 'parse' function to this loader, or call preload(loader) before parseSync(). ${o.url||""}`):new Error(`${e.id} loader - no parser found and worker is disabled`)}async function Go(e,r,t){return e.subloaders?await qo(e,r,t):await b(e,r,t)}function Jo(e){return mr(e)}async function Tt(e,r,t){if(r.encode)return await r.encode(e,t);if(r.encodeText){let o=await r.encodeText(e,t);return Q(new TextEncoder().encode(o))}if(r.encodeInBatches){let o=kt(e,r,t),n=[];for await(let s of o)n.push(s);return Me(...n)}throw new Error("Writer could not encode data")}async function Ko(e,r,t){if(r.text&&r.encodeText)return await r.encodeText(e,t);if(r.text){let o=await Tt(e,r,t);return new TextDecoder().decode(o)}throw new Error(`Writer ${r.name} could not encode data as text`)}function kt(e,r,t){if(r.encodeInBatches){let o=Qs(e);return r.encodeInBatches(o,t)}throw new Error("Writer could not encode data in batches")}function Qs(e){return[{...e,start:0,end:e.length}]}async function Yo(e,r,t){let n={...P(),...t};return r.encodeURLtoURL?Gs(r,e,n):Vr(r,n)?await Fe(r,e,n):await r.encode(e,n)}function At(e,r,t){if(r.encodeSync)return r.encodeSync(e,t);if(r.encodeTextSync)return Q(new TextEncoder().encode(r.encodeTextSync(e,t)));throw new Error(`Writer ${r.name} could not synchronously encode data`)}async function Xo(e,r,t){if(r.encodeText)return await r.encodeText(e,t);if(r.encodeTextSync)return r.encodeTextSync(e,t);if(r.text){let o=await r.encode(e,t);return new TextDecoder().decode(o)}throw new Error(`Writer ${r.name} could not encode data as text`)}function en(e,r,t){if(r.encodeTextSync)return r.encodeTextSync(e,t);if(r.text&&r.encodeSync){let o=At(e,r,t);return new TextDecoder().decode(o)}throw new Error(`Writer ${r.name} could not encode data as text`)}function rn(e,r,t){if(r.encodeInBatches){let o=Js(e);return r.encodeInBatches(o,t)}throw new Error(`Writer ${r.name} could not encode in batches`)}async function St(e,r,t,o){if(e=re(e),r=re(r),k||!t.encodeURLtoURL)throw new Error;return await t.encodeURLtoURL(e,r,o)}async function Gs(e,r,t){if(k)throw new Error(`Writer ${e.name} not supported in browser`);let o=Zo("input");await new qe(o,"w").write(r);let s=Zo("output"),a=await St(o,s,e,t);return(await I(a)).arrayBuffer()}function Js(e){return[{...e,start:0,end:e.length}]}function Zo(e){return`/tmp/${e}`}function tn(e,r,t={}){let o=t||{},n=o?.core?.type||o.type||"auto",s=r.length===1?r[0]:n==="auto"?O(e,r,{...o,core:{...o?.core,type:"auto"}}):Ks(n,r);if(!s)throw new Error("Not a valid source type");let a=o.core?.credentials?.length?s.getAuthentications?.(typeof e=="string"?e:"",o):void 0;if(a&&"then"in a)throw a.catch(()=>{}),new Error("Use load() with an asynchronous getAuthentications() hook.");let i=pe(a?.length?{...o,core:{...o.core,authentications:[...o.core?.authentications||[],...a||[]]}}:o);return s.createDataSource(e,i,we)}function Ks(e,r){for(let t of r)if(t.type===e)return t;return null}function on(e,r,t){let o=t?.type||"auto",n=null;if(o==="auto"?n=O(e,r,{core:{nothrow:!0}}):n=Zs(o,r),!n&&!t?.nothrow)throw new Error("Not a valid image source type");return n}function Zs(e,r){for(let t of r)if(t.type===e)return t;return null}function nn(e,r){if(globalThis.loaders.makeNodeStream)return globalThis.loaders.makeNodeStream(e,r);let t=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new ReadableStream({type:"bytes",async pull(o){try{let{done:n,value:s}=await t.next();n?o.close():o.enqueue(new Uint8Array(s))}catch(n){o.error(n)}},async cancel(){await t?.return?.()}},{highWaterMark:2**24,...r})}var sn="5.0.0-alpha.10",an={dataType:null,batchType:null,name:"Null loader",id:"null",module:"core",version:sn,worker:!0,mimeTypes:["application/x.empty"],extensions:["null"],tests:[()=>!1],options:{null:{}}},cn={dataType:null,batchType:null,name:"Null loader",id:"null",module:"core",version:sn,mimeTypes:["application/x.empty"],extensions:["null"],parse:async(e,r,t)=>Lt(e,r||{},t),parseSync:Lt,parseInBatches:async function*(r,t,o){for await(let n of r)yield Lt(n,t,o)},tests:[()=>!1],options:{null:{}}};function Lt(e,r,t){return null}async function un(e,r,t=()=>{},o=()=>{}){if(e=await e,!e.ok)return e;let n=e.body;if(!n)return e;let s=e.headers.get("content-length")||0,a=s?parseInt(s):0;if(!(a>0)||typeof ReadableStream>"u"||!n.getReader)return e;let i=new ReadableStream({async start(c){let u=n.getReader();await fn(c,u,0,a,r,t,o)}});return new Response(i)}async function fn(e,r,t,o,n,s,a){try{let{done:i,value:c}=await r.read();if(i){s(),e.close();return}t+=c.byteLength;let u=Math.round(t/o*100);n(u,{loadedBytes:t,totalBytes:o}),e.enqueue(c),await fn(e,r,t,o,n,s,a)}catch(i){e.error(i),a(i)}}var yr=class{_fetch;files={};lowerCaseFiles={};usedFiles={};constructor(r,t){this._fetch=t?.fetch||fetch;for(let o=0;o<r.length;++o){let n=r[o];this.files[n.name]=n,this.lowerCaseFiles[n.name.toLowerCase()]=n,this.usedFiles[n.name]=!1}this.fetch=this.fetch.bind(this)}async fetch(r,t){if(r.includes("://"))return this._fetch(r,t);let o=this._getFile(r,!0);if(!o)return new Response(r,{status:400,statusText:"NOT FOUND"});let s=new Headers(t?.headers).get("Range"),a=s&&/bytes=(\d+)-(\d+)/.exec(s);if(a){let c=parseInt(a[1]),u=Math.min(parseInt(a[2]),o.size-1);if(c>u){let h=new Response(null,{status:416,headers:{"Content-Range":`bytes */${o.size}`}});return Object.defineProperty(h,"url",{value:r}),h}let l=await o.slice(c,u+1).arrayBuffer(),f=new Response(l,{status:206,headers:{"Content-Range":`bytes ${c}-${u}/${o.size}`}});return Object.defineProperty(f,"url",{value:r}),f}let i=new Response(o);return Object.defineProperty(i,"url",{value:r}),i}async readdir(r){let t=[];for(let o in this.files)t.push(o);return t}async stat(r,t){let o=this._getFile(r,!1);if(!o)throw new Error(r);return{size:o.size}}async unlink(r){let t=this._getFile(r,!1);t&&(delete this.files[t.name],delete this.lowerCaseFiles[t.name.toLowerCase()],this.usedFiles[t.name]=!0)}async openReadableFile(r,t){return new De(this._getFile(r,!0))}_getFile(r,t){let o=this.files[r]||this.lowerCaseFiles[r.toLowerCase()];return o&&t&&(this.usedFiles[r]=!0),o}};return mn(Ys);})();
14
+ `)}}r.length>0&&(yield r)}async function*Zr(e){let r=1;for await(let t of e)yield{counter:r,line:t},r++}async function Yr(e,r){let t=jn(e);for(;;){let{done:o,value:n}=await t.next();if(o){t.return&&t.return();return}if(r(n))return}}async function ee(e){let r=[];for await(let t of e)r.push(Nn(t));return Me(...r)}function Nn(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:r,byteOffset:t,byteLength:o}=e;return no(r,t,o)}return no(e)}function no(e,r=0,t=e.byteLength-r){let o=new Uint8Array(e,r,t),n=new Uint8Array(o.length);return n.set(o),n.buffer}function jn(e){if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();if(typeof e[Symbol.iterator]=="function"){let r=e[Symbol.iterator]();return Dn(r)}return e}function Dn(e){return{next(r){return Promise.resolve(e.next(r))},return(r){return typeof e.return=="function"?Promise.resolve(e.return(r)):Promise.resolve({done:!0,value:r})},throw(r){return typeof e.throw=="function"?Promise.resolve(e.throw(r)):Promise.reject(r)}}}function $e(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let r=process.hrtime();e=r[0]*1e3+r[1]/1e6}else e=Date.now();return e}var de=class{constructor(r,t){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=r,this.type=t,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(r){return this.sampleSize=r,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(r){return this._count+=r,this._samples++,this._checkSampling(),this}subtractCount(r){return this._count-=r,this._samples++,this._checkSampling(),this}addTime(r){return this._time+=r,this.lastTiming=r,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=$e(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime($e()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}};var _e=class{constructor(r){this.stats={},this.id=r.id,this.stats={},this._initializeStats(r.stats),Object.seal(this)}get(r,t="count"){return this._getOrCreate({name:r,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(let r of Object.values(this.stats))r.reset();return this}forEach(r){for(let t of Object.values(this.stats))r(t)}getTable(){let r={};return this.forEach(t=>{r[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),r}_initializeStats(r=[]){r.forEach(t=>this._getOrCreate(t))}_getOrCreate(r){let{name:t,type:o}=r,n=this.stats[t];return n||(r instanceof de?n=r:n=new de(t,o),this.stats[t]=n),n}};var zn="Queued Requests",qn="Active Requests",Vn="Cancelled Requests",Hn="Queued Requests Ever",Qn="Active Requests Ever",Gn={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},Ee=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(r={}){this.props={...Gn,...r},this.stats=new _e({id:this.props.id}),this.stats.get(zn),this.stats.get(qn),this.stats.get(Vn),this.stats.get(Hn),this.stats.get(Qn)}setProps(r){r.throttleRequests!==void 0&&(this.props.throttleRequests=r.throttleRequests),r.maxRequests!==void 0&&(this.props.maxRequests=r.maxRequests),r.debounceTime!==void 0&&(this.props.debounceTime=r.debounceTime)}scheduleRequest(r,t=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(r))return this.requestMap.get(r);let o={handle:r,priority:0,getPriority:t},n=new Promise(s=>(o.resolve=s,o));return this.requestQueue.push(o),this.requestMap.set(r,n),this._issueNewRequests(),n}_issueRequest(r){let{handle:t,resolve:o}=r,n=!1,s=()=>{n||(n=!0,this.requestMap.delete(t),this.activeRequestCount--,this.scheduleRefill())};return this.activeRequestCount++,o?o({done:s}):Promise.resolve({done:s})}scheduleRefill(){this.updateTimer===null&&(this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;let r=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(r!==0){this._updateAllRequests();for(let t=0;t<r;++t){let o=this.requestQueue.shift();o&&this._issueRequest(o)}}}_updateAllRequests(){let r=this.requestQueue;for(let t=0;t<r.length;++t){let o=r[t];this._updateRequest(o)||(r.splice(t,1),this.requestMap.delete(o.handle),t--)}r.sort((t,o)=>t.priority-o.priority)}_updateRequest(r){return r.priority=r.getPriority(r.handle),r.priority<0?(r.resolve(null),!1):!0}};function sr(e,r=[]){return e.every(nr)?e:e.map((t,o)=>{if(nr(t))return t;let n=r.find(a=>a.type===t?.type);if(!n)throw new Error(`No authentication class registered for credential at index ${o}.`);let s;try{s=new n(t)}catch{throw new Error(`Invalid authentication configuration at index ${o}.`)}if(!nr(s))throw new Error(`Authentication class returned an invalid credential at index ${o}.`);return s})}function pe(e){if(!e.core?.credentials?.length)return e;let r=sr(e.core.credentials,e.core.authentications);return r===e.core.credentials?e:{...e,core:{...e.core,credentials:r}}}async function _(e,r,t){if(!t.core?.credentials?.length||t.core.credentials.every(nr))return t;let o=await e?.getAuthentications?.(r,t);return o?.length?pe({...t,core:{...t.core,authentications:[...t.core?.authentications||[],...o]}}):pe(t)}function nr(e){return!e||typeof e!="object"||typeof e.id!="string"||!Array.isArray(e.origins)?!1:e.type==="request"?typeof e.authenticate=="function":(e.type==="header"||e.type==="query-parameter")&&typeof e.name=="string"&&(typeof e.token=="string"||typeof e.token=="function")&&Array.isArray(e.refreshStatusCodes)}var so=Symbol("loaders.gl.authenticated-fetch"),Xr=new WeakMap;function et(e){let r=e.fetch||((f,h)=>fetch(f,h)),t=r[so],o=new Map(t?.credentialResolutions),n=sr(e.credentials.map(f=>o.get(f)||f),e.authentications);if(e.credentials.forEach((f,h)=>{o.set(f,n[h])}),!e.fetchOptions&&(!n.length||t?.credentials.length===n.length&&n.every((f,h)=>f===t.credentials[h])))return r;let s=t?.fetch||r,a=t?[...new Set([...n,...t.credentials])]:n,i=io(t?.fetchOptions||{},e.fetchOptions),c=a.filter(f=>f.type!=="request"),u=a.filter(f=>f.type==="request");for(let f of u)fo(f.origins);let l=async(f,h={})=>{if(h=io(i,h),h.signal?.aborted)throw Ne();if(!a.length)return s(f,h);let d=Zn(f),x=d?await co(d,h,c):{url:f,options:h,credentials:[]},T=await ao(x,u,"request"),p=await s(T.url,T.options),ce=[];for(let ue of x.credentials){let{credential:J}=ue;typeof J.token=="function"&&(ir(h)||J.canReplayRequest?.(f,h))&&(ir(T.options)||J.canReplayRequest?.(T.url,T.options))&&(J.refreshStatusCodes.includes(p.status)||await J.shouldRefresh?.(p))&&ce.push(ue)}let R=ir(h)&&ir(T.options)&&T.credentials.some(ue=>ue.refreshStatusCodes?.includes(p.status));if(!ce.length&&!R)return p;if(h.signal?.aborted)throw Ne();let D=new Map;if(await Promise.all(ce.map(async({credential:ue})=>{let J=await Jn(ue,f,p);J&&D.set(ue,J)})),!D.size&&!R)return p;if(await p.body?.cancel().catch(()=>{}),h.signal?.aborted)throw Ne();let F=d?await co(d,h,c,D,x.credentials):{url:f,options:h},B=await ao(F,u,"retry",p);return s(B.url,B.options)};return Object.defineProperty(l,so,{value:{fetch:s,credentials:a,credentialResolutions:o,fetchOptions:i}}),l}function io(e,r){let t={...e,...r};if(e.headers||r?.headers){let o=new Headers(e.headers);new Headers(r?.headers).forEach((n,s)=>o.set(s,n)),t.headers=o}return t}async function ao(e,r,t,o){let n=[],s=e.options.signal;for(let a of r){let i=uo(e.url);if(!i||!fo(a.origins).includes(i))continue;if(s?.aborted)throw Ne();let c=await a.authenticate({url:e.url,options:{...e.options,headers:new Headers(e.options.headers)},reason:t,response:o?{status:o.status,headers:new Headers(o.headers)}:void 0});if(!c||typeof c.url!="string"||!c.options||typeof c.options!="object")throw new Error("Authentication callback returned an invalid request.");e={url:c.url,options:{...c.options,...s?{signal:s}:{}}},n.push(a)}if(s?.aborted)throw Ne();return{...e,credentials:n}}function uo(e){try{let r=new URL(e);return!r.host||r.username||r.password?null:r.origin!=="null"?r.origin:`${r.protocol}//${r.host}`}catch{return null}}function fo(e){if(!e.length)throw new Error("Request authentication requires at least one exact origin.");return e.map(r=>{let t=uo(r),o;try{o=new URL(r)}catch{throw new Error("Invalid request authentication origin.")}if(!t||o.pathname&&o.pathname!=="/"||o.search||o.hash)throw new Error("Invalid request authentication origin.");return t})}async function co(e,r,t,o=new Map,n=[]){let s=new URL(e),a=new Headers(r.headers),i=[],c=new Map(n.map(({credential:u,token:l})=>[u,l]));for(let u of t){if(!u.origins.includes(s.origin))continue;let l=o.get(u),f=c.get(u),h=u.type==="query-parameter"&&f!==void 0,d=u.type==="header"&&f!==void 0;if(u.type==="query-parameter"&&s.searchParams.has(u.name)&&!h||u.type==="header"&&a.has(u.name)&&!d)continue;let x=l??f??await Kn(u.token,{url:e.toString(),reason:"request"});x&&(u.type==="query-parameter"?s.searchParams.set(u.name,x):a.set(u.name,`${u.prefix||""}${x}`),i.push({credential:u,token:x}))}return{url:s.toString(),options:{...r,headers:a},credentials:i}}async function Jn(e,r,t){let o=Xr.get(e);if(o)return o;let n=e.token,s=Promise.resolve(n({url:r,reason:"refresh",response:{status:t.status,headers:t.headers}})).finally(()=>Xr.delete(e));return Xr.set(e,s),s}async function Kn(e,r){return typeof e=="function"?e(r):e}function Zn(e){try{let r=new URL(e);return["http:","https:"].includes(r.protocol)?r:null}catch{return null}}function ir(e){let r=(e.method||"GET").toUpperCase();return["GET","HEAD","OPTIONS","PUT","DELETE"].includes(r)?!(e.body&&typeof ReadableStream<"u"&&e.body instanceof ReadableStream):!1}function Ne(){return new DOMException("The operation was aborted.","AbortError")}var rt="",lo={};function tt(e){rt=e}function ot(){return rt}function re(e){for(let r in lo)if(e.startsWith(r)){let t=lo[r];e=e.replace(r,t)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${rt}${e}`),e}var V={};_t(V,{dirname:()=>Xn,filename:()=>Yn,join:()=>es,resolve:()=>rs});function ho(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let e=globalThis.location?.pathname;return e?.slice(0,e.lastIndexOf("/")+1)||""}function Yn(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):e}function Xn(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function es(...e){return e=e.map((t,o)=>(o&&(t=t.replace(new RegExp("^/"),"")),o!==e.length-1&&(t=t.replace(new RegExp("/$"),"")),t)),e.join("/")}function rs(...e){let r=[];for(let s=0;s<e.length;s++)r[s]=e[s];let t="",o=!1,n;for(let s=r.length-1;s>=-1&&!o;s--){let a;s>=0?a=r[s]:(n===void 0&&(n=ho()),a=n),a.length!==0&&(t=`${a}/${t}`,o=a.charCodeAt(0)===je)}return t=ts(t,!o),o?`/${t}`:t.length>0?t:"."}var je=47,nt=46;function ts(e,r){let t="",o=-1,n=0,s,a=!1;for(let i=0;i<=e.length;++i){if(i<e.length)s=e.charCodeAt(i);else{if(s===je)break;s=je}if(s===je){if(!(o===i-1||n===1))if(o!==i-1&&n===2){if(t.length<2||!a||t.charCodeAt(t.length-1)!==nt||t.charCodeAt(t.length-2)!==nt){if(t.length>2){let c=t.length-1,u=c;for(;u>=0&&t.charCodeAt(u)!==je;--u);if(u!==c){t=u===-1?"":t.slice(0,u),o=i,n=0,a=!1;continue}}else if(t.length===2||t.length===1){t="",o=i,n=0,a=!1;continue}}r&&(t.length>0?t+="/..":t="..",a=!0)}else{let c=e.slice(o+1,i);t.length>0?t+=`/${c}`:t=c,a=!1}o=i,n=0}else s===nt&&n!==-1?++n:n=-1}return t}var os="5.0.0-alpha.11",st={dataType:null,batchType:null,name:"JSON",id:"json",module:"json",version:os,encoding:"json",format:"json",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:po,parse:async e=>po(new TextDecoder().decode(e)),options:{}};function po(e){return JSON.parse(e)}function cr(e){return e&&typeof e=="object"&&e.isBuffer}function H(e){if(cr(e))return e;if(e instanceof ArrayBuffer)return e;if(Rr(e))return ar(e);if(ArrayBuffer.isView(e)){let r=e.buffer;return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?r:r.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function Q(e){if(e instanceof ArrayBuffer)return e;if(Rr(e))return ar(e);let{buffer:r,byteOffset:t,byteLength:o}=e;return r instanceof ArrayBuffer&&t===0&&o===r.byteLength?r:ar(r,t,o)}function ar(e,r=0,t=e.byteLength-r){let o=new Uint8Array(e,r,t),n=new Uint8Array(o.length);return n.set(o),n.buffer}function ur(e){return ArrayBuffer.isView(e)?e:new Uint8Array(e)}var De=class{handle;size;bigsize;url;constructor(r){this.handle=r instanceof ArrayBuffer?new Blob([r]):r,this.size=r instanceof ArrayBuffer?r.byteLength:r.size,this.bigsize=BigInt(this.size),this.url=r instanceof File?r.name:""}async close(){}async stat(){return{size:this.handle.size,bigsize:BigInt(this.handle.size),isDirectory:!1}}async read(r,t,o){if(o?.aborted)throw new Error("Request aborted");let n=await this.handle.slice(Number(r),Number(r)+Number(t)).arrayBuffer();if(o?.aborted)throw new Error("Request aborted");return n}};var ze=new Error("Not implemented"),qe=class{handle;size=0;bigsize=0n;url="";constructor(r,t,o){if(globalThis.loaders?.NodeFile)return new globalThis.loaders.NodeFile(r,t,o);throw k?new Error("Can't instantiate NodeFile in browser."):new Error("Can't instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.")}async read(r,t){throw ze}async write(r,t,o){throw ze}async stat(){throw ze}async truncate(r){throw ze}async append(r){throw ze}async close(){}};function y(e){return!!(e&&typeof e=="object"&&"createDataSource"in e)}var Re=class extends Error{constructor(r,t){super(r),this.reason=t.reason,this.url=t.url,this.response=t.response}reason;url;response};var ns=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,ss=/^([-\w.]+\/[-\w.+]+)/;function it(e,r){return e.toLowerCase()===r.toLowerCase()}function mo(e){let r=ss.exec(e);return r?r[1]:e}function at(e){let r=ns.exec(e);return r?r[1]:""}var yo=/\?.*/;function go(e){let r=e.match(yo);return r&&r[0]}function te(e){return e.replace(yo,"")}function wo(e){if(e.length<50)return e;let r=e.slice(e.length-15);return`${e.substr(0,32)}...${r}`}function M(e){return w(e)?e.url:m(e)?("name"in e?e.name:"")||"":typeof e=="string"?e:""}function Be(e){if(w(e)){let r=e.headers.get("content-type")||"",t=te(e.url);return mo(r)||at(t)}return m(e)?e.type||"":typeof e=="string"?at(e):""}function bo(e){return w(e)?e.headers["content-length"]||-1:m(e)?e.size:typeof e=="string"?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}async function Ve(e){if(w(e))return e;let r={},t=bo(e);t>=0&&(r["content-length"]=String(t));let o=M(e),n=Be(e);n&&(r["content-type"]=n);let s=await as(e);s&&(r["x-first-bytes"]=s),typeof e=="string"&&(e=new TextEncoder().encode(e));let a=new Response(e,{headers:r});return Object.defineProperty(a,"url",{value:o}),a}async function fr(e){if(!e.ok)throw await is(e)}async function is(e){let r=wo(e.url),t=`Failed to fetch resource (${e.status}) ${e.statusText}: ${r}`;t=t.length>100?`${t.slice(0,100)}...`:t;let o={reason:e.statusText,url:e.url,response:e};try{let n=e.headers.get("Content-Type");o.reason=!e.bodyUsed&&n?.includes("application/json")?await e.json():await e.text()}catch{}return new Re(t,o)}async function as(e){if(typeof e=="string")return`data:,${e.slice(0,5)}`;if(e instanceof Blob){let t=e.slice(0,5);return await new Promise(o=>{let n=new FileReader;n.onload=s=>o(s?.target?.result),n.readAsDataURL(t)})}if(e instanceof ArrayBuffer){let t=e.slice(0,5);return`data:base64,${Qr(t)}`}return null}function cs(e){return!us(e)&&!fs(e)}function us(e){return e.startsWith("http:")||e.startsWith("https:")}function fs(e){return e.startsWith("data:")}async function I(e,r){if(typeof e=="string"){let t=re(e);return cs(t)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(t,r):await fetch(t,r)}return await Ve(e)}async function xo(e,r,t){e instanceof Blob||(e=new Blob([e]));let o=e.slice(r,r+t);return await ls(o)}async function ls(e){return await new Promise((r,t)=>{let o=new FileReader;o.onload=n=>r(n?.target?.result),o.onerror=n=>t(n),o.readAsArrayBuffer(e)})}var He=new U({id:"loaders.gl"}),lr=class{log(){return()=>{}}info(){return()=>{}}once(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},hr=class{console;onceMessages=new Set;constructor(){this.console=console}log(...r){return this.console.log.bind(this.console,...r)}info(...r){return this.console.info.bind(this.console,...r)}once(...r){let t=String(r[0]);return this.onceMessages.has(t)?()=>{}:(this.onceMessages.add(t),this.console.info.bind(this.console,...r))}warn(...r){return this.console.warn.bind(this.console,...r)}error(...r){return this.console.error.bind(this.console,...r)}};var dr={searchParams:void 0,core:{baseUrl:void 0,fetch:null,mimeType:void 0,fallbackMimeType:void 0,ignoreRegisteredLoaders:void 0,nothrow:!1,shape:void 0,log:new hr,useLocalLibraries:!1,subloaders:void 0,CDN:"https://unpkg.com/@loaders.gl",worker:!0,workerThreshold:.1,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:k,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]}},To={baseUri:"core.baseUrl",fetch:"core.fetch",mimeType:"core.mimeType",fallbackMimeType:"core.fallbackMimeType",ignoreRegisteredLoaders:"core.ignoreRegisteredLoaders",nothrow:"core.nothrow",log:"core.log",useLocalLibraries:"core.useLocalLibraries",CDN:"core.CDN",worker:"core.worker",maxConcurrency:"core.maxConcurrency",maxMobileConcurrency:"core.maxMobileConcurrency",reuseWorkers:"core.reuseWorkers",_nodeWorkers:"core.nodeWorkers",_workerType:"core._workerType",_worker:"core._workerType",limit:"core.limit",_limitMB:"core._limitMB",shape:"core.shape",batchSize:"core.batchSize",batchDebounceMs:"core.batchDebounceMs",metadata:"core.metadata",transforms:"core.transforms",throws:"nothrow",dataType:"(no longer used)",uri:"core.baseUrl",method:"core.fetch.method",headers:"core.fetch.headers",body:"core.fetch.body",mode:"core.fetch.mode",credentials:"core.fetch.credentials",cache:"core.fetch.cache",redirect:"core.fetch.redirect",referrer:"core.fetch.referrer",referrerPolicy:"core.fetch.referrerPolicy",integrity:"core.fetch.integrity",keepalive:"core.fetch.keepalive",signal:"core.fetch.signal"};var ct=["baseUrl","fetch","mimeType","fallbackMimeType","ignoreRegisteredLoaders","nothrow","log","useLocalLibraries","CDN","worker","workerThreshold","maxConcurrency","maxMobileConcurrency","reuseWorkers","workerTransferBufferCopy","_nodeWorkers","_workerType","limit","_limitMB","shape","batchSize","batchDebounceMs","metadata","transforms"];function Qe(e,r){let t=r?.searchParams;if(!t||Object.keys(t).length===0||/^(?:data|blob):/i.test(e))return e;let o=e.indexOf("#"),n=o>=0?e.slice(o):"",s=o>=0?e.slice(0,o):e,a=s.indexOf("?"),i=a>=0?s.slice(0,a):s,c=a>=0?s.slice(a+1):"",u=new URLSearchParams(c),l=new URLSearchParams;for(let[h,d]of Object.entries(t))u.has(h)||l.set(h,String(d));let f=l.toString();return`${i}${a>=0?`?${c}`:""}${f?`${a>=0?"&":"?"}${f}`:""}${n}`}function Ge(){globalThis.loaders=globalThis.loaders||{};let{loaders:e}=globalThis;return e._state||(e._state={}),e._state}function P(){let e=Ge();return e.globalOptions=e.globalOptions||{...dr,core:{...dr.core}},G(e.globalOptions)}function ut(e){let r=Ge(),t=P();r.globalOptions=Lo(t,e),Ir(e.modules)}function oe(e,r,t,o){t=t||[],t=Array.isArray(t)?t:[t],hs(e,t),ko(e);let n=G(Lo(r,e,o));return ko(n),n}function G(e){let r=ys(e);_o(r);for(let t of ct)r.core&&r.core[t]!==void 0&&delete r[t];return r.core&&r.core._workerType!==void 0&&delete r._worker,r}function hs(e,r){Ao(e,null,dr,To,r);for(let t of r){let o=e&&e[t.id]||{},n=t.options&&t.options[t.id]||{},s=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};Ao(o,t.id,n,s,r)}}function ko(e){let r=e.core?.workerThreshold;if(r!==void 0&&(!Number.isFinite(r)||r<0||r>1))throw new Error("core.workerThreshold must be a finite number between 0 and 1")}function Ao(e,r,t,o,n){let s=r||"Top level",a=r?`${r}.`:"";for(let i in e){let c=!r&&L(e[i]),u=i==="baseUri"&&!r,l=i==="workerUrl"&&r;if(!(i in t)&&!u&&!l){if(i in o)He.level>0&&He.warn(`${s} loader option '${a}${i}' no longer supported, use '${o[i]}'`)();else if(!c&&He.level>0){let f=ds(i,n);He.warn(`${s} loader option '${a}${i}' not recognized. ${f}`)()}}}}function ds(e,r){let t=e.toLowerCase(),o="";for(let n of r)for(let s in n.options){if(e===s)return`Did you mean '${n.id}.${s}'?`;let a=s.toLowerCase();(t.startsWith(a)||a.startsWith(t))&&(o=o||`Did you mean '${n.id}.${s}'?`)}return o}function Lo(e,r,t){let o=e.options||{},n={...o};o.core&&(n.core={...o.core}),_o(n),n.core?.log===null&&(n.core={...n.core,log:new lr}),So(n,G(P()));let s=G(r);return So(n,s),ps(n,s,e),ms(n,t),gs(n),n}function ps(e,r,t){let o=e.core?.shape;if(o===void 0)return;let n=t.options?.[t.id];if(!W(n)||!("shape"in n))return;let s=P()[t.id];if(W(s)&&"shape"in s)return;let a=r[t.id];if(W(a)&&"shape"in a)return;let i=e[t.id];e[t.id]={...W(i)?i:{},shape:o}}function So(e,r){for(let t in r)if(t in r){let o=r[t];W(o)&&W(e[t])?e[t]={...e[t],...r[t]}:e[t]=r[t]}}function ms(e,r){if(!r)return;e.core?.baseUrl!==void 0||(e.core||={},e.core.baseUrl=V.dirname(te(r)))}function ys(e){let r={...e};return e.core&&(r.core={...e.core}),r}function _o(e){e.baseUri!==void 0&&(e.core||={},e.core.baseUrl===void 0&&(e.core.baseUrl=e.baseUri));for(let t of ct)if(e[t]!==void 0){e.core||={};let n=e.core;n[t]===void 0&&(n[t]=e[t])}let r=e._worker;r!==void 0&&(e.core||={},e.core._workerType===void 0&&(e.core._workerType=r))}function gs(e){let r=e.core;if(r)for(let t of ct)r[t]!==void 0&&(e[t]=r[t])}function C(e){return e?(Array.isArray(e)&&(e=e[0]),Array.isArray(e?.extensions)):!1}function Je(e){be(e,"null loader"),be(C(e),"invalid loader");let r;return Array.isArray(e)&&(r=e[1],e=e[0],e={...e,options:{...e.options,...r}}),(e?.parseTextSync||e?.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}var Eo=()=>{let e=Ge();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function Ro(e){let r=Eo();e=Array.isArray(e)?e:[e];for(let t of e){let o=Je(t);r.find(n=>o===n)||r.unshift(o)}}function Bo(){return Eo()}function Io(){let e=Ge();e.loaderRegistry=[]}var ws=/\.([^.]+)$/;async function v(e,r=[],t,o){if(!Po(e))return null;let n=G(t||{});if(n.core||={},e instanceof Response&&Co(e)){let a=await e.clone().text(),i=O(a,r,{...n,core:{...n.core,nothrow:!0}},o);if(i)return i}let s=O(e,r,{...n,core:{...n.core,nothrow:!0}},o);if(s)return s;if(m(e)&&(e=await e.slice(0,10).arrayBuffer(),s=O(e,r,n,o)),!s&&e instanceof Response&&Co(e)){let a=await e.clone().text();s=O(a,r,n,o)}if(!s&&!n.core.nothrow)throw new Error(Oo(e));return s}function Co(e){let r=Be(e);return!!(r&&(r.startsWith("text/")||r==="application/json"||r.endsWith("+json")))}function O(e,r=[],t,o){if(!Po(e))return null;let n=G(t||{});if(n.core||={},r&&!Array.isArray(r))return Je(r);let s=[];r&&(s=s.concat(r)),n.core.ignoreRegisteredLoaders||s.push(...Bo()),xs(s);let a=bs(e,s,n,o);if(!a&&!n.core.nothrow)throw new Error(Oo(e));return a}function bs(e,r,t,o){let n=M(e),s=Be(e),a=te(n)||o?.url,i=null,c="",u=t?.core&&"type"in t.core?t.core.type:void 0;return u&&u!=="auto"&&(i=As(r,u),c=i?`match forced by supplied source type ${u}`:""),t?.core?.mimeType&&(i=ft(r,t?.core?.mimeType),c=`match forced by supplied MIME type ${t?.core?.mimeType}`),i=i||Ss(r,a),c=c||(i?`matched source url ${a}`:""),i=i||Ts(r,a),c=c||(i?`matched url ${a}`:""),i=i||ft(r,s),c=c||(i?`matched MIME type ${s}`:""),i=i||_s(r,e),c=c||(i?`matched initial data ${vo(e)}`:""),!i&&m(e)&&(i=Ls(r,e),c=c||(i?"matched source testData":"")),t?.core?.fallbackMimeType&&(i=i||ft(r,t?.core?.fallbackMimeType),c=c||(i?`matched fallback MIME type ${s}`:"")),c&&Er.log(1,`selectLoader selected ${i?.name}: ${c}.`),i}function Po(e){return!(e instanceof Response&&e.status===204)}function Oo(e){let r=M(e),t=Be(e),o="No valid loader found (";o+=r?`${V.filename(r)}, `:"no url provided, ",o+=`MIME type: ${t?`"${t}"`:"not provided"}, `;let n=e?vo(e):"";return o+=n?` first bytes: "${n}"`:"first bytes: not available",o+=")",o}function xs(e){for(let r of e)Je(r)}function Ts(e,r){let t=r&&ws.exec(r),o=t&&t[1];return o?ks(e,o):null}function ks(e,r){r=r.toLowerCase();for(let t of e)for(let o of t.extensions)if(o.toLowerCase()===r)return t;return null}function As(e,r){for(let t of e)if(y(t)&&t.type===r)return t;return null}function Ss(e,r){if(!r)return null;for(let t of e)if(y(t)&&t.testURL(r))return t;return null}function Ls(e,r){for(let t of e)if(y(t)&&t.testData?.(r))return t;return null}function ft(e,r){for(let t of e)if(t.mimeTypes?.some(o=>it(r,o))||it(r,`application/x.${t.id}`))return t;return null}function _s(e,r){if(!r)return null;for(let t of e)if(typeof r=="string"){if(Es(r,t))return t}else if(ArrayBuffer.isView(r)){if(Wo(r.buffer,r.byteOffset,t))return t}else if(r instanceof ArrayBuffer&&Wo(r,0,t))return t;return null}function Es(e,r){return r.testText?r.testText(e):(Array.isArray(r.tests)?r.tests:[r.tests]).some(o=>e.startsWith(o))}function Wo(e,r,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(n=>Rs(e,r,t,n))}function Rs(e,r,t,o){if(K(o))return Hr(o,e,o.byteLength);switch(typeof o){case"function":return o(Q(e));case"string":let n=lt(e,r,o.length);return o===n;default:return!1}}function vo(e,r=5){return typeof e=="string"?e.slice(0,r):ArrayBuffer.isView(e)?lt(e.buffer,e.byteOffset,r):e instanceof ArrayBuffer?lt(e,0,r):""}function lt(e,r,t){if(e.byteLength<r+t)return"";let o=new DataView(e),n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o.getUint8(r+s));return n}var Bs=256*1024;function*Fo(e,r){let t=r?.chunkSize||Bs,o=0,n=new TextEncoder;for(;o<e.length;){let s=Math.min(e.length-o,t),a=e.slice(o,o+s);o+=s,yield Q(n.encode(a))}}function*Uo(e,r={}){let{chunkSize:t=262144}=r,o=0;for(;o<e.byteLength;){let n=Math.min(e.byteLength-o,t),s=new ArrayBuffer(n),a=new Uint8Array(e,o,n);new Uint8Array(s).set(a),o+=n,yield s}}async function*Mo(e,r){let t=r?.chunkSize||1048576,o=0;for(;o<e.size;){let n=o+t,s=await e.slice(o,n).arrayBuffer();o=n,yield s}}function ht(e,r){return k?Is(e,r):Cs(e,r)}async function*Is(e,r){let t=e.getReader(),o,n=!1,s=!1,a=!1;try{for(;;){let i=o||t.read();o=void 0;let c;try{c=await i}catch(f){throw s=!0,f}let{done:u,value:l}=c;if(u){n=!0;return}r?._streamReadAhead&&(o=t.read(),o.catch(()=>{})),yield H(l)}}catch(i){throw a=!0,i}finally{let i=!1,c;if(!n&&!s)try{await t.cancel()}catch(u){i=!0,c=u}try{t.releaseLock()}catch(u){i||(i=!0,c=u)}if(!a&&i)throw c}}async function*Cs(e,r){for await(let t of e)yield H(t)}function me(e,r){if(typeof e=="string")return Fo(e,r);if(e instanceof ArrayBuffer)return Uo(e,r);if(m(e))return Mo(e,r);if(z(e))return ht(e,r);if(w(e)){let t=e.body;if(!t)throw new Error("Readable stream not available on Response");return ht(t,r)}throw new Error("makeIterator")}var Ke="Cannot convert supplied data type";function dt(e,r,t){if(r.text&&typeof e=="string")return e;if(cr(e)&&(e=e.buffer),K(e)){let o=ur(e);return r.text&&!r.binary?new TextDecoder("utf8").decode(o):H(o)}throw new Error(Ke)}async function $o(e,r,t){if(typeof e=="string"||K(e))return dt(e,r,t);if(m(e)&&(e=await Ve(e)),w(e))return await fr(e),r.binary?await e.arrayBuffer():await e.text();if(z(e)&&(e=me(e,t)),Z(e)||he(e))return ee(e);throw new Error(Ke)}async function No(e,r){if(typeof e=="string")return new TextEncoder().encode(e).buffer;if(K(e))return H(ur(e));if(m(e)&&(e=await Ve(e)),w(e))return await fr(e),await e.arrayBuffer();if(z(e)&&(e=me(e,r)),Z(e)||he(e))return ee(e);throw new Error(Ke)}async function jo(e,r){if(Ce(e)&&(e=await e),Ae(e))return e;if(w(e)){await fr(e);let t=await e.body;if(!t)throw new Error(Ke);return me(t,r)}return m(e)||z(e)?me(e,r):he(e)||Z(e)?e:Ws(e)}function Ws(e){if(ArrayBuffer.isView(e))return(function*(){yield H(e)})();if(K(e))return(function*(){yield H(e)})();if(Ae(e))return e;if(Z(e))return e[Symbol.iterator]();throw new Error(Ke)}function ye(e,r){let t=P(),o=e||t,n=o.fetch??o.core?.fetch,s;return typeof n=="function"?s=n:L(n)?s=r?.fetch||I:r?.fetch?s=r.fetch:s=I,et({fetch:s,credentials:o.core?.credentials||[],authentications:o.core?.authentications,fetchOptions:L(n)?n:void 0})}var pt=new Map,pr=new Map;async function b(e,r,t){if(y(e)){let i=e.preload?await e.preload(t||"",r):e;if(!y(i))throw new Error(`${e.id} source loader preload() did not return a runtime source loader`);return i}if(Ze(e))return e;let o=Do(e,r),n=pr.get(e)?.get(o);if(n)return n;let s=pt.get(e);s||(s=new Map,pt.set(e,s));let a=s.get(o);return a||(a=Ps(e,r,t).then(i=>{let c=pr.get(e);return c||(c=new Map,pr.set(e,c)),c.set(o,i),i}).catch(i=>{throw s.delete(o),s.size===0&&pt.delete(e),i}),s.set(o,a)),await a}function mr(e){if(e.subloaders&&!yt.has(e)){let t=zo.get(e);if(t)return t;if(!Ze(e))return null}if(Ze(e))return e;let r=Do(e);return pr.get(e)?.get(r)||null}function Ze(e){let r=e;return!!(r.parse||r.parseSync||r.parseInBatches||r.parseText||r.parseTextSync||r.parseFile||r.parseFileInBatches)}async function Ps(e,r,t){if(e.preload){let n=await e.preload(t||"",r);if(Ze(n))return n;throw new Error(`${e.id} loader preload() did not return a parser-bearing loader`)}let o=Os(e,r);return await vs(o,e.id)}function Os(e,r){if((r?._workerType||r?.core?._workerType)==="test"){let o=`modules/${e.module}/src/${e.id}-loader.ts`;return typeof window<"u"?`/${o}`:typeof process<"u"&&process.cwd?new URL(o,`file://${process.cwd()}/`).toString():o}throw new Error(`${e.id} loader does not provide a parser implementation. Import a parser-bearing loader directly, or use preload() before parse/load.`)}function Do(e,r){let t=r?.[e.id],o=e.options?.[e.id];return String(t?.backend||o?.backend||"")}async function vs(e,r){let t=await import(e);for(let o of Object.values(t))if(o&&typeof o=="object"&&o.id===r&&Ze(o))return o;throw new Error(`Could not find parser implementation for ${r} in ${e}`)}var yt=new WeakSet,zo=new WeakMap,mt=new WeakMap;async function qo(e,r,t){return yt.has(e)?await b(e,r,t):(Fs(e,r),await Vo(e,r,t))}async function Vo(e,r,t){if(!r){let s=mt.get(e);if(s)return await s}let o=Us(e,r,t);r||(mt.set(e,o),o.catch(()=>mt.delete(e)));let n=await o;return r||zo.set(e,n),n}function Ho(e,r){let t=r?.core?.subloaders||{};return Object.fromEntries(Object.entries(e.subloaders||{}).map(([o,n])=>[o,Object.hasOwn(t,o)?t[o]:n]))}function Fs(e,r){t(e,[]);function t(o,n){if(n.includes(o))throw new Error(`Subloader cycle: ${[...n,o].map(s=>s.id).join(" -> ")}`);for(let s of Object.values(Ho(o,r)))t(s,[...n,o])}}async function Us(e,r,t){let[o,n]=await Promise.all([b(e,r,t),Promise.all(Object.entries(Ho(e,r)).map(async([c,u])=>[c,await Vo(u,r,t)]))]),s=Object.fromEntries(n),a=Y(o.options,r||{});a.core={...a.core,worker:!1};let i={...o,options:a,subloaders:s};delete i.preload,i.worker=!1;for(let c of["parseBlob","createDataSource","parse","parseSync","parseText","parseTextSync","parseInBatches","parseFile","parseFileInBatches","parseUrl"]){let u=o[c];typeof u=="function"&&(i[c]=(l,f,h)=>{let d=Y(r,f||{});return u.call(o,l,{...d,core:{...d.core,subloaders:r?.core?.subloaders||f?.core?.subloaders,worker:!1},[e.id]:{...d[e.id],subloaders:s}},h)})}return yt.add(i),i}async function ne(e,r,t,o){r&&!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),t=t||{};let n=e.url||"",a=Ie(r,o),i=await v(n,a,t);if(!i)return null;if(y(i))throw new Error(`${i.id} is a SourceLoader. Use load() to create a runtime source object instead of parseFile().`);let c=oe(t,i,a,n),u=!i.getAuthentications&&c.core?.credentials?.length?await b(i,c,n||o?.url):i,l=await _(u,n,c);return o=se({url:n,_parse:g,loaders:a},l,o||null),await Ms(i,e,l,o)}async function Ms(e,r,t,o){Ue(e),t=Y(e.options,t);let n=await b(e,t,o.url);if(n.parseFile)return await n.parseFile(r,t,o);if(n.parse){let a=r.bigsize>0n?Number(r.bigsize):r.size;if(!a)throw new Error(`${e.id} loader - cannot fall back to parse without a file size`);let i=await r.read(0n,a);return await g(i,n,t,o)}throw new Error(`${e.id} loader - no file parser found`)}function ie(e,r,t,o){!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),t=t||{};let s=Ie(r,o),a=O(e,s,t);if(!a)return null;if(y(a))throw new Error(`${a.id} is a SourceLoader. Use load() to create a runtime source object instead of parseSync().`);let i=oe(t,a,s),c=M(e),u=()=>{throw new Error("parseSync called parse (which is async")};o=se({url:c,_parseSync:u,_parse:u,loaders:r},i,o||null);let l=mr(a);return $s(l||a,e,i,o)}function $s(e,r,t,o){if(r=dt(r,e,t),e.parseTextSync&&typeof r=="string")return e.parseTextSync(r,t);if(e.parseSync&&r instanceof ArrayBuffer)return e.parseSync(r,t,o);throw e.preload?new Error(`${e.name} loader: 'parseSync' requires a parser-bearing loader. Import the loader implementation directly, or call preload(loader) before parseSync(). ${o.url||""}`):new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${o.url||""}`)}function gt(e){switch(typeof e=="object"&&e?.shape){case"array-row-table":case"object-row-table":return Array.isArray(e.data);case"geojson-table":return Array.isArray(e.features);case"columnar-table":return!!(e.data&&typeof e.data=="object");case"arrow-table":return e?.data?.numRows!==void 0;default:return!1}}function wt(e){switch(e.shape){case"array-row-table":case"object-row-table":return e.data.length;case"geojson-table":return e.features.length;case"arrow-table":return e.data.numRows;case"columnar-table":for(let t of Object.values(e.data))return t.length||0;return 0;default:throw new Error("table")}}function bt(e){return{...e,length:wt(e),batchType:"data"}}async function E(e,r,t,o){let n=Array.isArray(r)?r:void 0;!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),e=await e,t=t||{};let s=M(e),a=await v(e,r,t);if(!a)return[];let i=oe(t,a,n,s),c=!a.getAuthentications&&i.core?.credentials?.length?await b(a,i,s||o?.url):a,u=await _(c,s||"",i);o=se({url:s,_parseInBatches:E,_parse:g,loaders:n},u,o||null);let l=await b(a,u,o.url);return await Ns(a,l,e,u,o)}async function Ns(e,r,t,o,n){let s=await js(r,t,o,n);if(!o?.core?.metadata)return s;let a={shape:"metadata",batchType:"metadata",metadata:{_loader:e,_context:n},data:[],bytesUsed:0};async function*i(c){yield a,yield*c}return i(s)}async function js(e,r,t,o){let n=await jo(r,t),s=await qs(n,t?.core?.transforms||[]);return e.parseInBatches?e.id==="csv"&&k&&or(e,t)?zr(e,s,t,o,g):e.parseInBatches(s,t,o):Ds(s,e,t,o)}async function*Ds(e,r,t,o){let n=await ee(e),s=await g(n,r,{...t,core:{...t?.core,mimeType:r.mimeTypes[0]}},o);yield zs(s,r)}function zs(e,r){let t=gt(e)?bt(e):{shape:"unknown",batchType:"data",data:e,length:Array.isArray(e)?e.length:1};return t.mimeType=r.mimeTypes[0],t}async function qs(e,r=[]){let t=e;for await(let o of r)t=o(t);return t}function ae(e,r,t,o){let n;return!Array.isArray(r)&&!C(r)?(o=void 0,t=r,n=void 0):n=r,Array.isArray(e)?e.map(a=>Qo(a,n,t||{})):Qo(e,n,t||{})}async function Qo(e,r,t){if(typeof e=="string"){let o=e,n=await v(o,r,{...t,core:{...t.core,nothrow:!0}}),s=n&&!n.getAuthentications&&t.core?.credentials?.length?await b(n,t,o):n;t=await _(s,o,t);let i=await ye(t)(Qe(o,t));return Array.isArray(r)?await E(i,r,t):await E(i,r,t)}return Array.isArray(r)?await E(e,r,t):await E(e,r,t)}async function ge(e,r,t,o){let n,s;if(!Array.isArray(r)&&!C(r)?(n=[],s=r,o=void 0):(n=r,s=t),s||=P(),!Array.isArray(n)&&y(n)){let c=await xt(n,e,s);s=await _(n.getAuthentications?n:c,typeof e=="string"?e:"",s||{});let u={fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae};return c.createDataSource(e,s||{},u)}if(Array.isArray(n)&&n.length===1&&y(n[0])){let c=await xt(n[0],e,s);s=await _(n[0].getAuthentications?n[0]:c,typeof e=="string"?e:"",s||{});let u={fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae};return c.createDataSource(e,s||{},u)}if(typeof e=="string"||m(e)){let c=await v(e,n,{...s,core:{...s?.core,nothrow:!0}});if(c&&y(c)){let u=await xt(c,e,s);return s=await _(c.getAuthentications?c:u,typeof e=="string"?e:"",s||{}),u.createDataSource(e,s||{},{fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae})}if(c&&typeof e=="string"){let u=await b(c,s,e);s=await _(c.getAuthentications?c:u,e,s||{});let l=u.parseUrl;if(l){let f=Qe(e,s);return await l(f,s,o)}}}s&&(s=pe(s));let a=ye(s),i=e;return typeof e=="string"&&(i=await a(Qe(e,s))),m(e)&&(i=await a(e)),typeof e=="string"&&(G(s||{}).core?.baseUrl||(s={...s,core:{...s?.core,baseUrl:e}})),Array.isArray(n)?await g(i,n,s,o):await g(i,n,s,o)}async function xt(e,r,t){if(!e.preload)return e;let o=await e.preload(typeof r=="string"?r:"",t);if(!y(o))throw new Error(`${e.id} source loader preload() did not return a runtime source loader`);return o}var we=Object.freeze({fetchFile:I,parse:g,parseFile:ne,parseSync:ie,parseInBatches:E,load:ge,loadInBatches:ae});function se(e,r,t){if(t)return{...t,coreApi:t.coreApi||e.coreApi||we,_parse:t._parse||e._parse,fetch:ye(r,t)};let o={...e,fetch:ye(r,e),coreApi:e.coreApi||we};if(o.url){let n=te(o.url);o.baseUrl=n,o.queryString=go(o.url),o.filename=V.filename(n),o.baseUrl=V.dirname(n)}return Array.isArray(o.loaders)||(o.loaders=null),o}function Ie(e,r){if(e&&!Array.isArray(e))return e;let t;if(e&&(t=Array.isArray(e)?e:[e]),r&&r.loaders){let o=Array.isArray(r.loaders)?r.loaders:[r.loaders];t=t?[...t,...o]:o}return t&&t.length?t:void 0}async function g(e,r,t,o){r&&!Array.isArray(r)&&!C(r)&&(o=void 0,t=r,r=void 0),e=await e,t=t||{};let n=M(e),a=Ie(r,o),i=await v(e,a,t);if(!i)return null;if(y(i))throw new Error(`${i.id} is a SourceLoader. Use load() to create a runtime source object instead of parse().`);let c=oe(t,i,a,n),u=!i.getAuthentications&&c.core?.credentials?.length?await b(i,c,n||o?.url):i,l=await _(u,n||"",c);return o=se({url:n,_parse:g,loaders:a},l,o||null),await Vs(i,e,l,o)}async function Vs(e,r,t,o){if(Ue(e),t=Y(e.options,t),w(r)){let{ok:s,redirected:a,status:i,statusText:c,type:u,url:l}=r,f=Object.fromEntries(r.headers.entries());o.response={headers:f,ok:s,redirected:a,status:i,statusText:c,type:u,url:l}}let n=await b(e,t,o.url);return jr(n,r,t,o,e)?(r=await No(r,t),await Dr(n,r,t,o,g)):m(r)&&n.parseBlob?await n.parseBlob(r,t,o):(r=await $o(r,e,t),await Hs(n,r,t,o))}async function Hs(e,r,t,o){if(e.parseText&&typeof r=="string")return await e.parseText(r,t,o);if(e.parseTextSync&&typeof r=="string")return e.parseTextSync(r,t,o);if(e.parse)return await e.parse(r,t,o);throw e.parseSync?new Error(`${e.name} loader: 'parse' not available on parser-bearing sync loader. Add an async 'parse' function to this loader, or call preload(loader) before parseSync(). ${o.url||""}`):new Error(`${e.id} loader - no parser found and worker is disabled`)}async function Go(e,r,t){return e.subloaders?await qo(e,r,t):await b(e,r,t)}function Jo(e){return mr(e)}async function Tt(e,r,t){if(r.encode)return await r.encode(e,t);if(r.encodeText){let o=await r.encodeText(e,t);return Q(new TextEncoder().encode(o))}if(r.encodeInBatches){let o=kt(e,r,t),n=[];for await(let s of o)n.push(s);return Me(...n)}throw new Error("Writer could not encode data")}async function Ko(e,r,t){if(r.text&&r.encodeText)return await r.encodeText(e,t);if(r.text){let o=await Tt(e,r,t);return new TextDecoder().decode(o)}throw new Error(`Writer ${r.name} could not encode data as text`)}function kt(e,r,t){if(r.encodeInBatches){let o=Qs(e);return r.encodeInBatches(o,t)}throw new Error("Writer could not encode data in batches")}function Qs(e){return[{...e,start:0,end:e.length}]}async function Yo(e,r,t){let n={...P(),...t};return r.encodeURLtoURL?Gs(r,e,n):Vr(r,n)?await Fe(r,e,n):await r.encode(e,n)}function At(e,r,t){if(r.encodeSync)return r.encodeSync(e,t);if(r.encodeTextSync)return Q(new TextEncoder().encode(r.encodeTextSync(e,t)));throw new Error(`Writer ${r.name} could not synchronously encode data`)}async function Xo(e,r,t){if(r.encodeText)return await r.encodeText(e,t);if(r.encodeTextSync)return r.encodeTextSync(e,t);if(r.text){let o=await r.encode(e,t);return new TextDecoder().decode(o)}throw new Error(`Writer ${r.name} could not encode data as text`)}function en(e,r,t){if(r.encodeTextSync)return r.encodeTextSync(e,t);if(r.text&&r.encodeSync){let o=At(e,r,t);return new TextDecoder().decode(o)}throw new Error(`Writer ${r.name} could not encode data as text`)}function rn(e,r,t){if(r.encodeInBatches){let o=Js(e);return r.encodeInBatches(o,t)}throw new Error(`Writer ${r.name} could not encode in batches`)}async function St(e,r,t,o){if(e=re(e),r=re(r),k||!t.encodeURLtoURL)throw new Error;return await t.encodeURLtoURL(e,r,o)}async function Gs(e,r,t){if(k)throw new Error(`Writer ${e.name} not supported in browser`);let o=Zo("input");await new qe(o,"w").write(r);let s=Zo("output"),a=await St(o,s,e,t);return(await I(a)).arrayBuffer()}function Js(e){return[{...e,start:0,end:e.length}]}function Zo(e){return`/tmp/${e}`}function tn(e,r,t={}){let o=t||{},n=o?.core?.type||o.type||"auto",s=r.length===1?r[0]:n==="auto"?O(e,r,{...o,core:{...o?.core,type:"auto"}}):Ks(n,r);if(!s)throw new Error("Not a valid source type");let a=o.core?.credentials?.length?s.getAuthentications?.(typeof e=="string"?e:"",o):void 0;if(a&&"then"in a)throw a.catch(()=>{}),new Error("Use load() with an asynchronous getAuthentications() hook.");let i=pe(a?.length?{...o,core:{...o.core,authentications:[...o.core?.authentications||[],...a||[]]}}:o);return s.createDataSource(e,i,we)}function Ks(e,r){for(let t of r)if(t.type===e)return t;return null}function on(e,r,t){let o=t?.type||"auto",n=null;if(o==="auto"?n=O(e,r,{core:{nothrow:!0}}):n=Zs(o,r),!n&&!t?.nothrow)throw new Error("Not a valid image source type");return n}function Zs(e,r){for(let t of r)if(t.type===e)return t;return null}function nn(e,r){if(globalThis.loaders.makeNodeStream)return globalThis.loaders.makeNodeStream(e,r);let t=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new ReadableStream({type:"bytes",async pull(o){try{let{done:n,value:s}=await t.next();n?o.close():o.enqueue(new Uint8Array(s))}catch(n){o.error(n)}},async cancel(){await t?.return?.()}},{highWaterMark:2**24,...r})}var sn="5.0.0-alpha.11",an={dataType:null,batchType:null,name:"Null loader",id:"null",module:"core",version:sn,worker:!0,mimeTypes:["application/x.empty"],extensions:["null"],tests:[()=>!1],options:{null:{}}},cn={dataType:null,batchType:null,name:"Null loader",id:"null",module:"core",version:sn,mimeTypes:["application/x.empty"],extensions:["null"],parse:async(e,r,t)=>Lt(e,r||{},t),parseSync:Lt,parseInBatches:async function*(r,t,o){for await(let n of r)yield Lt(n,t,o)},tests:[()=>!1],options:{null:{}}};function Lt(e,r,t){return null}async function un(e,r,t=()=>{},o=()=>{}){if(e=await e,!e.ok)return e;let n=e.body;if(!n)return e;let s=e.headers.get("content-length")||0,a=s?parseInt(s):0;if(!(a>0)||typeof ReadableStream>"u"||!n.getReader)return e;let i=new ReadableStream({async start(c){let u=n.getReader();await fn(c,u,0,a,r,t,o)}});return new Response(i)}async function fn(e,r,t,o,n,s,a){try{let{done:i,value:c}=await r.read();if(i){s(),e.close();return}t+=c.byteLength;let u=Math.round(t/o*100);n(u,{loadedBytes:t,totalBytes:o}),e.enqueue(c),await fn(e,r,t,o,n,s,a)}catch(i){e.error(i),a(i)}}var yr=class{_fetch;files={};lowerCaseFiles={};usedFiles={};constructor(r,t){this._fetch=t?.fetch||fetch;for(let o=0;o<r.length;++o){let n=r[o];this.files[n.name]=n,this.lowerCaseFiles[n.name.toLowerCase()]=n,this.usedFiles[n.name]=!1}this.fetch=this.fetch.bind(this)}async fetch(r,t){if(r.includes("://"))return this._fetch(r,t);let o=this._getFile(r,!0);if(!o)return new Response(r,{status:400,statusText:"NOT FOUND"});let s=new Headers(t?.headers).get("Range"),a=s&&/bytes=(\d+)-(\d+)/.exec(s);if(a){let c=parseInt(a[1]),u=Math.min(parseInt(a[2]),o.size-1);if(c>u){let h=new Response(null,{status:416,headers:{"Content-Range":`bytes */${o.size}`}});return Object.defineProperty(h,"url",{value:r}),h}let l=await o.slice(c,u+1).arrayBuffer(),f=new Response(l,{status:206,headers:{"Content-Range":`bytes ${c}-${u}/${o.size}`}});return Object.defineProperty(f,"url",{value:r}),f}let i=new Response(o);return Object.defineProperty(i,"url",{value:r}),i}async readdir(r){let t=[];for(let o in this.files)t.push(o);return t}async stat(r,t){let o=this._getFile(r,!1);if(!o)throw new Error(r);return{size:o.size}}async unlink(r){let t=this._getFile(r,!1);t&&(delete this.files[t.name],delete this.lowerCaseFiles[t.name.toLowerCase()],this.usedFiles[t.name]=!0)}async openReadableFile(r,t){return new De(this._getFile(r,!0))}_getFile(r,t){let o=this.files[r]||this.lowerCaseFiles[r.toLowerCase()];return o&&t&&(this.usedFiles[r]=!0),o}};return mn(Ys);})();
15
15
  return __exports__;
16
16
  });
package/dist/index.cjs CHANGED
@@ -4377,7 +4377,7 @@ function makeStream(source, options) {
4377
4377
  }
4378
4378
 
4379
4379
  // dist/null-loader.js
4380
- var VERSION4 = true ? "5.0.0-alpha.10" : "latest";
4380
+ var VERSION4 = true ? "5.0.0-alpha.11" : "latest";
4381
4381
  var NullWorkerLoader = {
4382
4382
  dataType: null,
4383
4383
  batchType: null,
package/dist/lib/init.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // Copyright (c) vis.gl contributors
4
4
  import { log } from '@loaders.gl/loader-utils';
5
5
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
6
- const version = typeof "5.0.0-alpha.10" !== 'undefined' ? "5.0.0-alpha.10" : '';
6
+ const version = typeof "5.0.0-alpha.11" !== 'undefined' ? "5.0.0-alpha.11" : '';
7
7
  // @ts-ignore
8
8
  if (!globalThis.loaders) {
9
9
  log.log(1, `loaders.gl ${version}`)();
@@ -3,7 +3,7 @@
3
3
  // Copyright (c) vis.gl contributors
4
4
  // __VERSION__ is injected by babel-plugin-version-inline
5
5
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
6
- const VERSION = typeof "5.0.0-alpha.10" !== 'undefined' ? "5.0.0-alpha.10" : 'latest';
6
+ const VERSION = typeof "5.0.0-alpha.11" !== 'undefined' ? "5.0.0-alpha.11" : 'latest';
7
7
  /**
8
8
  * Loads any data and returns null (or optionally passes through data unparsed)
9
9
  */
@@ -473,7 +473,7 @@ async function parseData({
473
473
  }
474
474
 
475
475
  // src/null-loader.ts
476
- var VERSION = true ? "5.0.0-alpha.10" : "latest";
476
+ var VERSION = true ? "5.0.0-alpha.11" : "latest";
477
477
  var NullLoader = {
478
478
  dataType: null,
479
479
  batchType: null,
@@ -438,7 +438,7 @@
438
438
  }
439
439
 
440
440
  // src/null-loader.ts
441
- var VERSION = true ? "5.0.0-alpha.10" : "latest";
441
+ var VERSION = true ? "5.0.0-alpha.11" : "latest";
442
442
  var NullLoader = {
443
443
  dataType: null,
444
444
  batchType: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/core",
3
- "version": "5.0.0-alpha.10",
3
+ "version": "5.0.0-alpha.11",
4
4
  "description": "The core API for working with loaders.gl loaders and writers",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -58,11 +58,11 @@
58
58
  "build-worker-node": "esbuild src/workers/null-worker.ts --outfile=dist/null-worker-node.js --bundle --platform=node --target=node16 --define:__VERSION__=\\\"$npm_package_version\\\""
59
59
  },
60
60
  "dependencies": {
61
- "@loaders.gl/loader-utils": "5.0.0-alpha.10",
62
- "@loaders.gl/schema": "5.0.0-alpha.10",
63
- "@loaders.gl/schema-utils": "5.0.0-alpha.10",
64
- "@loaders.gl/worker-utils": "5.0.0-alpha.10",
61
+ "@loaders.gl/loader-utils": "5.0.0-alpha.11",
62
+ "@loaders.gl/schema": "5.0.0-alpha.11",
63
+ "@loaders.gl/schema-utils": "5.0.0-alpha.11",
64
+ "@loaders.gl/worker-utils": "5.0.0-alpha.11",
65
65
  "@probe.gl/log": "^4.1.1"
66
66
  },
67
- "gitHead": "7cbfaef633e86356c946541dab4977b522745b6c"
67
+ "gitHead": "31449661e98c1c3f97bb4f8a7bcba7f19596ac00"
68
68
  }