@loaders.gl/scientific 5.0.0-beta.10 → 5.0.0-beta.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/index.cjs +5 -5
- package/dist/netcdf/index.cjs.map +1 -1
- package/dist/netcdf/netcdf-loader.cjs +1 -1
- package/dist/netcdf/netcdf-loader.js +1 -1
- package/dist/netcdf.dev.js +2 -0
- package/dist/netcdf.min.js +3 -3
- package/dist/npy-loader-types.cjs +1 -1
- package/dist/npy-loader-types.js +1 -1
- package/dist/npy-loader.cjs +1 -1
- package/dist/npy-worker.js +1 -1
- package/dist/nrrd-loader-types.cjs +1 -1
- package/dist/nrrd-loader-types.js +1 -1
- package/dist/vtk-loader-types.cjs +1 -1
- package/dist/vtk-loader-types.js +1 -1
- package/dist/zarr/geo-zarr-loader.js +1 -1
- package/dist/zarr/index.cjs.map +1 -1
- package/dist/zarr/ome-zarr-loader.js +1 -1
- package/dist/zarr/zarr-loader-types.cjs +1 -1
- package/dist/zarr/zarr-loader-types.js +1 -1
- package/dist/zarr.dev.js +2 -0
- package/dist/zarr.min.js +3 -3
- package/package.json +5 -5
package/dist/netcdf.min.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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 qr=Object.create;var K=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var Vr=Object.getOwnPropertyNames;var Gr=Object.getPrototypeOf,Qr=Object.prototype.hasOwnProperty;var u=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var Jr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Rt=(e,t)=>{for(var r in t)K(e,r,{get:t[r],enumerable:!0})},_t=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vr(t))!Qr.call(e,o)&&o!==r&&K(e,o,{get:()=>t[o],enumerable:!(n=zr(t,o))||n.enumerable});return e};var Zr=(e,t,r)=>(r=e!=null?qr(Gr(e)):{},_t(t||!e||!e.__esModule?K(r,"default",{value:e,enumerable:!0}):r,e)),Yr=e=>_t(K({},"__esModule",{value:!0}),e);var Bt=Jr((no,Nt)=>{Nt.exports=globalThis.loaders});function ge(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var Dt=u(()=>{"use strict"});var A,ye,be,we,xe,Te,Ee,Lt,Kr,Ft=u(()=>{"use strict";A={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},ye=A.self||A.window||A.global||{},be=A.window||A.self||A.global||{},we=A.global||A.self||A.window||{},xe=A.document||{},Te=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),Ee=typeof importScripts=="function",Lt=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Kr=Lt&&parseFloat(Lt[1])||0});var M,Xr,X,en,tn,Ae=u(()=>{M=globalThis,Xr=globalThis.document||{},X=globalThis.process||{},en=globalThis.console,tn=globalThis.navigator||{}});function ee(e){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;let t=typeof navigator<"u"&&navigator.userAgent,r=e||t;return!!(r&&r.indexOf("Electron")>=0)}var te=u(()=>{});function _(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||ee()}var Se=u(()=>{te()});var vt=u(()=>{Se();te();Ae()});var It=u(()=>{});var Ce,re=u(()=>{Ae();Se();vt();te();It();Ce="5.0.0"});function P(e,t){if(!e)throw new Error(t||"Assertion failed")}var Re=u(()=>{});function ne(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return P(Number.isFinite(t)&&t>=0),t}function _e(e){let{logLevel:t,message:r}=e;e.logLevel=ne(t);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==r;);switch(typeof t){case"string":case"function":r!==void 0&&n.unshift(r),e.message=t;break;case"object":Object.assign(e,t);break;default:}typeof e.message=="function"&&(e.message=e.message());let o=typeof e.message;return P(o==="string"||o==="object"),Object.assign(e,{args:n},e.opts)}var oe=u(()=>{Re()});var N,L,$=u(()=>{oe();N=()=>{},L=class{constructor({level:t=0}={}){this.userData={},this._onceCache=new Set,this._level=t}set level(t){this.setLevel(t)}get level(){return this.getLevel()}setLevel(t){return this._level=t,this}getLevel(){return this._level}warn(t,...r){return this._log("warn",0,t,r,{once:!0})}error(t,...r){return this._log("error",0,t,r)}log(t,r,...n){return this._log("log",t,r,n)}info(t,r,...n){return this._log("info",t,r,n)}once(t,r,...n){return this._log("once",t,r,n,{once:!0})}_log(t,r,n,o,s={}){let c=_e({logLevel:r,message:n,args:this._buildArgs(r,n,o),opts:s});return this._createLogFunction(t,c,s)}_buildArgs(t,r,n){return[t,r,...n]}_createLogFunction(t,r,n){if(!this._shouldLog(r.logLevel))return N;let o=this._getOnceTag(n.tag??r.tag??r.message);if((n.once||r.once)&&o!==void 0){if(this._onceCache.has(o))return N;this._onceCache.add(o)}return this._emit(t,r)}_shouldLog(t){return this.getLevel()>=ne(t)}_getOnceTag(t){if(t!==void 0)try{return typeof t=="string"?t:String(t)}catch{return}}}});function nn(e){try{let t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),t}catch{return null}}var H,Ne=u(()=>{H=class{constructor(t,r,n="sessionStorage"){this.storage=nn(n),this.id=t,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let t={};if(this.storage){let r=this.storage.getItem(this.id);t=r?JSON.parse(r):{}}return Object.assign(this.config,t),this}}});function Pt(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function Be(e,t=8){let r=Math.max(t-e.length,0);return`${" ".repeat(r)}${e}`}var De=u(()=>{});function Ot(e){return typeof e!="string"?e:(e=e.toUpperCase(),W[e]||W.WHITE)}function Le(e,t,r){return!_&&typeof e=="string"&&(t&&(e=`\x1B[${Ot(t)}m${e}\x1B[39m`),r&&(e=`\x1B[${Ot(r)+on}m${e}\x1B[49m`)),e}var W,on,se=u(()=>{re();(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"})(W||(W={}));on=10});function Fe(e,t=["constructor"]){let r=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(r),o=e;for(let s of n){let c=o[s];typeof c=="function"&&(t.find(d=>s===d)||(o[s]=c.bind(e)))}}var ve=u(()=>{});var ie,T,q=u(()=>{re();ie=class{getHighResolutionTimer(){let t;if(_()&&M.performance)t=M?.performance?.now?.();else if("hrtime"in X){let r=X?.hrtime?.();t=r[0]*1e3+r[1]/1e6}else t=Date.now();return t}getMemoryUsageMB(){let r=M?.performance?.memory?.usedJSHeapSize;return r==null?null:Math.trunc(r/1024/1024)}},T=new ie;globalThis.Probe=ie;globalThis.probe=T});function sn(e,t,r){if(typeof t=="string"){let n=r.time?Be(Pt(r.total)):"";t=r.time?`${e}: ${n} ${t}`:`${e}: ${t}`,t=Le(t,r.color,r.background)}return t}function an(e){for(let t in e)for(let r in e[t])return r||"untitled";return"empty"}var O,Ie,S,Pe=u(()=>{re();$();Ne();De();se();ve();Re();q();oe();oe();O={debug:_()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Ie={enabled:!0,level:0},S=class extends L{constructor({id:t}={id:""}){super({level:0}),this.VERSION=Ce,this._startTs=T.getHighResolutionTimer(),this._deltaTs=T.getHighResolutionTimer(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new H(`__probe-${this.id}__`,{[this.id]:Ie}),this.timeStamp(`${this.id} started`),Fe(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((T.getHighResolutionTimer()-this._startTs).toPrecision(10))}getDelta(){return Number((T.getHighResolutionTimer()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._updateConfiguration({enabled:t}),this}setLevel(t){return this._updateConfiguration({level:t}),this}get(t){return this._getConfiguration()[t]}set(t,r){this._updateConfiguration({[t]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,r){if(!t)throw new Error(r||"Assertion failed")}warn(t,...r){return this._log("warn",0,t,r,{method:O.warn,once:!0})}error(t,...r){return this._log("error",0,t,r,{method:O.error})}deprecated(t,r){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(t,r){return this.error(`\`${t}\` has been removed. Use \`${r}\` instead`)}probe(t,r,...n){let o=T.getMemoryUsageMB();if(o!==null){let s=`${o}MB `;typeof r=="function"?r=()=>`${s}${r()}`:typeof r=="string"&&(r=`${s}${r}`)}return this._log("log",t,r,n,{method:O.log,time:!0,once:!0})}log(t,r,...n){return this._log("log",t,r,n,{method:O.debug})}info(t,r,...n){return this._log("info",t,r,n,{method:console.info})}once(t,r,...n){return this._log("once",t,r,n,{method:O.debug||O.info,once:!0})}table(t,r,n){return r?this._log("table",t,r,n&&[n]||[],{method:console.table||N,tag:an(r)}):N}time(t,r){return this._log("time",t,r,[],{method:console.time?console.time:console.info})}timeEnd(t,r){return this._log("time",t,r,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(t,r){return this._log("time",t,r,[],{method:console.timeStamp||N})}group(t,r,n={collapsed:!1}){let o=(n.collapsed?console.groupCollapsed:console.group)||console.info;return this._log("group",t,r,[],{method:o})}groupCollapsed(t,r,n={}){return this.group(t,r,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._log("groupEnd",t,"",[],{method:console.groupEnd||N})}withGroup(t,r,n){this.group(t,r)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&super._shouldLog(t)}_emit(t,r){let n=r.method;P(n),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=T.getHighResolutionTimer();let o=sn(this.id,r.message,r);return n.bind(console,o,...r.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(Ie),this._storage.config[this.id]}_updateConfiguration(t){let r=this._storage.config[this.id]||{...Ie};this._storage.setConfiguration({[this.id]:{...r,...t}})}};S.VERSION=Ce});var Ut=u(()=>{$()});var kt=u(()=>{$()});var jt=u(()=>{q()});var Mt=u(()=>{q();globalThis.probe||(globalThis.probe=T)});var is,$t=u(()=>{Pe();q();Pe();Ut();$();kt();se();se();De();ve();Ne();jt();Mt();is=new S({id:"@probe.gl/log"})});function un(){let e=new S({id:"loaders.gl"});return globalThis.loaders||={},globalThis.loaders.log=e,globalThis.loaders.version=cn,globalThis.probe||={},globalThis.probe.loaders=e,e}function z(){}function Ht(e){let t=e?.core?.log;return t===null?ln:t||fn}var Oe,cn,fn,Ue,ln,Wt=u(()=>{"use strict";$t();Oe="5.0.0-beta.10",cn=Oe[0]>="0"&&Oe[0]<="9"?`v${Oe}`:"";fn=un(),Ue=class{log(){return z}info(){return z}once(){return z}warn(){return z}error(){return z}};ln=new Ue});var qt,b,B,V,ke,je,Me,$e,He,zt,Vt,Gt,Qt,We,qe,ze=u(()=>{"use strict";qt=e=>typeof e=="boolean",b=e=>typeof e=="function",B=e=>e!==null&&typeof e=="object",V=e=>B(e)&&e.constructor==={}.constructor,ke=e=>B(e)&&"then"in e&&b(e.then),je=e=>!!e&&b(e[Symbol.iterator]),Me=e=>!!e&&b(e[Symbol.asyncIterator]),$e=e=>!!e&&b(e.next),He=e=>typeof Response<"u"&&e instanceof Response||B(e)&&b(e.arrayBuffer)&&b(e.text)&&b(e.json),zt=e=>B(e)&&b(e.abort)&&b(e.getWriter),Vt=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||B(e)&&b(e.tee)&&b(e.cancel)&&b(e.getReader),Gt=e=>B(e)&&b(e.end)&&b(e.write)&&qt(e.writable),Qt=e=>B(e)&&b(e.read)&&b(e.pipe)&&qt(e.readable),We=e=>Vt(e)||Qt(e),qe=e=>zt(e)||Gt(e)});function ae(e,t){return Jt(e||{},t)}function Jt(e,t,r=0){if(r>3)return t;let n={...e};for(let[o,s]of Object.entries(t))V(s)?n[o]=Jt(n[o]||{},t[o],r+1):n[o]=t[o];return n}var Zt=u(()=>{"use strict";ze()});function Yt(...e){return dn(e)}function dn(e){let t=e.map(s=>s instanceof ArrayBuffer?new Uint8Array(s):s),r=t.reduce((s,c)=>s+c.byteLength,0),n=new Uint8Array(r),o=0;for(let s of t)n.set(s,o),o+=s.byteLength;return n.buffer}var Kt=u(()=>{"use strict"});async function*Ve(e,t={}){let r=new TextDecoder(void 0,t);for await(let n of e)yield typeof n=="string"?n:r.decode(n,{stream:!0})}async function*Ge(e){let t=new TextEncoder;for await(let r of e)yield typeof r=="string"?t.encode(r).buffer:r}async function*Qe(e){let t="";for await(let r of e){t+=r;let n;for(n=t.indexOf(`
|
|
7
|
+
"use strict";var __exports__=(()=>{var qr=Object.create;var K=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var Vr=Object.getOwnPropertyNames;var Gr=Object.getPrototypeOf,Qr=Object.prototype.hasOwnProperty;var u=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var Jr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Ct=(e,t)=>{for(var r in t)K(e,r,{get:t[r],enumerable:!0})},_t=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vr(t))!Qr.call(e,o)&&o!==r&&K(e,o,{get:()=>t[o],enumerable:!(n=zr(t,o))||n.enumerable});return e};var Zr=(e,t,r)=>(r=e!=null?qr(Gr(e)):{},_t(t||!e||!e.__esModule?K(r,"default",{value:e,enumerable:!0}):r,e)),Yr=e=>_t(K({},"__esModule",{value:!0}),e);var Bt=Jr((no,Nt)=>{Nt.exports=globalThis.loaders});function ge(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var Dt=u(()=>{"use strict"});var A,ye,be,we,xe,Ee,Te,Lt,Kr,Ft=u(()=>{"use strict";A={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},ye=A.self||A.window||A.global||{},be=A.window||A.self||A.global||{},we=A.global||A.self||A.window||{},xe=A.document||{},Ee=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),Te=typeof importScripts=="function",Lt=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),Kr=Lt&&parseFloat(Lt[1])||0});var M,Xr,X,en,tn,Ae=u(()=>{M=globalThis,Xr=globalThis.document||{},X=globalThis.process||{},en=globalThis.console,tn=globalThis.navigator||{}});function ee(e){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;let t=typeof navigator<"u"&&navigator.userAgent,r=e||t;return!!(r&&r.indexOf("Electron")>=0)}var te=u(()=>{});function _(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||ee()}var Se=u(()=>{te()});var vt=u(()=>{Se();te();Ae()});var It=u(()=>{});var Re,re=u(()=>{Ae();Se();vt();te();It();Re="5.0.0"});function P(e,t){if(!e)throw new Error(t||"Assertion failed")}var Ce=u(()=>{});function ne(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return P(Number.isFinite(t)&&t>=0),t}function _e(e){let{logLevel:t,message:r}=e;e.logLevel=ne(t);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==r;);switch(typeof t){case"string":case"function":r!==void 0&&n.unshift(r),e.message=t;break;case"object":Object.assign(e,t);break;default:}typeof e.message=="function"&&(e.message=e.message());let o=typeof e.message;return P(o==="string"||o==="object"),Object.assign(e,{args:n},e.opts)}var oe=u(()=>{Ce()});var N,L,W=u(()=>{oe();N=()=>{},L=class{constructor({level:t=0}={}){this.userData={},this._onceCache=new Set,this._level=t}set level(t){this.setLevel(t)}get level(){return this.getLevel()}setLevel(t){return this._level=t,this}getLevel(){return this._level}warn(t,...r){return this._log("warn",0,t,r,{once:!0})}error(t,...r){return this._log("error",0,t,r)}log(t,r,...n){return this._log("log",t,r,n)}info(t,r,...n){return this._log("info",t,r,n)}once(t,r,...n){return this._log("once",t,r,n,{once:!0})}_log(t,r,n,o,s={}){let c=_e({logLevel:r,message:n,args:this._buildArgs(r,n,o),opts:s});return this._createLogFunction(t,c,s)}_buildArgs(t,r,n){return[t,r,...n]}_createLogFunction(t,r,n){if(!this._shouldLog(r.logLevel))return N;let o=this._getOnceTag(n.tag??r.tag??r.message);if((n.once||r.once)&&o!==void 0){if(this._onceCache.has(o))return N;this._onceCache.add(o)}return this._emit(t,r)}_shouldLog(t){return this.getLevel()>=ne(t)}_getOnceTag(t){if(t!==void 0)try{return typeof t=="string"?t:String(t)}catch{return}}}});function nn(e){try{let t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),t}catch{return null}}var $,Ne=u(()=>{$=class{constructor(t,r,n="sessionStorage"){this.storage=nn(n),this.id=t,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let t={};if(this.storage){let r=this.storage.getItem(this.id);t=r?JSON.parse(r):{}}return Object.assign(this.config,t),this}}});function Pt(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function Be(e,t=8){let r=Math.max(t-e.length,0);return`${" ".repeat(r)}${e}`}var De=u(()=>{});function Ot(e){return typeof e!="string"?e:(e=e.toUpperCase(),H[e]||H.WHITE)}function Le(e,t,r){return!_&&typeof e=="string"&&(t&&(e=`\x1B[${Ot(t)}m${e}\x1B[39m`),r&&(e=`\x1B[${Ot(r)+on}m${e}\x1B[49m`)),e}var H,on,se=u(()=>{re();(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"})(H||(H={}));on=10});function Fe(e,t=["constructor"]){let r=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(r),o=e;for(let s of n){let c=o[s];typeof c=="function"&&(t.find(d=>s===d)||(o[s]=c.bind(e)))}}var ve=u(()=>{});var ie,E,q=u(()=>{re();ie=class{getHighResolutionTimer(){let t;if(_()&&M.performance)t=M?.performance?.now?.();else if("hrtime"in X){let r=X?.hrtime?.();t=r[0]*1e3+r[1]/1e6}else t=Date.now();return t}getMemoryUsageMB(){let r=M?.performance?.memory?.usedJSHeapSize;return r==null?null:Math.trunc(r/1024/1024)}},E=new ie;globalThis.Probe=ie;globalThis.probe=E});function sn(e,t,r){if(typeof t=="string"){let n=r.time?Be(Pt(r.total)):"";t=r.time?`${e}: ${n} ${t}`:`${e}: ${t}`,t=Le(t,r.color,r.background)}return t}function an(e){for(let t in e)for(let r in e[t])return r||"untitled";return"empty"}var O,Ie,S,Pe=u(()=>{re();W();Ne();De();se();ve();Ce();q();oe();oe();O={debug:_()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Ie={enabled:!0,level:0},S=class extends L{constructor({id:t}={id:""}){super({level:0}),this.VERSION=Re,this._startTs=E.getHighResolutionTimer(),this._deltaTs=E.getHighResolutionTimer(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new $(`__probe-${this.id}__`,{[this.id]:Ie}),this.timeStamp(`${this.id} started`),Fe(this),Object.seal(this)}isEnabled(){return this._getConfiguration().enabled}getLevel(){return this._getConfiguration().level}getTotal(){return Number((E.getHighResolutionTimer()-this._startTs).toPrecision(10))}getDelta(){return Number((E.getHighResolutionTimer()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._updateConfiguration({enabled:t}),this}setLevel(t){return this._updateConfiguration({level:t}),this}get(t){return this._getConfiguration()[t]}set(t,r){this._updateConfiguration({[t]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,r){if(!t)throw new Error(r||"Assertion failed")}warn(t,...r){return this._log("warn",0,t,r,{method:O.warn,once:!0})}error(t,...r){return this._log("error",0,t,r,{method:O.error})}deprecated(t,r){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(t,r){return this.error(`\`${t}\` has been removed. Use \`${r}\` instead`)}probe(t,r,...n){let o=E.getMemoryUsageMB();if(o!==null){let s=`${o}MB `;typeof r=="function"?r=()=>`${s}${r()}`:typeof r=="string"&&(r=`${s}${r}`)}return this._log("log",t,r,n,{method:O.log,time:!0,once:!0})}log(t,r,...n){return this._log("log",t,r,n,{method:O.debug})}info(t,r,...n){return this._log("info",t,r,n,{method:console.info})}once(t,r,...n){return this._log("once",t,r,n,{method:O.debug||O.info,once:!0})}table(t,r,n){return r?this._log("table",t,r,n&&[n]||[],{method:console.table||N,tag:an(r)}):N}time(t,r){return this._log("time",t,r,[],{method:console.time?console.time:console.info})}timeEnd(t,r){return this._log("time",t,r,[],{method:console.timeEnd?console.timeEnd:console.info})}timeStamp(t,r){return this._log("time",t,r,[],{method:console.timeStamp||N})}group(t,r,n={collapsed:!1}){let o=(n.collapsed?console.groupCollapsed:console.group)||console.info;return this._log("group",t,r,[],{method:o})}groupCollapsed(t,r,n={}){return this.group(t,r,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._log("groupEnd",t,"",[],{method:console.groupEnd||N})}withGroup(t,r,n){this.group(t,r)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&super._shouldLog(t)}_emit(t,r){let n=r.method;P(n),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=E.getHighResolutionTimer();let o=sn(this.id,r.message,r);return n.bind(console,o,...r.args)}_getConfiguration(){return this._storage.config[this.id]||this._updateConfiguration(Ie),this._storage.config[this.id]}_updateConfiguration(t){let r=this._storage.config[this.id]||{...Ie};this._storage.setConfiguration({[this.id]:{...r,...t}})}};S.VERSION=Re});var Ut=u(()=>{W()});var kt=u(()=>{W()});var jt=u(()=>{q()});var Mt=u(()=>{q();globalThis.probe||(globalThis.probe=E)});var is,Wt=u(()=>{Pe();q();Pe();Ut();W();kt();se();se();De();ve();Ne();jt();Mt();is=new S({id:"@probe.gl/log"})});function un(){let e=new S({id:"loaders.gl"});return globalThis.loaders||={},globalThis.loaders.log=e,globalThis.loaders.version=cn,globalThis.probe||={},globalThis.probe.loaders=e,e}function z(){}function $t(e){let t=e?.core?.log;return t===null?ln:t||fn}var Oe,cn,fn,Ue,ln,Ht=u(()=>{"use strict";Wt();Oe="5.0.0-beta.11",cn=Oe[0]>="0"&&Oe[0]<="9"?`v${Oe}`:"";fn=un(),Ue=class{log(){return z}info(){return z}once(){return z}warn(){return z}error(){return z}};ln=new Ue});var qt,b,B,V,ke,je,Me,We,$e,zt,Vt,Gt,Qt,He,qe,ze=u(()=>{"use strict";qt=e=>typeof e=="boolean",b=e=>typeof e=="function",B=e=>e!==null&&typeof e=="object",V=e=>B(e)&&e.constructor==={}.constructor,ke=e=>B(e)&&"then"in e&&b(e.then),je=e=>!!e&&b(e[Symbol.iterator]),Me=e=>!!e&&b(e[Symbol.asyncIterator]),We=e=>!!e&&b(e.next),$e=e=>typeof Response<"u"&&e instanceof Response||B(e)&&b(e.arrayBuffer)&&b(e.text)&&b(e.json),zt=e=>B(e)&&b(e.abort)&&b(e.getWriter),Vt=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||B(e)&&b(e.tee)&&b(e.cancel)&&b(e.getReader),Gt=e=>B(e)&&b(e.end)&&b(e.write)&&qt(e.writable),Qt=e=>B(e)&&b(e.read)&&b(e.pipe)&&qt(e.readable),He=e=>Vt(e)||Qt(e),qe=e=>zt(e)||Gt(e)});function ae(e,t){return Jt(e||{},t)}function Jt(e,t,r=0){if(r>3)return t;let n={...e};for(let[o,s]of Object.entries(t))V(s)?n[o]=Jt(n[o]||{},t[o],r+1):n[o]=t[o];return n}var Zt=u(()=>{"use strict";ze()});function Yt(...e){return dn(e)}function dn(e){let t=e.map(s=>s instanceof ArrayBuffer?new Uint8Array(s):s),r=t.reduce((s,c)=>s+c.byteLength,0),n=new Uint8Array(r),o=0;for(let s of t)n.set(s,o),o+=s.byteLength;return n.buffer}var Kt=u(()=>{"use strict"});async function*Ve(e,t={}){let r=new TextDecoder(void 0,t);for await(let n of e)yield typeof n=="string"?n:r.decode(n,{stream:!0})}async function*Ge(e){let t=new TextEncoder;for await(let r of e)yield typeof r=="string"?t.encode(r).buffer:r}async function*Qe(e){let t="";for await(let r of e){t+=r;let n;for(n=t.indexOf(`
|
|
8
8
|
`);n>=0;){let o=t.slice(0,n+1);t=t.slice(n+1),yield o,n=t.indexOf(`
|
|
9
|
-
`)}}t.length>0&&(yield t)}async function*Je(e){let t=1;for await(let r of e)yield{counter:t,line:r},t++}var Xt=u(()=>{"use strict"});async function Ze(e,t){let r=mn(e);for(;;){let{done:n,value:o}=await r.next();if(n){r.return&&r.return();return}if(t(o))return}}async function Ye(e){let t=[];for await(let r of e)t.push(hn(r));return Yt(...t)}function hn(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return er(t,r,n)}return er(e)}function er(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);return o.set(n),o.buffer}function mn(e){if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();if(typeof e[Symbol.iterator]=="function"){let t=e[Symbol.iterator]();return pn(t)}return e}function pn(e){return{next(t){return Promise.resolve(e.next(t))},return(t){return typeof e.return=="function"?Promise.resolve(e.return(t)):Promise.resolve({done:!0,value:t})},throw(t){return typeof e.throw=="function"?Promise.resolve(e.throw(t)):Promise.reject(t)}}}var tr=u(()=>{"use strict";Kt()});function G(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}var Ke=u(()=>{});var F,Xe=u(()=>{Ke();F=class{constructor(t,r){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=t,this.type=r,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(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=G(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(G()-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 U,rr=u(()=>{Xe();U=class{constructor(t){this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t,r="count"){return this._getOrCreate({name:t,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let t of Object.values(this.stats))t.reset();return this}forEach(t){for(let r of Object.values(this.stats))t(r)}getTable(){let t={};return this.forEach(r=>{t[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,o=this.stats[r];return o||(t instanceof F?o=t:o=new F(r,n),this.stats[r]=o),o}}});var nr=u(()=>{rr();Xe();Ke()});var gn,yn,bn,wn,xn,Tn,k,or=u(()=>{"use strict";nr();gn="Queued Requests",yn="Active Requests",bn="Cancelled Requests",wn="Queued Requests Ever",xn="Active Requests Ever",Tn={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},k=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(t={}){this.props={...Tn,...t},this.stats=new U({id:this.props.id}),this.stats.get(gn),this.stats.get(yn),this.stats.get(bn),this.stats.get(wn),this.stats.get(xn)}setProps(t){t.throttleRequests!==void 0&&(this.props.throttleRequests=t.throttleRequests),t.maxRequests!==void 0&&(this.props.maxRequests=t.maxRequests),t.debounceTime!==void 0&&(this.props.debounceTime=t.debounceTime)}scheduleRequest(t,r=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);let n={handle:t,priority:0,getPriority:r},o=new Promise(s=>(n.resolve=s,n));return this.requestQueue.push(n),this.requestMap.set(t,o),this._issueNewRequests(),o}_issueRequest(t){let{handle:r,resolve:n}=t,o=!1,s=()=>{o||(o=!0,this.requestMap.delete(r),this.activeRequestCount--,this.scheduleRefill())};return this.activeRequestCount++,n?n({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 t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(t!==0){this._updateAllRequests();for(let r=0;r<t;++r){let n=this.requestQueue.shift();n&&this._issueRequest(n)}}}_updateAllRequests(){let t=this.requestQueue;for(let r=0;r<t.length;++r){let n=t[r];this._updateRequest(n)||(t.splice(r,1),this.requestMap.delete(n.handle),r--)}t.sort((r,n)=>r.priority-n.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),t.priority<0?(t.resolve(null),!1):!0}}});function tt(e,t=[]){return e.every(et)?e:e.map((r,n)=>{if(et(r))return r;let o=t.find(c=>c.type===r?.type);if(!o)throw new Error(`No authentication class registered for credential at index ${n}.`);let s;try{s=new o(r)}catch{throw new Error(`Invalid authentication configuration at index ${n}.`)}if(!et(s))throw new Error(`Authentication class returned an invalid credential at index ${n}.`);return s})}function rt(e){if(!e.core?.credentials?.length)return e;let t=tt(e.core.credentials,e.core.authentications);return t===e.core.credentials?e:{...e,core:{...e.core,credentials:t}}}function et(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 nt=u(()=>{"use strict"});function En(e){let t=e.fetch||((l,f)=>fetch(l,f)),r=t[sr],n=new Map(r?.credentialResolutions),o=tt(e.credentials.map(l=>n.get(l)||l),e.authentications);if(e.credentials.forEach((l,f)=>{n.set(l,o[f])}),!e.fetchOptions&&(!o.length||r?.credentials.length===o.length&&o.every((l,f)=>l===r.credentials[f])))return t;let s=r?.fetch||t,c=r?[...new Set([...o,...r.credentials])]:o,d=ir(r?.fetchOptions||{},e.fetchOptions),m=c.filter(l=>l.type!=="request"),a=c.filter(l=>l.type==="request");for(let l of a)lr(l.origins);let h=async(l,f={})=>{if(f=ir(d,f),f.signal?.throwIfAborted(),!c.length)return s(l,f);let y=Cn(l),g=y?await cr(y,f,m):{url:l,options:f,credentials:[]},w=await ar(g,a,"request"),x=await s(w.url,w.options),me=[];for(let D of g.credentials){let{credential:R}=D;typeof R.token=="function"&&(ce(f)||R.canReplayRequest?.(l,f))&&(ce(w.options)||R.canReplayRequest?.(w.url,w.options))&&(R.refreshStatusCodes.includes(x.status)||await R.shouldRefresh?.(x))&&me.push(D)}let St=ce(f)&&ce(w.options)&&w.credentials.some(D=>D.refreshStatusCodes?.includes(x.status));if(!me.length&&!St)return x;f.signal?.throwIfAborted();let pe=new Map;if(await Promise.all(me.map(async({credential:D})=>{let R=await An(D,l,x);R&&pe.set(D,R)})),!pe.size&&!St)return x;await x.body?.cancel().catch(()=>{}),f.signal?.throwIfAborted();let Wr=y?await cr(y,f,m,pe,g.credentials):{url:l,options:f},Ct=await ar(Wr,a,"retry",x);return s(Ct.url,Ct.options)};return Object.defineProperty(h,sr,{value:{fetch:s,credentials:c,credentialResolutions:n,fetchOptions:d}}),h}function ur(e={}){let t=e.core?.fetch,r;typeof t=="function"?r=t:r=(o,s)=>fetch(o,s);let n=typeof t=="object"&&t?t:void 0;return En({fetch:r,fetchOptions:e.signal?{...n,signal:e.signal}:n,credentials:e.core?.credentials||[],authentications:e.core?.authentications})}function ir(e,t){let r={...e,...t};if(e.headers||t?.headers){let n=new Headers(e.headers);new Headers(t?.headers).forEach((o,s)=>n.set(s,o)),r.headers=n}return r}async function ar(e,t,r,n){let o=[],s=e.options.signal;for(let c of t){let d=fr(e.url);if(!d||!lr(c.origins).includes(d))continue;s?.throwIfAborted();let m=await c.authenticate({url:e.url,options:{...e.options,headers:new Headers(e.options.headers)},reason:r,response:n?{status:n.status,headers:new Headers(n.headers)}:void 0});if(!m||typeof m.url!="string"||!m.options||typeof m.options!="object")throw new Error("Authentication callback returned an invalid request.");e={url:m.url,options:{...m.options,...s?{signal:s}:{}}},o.push(c)}return s?.throwIfAborted(),{...e,credentials:o}}function fr(e){try{let t=new URL(e);return!t.host||t.username||t.password?null:t.origin!=="null"?t.origin:`${t.protocol}//${t.host}`}catch{return null}}function lr(e){if(!e.length)throw new Error("Request authentication requires at least one exact origin.");return e.map(t=>{let r=fr(t),n;try{n=new URL(t)}catch{throw new Error("Invalid request authentication origin.")}if(!r||n.pathname&&n.pathname!=="/"||n.search||n.hash)throw new Error("Invalid request authentication origin.");return r})}async function cr(e,t,r,n=new Map,o=[]){let s=new URL(e),c=new Headers(t.headers),d=[],m=new Map(o.map(({credential:a,token:h})=>[a,h]));for(let a of r){if(!a.origins.includes(s.origin))continue;let h=n.get(a),l=m.get(a),f=a.type==="query-parameter"&&l!==void 0,y=a.type==="header"&&l!==void 0;if(a.type==="query-parameter"&&s.searchParams.has(a.name)&&!f||a.type==="header"&&c.has(a.name)&&!y)continue;let g=h??l??await Sn(a.token,{url:e.toString(),reason:"request"});g&&(a.type==="query-parameter"?s.searchParams.set(a.name,g):c.set(a.name,`${a.prefix||""}${g}`),d.push({credential:a,token:g}))}return{url:s.toString(),options:{...t,headers:c},credentials:d}}async function An(e,t,r){let n=ot.get(e);if(n)return n;let o=e.token,s=Promise.resolve(o({url:t,reason:"refresh",response:{status:r.status,headers:r.headers}})).finally(()=>ot.delete(e));return ot.set(e,s),s}async function Sn(e,t){return typeof e=="function"?e(t):e}function Cn(e){try{let t=new URL(e);return["http:","https:"].includes(t.protocol)?t:null}catch{return null}}function ce(e){let t=(e.method||"GET").toUpperCase();return["GET","HEAD","OPTIONS","PUT","DELETE"].includes(t)?!(e.body&&typeof ReadableStream<"u"&&e.body instanceof ReadableStream):!1}var sr,ot,dr=u(()=>{"use strict";nt();sr=Symbol("loaders.gl.authenticated-fetch"),ot=new WeakMap});function it(e){st=e}function at(){return st}function Q(e){for(let t in hr)if(e.startsWith(t)){let r=hr[t];e=e.replace(t,r)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${st}${e}`),e}var st,hr,ct=u(()=>{"use strict";st="",hr={}});function mr(e){return JSON.parse(e)}var Rn,ut,pr=u(()=>{"use strict";Rn="5.0.0-beta.10",ut={dataType:null,batchType:null,name:"JSON",id:"json",module:"json",version:Rn,encoding:"json",format:"json",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:mr,parse:async e=>mr(new TextDecoder().decode(e)),options:{}}});function gr(e){return ur(e)}function yr(e){if(e.loadOptions!==void 0||e.core?.loadOptions!==void 0)throw new Error("Source loadOptions and core.loadOptions were removed. Use core and root loader namespaces directly.");let t={...e};if(e?.core){t.core={...e.core};let r=t.core;for(let n of["type","name","attributions","loaders","onError","loadOptions"])delete r[n];Object.keys(r).length===0&&delete t.core}return t}function Nn(e,t){return e instanceof Error?e:typeof e=="string"?new Error(e):new Error(t)}function v(e){return()=>{throw new Error(`CoreAPI.${e} is unavailable. Use @loaders.gl/core.createDataSourceSync().`)}}function Bn(e,t){let r=t.core?.name;if(r!==void 0){if(typeof r!="string"||!r.trim())throw new Error("Data source name must be a non-empty string.");return r}if(e&&typeof e=="object"){let n=e;if(typeof n.name=="string"&&n.name.trim())return e instanceof Blob?br(n.name):n.name;let o=n.schema?.metadata,s=o instanceof Map?o.get("name"):o?.name;if(typeof s=="string"&&s.trim())return s}if(typeof e=="string")try{let n=new URL(e.replace(/\\/g,"/"),"https://source.invalid/");if(!["data:","blob:"].includes(n.protocol)){let o=n.pathname.split("/").filter(Boolean).pop();if(o){try{o=decodeURIComponent(o)}catch{}return br(o)}}}catch{}return t.core?.type&&t.core.type!=="auto"?t.core.type:"source"}function br(e){let t=e.lastIndexOf(".");return t>0?e.slice(0,t):e}var _n,J,wr=u(()=>{"use strict";Zt();ct();Wt();dr();nt();_n={fetchFile:v("fetchFile"),parse:v("parse"),parseFile:v("parseFile"),parseSync:v("parseSync"),parseInBatches:v("parseInBatches"),load:v("load"),loadInBatches:v("loadInBatches")},J=class e{static defaultOptions={core:{type:"auto",attributions:[],loaders:[],onError:void 0}};optionsType;options;data;url;name;loadOptions;fetch;coreApi;hasCoreApi;_needsRefresh=!0;constructor(t,r,n,o){this.options=ae(ae(e.defaultOptions,n||{}),r),this.data=t,this.url=typeof t=="string"?Q(t):"",this.name=Bn(t,this.options);let s=rt(yr(this.options));this.loadOptions=s;let c=gr(s);this.coreApi=o||_n,this.hasCoreApi=!!o,this.fetch=c}setProps(t){if(t.core?.name!==void 0&&t.core.name!==this.name)throw new Error("Data source names are fixed at creation.");let r=ae(this.options,t),n=rt(yr(r));this.options=r,this.loadOptions=n,this.fetch=gr(n),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(t=!0){let r=this._needsRefresh;return t&&(this._needsRefresh=!1),r}reportError(t,r){let n=Nn(t,r),o=this.options.core?.onError;return o?o(n,this):Ht(this.options).warn(`${this.constructor.name}: ${n.message}`)(),n}}});function lt(e={}){if(e.coordinateEpoch!==void 0&&!Number.isFinite(e.coordinateEpoch))throw new Error("Spatial reference coordinate epoch must be a finite decimal year");return Object.freeze({crs:xr(e.crs||{state:"absent",provenance:"unknown"}),vertical:e.vertical?xr(e.vertical):void 0,coordinateEpoch:e.coordinateEpoch,coordinateFrame:e.coordinateFrame||"unknown",coordinateOrder:Object.freeze([...e.coordinateOrder||[]]),units:e.units?Object.freeze([...e.units]):void 0})}function xr(e){return e.state==="explicit"||e.state==="default"?Object.freeze({...e,definition:Tr(e.definition),alternatives:e.alternatives?Object.freeze(e.alternatives.map(t=>Object.freeze({...t,definition:Tr(t.definition)}))):void 0}):Object.freeze({...e})}function Tr(e){return typeof e=="string"?e:ft(e)}function ft(e){return Array.isArray(e)?Object.freeze(e.map(t=>ft(t))):e&&typeof e=="object"?Object.freeze(Object.fromEntries(Object.entries(e).map(([t,r])=>[t,ft(r)]))):e}var Er=u(()=>{});var Ar=u(()=>{Er()});function dt(e){Dn(e.queryType,e.execution);let t=Object.freeze({fields:Object.freeze(e.schema.fields.map(o=>Object.freeze({...o,metadata:Object.freeze({...o.metadata})}))),metadata:Object.freeze({...e.schema.metadata})}),r=t.fields.map(o=>Object.freeze({name:o.name,type:o.type,nullable:o.nullable!==!1,role:e.columnRoles?.[o.name]||"attribute",title:Sr(o.metadata,"title"),description:Sr(o.metadata,"description"),metadata:o.metadata||Object.freeze({})})),n=Object.freeze({...e.capabilities});return Object.freeze({sourceType:e.sourceType,queryType:e.queryType,execution:Object.freeze({...e.execution}),name:e.name,description:e.description,schema:t,columns:Object.freeze(r),capabilities:n,queryCapabilities:n,spatial:e.spatial?Object.freeze({...e.spatial,bounds:e.spatial.bounds?Object.freeze({minimum:Object.freeze([...e.spatial.bounds.minimum]),maximum:Object.freeze([...e.spatial.bounds.maximum])}):void 0,coordinateReferenceSystems:e.spatial.coordinateReferenceSystems?Object.freeze([...e.spatial.coordinateReferenceSystems]):void 0,spatialReference:e.spatial.spatialReference?lt(e.spatial.spatialReference):void 0}):void 0,statistics:e.statistics?Object.freeze({...e.statistics}):void 0,levels:e.levels?Object.freeze(e.levels.map(o=>Object.freeze({...o,scale:o.scale?Object.freeze([...o.scale]):void 0}))):void 0})}function Dn(e,t){if(t.status==="metadata-only"){if(!t.reason.trim())throw new Error("Metadata-only scan support requires a concrete reason");return}if(!{table:["read","query"],raster:["getRaster"],"point-cloud":["scan"]}[e].includes(t.method))throw new Error(`Scan execution method "${t.method}" is not valid for ${e} queries`)}function Sr(e,t){return e?.[t]||void 0}var Cr=u(()=>{"use strict";Ar()});function ht(e){if(e.width!==void 0&&Rr(e.width,"width"),e.height!==void 0&&Rr(e.height,"height"),e.level!==void 0&&_r(e.level,"level"),e.bounds)for(let t=0;t<2;t++){let r=e.bounds[0][t],n=e.bounds[1][t];if(!Number.isFinite(r)||!Number.isFinite(n)||r>n)throw new Error("Raster query bounds must contain finite, ordered coordinates.")}for(let t of e.channels||[])_r(t,"channel");for(let[t,r]of Object.entries(e.slices||{})){if(!t)throw new Error("Raster query slice names must be non-empty.");if(Array.isArray(r)){if(r.length!==2||!r.every(Number.isFinite)||r[0]>r[1])throw new Error(`Raster query slice ${t} must be an ordered finite range.`)}else if(!Number.isFinite(r))throw new Error(`Raster query slice ${t} must be finite.`)}}function Rr(e,t){if(!Number.isSafeInteger(e)||e<1)throw new Error(`Raster query ${t} must be a positive safe integer.`)}function _r(e,t){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Raster query ${t} must be a non-negative safe integer.`)}var Nr=u(()=>{"use strict"});var mt=u(()=>{"use strict";Dt();Ft();ze();Xt();tr();or();ct();pr();wr();Nr();Cr()});var ue,Br=u(()=>{"use strict";ue=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;textDecoder=new TextDecoder;textEncoder=new TextEncoder;constructor(t=8192,r={}){let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);let o=r.offset?r.offset>>>0:0,s=t.byteLength-o,c=o;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(c=t.byteOffset+o),t=t.buffer),n?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){let n=(this.offset+t)*2,o=new Uint8Array(n);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){let r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=this.readByte();return r}readInt16(){let t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){let t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){let t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){let t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){let t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){let t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let n=0;n<t;n++)r+=this.readChar();return r}readUtf8(t=1){return this.textDecoder.decode(this.readBytes(t))}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++)this._data.setUint8(this.offset++,t[r]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));return this}writeUtf8(t){let r=this.textEncoder.encode(t);return this.writeBytes(r)}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}});function Z(e,t,r){switch(t){case p.BYTE:return e.readBytes(r);case p.CHAR:return Ln(e.readChars(r));case p.SHORT:return fe(r,e.readInt16.bind(e));case p.INT:return fe(r,e.readInt32.bind(e));case p.FLOAT:return fe(r,e.readFloat32.bind(e));case p.DOUBLE:return fe(r,e.readFloat64.bind(e));default:throw new Error(`NetCDF: non valid type ${t}`)}}function pt(e){switch(Number(e)){case p.BYTE:return"byte";case p.CHAR:return"char";case p.SHORT:return"short";case p.INT:return"int";case p.FLOAT:return"float";case p.DOUBLE:return"double";default:return"undefined"}}function Dr(e){switch(Number(e)){case p.BYTE:return 1;case p.CHAR:return 1;case p.SHORT:return 2;case p.INT:return 4;case p.FLOAT:return 4;case p.DOUBLE:return 8;default:return-1}}function gt(e){switch(String(e)){case"byte":return p.BYTE;case"char":return p.CHAR;case"short":return p.SHORT;case"int":return p.INT;case"float":return p.FLOAT;case"double":return p.DOUBLE;default:return-1}}function fe(e,t){if(e!==1){let r=new Array(e);for(let n=0;n<e;n++)r[n]=t();return r}return t()}function Ln(e){return e.charCodeAt(e.length-1)===0?e.substring(0,e.length-1):e}var p,yt=u(()=>{"use strict";p={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6}});function Lr(e,t){let r=e.readUint32(),n=On(e),o=Fr(e),s=Un(e,n.recordId,t);return{version:t,recordDimension:{length:r,id:n.recordId,name:n.recordName,recordStep:s.recordStep},dimensions:n.dimensions,variables:s.variables,attributes:o}}function On(e){let t=e.readUint32();if(t===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of dimensions");return{recordId:0,recordName:"",dimensions:[]}}if(t!==Fn)throw new Error("NetCDF: wrong tag for list of dimensions");let r=e.readUint32(),n=new Array(r),o,s;for(let c=0;c<r;c++){let d=bt(e),m=e.readUint32();m===Pn&&(o=c,s=d),n[c]={name:d,size:m}}return{dimensions:n,recordId:o,recordName:s}}function Fr(e){let t=e.readUint32();if(t===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of attributes");return[]}if(t!==In)throw new Error("NetCDF: wrong tag for list of attributes");let r=e.readUint32(),n=new Array(r);for(let o=0;o<r;o++){let s=bt(e),c=e.readUint32();if(c<1||c>6)throw new Error(`NetCDF: non valid type ${c}`);let d=e.readUint32(),m=Z(e,c,d);vr(e),n[o]={name:s,type:pt(c),value:m}}return n}function Un(e,t,r){let n=e.readUint32(),o=0;if(n===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of variables");return{recordStep:o,variables:[]}}if(n!==vn)throw new Error("NetCDF: wrong tag for list of variables");let s=e.readUint32(),c=new Array(s);for(let d=0;d<s;d++){let m=bt(e),a=e.readUint32(),h=new Array(a);for(let x=0;x<a;x++)h[x]=e.readUint32();let l=Fr(e),f=e.readUint32();if(f<1&&f>6)throw new Error(`NetCDF: non valid type ${f}`);let y=e.readUint32(),g=e.readUint32();if(r===2){if(g>0)throw new Error("NetCDF: offsets larger than 4GB not supported");g=e.readUint32()}let w=!1;typeof t<"u"&&h[0]===t&&(o+=y,w=!0),c[d]={name:m,dimensions:h,attributes:l,type:pt(f),size:y,offset:g,record:w}}return{variables:c,recordStep:o}}function bt(e){let t=e.readUint32(),r=e.readChars(t);return vr(e),r}function vr(e){e.offset%4!==0&&e.skip(4-e.offset%4)}var j,Fn,vn,In,Pn,Ir=u(()=>{"use strict";yt();j=0,Fn=10,vn=11,In=12,Pn=0});function Pr(e,t){let r=gt(t.type),n=t.size/Dr(r),o=new Array(n);for(let s=0;s<n;s++)o[s]=Z(e,r,1);return o}function Or(e,t,r,n){let o=gt(t.type),s=t.dimensions.filter(a=>a!==r.id).reduce((a,h)=>a*n[h].size,1),c=r.length,d=new Array(c),m=r.recordStep;for(let a=0;a<c;a++){let h=e.offset;d[a]=Z(e,o,s),e.seek(h+m)}return d}var Ur=u(()=>{"use strict";yt()});var E,le=u(()=>{"use strict";Br();Ir();Ur();E=class{header;buffer;constructor(t){let r=new ue(t);r.setBigEndian();let n=r.readChars(3);if(n!=="CDF")throw new Error(`NetCDF: file should start with 'CDF', found ${n}`);let o=r.readByte();if(o>2)throw new Error(`NetCDF: unsupported version ${o}`);this.header=Lr(r,o),this.buffer=r}get version(){return this.header.version===1?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get attributes(){return this.header.attributes}get variables(){return this.header.variables}attributeExists(t){return this.attributes.find(n=>n.name===t)!==void 0}getAttribute(t){let r=this.attributes.find(n=>n.name===t);return r?r.value:null}dataVariableExists(t){return this.header.variables.find(function(n){return n.name===t})!==void 0}getDataVariableAsString(t){let r=this.getDataVariable(t);return r?r.join(""):null}getDataVariable(t){let r;if(typeof t=="string"?r=this.header.variables.find(function(n){return n.name===t}):r=t,r===void 0){let n;throw typeof t=="string"?n=t:typeof t=="object"&&(n=JSON.stringify(t)),new Error(`NetCDF: variable not found: ${n}`)}return this.buffer.seek(r.offset),r.record?Or(this.buffer,r,this.header.recordDimension,this.header.dimensions):Pr(this.buffer,r)}toString(){let t=[];t.push("DIMENSIONS");for(let n of this.dimensions)t.push(` ${n.name.padEnd(30)} = size: ${n.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(let n of this.attributes)t.push(` ${n.name.padEnd(30)} = ${n.value}`);let r=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(let n of r){n.value=this.getDataVariable(n);let o=JSON.stringify(n.value);o.length>50&&(o=o.substring(0,50)),Number.isNaN(n.value.length)||(o+=` (length: ${n.value.length})`),t.push(` ${n.name.padEnd(30)} = ${o}`)}return t.join(`
|
|
10
|
-
`)}}});var Y,wt=u(()=>{"use strict";Y={name:"NetCDF",id:"netcdf",module:"netcdf",encoding:"binary",format:"netcdf",extensions:["cdf","nc"],mimeTypes:["application/x-netcdf"],binary:!0}});function kr(e,t){return new xt(e,t)}function kn(e){switch(e.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"int64":return"int64";case"uint64":return"uint64";case"float":return"float32";case"double":return"float64";case"char":case"string":return"utf8";default:return"binary"}}function jn(e){if(e.bounds)throw new Error("NetCDF raster bounds are not supported.");if(e.level!==void 0)throw new Error("NetCDF raster levels are not supported.");if(e.width!==void 0||e.height!==void 0)throw new Error("NetCDF raster resampling is not supported.");if(e.channels?.length)throw new Error("NetCDF uses named variables instead of numeric channels.")}function Mn(e,t){let r=e.variables.find(o=>o.dimensions.length>0&&Wn(o.type)),n=t?.length?[...t]:r?[r.name]:[];if(n.length===0)throw new Error("NetCDF contains no numeric variables that can be read as raster data.");if(new Set(n).size!==n.length)throw new Error("NetCDF raster variables must not contain duplicates.");return n.map(o=>{let s=e.variables.find(c=>c.name===o);if(!s)throw new Error(`NetCDF variable not found: ${o}`);return Tt(s.type),s})}function $n(e,t){let r=new Set(e.dimensions.map(n=>n.name));for(let n of Object.keys(t||{}))if(!r.has(n))throw new Error(`NetCDF dimension not found: ${n}`)}function Hn(e,t,r,n,o){let s=t.map((a,h)=>{let l=r[h],f=n[a];if(f===void 0)return{start:0,stop:l,remove:!1};if(typeof f!="number"){let[y,g]=f;if(!Number.isSafeInteger(y)||!Number.isSafeInteger(g)||y<0||g<y||g>l)throw new Error(`NetCDF slice ${a} must be a valid half-open range within 0..${l}.`);return{start:y,stop:g,remove:!1}}if(!Number.isSafeInteger(f)||f<0||f>=l)throw new Error(`NetCDF slice ${a} must be an index within 0..${l-1}.`);return{start:f,stop:f+1,remove:!0}}),c=r.map((a,h)=>r.slice(h+1).reduce((l,f)=>l*f,1)),d=[],m=(a,h)=>{if(C(o),a===s.length){let f=e[h];if(typeof f!="number")throw new Error("NetCDF raster variables must contain numeric values.");d.push(f);return}let l=s[a];for(let f=l.start;f<l.stop;f++)m(a+1,h+f*c[a])};return m(0,0),{values:d,dimensionNames:t.filter((a,h)=>!s[h].remove),shape:s.map(a=>a.stop-a.start).filter((a,h)=>!s[h].remove)}}function jr(e){return Array.isArray(e)?e.flatMap(jr):ArrayBuffer.isView(e)?Array.from(e):[e]}function Wn(e){try{return Tt(e),!0}catch{return!1}}function Tt(e){switch(e.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"float":return"float32";case"double":return"float64";default:throw new Error(`NetCDF variable type is not supported as raster data: ${e}`)}}function qn(e,t){switch(t){case"int8":return Int8Array.from(e);case"uint8":return Uint8Array.from(e);case"int16":return Int16Array.from(e);case"uint16":return Uint16Array.from(e);case"int32":return Int32Array.from(e);case"uint32":return Uint32Array.from(e);case"float32":return Float32Array.from(e);case"float64":return Float64Array.from(e)}}function zn(e){let t=e.attributes.find(n=>n.name==="_FillValue"||n.name==="missing_value"),r=Number(t?.value);return t&&Number.isFinite(r)?r:null}function Vn(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function Gn(e,t){let n={dimensions:e.dimensions.map(o=>t.dimensions[o]).filter(Boolean).map((o,s)=>`${o.name}[${Et(t,e.dimensions[s])}]`).join(",")};for(let o of e.attributes)n[o.name]=String(o.value);return{name:e.name,type:kn(e.type),nullable:!0,metadata:n}}function Qn(e){let t={};for(let[r,n]of e.dimensions.entries())t[`dimension:${n.name}`]=String(Et(e,r));return t}function Et(e,t){let r=e.dimensions[t];return t===e.recordDimension.id?e.recordDimension.length:r?.size||0}function Jn(e,t){let n=e.headers.get("content-range")?.match(/\/([0-9]+)$/)?.[1];return Number(n||e.headers.get("content-length")||t)}function C(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}var xt,Mr=u(()=>{"use strict";mt();le();xt=class e extends J{static HEADER_RANGE_SIZE=64*1024;static MAX_HEADER_RANGE_SIZE=4*1024*1024;headerPromise=null;rasterQueryCapabilities=Object.freeze({bounds:"unsupported",level:"unsupported",variables:"pushdown",slices:"residual",streaming:!1,cancellation:!0});constructor(t,r={}){super(t,r)}async getQueryMetadata(t={}){C(t.signal);let{header:r,byteLength:n}=await this.getHeader(t.signal);C(t.signal);let s={fields:r.variables.map(c=>Gn(c,r)),metadata:Qn(r)};return dt({sourceType:"netcdf",queryType:"raster",execution:{status:"supported",method:"getRaster"},name:typeof this.data=="string"?this.data.split("/").pop():void 0,schema:s,capabilities:{bounds:"unsupported",levelOfDetail:"unsupported",raster:this.rasterQueryCapabilities},statistics:{byteLength:n,rowCount:r.recordDimension.length||void 0}})}async getRaster(t={}){ht(t),jn(t),C(t.signal);let r=await this.loadReader(t.signal);C(t.signal),$n(r.header,t.slices);let o=Mn(r.header,t.variables).map(a=>{C(t.signal);let h=a.dimensions.map(w=>r.header.dimensions[w]?.name||`dimension_${w}`),l=a.dimensions.map(w=>Et(r.header,w)),f=jr(r.getDataVariable(a)),y=Hn(f,h,l,t.slices||{},t.signal),g=Tt(a.type);return{variable:a,dimensionNames:y.dimensionNames,shape:y.shape,data:qn(y.values,g),dtype:g}}),s=o[0];for(let a of o.slice(1))if(a.dtype!==s.dtype||!Vn(a.shape,s.shape))throw new Error("NetCDF raster variables must retain the same shape and numeric type after slicing.");let c=s.shape.at(-1)??1,d=s.shape.length<2?1:s.shape.slice(0,-1).reduce((a,h)=>a*h,1),m=zn(s.variable);return{data:o.length===1?s.data:o.map(a=>a.data),width:c,height:d,bandCount:o.length,dtype:s.dtype,interleaved:!1,noData:m,metadata:{variables:o.map(a=>a.variable.name),dimensions:s.dimensionNames,shape:s.shape,slices:{...t.slices}}}}async loadReader(t){let r;if(typeof this.data=="string"){let n=await this.fetch(this.url,{signal:t});if(!n.ok)throw new Error(`NetCDF request failed with status ${n.status}.`);r=await n.arrayBuffer()}else r=await this.data.arrayBuffer();return C(t),new E(r)}async getHeader(t){C(t),this.headerPromise||(this.headerPromise=this.loadHeader().catch(n=>{throw this.headerPromise=null,n}));let r=await this.headerPromise;return C(t),r}async loadHeader(){if(typeof this.data!="string"){let s=await this.data.arrayBuffer();return{header:new E(s).header,byteLength:s.byteLength}}let t=e.HEADER_RANGE_SIZE,r=null,n=null,o;for(;t<=e.MAX_HEADER_RANGE_SIZE;){if(r=await this.fetch(this.url,{headers:{Range:`bytes=0-${t-1}`}}),!r.ok)throw new Error(`NetCDF request failed with status ${r.status}.`);n=await r.arrayBuffer();let s=Jn(r,n.byteLength);if(r.status===206&&!r.headers.has("Content-Range")&&n.byteLength===t){let c=await this.fetch(this.url,{method:"HEAD"}),d=c.headers.get("Content-Length");if(await c.body?.cancel(),c.status!==200||!d||!/^\d+$/.test(d)||!Number.isSafeInteger(Number(d))||Number(d)<n.byteLength)throw new Error("NetCDF file size unavailable: expose Content-Range or provide HEAD Content-Length");s=Number(d)}try{return{header:new E(n).header,byteLength:s}}catch(c){if(o=c,r.status!==206||n.byteLength<t)throw c;t*=2}}throw o||new Error("NetCDF header exceeds the maximum metadata range.")}}});var Hr={};Rt(Hr,{NetCDFLoaderWithParser:()=>de,NetCDFWorkerLoaderWithParser:()=>$r});function Kn(e,t){let r=new E(e),n={};if(t?.netcdf?.loadData)for(let o of r.variables)n[o.name]=r.getDataVariable(o);return{loaderData:r.header,data:n}}var Mi,Zn,$i,Yn,$r,de,At=u(()=>{"use strict";Mr();le();he();he();({preload:Mi,...Zn}=I),{preload:$i,...Yn}=I,$r={...Zn},de={createDataSourceSync:kr,...Yn,parse:async(e,t)=>Kn(e,t)}});async function eo(){let{NetCDFLoaderWithParser:e}=await Promise.resolve().then(()=>(At(),Hr));return e}var Xn,I,he=u(()=>{"use strict";wt();Xn="5.0.0-beta.10";I={testURL:e=>/\.(?:cdf|nc)(?:$|[?#])/i.test(e),fromUrl:!0,fromBlob:!0,type:"netcdf",...Y,dataType:null,batchType:null,name:"NetCDF",id:"mvt",module:"scientific",version:Xn,extensions:["cdf","nc"],mimeTypes:["application/netcdf","application/x-netcdf"],category:"image",binary:!0,options:{netcdf:{loadVariables:!1}},preload:eo}});var to={};Rt(to,{FetchError:()=>i.FetchError,JSONLoader:()=>ut,NetCDFFormat:()=>Y,NetCDFLoader:()=>I,NetCDFLoaderWithParser:()=>de,NetCDFReader:()=>E,NullLoader:()=>i.NullLoader,RequestScheduler:()=>k,_BrowserFileSystem:()=>i._BrowserFileSystem,_fetchProgress:()=>i._fetchProgress,_selectSource:()=>i._selectSource,_unregisterLoaders:()=>i._unregisterLoaders,assert:()=>ge,concatenateArrayBuffersAsync:()=>Ye,coreApi:()=>i.coreApi,createDataSource:()=>i.createDataSource,createDataSourceSync:()=>i.createDataSourceSync,document:()=>xe,encode:()=>i.encode,encodeInBatches:()=>i.encodeInBatches,encodeSync:()=>i.encodeSync,encodeTable:()=>i.encodeTable,encodeTableAsText:()=>i.encodeTableAsText,encodeTableInBatches:()=>i.encodeTableInBatches,encodeText:()=>i.encodeText,encodeTextSync:()=>i.encodeTextSync,encodeURLtoURL:()=>i.encodeURLtoURL,fetchFile:()=>i.fetchFile,forEach:()=>Ze,getLoaderOptions:()=>i.getLoaderOptions,getPathPrefix:()=>at,global:()=>we,isAsyncIterable:()=>Me,isBrowser:()=>Te,isIterable:()=>je,isIterator:()=>$e,isPromise:()=>ke,isPureObject:()=>V,isReadableStream:()=>We,isResponse:()=>He,isWorker:()=>Ee,isWritableStream:()=>qe,load:()=>i.load,loadInBatches:()=>i.loadInBatches,makeIterator:()=>i.makeIterator,makeLineIterator:()=>Qe,makeNumberedLineIterator:()=>Je,makeStream:()=>i.makeStream,makeTextDecoderIterator:()=>Ve,makeTextEncoderIterator:()=>Ge,parse:()=>i.parse,parseFile:()=>i.parseFile,parseInBatches:()=>i.parseInBatches,parseSync:()=>i.parseSync,preload:()=>i.preload,preloadSync:()=>i.preloadSync,readArrayBuffer:()=>i.readArrayBuffer,registerLoaders:()=>i.registerLoaders,resolvePath:()=>Q,selectLoader:()=>i.selectLoader,selectLoaderSync:()=>i.selectLoaderSync,self:()=>ye,setLoaderOptions:()=>i.setLoaderOptions,setPathPrefix:()=>it,window:()=>be});var i=Zr(Bt(),1);mt();le();wt();he();At();return Yr(to);})();
|
|
9
|
+
`)}}t.length>0&&(yield t)}async function*Je(e){let t=1;for await(let r of e)yield{counter:t,line:r},t++}var Xt=u(()=>{"use strict"});async function Ze(e,t){let r=mn(e);for(;;){let{done:n,value:o}=await r.next();if(n){r.return&&r.return();return}if(t(o))return}}async function Ye(e){let t=[];for await(let r of e)t.push(hn(r));return Yt(...t)}function hn(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return er(t,r,n)}return er(e)}function er(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);return o.set(n),o.buffer}function mn(e){if(typeof e[Symbol.asyncIterator]=="function")return e[Symbol.asyncIterator]();if(typeof e[Symbol.iterator]=="function"){let t=e[Symbol.iterator]();return pn(t)}return e}function pn(e){return{next(t){return Promise.resolve(e.next(t))},return(t){return typeof e.return=="function"?Promise.resolve(e.return(t)):Promise.resolve({done:!0,value:t})},throw(t){return typeof e.throw=="function"?Promise.resolve(e.throw(t)):Promise.reject(t)}}}var tr=u(()=>{"use strict";Kt()});function G(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}var Ke=u(()=>{});var F,Xe=u(()=>{Ke();F=class{constructor(t,r){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=t,this.type=r,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(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=G(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(G()-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 U,rr=u(()=>{Xe();U=class{constructor(t){this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t,r="count"){return this._getOrCreate({name:t,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let t of Object.values(this.stats))t.reset();return this}forEach(t){for(let r of Object.values(this.stats))t(r)}getTable(){let t={};return this.forEach(r=>{t[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,o=this.stats[r];return o||(t instanceof F?o=t:o=new F(r,n),this.stats[r]=o),o}}});var nr=u(()=>{rr();Xe();Ke()});var gn,yn,bn,wn,xn,En,k,or=u(()=>{"use strict";nr();gn="Queued Requests",yn="Active Requests",bn="Cancelled Requests",wn="Queued Requests Ever",xn="Active Requests Ever",En={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},k=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(t={}){this.props={...En,...t},this.stats=new U({id:this.props.id}),this.stats.get(gn),this.stats.get(yn),this.stats.get(bn),this.stats.get(wn),this.stats.get(xn)}setProps(t){t.throttleRequests!==void 0&&(this.props.throttleRequests=t.throttleRequests),t.maxRequests!==void 0&&(this.props.maxRequests=t.maxRequests),t.debounceTime!==void 0&&(this.props.debounceTime=t.debounceTime)}scheduleRequest(t,r=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);let n={handle:t,priority:0,getPriority:r},o=new Promise(s=>(n.resolve=s,n));return this.requestQueue.push(n),this.requestMap.set(t,o),this._issueNewRequests(),o}_issueRequest(t){let{handle:r,resolve:n}=t,o=!1,s=()=>{o||(o=!0,this.requestMap.delete(r),this.activeRequestCount--,this.scheduleRefill())};return this.activeRequestCount++,n?n({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 t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(t!==0){this._updateAllRequests();for(let r=0;r<t;++r){let n=this.requestQueue.shift();n&&this._issueRequest(n)}}}_updateAllRequests(){let t=this.requestQueue;for(let r=0;r<t.length;++r){let n=t[r];this._updateRequest(n)||(t.splice(r,1),this.requestMap.delete(n.handle),r--)}t.sort((r,n)=>r.priority-n.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),t.priority<0?(t.resolve(null),!1):!0}}});function tt(e,t=[]){return e.every(et)?e:e.map((r,n)=>{if(et(r))return r;let o=t.find(c=>c.type===r?.type);if(!o)throw new Error(`No authentication class registered for credential at index ${n}.`);let s;try{s=new o(r)}catch{throw new Error(`Invalid authentication configuration at index ${n}.`)}if(!et(s))throw new Error(`Authentication class returned an invalid credential at index ${n}.`);return s})}function rt(e){if(!e.core?.credentials?.length)return e;let t=tt(e.core.credentials,e.core.authentications);return t===e.core.credentials?e:{...e,core:{...e.core,credentials:t}}}function et(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 nt=u(()=>{"use strict"});function Tn(e){let t=e.fetch||((l,f)=>fetch(l,f)),r=t[sr],n=new Map(r?.credentialResolutions),o=tt(e.credentials.map(l=>n.get(l)||l),e.authentications);if(e.credentials.forEach((l,f)=>{n.set(l,o[f])}),!e.fetchOptions&&(!o.length||r?.credentials.length===o.length&&o.every((l,f)=>l===r.credentials[f])))return t;let s=r?.fetch||t,c=r?[...new Set([...o,...r.credentials])]:o,d=ir(r?.fetchOptions||{},e.fetchOptions),m=c.filter(l=>l.type!=="request"),a=c.filter(l=>l.type==="request");for(let l of a)lr(l.origins);let h=async(l,f={})=>{if(f=ir(d,f),f.signal?.throwIfAborted(),!c.length)return s(l,f);let y=Rn(l),g=y?await cr(y,f,m):{url:l,options:f,credentials:[]},w=await ar(g,a,"request"),x=await s(w.url,w.options),me=[];for(let D of g.credentials){let{credential:C}=D;typeof C.token=="function"&&(ce(f)||C.canReplayRequest?.(l,f))&&(ce(w.options)||C.canReplayRequest?.(w.url,w.options))&&(C.refreshStatusCodes.includes(x.status)||await C.shouldRefresh?.(x))&&me.push(D)}let St=ce(f)&&ce(w.options)&&w.credentials.some(D=>D.refreshStatusCodes?.includes(x.status));if(!me.length&&!St)return x;f.signal?.throwIfAborted();let pe=new Map;if(await Promise.all(me.map(async({credential:D})=>{let C=await An(D,l,x);C&&pe.set(D,C)})),!pe.size&&!St)return x;await x.body?.cancel().catch(()=>{}),f.signal?.throwIfAborted();let Hr=y?await cr(y,f,m,pe,g.credentials):{url:l,options:f},Rt=await ar(Hr,a,"retry",x);return s(Rt.url,Rt.options)};return Object.defineProperty(h,sr,{value:{fetch:s,credentials:c,credentialResolutions:n,fetchOptions:d}}),h}function ur(e={}){let t=e.core?.fetch,r;typeof t=="function"?r=t:r=(o,s)=>fetch(o,s);let n=typeof t=="object"&&t?t:void 0;return Tn({fetch:r,fetchOptions:e.signal?{...n,signal:e.signal}:n,credentials:e.core?.credentials||[],authentications:e.core?.authentications})}function ir(e,t){let r={...e,...t};if(e.headers||t?.headers){let n=new Headers(e.headers);new Headers(t?.headers).forEach((o,s)=>n.set(s,o)),r.headers=n}return r}async function ar(e,t,r,n){let o=[],s=e.options.signal;for(let c of t){let d=fr(e.url);if(!d||!lr(c.origins).includes(d))continue;s?.throwIfAborted();let m=await c.authenticate({url:e.url,options:{...e.options,headers:new Headers(e.options.headers)},reason:r,response:n?{status:n.status,headers:new Headers(n.headers)}:void 0});if(!m||typeof m.url!="string"||!m.options||typeof m.options!="object")throw new Error("Authentication callback returned an invalid request.");e={url:m.url,options:{...m.options,...s?{signal:s}:{}}},o.push(c)}return s?.throwIfAborted(),{...e,credentials:o}}function fr(e){try{let t=new URL(e);return!t.host||t.username||t.password?null:t.origin!=="null"?t.origin:`${t.protocol}//${t.host}`}catch{return null}}function lr(e){if(!e.length)throw new Error("Request authentication requires at least one exact origin.");return e.map(t=>{let r=fr(t),n;try{n=new URL(t)}catch{throw new Error("Invalid request authentication origin.")}if(!r||n.pathname&&n.pathname!=="/"||n.search||n.hash)throw new Error("Invalid request authentication origin.");return r})}async function cr(e,t,r,n=new Map,o=[]){let s=new URL(e),c=new Headers(t.headers),d=[],m=new Map(o.map(({credential:a,token:h})=>[a,h]));for(let a of r){if(!a.origins.includes(s.origin))continue;let h=n.get(a),l=m.get(a),f=a.type==="query-parameter"&&l!==void 0,y=a.type==="header"&&l!==void 0;if(a.type==="query-parameter"&&s.searchParams.has(a.name)&&!f||a.type==="header"&&c.has(a.name)&&!y)continue;let g=h??l??await Sn(a.token,{url:e.toString(),reason:"request"});g&&(a.type==="query-parameter"?s.searchParams.set(a.name,g):c.set(a.name,`${a.prefix||""}${g}`),d.push({credential:a,token:g}))}return{url:s.toString(),options:{...t,headers:c},credentials:d}}async function An(e,t,r){let n=ot.get(e);if(n)return n;let o=e.token,s=Promise.resolve(o({url:t,reason:"refresh",response:{status:r.status,headers:r.headers}})).finally(()=>ot.delete(e));return ot.set(e,s),s}async function Sn(e,t){return typeof e=="function"?e(t):e}function Rn(e){try{let t=new URL(e);return["http:","https:"].includes(t.protocol)?t:null}catch{return null}}function ce(e){let t=(e.method||"GET").toUpperCase();return["GET","HEAD","OPTIONS","PUT","DELETE"].includes(t)?!(e.body&&typeof ReadableStream<"u"&&e.body instanceof ReadableStream):!1}var sr,ot,dr=u(()=>{"use strict";nt();sr=Symbol("loaders.gl.authenticated-fetch"),ot=new WeakMap});function it(e){st=e}function at(){return st}function Q(e){for(let t in hr)if(e.startsWith(t)){let r=hr[t];e=e.replace(t,r)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${st}${e}`),e}var st,hr,ct=u(()=>{"use strict";st="",hr={}});function mr(e){return JSON.parse(e)}var Cn,ut,pr=u(()=>{"use strict";Cn="5.0.0-beta.11",ut={dataType:null,batchType:null,name:"JSON",id:"json",module:"json",version:Cn,encoding:"json",format:"json",extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:mr,parse:async e=>mr(new TextDecoder().decode(e)),options:{}}});function gr(e){return ur(e)}function yr(e){if(e.loadOptions!==void 0||e.core?.loadOptions!==void 0)throw new Error("Source loadOptions and core.loadOptions were removed. Use core and root loader namespaces directly.");let t={...e};if(e?.core){t.core={...e.core};let r=t.core;for(let n of["type","name","attributions","loaders","onError","loadOptions"])delete r[n];Object.keys(r).length===0&&delete t.core}return t}function Nn(e,t){return e instanceof Error?e:typeof e=="string"?new Error(e):new Error(t)}function v(e){return()=>{throw new Error(`CoreAPI.${e} is unavailable. Use @loaders.gl/core.createDataSourceSync().`)}}function Bn(e,t){let r=t.core?.name;if(r!==void 0){if(typeof r!="string"||!r.trim())throw new Error("Data source name must be a non-empty string.");return r}if(e&&typeof e=="object"){let n=e;if(typeof n.name=="string"&&n.name.trim())return e instanceof Blob?br(n.name):n.name;let o=n.schema?.metadata,s=o instanceof Map?o.get("name"):o?.name;if(typeof s=="string"&&s.trim())return s}if(typeof e=="string")try{let n=new URL(e.replace(/\\/g,"/"),"https://source.invalid/");if(!["data:","blob:"].includes(n.protocol)){let o=n.pathname.split("/").filter(Boolean).pop();if(o){try{o=decodeURIComponent(o)}catch{}return br(o)}}}catch{}return t.core?.type&&t.core.type!=="auto"?t.core.type:"source"}function br(e){let t=e.lastIndexOf(".");return t>0?e.slice(0,t):e}var _n,J,wr=u(()=>{"use strict";Zt();ct();Ht();dr();nt();_n={fetchFile:v("fetchFile"),parse:v("parse"),parseFile:v("parseFile"),parseSync:v("parseSync"),parseInBatches:v("parseInBatches"),load:v("load"),loadInBatches:v("loadInBatches")},J=class e{static defaultOptions={core:{type:"auto",attributions:[],loaders:[],onError:void 0}};optionsType;options;data;url;name;loadOptions;fetch;coreApi;hasCoreApi;_needsRefresh=!0;constructor(t,r,n,o){this.options=ae(ae(e.defaultOptions,n||{}),r),this.data=t,this.url=typeof t=="string"?Q(t):"",this.name=Bn(t,this.options);let s=rt(yr(this.options));this.loadOptions=s;let c=gr(s);this.coreApi=o||_n,this.hasCoreApi=!!o,this.fetch=c}setProps(t){if(t.core?.name!==void 0&&t.core.name!==this.name)throw new Error("Data source names are fixed at creation.");let r=ae(this.options,t),n=rt(yr(r));this.options=r,this.loadOptions=n,this.fetch=gr(n),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(t=!0){let r=this._needsRefresh;return t&&(this._needsRefresh=!1),r}reportError(t,r){let n=Nn(t,r),o=this.options.core?.onError;return o?o(n,this):$t(this.options).warn(`${this.constructor.name}: ${n.message}`)(),n}}});function lt(e={}){if(e.coordinateEpoch!==void 0&&!Number.isFinite(e.coordinateEpoch))throw new Error("Spatial reference coordinate epoch must be a finite decimal year");return Object.freeze({crs:xr(e.crs||{state:"absent",provenance:"unknown"}),vertical:e.vertical?xr(e.vertical):void 0,coordinateEpoch:e.coordinateEpoch,coordinateFrame:e.coordinateFrame||"unknown",coordinateOrder:Object.freeze([...e.coordinateOrder||[]]),units:e.units?Object.freeze([...e.units]):void 0})}function xr(e){return e.state==="explicit"||e.state==="default"?Object.freeze({...e,definition:Er(e.definition),alternatives:e.alternatives?Object.freeze(e.alternatives.map(t=>Object.freeze({...t,definition:Er(t.definition)}))):void 0}):Object.freeze({...e})}function Er(e){return typeof e=="string"?e:ft(e)}function ft(e){return Array.isArray(e)?Object.freeze(e.map(t=>ft(t))):e&&typeof e=="object"?Object.freeze(Object.fromEntries(Object.entries(e).map(([t,r])=>[t,ft(r)]))):e}var Tr=u(()=>{});var Ar=u(()=>{Tr()});function dt(e){Dn(e.queryType,e.execution);let t=Object.freeze({fields:Object.freeze(e.schema.fields.map(o=>Object.freeze({...o,metadata:Object.freeze({...o.metadata})}))),metadata:Object.freeze({...e.schema.metadata})}),r=t.fields.map(o=>Object.freeze({name:o.name,type:o.type,nullable:o.nullable!==!1,role:e.columnRoles?.[o.name]||"attribute",title:Sr(o.metadata,"title"),description:Sr(o.metadata,"description"),metadata:o.metadata||Object.freeze({})})),n=Object.freeze({...e.capabilities});return Object.freeze({sourceType:e.sourceType,queryType:e.queryType,execution:Object.freeze({...e.execution}),name:e.name,description:e.description,schema:t,columns:Object.freeze(r),capabilities:n,queryCapabilities:n,...e.hasDefaultRowWindow?{hasDefaultRowWindow:!0}:{},spatial:e.spatial?Object.freeze({...e.spatial,bounds:e.spatial.bounds?Object.freeze({minimum:Object.freeze([...e.spatial.bounds.minimum]),maximum:Object.freeze([...e.spatial.bounds.maximum])}):void 0,coordinateReferenceSystems:e.spatial.coordinateReferenceSystems?Object.freeze([...e.spatial.coordinateReferenceSystems]):void 0,spatialReference:e.spatial.spatialReference?lt(e.spatial.spatialReference):void 0}):void 0,statistics:e.statistics?Object.freeze({...e.statistics}):void 0,levels:e.levels?Object.freeze(e.levels.map(o=>Object.freeze({...o,scale:o.scale?Object.freeze([...o.scale]):void 0}))):void 0})}function Dn(e,t){if(t.status==="metadata-only"){if(!t.reason.trim())throw new Error("Metadata-only scan support requires a concrete reason");return}if(!{table:["read","query"],raster:["getRaster"],"point-cloud":["scan"]}[e].includes(t.method))throw new Error(`Scan execution method "${t.method}" is not valid for ${e} queries`)}function Sr(e,t){return e?.[t]||void 0}var Rr=u(()=>{"use strict";Ar()});function ht(e){if(e.width!==void 0&&Cr(e.width,"width"),e.height!==void 0&&Cr(e.height,"height"),e.level!==void 0&&_r(e.level,"level"),e.bounds)for(let t=0;t<2;t++){let r=e.bounds[0][t],n=e.bounds[1][t];if(!Number.isFinite(r)||!Number.isFinite(n)||r>n)throw new Error("Raster query bounds must contain finite, ordered coordinates.")}for(let t of e.channels||[])_r(t,"channel");for(let[t,r]of Object.entries(e.slices||{})){if(!t)throw new Error("Raster query slice names must be non-empty.");if(Array.isArray(r)){if(r.length!==2||!r.every(Number.isFinite)||r[0]>r[1])throw new Error(`Raster query slice ${t} must be an ordered finite range.`)}else if(!Number.isFinite(r))throw new Error(`Raster query slice ${t} must be finite.`)}}function Cr(e,t){if(!Number.isSafeInteger(e)||e<1)throw new Error(`Raster query ${t} must be a positive safe integer.`)}function _r(e,t){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Raster query ${t} must be a non-negative safe integer.`)}var Nr=u(()=>{"use strict"});var mt=u(()=>{"use strict";Dt();Ft();ze();Xt();tr();or();ct();pr();wr();Nr();Rr()});var ue,Br=u(()=>{"use strict";ue=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;textDecoder=new TextDecoder;textEncoder=new TextEncoder;constructor(t=8192,r={}){let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);let o=r.offset?r.offset>>>0:0,s=t.byteLength-o,c=o;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(c=t.byteOffset+o),t=t.buffer),n?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){let n=(this.offset+t)*2,o=new Uint8Array(n);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){let r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=this.readByte();return r}readInt16(){let t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){let t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){let t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){let t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){let t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){let t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let n=0;n<t;n++)r+=this.readChar();return r}readUtf8(t=1){return this.textDecoder.decode(this.readBytes(t))}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++)this._data.setUint8(this.offset++,t[r]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));return this}writeUtf8(t){let r=this.textEncoder.encode(t);return this.writeBytes(r)}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}});function Z(e,t,r){switch(t){case p.BYTE:return e.readBytes(r);case p.CHAR:return Ln(e.readChars(r));case p.SHORT:return fe(r,e.readInt16.bind(e));case p.INT:return fe(r,e.readInt32.bind(e));case p.FLOAT:return fe(r,e.readFloat32.bind(e));case p.DOUBLE:return fe(r,e.readFloat64.bind(e));default:throw new Error(`NetCDF: non valid type ${t}`)}}function pt(e){switch(Number(e)){case p.BYTE:return"byte";case p.CHAR:return"char";case p.SHORT:return"short";case p.INT:return"int";case p.FLOAT:return"float";case p.DOUBLE:return"double";default:return"undefined"}}function Dr(e){switch(Number(e)){case p.BYTE:return 1;case p.CHAR:return 1;case p.SHORT:return 2;case p.INT:return 4;case p.FLOAT:return 4;case p.DOUBLE:return 8;default:return-1}}function gt(e){switch(String(e)){case"byte":return p.BYTE;case"char":return p.CHAR;case"short":return p.SHORT;case"int":return p.INT;case"float":return p.FLOAT;case"double":return p.DOUBLE;default:return-1}}function fe(e,t){if(e!==1){let r=new Array(e);for(let n=0;n<e;n++)r[n]=t();return r}return t()}function Ln(e){return e.charCodeAt(e.length-1)===0?e.substring(0,e.length-1):e}var p,yt=u(()=>{"use strict";p={BYTE:1,CHAR:2,SHORT:3,INT:4,FLOAT:5,DOUBLE:6}});function Lr(e,t){let r=e.readUint32(),n=On(e),o=Fr(e),s=Un(e,n.recordId,t);return{version:t,recordDimension:{length:r,id:n.recordId,name:n.recordName,recordStep:s.recordStep},dimensions:n.dimensions,variables:s.variables,attributes:o}}function On(e){let t=e.readUint32();if(t===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of dimensions");return{recordId:0,recordName:"",dimensions:[]}}if(t!==Fn)throw new Error("NetCDF: wrong tag for list of dimensions");let r=e.readUint32(),n=new Array(r),o,s;for(let c=0;c<r;c++){let d=bt(e),m=e.readUint32();m===Pn&&(o=c,s=d),n[c]={name:d,size:m}}return{dimensions:n,recordId:o,recordName:s}}function Fr(e){let t=e.readUint32();if(t===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of attributes");return[]}if(t!==In)throw new Error("NetCDF: wrong tag for list of attributes");let r=e.readUint32(),n=new Array(r);for(let o=0;o<r;o++){let s=bt(e),c=e.readUint32();if(c<1||c>6)throw new Error(`NetCDF: non valid type ${c}`);let d=e.readUint32(),m=Z(e,c,d);vr(e),n[o]={name:s,type:pt(c),value:m}}return n}function Un(e,t,r){let n=e.readUint32(),o=0;if(n===j){if(e.readUint32()!==j)throw new Error("NetCDF: wrong empty tag for list of variables");return{recordStep:o,variables:[]}}if(n!==vn)throw new Error("NetCDF: wrong tag for list of variables");let s=e.readUint32(),c=new Array(s);for(let d=0;d<s;d++){let m=bt(e),a=e.readUint32(),h=new Array(a);for(let x=0;x<a;x++)h[x]=e.readUint32();let l=Fr(e),f=e.readUint32();if(f<1&&f>6)throw new Error(`NetCDF: non valid type ${f}`);let y=e.readUint32(),g=e.readUint32();if(r===2){if(g>0)throw new Error("NetCDF: offsets larger than 4GB not supported");g=e.readUint32()}let w=!1;typeof t<"u"&&h[0]===t&&(o+=y,w=!0),c[d]={name:m,dimensions:h,attributes:l,type:pt(f),size:y,offset:g,record:w}}return{variables:c,recordStep:o}}function bt(e){let t=e.readUint32(),r=e.readChars(t);return vr(e),r}function vr(e){e.offset%4!==0&&e.skip(4-e.offset%4)}var j,Fn,vn,In,Pn,Ir=u(()=>{"use strict";yt();j=0,Fn=10,vn=11,In=12,Pn=0});function Pr(e,t){let r=gt(t.type),n=t.size/Dr(r),o=new Array(n);for(let s=0;s<n;s++)o[s]=Z(e,r,1);return o}function Or(e,t,r,n){let o=gt(t.type),s=t.dimensions.filter(a=>a!==r.id).reduce((a,h)=>a*n[h].size,1),c=r.length,d=new Array(c),m=r.recordStep;for(let a=0;a<c;a++){let h=e.offset;d[a]=Z(e,o,s),e.seek(h+m)}return d}var Ur=u(()=>{"use strict";yt()});var T,le=u(()=>{"use strict";Br();Ir();Ur();T=class{header;buffer;constructor(t){let r=new ue(t);r.setBigEndian();let n=r.readChars(3);if(n!=="CDF")throw new Error(`NetCDF: file should start with 'CDF', found ${n}`);let o=r.readByte();if(o>2)throw new Error(`NetCDF: unsupported version ${o}`);this.header=Lr(r,o),this.buffer=r}get version(){return this.header.version===1?"classic format":"64-bit offset format"}get recordDimension(){return this.header.recordDimension}get dimensions(){return this.header.dimensions}get attributes(){return this.header.attributes}get variables(){return this.header.variables}attributeExists(t){return this.attributes.find(n=>n.name===t)!==void 0}getAttribute(t){let r=this.attributes.find(n=>n.name===t);return r?r.value:null}dataVariableExists(t){return this.header.variables.find(function(n){return n.name===t})!==void 0}getDataVariableAsString(t){let r=this.getDataVariable(t);return r?r.join(""):null}getDataVariable(t){let r;if(typeof t=="string"?r=this.header.variables.find(function(n){return n.name===t}):r=t,r===void 0){let n;throw typeof t=="string"?n=t:typeof t=="object"&&(n=JSON.stringify(t)),new Error(`NetCDF: variable not found: ${n}`)}return this.buffer.seek(r.offset),r.record?Or(this.buffer,r,this.header.recordDimension,this.header.dimensions):Pr(this.buffer,r)}toString(){let t=[];t.push("DIMENSIONS");for(let n of this.dimensions)t.push(` ${n.name.padEnd(30)} = size: ${n.size}`);t.push(""),t.push("GLOBAL ATTRIBUTES");for(let n of this.attributes)t.push(` ${n.name.padEnd(30)} = ${n.value}`);let r=JSON.parse(JSON.stringify(this.variables));t.push(""),t.push("VARIABLES:");for(let n of r){n.value=this.getDataVariable(n);let o=JSON.stringify(n.value);o.length>50&&(o=o.substring(0,50)),Number.isNaN(n.value.length)||(o+=` (length: ${n.value.length})`),t.push(` ${n.name.padEnd(30)} = ${o}`)}return t.join(`
|
|
10
|
+
`)}}});var Y,wt=u(()=>{"use strict";Y={name:"NetCDF",id:"netcdf",module:"netcdf",encoding:"binary",format:"netcdf",extensions:["cdf","nc"],mimeTypes:["application/x-netcdf"],binary:!0}});function kr(e,t){return new xt(e,t)}function kn(e){switch(e.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"int64":return"int64";case"uint64":return"uint64";case"float":return"float32";case"double":return"float64";case"char":case"string":return"utf8";default:return"binary"}}function jn(e){if(e.bounds)throw new Error("NetCDF raster bounds are not supported.");if(e.level!==void 0)throw new Error("NetCDF raster levels are not supported.");if(e.width!==void 0||e.height!==void 0)throw new Error("NetCDF raster resampling is not supported.");if(e.channels?.length)throw new Error("NetCDF uses named variables instead of numeric channels.")}function Mn(e,t){let r=e.variables.find(o=>o.dimensions.length>0&&Hn(o.type)),n=t?.length?[...t]:r?[r.name]:[];if(n.length===0)throw new Error("NetCDF contains no numeric variables that can be read as raster data.");if(new Set(n).size!==n.length)throw new Error("NetCDF raster variables must not contain duplicates.");return n.map(o=>{let s=e.variables.find(c=>c.name===o);if(!s)throw new Error(`NetCDF variable not found: ${o}`);return Et(s.type),s})}function Wn(e,t){let r=new Set(e.dimensions.map(n=>n.name));for(let n of Object.keys(t||{}))if(!r.has(n))throw new Error(`NetCDF dimension not found: ${n}`)}function $n(e,t,r,n,o){let s=t.map((a,h)=>{let l=r[h],f=n[a];if(f===void 0)return{start:0,stop:l,remove:!1};if(typeof f!="number"){let[y,g]=f;if(!Number.isSafeInteger(y)||!Number.isSafeInteger(g)||y<0||g<y||g>l)throw new Error(`NetCDF slice ${a} must be a valid half-open range within 0..${l}.`);return{start:y,stop:g,remove:!1}}if(!Number.isSafeInteger(f)||f<0||f>=l)throw new Error(`NetCDF slice ${a} must be an index within 0..${l-1}.`);return{start:f,stop:f+1,remove:!0}}),c=r.map((a,h)=>r.slice(h+1).reduce((l,f)=>l*f,1)),d=[],m=(a,h)=>{if(R(o),a===s.length){let f=e[h];if(typeof f!="number")throw new Error("NetCDF raster variables must contain numeric values.");d.push(f);return}let l=s[a];for(let f=l.start;f<l.stop;f++)m(a+1,h+f*c[a])};return m(0,0),{values:d,dimensionNames:t.filter((a,h)=>!s[h].remove),shape:s.map(a=>a.stop-a.start).filter((a,h)=>!s[h].remove)}}function jr(e){return Array.isArray(e)?e.flatMap(jr):ArrayBuffer.isView(e)?Array.from(e):[e]}function Hn(e){try{return Et(e),!0}catch{return!1}}function Et(e){switch(e.toLowerCase()){case"byte":return"int8";case"ubyte":return"uint8";case"short":return"int16";case"ushort":return"uint16";case"int":return"int32";case"uint":return"uint32";case"float":return"float32";case"double":return"float64";default:throw new Error(`NetCDF variable type is not supported as raster data: ${e}`)}}function qn(e,t){switch(t){case"int8":return Int8Array.from(e);case"uint8":return Uint8Array.from(e);case"int16":return Int16Array.from(e);case"uint16":return Uint16Array.from(e);case"int32":return Int32Array.from(e);case"uint32":return Uint32Array.from(e);case"float32":return Float32Array.from(e);case"float64":return Float64Array.from(e)}}function zn(e){let t=e.attributes.find(n=>n.name==="_FillValue"||n.name==="missing_value"),r=Number(t?.value);return t&&Number.isFinite(r)?r:null}function Vn(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function Gn(e,t){let n={dimensions:e.dimensions.map(o=>t.dimensions[o]).filter(Boolean).map((o,s)=>`${o.name}[${Tt(t,e.dimensions[s])}]`).join(",")};for(let o of e.attributes)n[o.name]=String(o.value);return{name:e.name,type:kn(e.type),nullable:!0,metadata:n}}function Qn(e){let t={};for(let[r,n]of e.dimensions.entries())t[`dimension:${n.name}`]=String(Tt(e,r));return t}function Tt(e,t){let r=e.dimensions[t];return t===e.recordDimension.id?e.recordDimension.length:r?.size||0}function Jn(e,t){let n=e.headers.get("content-range")?.match(/\/([0-9]+)$/)?.[1];return Number(n||e.headers.get("content-length")||t)}function R(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}var xt,Mr=u(()=>{"use strict";mt();le();xt=class e extends J{static HEADER_RANGE_SIZE=64*1024;static MAX_HEADER_RANGE_SIZE=4*1024*1024;headerPromise=null;rasterQueryCapabilities=Object.freeze({bounds:"unsupported",level:"unsupported",variables:"pushdown",slices:"residual",streaming:!1,cancellation:!0});constructor(t,r={}){super(t,r)}async getQueryMetadata(t={}){R(t.signal);let{header:r,byteLength:n}=await this.getHeader(t.signal);R(t.signal);let s={fields:r.variables.map(c=>Gn(c,r)),metadata:Qn(r)};return dt({sourceType:"netcdf",queryType:"raster",execution:{status:"supported",method:"getRaster"},name:typeof this.data=="string"?this.data.split("/").pop():void 0,schema:s,capabilities:{bounds:"unsupported",levelOfDetail:"unsupported",raster:this.rasterQueryCapabilities},statistics:{byteLength:n,rowCount:r.recordDimension.length||void 0}})}async getRaster(t={}){ht(t),jn(t),R(t.signal);let r=await this.loadReader(t.signal);R(t.signal),Wn(r.header,t.slices);let o=Mn(r.header,t.variables).map(a=>{R(t.signal);let h=a.dimensions.map(w=>r.header.dimensions[w]?.name||`dimension_${w}`),l=a.dimensions.map(w=>Tt(r.header,w)),f=jr(r.getDataVariable(a)),y=$n(f,h,l,t.slices||{},t.signal),g=Et(a.type);return{variable:a,dimensionNames:y.dimensionNames,shape:y.shape,data:qn(y.values,g),dtype:g}}),s=o[0];for(let a of o.slice(1))if(a.dtype!==s.dtype||!Vn(a.shape,s.shape))throw new Error("NetCDF raster variables must retain the same shape and numeric type after slicing.");let c=s.shape.at(-1)??1,d=s.shape.length<2?1:s.shape.slice(0,-1).reduce((a,h)=>a*h,1),m=zn(s.variable);return{data:o.length===1?s.data:o.map(a=>a.data),width:c,height:d,bandCount:o.length,dtype:s.dtype,interleaved:!1,noData:m,metadata:{variables:o.map(a=>a.variable.name),dimensions:s.dimensionNames,shape:s.shape,slices:{...t.slices}}}}async loadReader(t){let r;if(typeof this.data=="string"){let n=await this.fetch(this.url,{signal:t});if(!n.ok)throw new Error(`NetCDF request failed with status ${n.status}.`);r=await n.arrayBuffer()}else r=await this.data.arrayBuffer();return R(t),new T(r)}async getHeader(t){R(t),this.headerPromise||(this.headerPromise=this.loadHeader().catch(n=>{throw this.headerPromise=null,n}));let r=await this.headerPromise;return R(t),r}async loadHeader(){if(typeof this.data!="string"){let s=await this.data.arrayBuffer();return{header:new T(s).header,byteLength:s.byteLength}}let t=e.HEADER_RANGE_SIZE,r=null,n=null,o;for(;t<=e.MAX_HEADER_RANGE_SIZE;){if(r=await this.fetch(this.url,{headers:{Range:`bytes=0-${t-1}`}}),!r.ok)throw new Error(`NetCDF request failed with status ${r.status}.`);n=await r.arrayBuffer();let s=Jn(r,n.byteLength);if(r.status===206&&!r.headers.has("Content-Range")&&n.byteLength===t){let c=await this.fetch(this.url,{method:"HEAD"}),d=c.headers.get("Content-Length");if(await c.body?.cancel(),c.status!==200||!d||!/^\d+$/.test(d)||!Number.isSafeInteger(Number(d))||Number(d)<n.byteLength)throw new Error("NetCDF file size unavailable: expose Content-Range or provide HEAD Content-Length");s=Number(d)}try{return{header:new T(n).header,byteLength:s}}catch(c){if(o=c,r.status!==206||n.byteLength<t)throw c;t*=2}}throw o||new Error("NetCDF header exceeds the maximum metadata range.")}}});var $r={};Ct($r,{NetCDFLoaderWithParser:()=>de,NetCDFWorkerLoaderWithParser:()=>Wr});function Kn(e,t){let r=new T(e),n={};if(t?.netcdf?.loadData)for(let o of r.variables)n[o.name]=r.getDataVariable(o);return{loaderData:r.header,data:n}}var Mi,Zn,Wi,Yn,Wr,de,At=u(()=>{"use strict";Mr();le();he();he();({preload:Mi,...Zn}=I),{preload:Wi,...Yn}=I,Wr={...Zn},de={createDataSourceSync:kr,...Yn,parse:async(e,t)=>Kn(e,t)}});async function eo(){let{NetCDFLoaderWithParser:e}=await Promise.resolve().then(()=>(At(),$r));return e}var Xn,I,he=u(()=>{"use strict";wt();Xn="5.0.0-beta.11";I={testURL:e=>/\.(?:cdf|nc)(?:$|[?#])/i.test(e),fromUrl:!0,fromBlob:!0,type:"netcdf",...Y,dataType:null,batchType:null,name:"NetCDF",id:"mvt",module:"scientific",version:Xn,extensions:["cdf","nc"],mimeTypes:["application/netcdf","application/x-netcdf"],category:"image",binary:!0,options:{netcdf:{loadVariables:!1}},preload:eo}});var to={};Ct(to,{FetchError:()=>i.FetchError,JSONLoader:()=>ut,NetCDFFormat:()=>Y,NetCDFLoader:()=>I,NetCDFLoaderWithParser:()=>de,NetCDFReader:()=>T,NullLoader:()=>i.NullLoader,RequestScheduler:()=>k,_BrowserFileSystem:()=>i._BrowserFileSystem,_fetchProgress:()=>i._fetchProgress,_selectSource:()=>i._selectSource,_unregisterLoaders:()=>i._unregisterLoaders,assert:()=>ge,compareLoaderOptions:()=>i.compareLoaderOptions,concatenateArrayBuffersAsync:()=>Ye,coreApi:()=>i.coreApi,createDataSource:()=>i.createDataSource,createDataSourceSync:()=>i.createDataSourceSync,document:()=>xe,encode:()=>i.encode,encodeInBatches:()=>i.encodeInBatches,encodeSync:()=>i.encodeSync,encodeTable:()=>i.encodeTable,encodeTableAsText:()=>i.encodeTableAsText,encodeTableInBatches:()=>i.encodeTableInBatches,encodeText:()=>i.encodeText,encodeTextSync:()=>i.encodeTextSync,encodeURLtoURL:()=>i.encodeURLtoURL,fetchFile:()=>i.fetchFile,forEach:()=>Ze,getLoaderOptions:()=>i.getLoaderOptions,getPathPrefix:()=>at,global:()=>we,isAsyncIterable:()=>Me,isBrowser:()=>Ee,isIterable:()=>je,isIterator:()=>We,isPromise:()=>ke,isPureObject:()=>V,isReadableStream:()=>He,isResponse:()=>$e,isWorker:()=>Te,isWritableStream:()=>qe,load:()=>i.load,loadInBatches:()=>i.loadInBatches,makeIterator:()=>i.makeIterator,makeLineIterator:()=>Qe,makeNumberedLineIterator:()=>Je,makeStream:()=>i.makeStream,makeTextDecoderIterator:()=>Ve,makeTextEncoderIterator:()=>Ge,parse:()=>i.parse,parseFile:()=>i.parseFile,parseInBatches:()=>i.parseInBatches,parseSync:()=>i.parseSync,preload:()=>i.preload,preloadSync:()=>i.preloadSync,readArrayBuffer:()=>i.readArrayBuffer,registerLoaders:()=>i.registerLoaders,resolvePath:()=>Q,selectLoader:()=>i.selectLoader,selectLoaderSync:()=>i.selectLoaderSync,self:()=>ye,setLoaderOptions:()=>i.setLoaderOptions,setPathPrefix:()=>it,window:()=>be});var i=Zr(Bt(),1);mt();le();wt();he();At();return Yr(to);})();
|
|
11
11
|
return __exports__;
|
|
12
12
|
});
|
|
@@ -47,7 +47,7 @@ var NPYFormat = {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
// dist/npy-loader-types.js
|
|
50
|
-
var VERSION = true ? "5.0.0-beta.
|
|
50
|
+
var VERSION = true ? "5.0.0-beta.11" : "latest";
|
|
51
51
|
var NPY_MAGIC_NUMBER = new Uint8Array([147, 78, 85, 77, 80, 89]);
|
|
52
52
|
async function preload() {
|
|
53
53
|
const { NPYLoaderWithParser } = await import("@loaders.gl/scientific/npy-loader");
|
package/dist/npy-loader-types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import { NPYFormat } from "./npy-format.js";
|
|
5
5
|
// @ts-ignore __VERSION__ is injected by the package build.
|
|
6
|
-
const VERSION = typeof "5.0.0-beta.
|
|
6
|
+
const VERSION = typeof "5.0.0-beta.11" !== 'undefined' ? "5.0.0-beta.11" : 'latest';
|
|
7
7
|
// \x93NUMPY
|
|
8
8
|
const NPY_MAGIC_NUMBER = new Uint8Array([147, 78, 85, 77, 80, 89]);
|
|
9
9
|
/** Preloads the parser-bearing NPY loader implementation. */
|
package/dist/npy-loader.cjs
CHANGED
|
@@ -239,7 +239,7 @@ var NPYFormat = {
|
|
|
239
239
|
};
|
|
240
240
|
|
|
241
241
|
// dist/npy-loader-types.js
|
|
242
|
-
var VERSION2 = true ? "5.0.0-beta.
|
|
242
|
+
var VERSION2 = true ? "5.0.0-beta.11" : "latest";
|
|
243
243
|
var NPY_MAGIC_NUMBER2 = new Uint8Array([147, 78, 85, 77, 80, 89]);
|
|
244
244
|
async function preload2() {
|
|
245
245
|
const { NPYLoaderWithParser: NPYLoaderWithParser3 } = await Promise.resolve().then(() => (init_npy_loader(), npy_loader_exports));
|
package/dist/npy-worker.js
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"src/npy-loader-types.ts"() {
|
|
109
109
|
"use strict";
|
|
110
110
|
init_npy_format();
|
|
111
|
-
VERSION = true ? "5.0.0-beta.
|
|
111
|
+
VERSION = true ? "5.0.0-beta.11" : "latest";
|
|
112
112
|
NPY_MAGIC_NUMBER = new Uint8Array([147, 78, 85, 77, 80, 89]);
|
|
113
113
|
NPYLoader = {
|
|
114
114
|
...NPYFormat,
|
|
@@ -33,7 +33,7 @@ __export(nrrd_loader_types_exports, {
|
|
|
33
33
|
NRRDLoader: () => NRRDLoader
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(nrrd_loader_types_exports);
|
|
36
|
-
var VERSION = true ? "5.0.0-beta.
|
|
36
|
+
var VERSION = true ? "5.0.0-beta.11" : "latest";
|
|
37
37
|
async function preload() {
|
|
38
38
|
const { NRRDLoaderWithParser } = await import("@loaders.gl/scientific/nrrd-loader");
|
|
39
39
|
return NRRDLoaderWithParser;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) vis.gl contributors
|
|
3
3
|
/** Package version injected by the build. */
|
|
4
4
|
// @ts-ignore __VERSION__ is injected during compilation.
|
|
5
|
-
const VERSION = typeof "5.0.0-beta.
|
|
5
|
+
const VERSION = typeof "5.0.0-beta.11" !== 'undefined' ? "5.0.0-beta.11" : 'latest';
|
|
6
6
|
/** Loads the attached NRRD parser on demand. */
|
|
7
7
|
async function preload() {
|
|
8
8
|
const { NRRDLoaderWithParser } = await import('@loaders.gl/scientific/nrrd-loader');
|
|
@@ -33,7 +33,7 @@ __export(vtk_loader_types_exports, {
|
|
|
33
33
|
VTKLoader: () => VTKLoader
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(vtk_loader_types_exports);
|
|
36
|
-
var VERSION = true ? "5.0.0-beta.
|
|
36
|
+
var VERSION = true ? "5.0.0-beta.11" : "latest";
|
|
37
37
|
async function preload() {
|
|
38
38
|
const { VTKLoaderWithParser } = await import("@loaders.gl/scientific/vtk-loader");
|
|
39
39
|
return VTKLoaderWithParser;
|
package/dist/vtk-loader-types.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) vis.gl contributors
|
|
3
3
|
/** Package version injected by the build. */
|
|
4
4
|
// @ts-ignore __VERSION__ is injected during compilation.
|
|
5
|
-
const VERSION = typeof "5.0.0-beta.
|
|
5
|
+
const VERSION = typeof "5.0.0-beta.11" !== 'undefined' ? "5.0.0-beta.11" : 'latest';
|
|
6
6
|
/** Loads the existing VTK readers on demand. */
|
|
7
7
|
async function preload() {
|
|
8
8
|
const { VTKLoaderWithParser } = await import('@loaders.gl/scientific/vtk-loader');
|
|
@@ -8,7 +8,7 @@ import { ZarrSource } from "./ome-zarr-loader.js";
|
|
|
8
8
|
import { cloneZarrSelection, getCachedZarrSelection, getZarrSelectionKey } from "./lib/zarr-data-cache.js";
|
|
9
9
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
10
10
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
11
|
-
const VERSION = typeof "5.0.0-beta.
|
|
11
|
+
const VERSION = typeof "5.0.0-beta.11" !== 'undefined' ? "5.0.0-beta.11" : 'latest';
|
|
12
12
|
/** Source factory for GeoZarr and regular CF/xarray Zarr raster arrays. */
|
|
13
13
|
export const GeoZarrLoaderWithParser = {
|
|
14
14
|
dataType: null,
|