@loaders.gl/core
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,1 +0,1 @@ | ||
!function(n,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var t in r)("object"==typeof exports?exports:n)[t]=r[t]}}(window,function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)r.d(t,o,function(e){return n[e]}.bind(null,o));return t},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.p="",r(r.s=5)}([function(n,e,r){"use strict";(function(n,t){r.d(e,"c",function(){return o}),r.d(e,"d",function(){return u}),r.d(e,"e",function(){return c}),r.d(e,"b",function(){return f}),r.d(e,"a",function(){return a});const o="object"!=typeof n||"[object process]"!==String(n)||n.browser,i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},u=i.self||i.window||i.global,c=i.window||i.self||i.global,f=i.global||i.self||i.window,a=i.document||{}}).call(this,r(6),r(4))},function(n,e,r){"undefined"==typeof TextDecoder?n.exports=r(7):n.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(n,e){},function(n,e){},function(n,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"==typeof window&&(r=window)}n.exports=r},function(n,e,r){(function(e){const t=r(8),o="undefined"==typeof window?e:window;o.loaders=o.loaders||{},n.exports=Object.assign(o.loaders,t)}).call(this,r(4))},function(n,e){var r,t,o=n.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(n){if(r===setTimeout)return setTimeout(n,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(e){try{return r.call(null,n,0)}catch(e){return r.call(this,n,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(n){r=i}try{t="function"==typeof clearTimeout?clearTimeout:u}catch(n){t=u}}();var f,a=[],s=!1,d=-1;function l(){s&&f&&(s=!1,f.length?a=f.concat(a):d=-1,a.length&&y())}function y(){if(!s){var n=c(l);s=!0;for(var e=a.length;e;){for(f=a,a=[];++d<e;)f&&f[d].run();d=-1,e=a.length}f=null,s=!1,function(n){if(t===clearTimeout)return clearTimeout(n);if((t===u||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(n);try{t(n)}catch(e){try{return t.call(null,n)}catch(e){return t.call(this,n)}}}(n)}}function p(n,e){this.fun=n,this.array=e}function w(){}o.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new p(n,e)),1!==a.length||s||c(y)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=w,o.addListener=w,o.once=w,o.off=w,o.removeListener=w,o.removeAllListeners=w,o.emit=w,o.prependListener=w,o.prependOnceListener=w,o.listeners=function(n){return[]},o.binding=function(n){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(n){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(n,e){},function(n,e,r){"use strict";r.r(e);let t="";const o={};function i(n){t=n}function u(){return t}function c(n){for(const e in o)if(n.startsWith(e)){const r=o[e];return n.replace(e,r)}return n+=t}var f=r(0),a=r(2);function s(n,e){if(!n)throw new Error(e||"loader assertion failed.")}const d={dataType:"arrayBuffer",nothrow:!0},l=n=>n.startsWith("data:");async function y(n,e){return await fetch(n,e)}function p(n,e={}){return e=function(n={}){return(n=Object.assign({},d,n)).responseType=n.responseType||n.dataType,n}(e),l(n),e.nothrow||s(!1),null}async function w(n,e){return fetch(n,e).then(n=>n.body)}async function b(n,e){return n=c(n),(f.c?y:a.fetchFile)(n,e)}function h(n,e={}){return n=c(n),(f.c?p:a.readFileSync)(n,e)}async function A(n,e){return n=c(n),(f.c?w:a.createReadStream)(n,e)}var g=r(3);function m(n,e,r){return f.c?s(!1):g.writeFile(n,e,r)}function x(n,e,r){return f.c?s(!1):g.writeFileSync(n,e,r)}function T(n){if(!n)return!1;return Array.isArray(n)&&(n=n[0]),n.parseTextSync||n.parseSync||n.parse||n.loadAndParse||n.parseStream||n.parseInBatches||n.worker}function S(n){let e;return s(T(n)),Array.isArray(n)&&(e=(n=n[0])[1],n={...n,options:{...n.options,options:e}}),n.extension&&(n.extensions=n.extensions||[n.extension],delete n.extension),Array.isArray(n.extensions)||(n.extensions=[n.extensions]),s(n.extensions&&n.extensions.length>0&&n.extensions[0]),n.parseTextSync&&(n.text=!0),n.text||(n.binary=!0),n}const B={};function v(n){n=Array.isArray(n)?n:[n];for(const e of n){S(e);for(const n of e.extensions)B[n]=e}}function E(){return Object.values(B)}const j=/[^\.]+$/;function I(n="",e,r){const t=n.match(j);if(t&&t[0]){const n=function(n,e){e=e.toLowerCase();for(const r of n){S(r);for(const n of r.extensions)if(n.toLowerCase()===e)return r}return null}(r,t[0]);if(n)return n}const o=function(n,e){for(const r of n)if(r.testText&&r.testText(e))return r;return null}(r,e);return o||null}class F{log(){}info(){}warn(){}error(){}}var L=r(1);const P=n=>n&&n instanceof ArrayBuffer,O=n=>n&&"undefined"!=typeof Blob&&n instanceof Blob,D=n=>n&&n instanceof Buffer;function R(n){if(P(n))return n;if(D(n)){return new Uint8Array(n).buffer}if(ArrayBuffer.isView(n))return n.buffer;if("string"==typeof n){const e=n;return(new L.TextEncoder).encode(e).buffer}return s(!1)}function U(n){return new Promise((e,r)=>{let t;const o=new FileReader;o.onload=(n=>{t=n.target.result}),o.onloadend=(n=>e(t)),o.onerror=r,o.readAsArrayBuffer(n)})}function _(n){return new DataView(R(n))}const M=new Map;function V(n,e,r){const t=function(n){let e=M.get(n);if(!e){const r=new Blob([n],{type:"application/javascript"});e=URL.createObjectURL(r),M.set(n,e)}return new Worker(e)}(n);r=function(n){null!==(n=Object.assign({},n)).log&&delete n.log;return n}(r);const o=(n,e)=>new Promise((r,o)=>{t.onmessage=(n=>{switch(n.data.type){case"done":r(n.data.result),t.terminate();break;case"error":o(new Error(n.data.message))}});const i=R(n);t.postMessage({arraybuffer:i,opts:e},[i])});return e?o(e,r):o}const k=n=>"boolean"==typeof n,W=n=>"function"==typeof n,C=n=>null!==n&&"object"==typeof n,N=n=>C(n)&&W(n.then),$=n=>n&&"function"==typeof n[Symbol.iterator],z=n=>n&&"function"==typeof n[Symbol.asyncIterator],Y=n=>C(n)&&"done"in n&&"value"in n,q=n=>"undefined"!=typeof window&&n instanceof window.Response||n.arrayBuffer&&n.json&&n.body,G=n=>(n=>C(n)&&W(n.tee)&&W(n.cancel)&&W(n.pipeTo)&&W(n.getReader))(n)||(n=>C(n)&&W(n.read)&&W(n.pipe)&&k(n.readable))(n),H=n=>(n=>C(n)&&W(n.abort)&&W(n.getWriter))(n)||(n=>C(n)&&W(n.end)&&W(n.write)&&k(n.writable))(n);function J(n){return n+3&-4}function K(n,e,r,t=e.byteLength){const o=new Uint8Array(n,r,t),i=new Uint8Array(e);return o.set(i),n}function Q(n,e,r){let t;if(n instanceof ArrayBuffer)t=new Uint8Array(n);else{const e=n.byteOffset,r=n.byteLength;t=new Uint8Array(n.buffer,e,r)}return e.set(t,r),r+J(t.byteLength)}function X(n,e){const r=n instanceof ArrayBuffer?new Uint8Array(n):n,t=e instanceof ArrayBuffer?new Uint8Array(e):e,o=new Uint8Array(r.byteLength+t.byteLength);return o.set(r,0),o.set(t,r.byteLength),o}function Z(n){return"function"==typeof n[Symbol.asyncIterator]?n:"function"==typeof n.getIterator?n.getIterator():f.c?async function*(n){const e=n.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}(n):async function*(n){n=await n;for(;;){const e=n.read();if(null===e){if(n._readableState.ended)return;await nn(n)}else yield e}}(n)}async function nn(n){return new Promise(e=>{n.once("readable",e)})}const en="Cannot convert supplied data type";function rn(n,e){if(e.text&&"string"==typeof n)return n;if(n instanceof ArrayBuffer||ArrayBuffer.isView(n)){const r=n.buffer||n;if(e.text&&!e.binary){return new L.TextDecoder("utf8").decode(r)}return r}throw new Error(en)}async function tn(n,e){if(n instanceof ArrayBuffer||ArrayBuffer.isView(n))return function*(){yield n.buffer||n}();if(Y(n))return n;if($(n))return n[Symbol.iterator]();throw new Error(en)}async function on(n,e,r={},t){return t=t||function(n){return q(n)?n.url:null}(n),n=await async function(n,e){const r=(n=await n)instanceof ArrayBuffer||ArrayBuffer.isView(n);if("string"==typeof n||r)return rn(n,e);if(q(n))return e.binary?await n.arrayBuffer():n.text();throw new Error(en)}(n,e),e.parseTextSync&&"string"==typeof n?(r.dataType="text",e.parseTextSync(n,r,t,e)):e.parseSync?e.parseSync(n,r,t,e):e.parse?await e.parse(n,r,t,e):e.worker?await V(e.worker,n,r):s(!1)}async function un(n,e,r={},t){if(e.parseInBatches){const o=await async function(n,e){return Y(n)?n:q(n)?Z(n.body):G(n)?Z(n):z(n)?n[Symbol.asyncIterator]():tn(n)}(n);return e.parseInBatches(o,r,t,e)}return null}async function cn(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,n,e):e;return o?(S(o),r=dn(r,o),await on(n,o,r,t)):null}function fn(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,n,e):e;return S(o),function(n,e,r={},t){return n=rn(n,e),e.parseTextSync&&"string"==typeof n?e.parseTextSync(n,r,t,e):e.parseSync?e.parseSync(n,r,t,e):s(!1)}(n,o,r=dn(r,o),t)}async function an(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,null,e):e;return S(o),un(n,o,r=dn(r,o),t)}async function sn(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,null,e):e;return S(o),un(n,o,r=dn(r,o),t)}function dn(n,e){return null===(n=Object.assign({},e.DEFAULT_OPTIONS,e.options,n,{dataType:"arraybuffer"})).log&&(n.log=new F),"log"in n||(n.log=console),n}async function ln(n,e,r){return an(await b(n,r),e,r,n)}async function yn(n,e,r){Array.isArray(e)||T(e)||(r=e,e=null),e=e||E();const t=Array.isArray(e)?I(n,null,e):e;return t&&t.loadAndParse?await t.loadAndParse(n,r):cn(await b(n,r),e,r,n)}function pn(n,e,r,t){if(e.encode)return e.encode(n,r);if(e.encodeSync)return Promise.resolve(e.encodeSync(n,r));throw new Error("Writer could not encode data")}function wn(n,e,r,t){if(e.encodeSync)return e.encodeSync(n,r);throw new Error("Writer could not synchronously encode data")}function bn(n,e,r,t){if(e.encodeInBatches)return e.encodeInBatches(n,r);throw new Error("Writer could not encode data in batches")}function hn(n,e,r){return m(e,pn(n,r,e))}function An(n,e,r){return x(e,wn(n,r,e))}function gn(n,e=Float32Array){if(0===n.length)return new Float32Array(0);if(!function n(e,r=Number.isFinite){let t=-1;for(;++t<e.length;){const o=e[t];if(Array.isArray(o)||ArrayBuffer.isView(o)){if(!n(o,r))return!1}else if(!r(o))return!1}return!0}(n))return null;const r=new e(function n(e,r=3){let t=0;let o=0;let i=-1;for(;++i<e.length;){const r=e[i];Array.isArray(r)||ArrayBuffer.isView(r)?t+=n(r):o++}return t+(0===t&&o<r?r:o)}(n));return function(n,e,r=3){(function n(e,r,t,o){let i=-1,u=0;for(;++i<e.length;){const c=e[i];Array.isArray(c)||ArrayBuffer.isView(c)?o=n(c,r,t,o):u<t&&(r[o++]=c,u++)}return u>0&&u<t&&(r[o++]=0),o})(n,e,r,0)}(n,r),r}async function mn(n,e){for(;;){const{done:r,value:t}=await n.next();if(r)return void n.return();if(e(t))return}}async function xn(n){let e=new ArrayBuffer,r="";for await(const t of n)"string"==typeof t?r+=t:e=X(e,t);return e||r}async function*Tn(n,e){const r=new L.TextDecoder(e);for await(const e of n)yield"string"==typeof e?e:r.decode(e,{stream:!0})}async function*Sn(n){let e="";for await(const r of n){let n;for(e+=r;(n=e.indexOf("\n"))>=0;){const r=e.slice(0,n+1);e=e.slice(n+1),yield r}}e.length>0&&(yield e)}async function*Bn(n){let e=1;for await(const r of n)yield{counter:e,line:r},e++}function vn(n){"undefined"!=typeof self&&(self.onmessage=(e=>{const{arraybuffer:r,opts:t}=e.data;try{let e,o;if(n.parseSync)e=r,o=n.parseSync;else{if(!n.parseTextSync)throw new Error(`Could not load data with ${n.name} loader`);e=(new TextDecoder).decode(r),o=n.parseTextSync}const i=o(e,t),u=function n(e,r=!0,t){const o=t||new Set;if(e)if(e instanceof ArrayBuffer)o.add(e);else if(e.buffer&&e.buffer instanceof ArrayBuffer)o.add(e.buffer);else if(r&&"object"==typeof e)for(const t in e)n(e[t],r,o);return void 0===t?Array.from(o):null}(i);self.postMessage({type:"done",result:i},u)}catch(n){self.postMessage({type:"error",message:n.message})}}))}function En(n){let e=0;for(const r in n){const t=n[r];ArrayBuffer.isView(t)&&(e+=t.length*t.BYTES_PER_ELEMENT)}return e}function jn(...n){return console.warn("parseFile() deprecated, use parse()"),cn(...n)}function In(...n){return console.warn("parseFileSync() deprecated, use parseSync()"),fn(...n)}function Fn(...n){return console.warn("loadFile() deprecated, use load()"),yn(...n)}r.d(e,"parseFile",function(){return jn}),r.d(e,"parseFileSync",function(){return In}),r.d(e,"loadFile",function(){return Fn}),r.d(e,"setPathPrefix",function(){return i}),r.d(e,"getPathPrefix",function(){return u}),r.d(e,"resolvePath",function(){return c}),r.d(e,"fetchFile",function(){return b}),r.d(e,"readFileSync",function(){return h}),r.d(e,"writeFile",function(){return m}),r.d(e,"writeFileSync",function(){return x}),r.d(e,"registerLoaders",function(){return v}),r.d(e,"parse",function(){return cn}),r.d(e,"parseSync",function(){return fn}),r.d(e,"parseInBatches",function(){return an}),r.d(e,"parseInBatchesSync",function(){return sn}),r.d(e,"load",function(){return yn}),r.d(e,"loadInBatches",function(){return ln}),r.d(e,"encode",function(){return pn}),r.d(e,"encodeSync",function(){return wn}),r.d(e,"encodeInBatches",function(){return bn}),r.d(e,"save",function(){return hn}),r.d(e,"saveSync",function(){return An}),r.d(e,"isPromise",function(){return N}),r.d(e,"isIterable",function(){return $}),r.d(e,"isAsyncIterable",function(){return z}),r.d(e,"isIterator",function(){return Y}),r.d(e,"isFetchResponse",function(){return q}),r.d(e,"isReadableStream",function(){return G}),r.d(e,"isWritableStream",function(){return H}),r.d(e,"isArrayBuffer",function(){return P}),r.d(e,"isBlob",function(){return O}),r.d(e,"toArrayBuffer",function(){return R}),r.d(e,"blobToArrayBuffer",function(){return U}),r.d(e,"toDataView",function(){return _}),r.d(e,"padTo4Bytes",function(){return J}),r.d(e,"copyToArray",function(){return Q}),r.d(e,"copyArrayBuffer",function(){return K}),r.d(e,"flattenToTypedArray",function(){return gn}),r.d(e,"TextDecoder",function(){return L.TextDecoder}),r.d(e,"TextEncoder",function(){return L.TextEncoder}),r.d(e,"getStreamIterator",function(){return Z}),r.d(e,"forEach",function(){return mn}),r.d(e,"concatenateAsyncIterator",function(){return xn}),r.d(e,"lineAsyncIterator",function(){return Sn}),r.d(e,"textDecoderAsyncIterator",function(){return Tn}),r.d(e,"numberedLineAsyncIterator",function(){return Bn}),r.d(e,"createWorker",function(){return vn}),r.d(e,"isBrowser",function(){return f.c}),r.d(e,"self",function(){return f.d}),r.d(e,"window",function(){return f.e}),r.d(e,"global",function(){return f.b}),r.d(e,"document",function(){return f.a}),r.d(e,"assert",function(){return s}),r.d(e,"_getMeshSize",function(){return En}),r.d(e,"createReadStream",function(){return A})}])}); | ||
!function(n,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var t in r)("object"==typeof exports?exports:n)[t]=r[t]}}(window,function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)r.d(t,o,function(e){return n[e]}.bind(null,o));return t},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.p="",r(r.s=5)}([function(n,e,r){"use strict";(function(n,t){r.d(e,"c",function(){return o}),r.d(e,"d",function(){return u}),r.d(e,"e",function(){return c}),r.d(e,"b",function(){return f}),r.d(e,"a",function(){return a});const o="object"!=typeof n||"[object process]"!==String(n)||n.browser,i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},u=i.self||i.window||i.global,c=i.window||i.self||i.global,f=i.global||i.self||i.window,a=i.document||{}}).call(this,r(6),r(4))},function(n,e,r){"undefined"==typeof TextDecoder?n.exports=r(7):n.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(n,e){},function(n,e){},function(n,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"==typeof window&&(r=window)}n.exports=r},function(n,e,r){(function(e){const t=r(8),o="undefined"==typeof window?e:window;o.loaders=o.loaders||{},n.exports=Object.assign(o.loaders,t)}).call(this,r(4))},function(n,e){var r,t,o=n.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(n){if(r===setTimeout)return setTimeout(n,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(e){try{return r.call(null,n,0)}catch(e){return r.call(this,n,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(n){r=i}try{t="function"==typeof clearTimeout?clearTimeout:u}catch(n){t=u}}();var f,a=[],s=!1,d=-1;function l(){s&&f&&(s=!1,f.length?a=f.concat(a):d=-1,a.length&&y())}function y(){if(!s){var n=c(l);s=!0;for(var e=a.length;e;){for(f=a,a=[];++d<e;)f&&f[d].run();d=-1,e=a.length}f=null,s=!1,function(n){if(t===clearTimeout)return clearTimeout(n);if((t===u||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(n);try{t(n)}catch(e){try{return t.call(null,n)}catch(e){return t.call(this,n)}}}(n)}}function p(n,e){this.fun=n,this.array=e}function w(){}o.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new p(n,e)),1!==a.length||s||c(y)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=w,o.addListener=w,o.once=w,o.off=w,o.removeListener=w,o.removeAllListeners=w,o.emit=w,o.prependListener=w,o.prependOnceListener=w,o.listeners=function(n){return[]},o.binding=function(n){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(n){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(n,e){},function(n,e,r){"use strict";r.r(e);let t="";const o={};function i(n){t=n}function u(){return t}function c(n){for(const e in o)if(n.startsWith(e)){const r=o[e];return n.replace(e,r)}return n+=t}var f=r(0),a=r(2);function s(n,e){if(!n)throw new Error(e||"loader assertion failed.")}const d={dataType:"arrayBuffer",nothrow:!0},l=n=>n.startsWith("data:");async function y(n,e){return await fetch(n,e)}function p(n,e={}){return e=function(n={}){return(n=Object.assign({},d,n)).responseType=n.responseType||n.dataType,n}(e),l(n),e.nothrow||s(!1),null}async function w(n,e){return fetch(n,e).then(n=>n.body)}async function b(n,e){return n=c(n),(f.c?y:a.fetchFile)(n,e)}function h(n,e={}){return n=c(n),(f.c?p:a.readFileSync)(n,e)}async function A(n,e){return n=c(n),(f.c?w:a.createReadStream)(n,e)}var g=r(3);function m(n,e,r){return f.c?s(!1):g.writeFile(n,e,r)}function x(n,e,r){return f.c?s(!1):g.writeFileSync(n,e,r)}function T(n){if(!n)return!1;return Array.isArray(n)&&(n=n[0]),n.parseTextSync||n.parseSync||n.parse||n.loadAndParse||n.parseStream||n.parseInBatches||n.worker}function S(n){let e;return s(T(n)),Array.isArray(n)&&(e=(n=n[0])[1],n={...n,options:{...n.options,options:e}}),n.extension&&(n.extensions=n.extensions||[n.extension],delete n.extension),Array.isArray(n.extensions)||(n.extensions=[n.extensions]),s(n.extensions&&n.extensions.length>0&&n.extensions[0]),n.parseTextSync&&(n.text=!0),n.text||(n.binary=!0),n}const B={};function v(n){n=Array.isArray(n)?n:[n];for(const e of n){S(e);for(const n of e.extensions)B[n]=e}}function E(){return Object.values(B)}const j=/[^\.]+$/;function I(n="",e,r){const t=n.match(j);if(t&&t[0]){const n=function(n,e){e=e.toLowerCase();for(const r of n){S(r);for(const n of r.extensions)if(n.toLowerCase()===e)return r}return null}(r,t[0]);if(n)return n}const o=function(n,e){for(const r of n)if(r.testText&&r.testText(e))return r;return null}(r,e);return o||null}class L{log(){}info(){}warn(){}error(){}}var P=r(1);const F=n=>n&&n instanceof ArrayBuffer,O=n=>n&&"undefined"!=typeof Blob&&n instanceof Blob,D=n=>n&&n instanceof Buffer;function R(n){if(F(n))return n;if(D(n)){return new Uint8Array(n).buffer}if(ArrayBuffer.isView(n))return n.buffer;if("string"==typeof n){const e=n;return(new P.TextEncoder).encode(e).buffer}return s(!1)}function U(n){return new Promise((e,r)=>{let t;const o=new FileReader;o.onload=(n=>{t=n.target.result}),o.onloadend=(n=>e(t)),o.onerror=r,o.readAsArrayBuffer(n)})}function _(n){return new DataView(R(n))}const M=new Map;function V(n,e,r){const t=function(n){let e=M.get(n);if(!e){const r=new Blob([n],{type:"application/javascript"});e=URL.createObjectURL(r),M.set(n,e)}return new Worker(e)}(n);r=function(n){null!==(n=Object.assign({},n)).log&&delete n.log;return n}(r);const o=(n,e)=>new Promise((r,o)=>{t.onmessage=(n=>{switch(n.data.type){case"done":r(n.data.result),t.terminate();break;case"error":o(new Error(n.data.message))}});const i=R(n);t.postMessage({arraybuffer:i,opts:e},[i])});return e?o(e,r):o}const k=n=>"boolean"==typeof n,W=n=>"function"==typeof n,C=n=>null!==n&&"object"==typeof n,N=n=>C(n)&&W(n.then),$=n=>n&&"function"==typeof n[Symbol.iterator],z=n=>n&&"function"==typeof n[Symbol.asyncIterator],Y=n=>C(n)&&"done"in n&&"value"in n,q=n=>"undefined"!=typeof window&&n instanceof window.Response||n.arrayBuffer&&n.json&&n.body,G=n=>(n=>C(n)&&W(n.tee)&&W(n.cancel)&&W(n.pipeTo)&&W(n.getReader))(n)||(n=>C(n)&&W(n.read)&&W(n.pipe)&&k(n.readable))(n),H=n=>(n=>C(n)&&W(n.abort)&&W(n.getWriter))(n)||(n=>C(n)&&W(n.end)&&W(n.write)&&k(n.writable))(n);function J(n){return n+3&-4}function K(n,e,r,t=e.byteLength){const o=new Uint8Array(n,r,t),i=new Uint8Array(e);return o.set(i),n}function Q(n,e,r){let t;if(n instanceof ArrayBuffer)t=new Uint8Array(n);else{const e=n.byteOffset,r=n.byteLength;t=new Uint8Array(n.buffer,e,r)}return e.set(t,r),r+J(t.byteLength)}function X(n,e){const r=n instanceof ArrayBuffer?new Uint8Array(n):n,t=e instanceof ArrayBuffer?new Uint8Array(e):e,o=new Uint8Array(r.byteLength+t.byteLength);return o.set(r,0),o.set(t,r.byteLength),o}function Z(n){return"function"==typeof n[Symbol.asyncIterator]?n:"function"==typeof n.getIterator?n.getIterator():f.c?async function*(n){const e=n.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}(n):async function*(n){n=await n;for(;;){const e=n.read();if(null===e){if(n._readableState.ended)return;await nn(n)}else yield e}}(n)}async function nn(n){return new Promise(e=>{n.once("readable",e)})}const en="Cannot convert supplied data type";function rn(n,e){if(e.text&&"string"==typeof n)return n;if(n instanceof ArrayBuffer||ArrayBuffer.isView(n)){const r=n.buffer||n;if(e.text&&!e.binary){return new P.TextDecoder("utf8").decode(r)}return r}throw new Error(en)}async function tn(n,e){if(n instanceof ArrayBuffer||ArrayBuffer.isView(n))return function*(){yield n.buffer||n}();if(Y(n))return n;if($(n))return n[Symbol.iterator]();throw new Error(en)}async function on(n,e,r={},t){return t=t||function(n){return q(n)?n.url:null}(n),n=await async function(n,e){const r=(n=await n)instanceof ArrayBuffer||ArrayBuffer.isView(n);if("string"==typeof n||r)return rn(n,e);if(q(n))return e.binary?await n.arrayBuffer():n.text();throw new Error(en)}(n,e),e.parseTextSync&&"string"==typeof n?(r.dataType="text",e.parseTextSync(n,r,t,e)):e.parseSync?e.parseSync(n,r,t,e):e.parse?await e.parse(n,r,t,e):e.worker?await V(e.worker,n,r):s(!1)}async function un(n,e,r={},t){if(e.parseInBatches){const o=await async function(n,e){return Y(n)?n:q(n)?Z(n.body):G(n)?Z(n):z(n)?n[Symbol.asyncIterator]():tn(n)}(n);return e.parseInBatches(o,r,t,e)}return null}async function cn(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,n,e):e;return o?(S(o),r=dn(r,o),await on(n,o,r,t)):null}function fn(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,n,e):e;return S(o),function(n,e,r={},t){return n=rn(n,e),e.parseTextSync&&"string"==typeof n?e.parseTextSync(n,r,t,e):e.parseSync?e.parseSync(n,r,t,e):s(!1)}(n,o,r=dn(r,o),t)}async function an(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,null,e):e;return S(o),un(n,o,r=dn(r,o),t)}async function sn(n,e,r,t){Array.isArray(e)||T(e)||(t=r,r=e,e=null),e=e||E();const o=Array.isArray(e)?I(t,null,e):e;return S(o),un(n,o,r=dn(r,o),t)}function dn(n,e){return null===(n=Object.assign({},e.DEFAULT_OPTIONS,e.options,n,{dataType:"arraybuffer"})).log&&(n.log=new L),"log"in n||(n.log=console),n}async function ln(n,e,r){return an(await b(n,r),e,r,n)}async function yn(n,e,r){Array.isArray(e)||T(e)||(r=e,e=null),e=e||E();const t=Array.isArray(e)?I(n,null,e):e;return t&&t.loadAndParse?await t.loadAndParse(n,r):cn(await b(n,r),e,r,n)}function pn(n,e,r,t){if(e.encode)return e.encode(n,r);if(e.encodeSync)return Promise.resolve(e.encodeSync(n,r));throw new Error("Writer could not encode data")}function wn(n,e,r,t){if(e.encodeSync)return e.encodeSync(n,r);throw new Error("Writer could not synchronously encode data")}function bn(n,e,r,t){if(e.encodeInBatches)return e.encodeInBatches(n,r);throw new Error("Writer could not encode data in batches")}function hn(n,e,r){return m(e,pn(n,r,e))}function An(n,e,r){return x(e,wn(n,r,e))}function gn(n,e=Float32Array){if(0===n.length)return new Float32Array(0);if(!function n(e,r=Number.isFinite){let t=-1;for(;++t<e.length;){const o=e[t];if(Array.isArray(o)||ArrayBuffer.isView(o)){if(!n(o,r))return!1}else if(!r(o))return!1}return!0}(n))return null;const r=new e(function n(e,r=3){let t=0;let o=0;let i=-1;for(;++i<e.length;){const r=e[i];Array.isArray(r)||ArrayBuffer.isView(r)?t+=n(r):o++}return t+(0===t&&o<r?r:o)}(n));return function(n,e,r=3){(function n(e,r,t,o){let i=-1,u=0;for(;++i<e.length;){const c=e[i];Array.isArray(c)||ArrayBuffer.isView(c)?o=n(c,r,t,o):u<t&&(r[o++]=c,u++)}return u>0&&u<t&&(r[o++]=0),o})(n,e,r,0)}(n,r),r}async function mn(n,e){for(;;){const{done:r,value:t}=await n.next();if(r)return void n.return();if(e(t))return}}async function xn(n){let e=new ArrayBuffer,r="";for await(const t of n)"string"==typeof t?r+=t:e=X(e,t);return e||r}async function*Tn(n,e){const r=new P.TextDecoder(e);for await(const e of n)yield"string"==typeof e?e:r.decode(e,{stream:!0})}async function*Sn(n){let e="";for await(const r of n){let n;for(e+=r;(n=e.indexOf("\n"))>=0;){const r=e.slice(0,n+1);e=e.slice(n+1),yield r}}e.length>0&&(yield e)}async function*Bn(n){let e=1;for await(const r of n)yield{counter:e,line:r},e++}function vn(n){"undefined"!=typeof self&&(self.onmessage=(e=>{const{arraybuffer:r,opts:t}=e.data;try{let e,o;if(n.parseSync)e=r,o=n.parseSync;else{if(!n.parseTextSync)throw new Error(`Could not load data with ${n.name} loader`);e=(new TextDecoder).decode(r),o=n.parseTextSync}const i=o(e,t),u=function n(e,r=!0,t){const o=t||new Set;if(e)if(e instanceof ArrayBuffer)o.add(e);else if(e.buffer&&e.buffer instanceof ArrayBuffer)o.add(e.buffer);else if(r&&"object"==typeof e)for(const t in e)n(e[t],r,o);return void 0===t?Array.from(o):null}(i);self.postMessage({type:"done",result:i},u)}catch(n){self.postMessage({type:"error",message:n.message})}}))}function En(n){let e=0;for(const r in n){const t=n[r];ArrayBuffer.isView(t)&&(e+=t.length*t.BYTES_PER_ELEMENT)}return e}function jn(...n){return console.warn("parse() deprecated, use parse()"),cn(...n)}function In(...n){return console.warn("parseSync() deprecated, use parseSync()"),fn(...n)}function Ln(...n){return console.warn("loadFile() deprecated, use load()"),yn(...n)}r.d(e,"parseFile",function(){return jn}),r.d(e,"parseFileSync",function(){return In}),r.d(e,"loadFile",function(){return Ln}),r.d(e,"setPathPrefix",function(){return i}),r.d(e,"getPathPrefix",function(){return u}),r.d(e,"resolvePath",function(){return c}),r.d(e,"fetchFile",function(){return b}),r.d(e,"readFileSync",function(){return h}),r.d(e,"writeFile",function(){return m}),r.d(e,"writeFileSync",function(){return x}),r.d(e,"registerLoaders",function(){return v}),r.d(e,"parse",function(){return cn}),r.d(e,"parseSync",function(){return fn}),r.d(e,"parseInBatches",function(){return an}),r.d(e,"parseInBatchesSync",function(){return sn}),r.d(e,"load",function(){return yn}),r.d(e,"loadInBatches",function(){return ln}),r.d(e,"encode",function(){return pn}),r.d(e,"encodeSync",function(){return wn}),r.d(e,"encodeInBatches",function(){return bn}),r.d(e,"save",function(){return hn}),r.d(e,"saveSync",function(){return An}),r.d(e,"isPromise",function(){return N}),r.d(e,"isIterable",function(){return $}),r.d(e,"isAsyncIterable",function(){return z}),r.d(e,"isIterator",function(){return Y}),r.d(e,"isFetchResponse",function(){return q}),r.d(e,"isReadableStream",function(){return G}),r.d(e,"isWritableStream",function(){return H}),r.d(e,"isArrayBuffer",function(){return F}),r.d(e,"isBlob",function(){return O}),r.d(e,"toArrayBuffer",function(){return R}),r.d(e,"blobToArrayBuffer",function(){return U}),r.d(e,"toDataView",function(){return _}),r.d(e,"padTo4Bytes",function(){return J}),r.d(e,"copyToArray",function(){return Q}),r.d(e,"copyArrayBuffer",function(){return K}),r.d(e,"flattenToTypedArray",function(){return gn}),r.d(e,"TextDecoder",function(){return P.TextDecoder}),r.d(e,"TextEncoder",function(){return P.TextEncoder}),r.d(e,"getStreamIterator",function(){return Z}),r.d(e,"forEach",function(){return mn}),r.d(e,"concatenateAsyncIterator",function(){return xn}),r.d(e,"lineAsyncIterator",function(){return Sn}),r.d(e,"textDecoderAsyncIterator",function(){return Tn}),r.d(e,"numberedLineAsyncIterator",function(){return Bn}),r.d(e,"createWorker",function(){return vn}),r.d(e,"isBrowser",function(){return f.c}),r.d(e,"self",function(){return f.d}),r.d(e,"window",function(){return f.e}),r.d(e,"global",function(){return f.b}),r.d(e,"document",function(){return f.a}),r.d(e,"assert",function(){return s}),r.d(e,"_getMeshSize",function(){return En}),r.d(e,"createReadStream",function(){return A})}])}); |
@@ -363,3 +363,3 @@ "use strict"; | ||
function parseFile() { | ||
console.warn('parseFile() deprecated, use parse()'); | ||
console.warn('parse() deprecated, use parse()'); | ||
return _parse.parse.apply(void 0, arguments); | ||
@@ -369,3 +369,3 @@ } | ||
function parseFileSync() { | ||
console.warn('parseFileSync() deprecated, use parseSync()'); | ||
console.warn('parseSync() deprecated, use parseSync()'); | ||
return _parse.parseSync.apply(void 0, arguments); | ||
@@ -372,0 +372,0 @@ } |
@@ -24,7 +24,7 @@ export { setPathPrefix, getPathPrefix, resolvePath } from './lib/fetch/file-aliases.js'; | ||
export function parseFile() { | ||
console.warn('parseFile() deprecated, use parse()'); | ||
console.warn('parse() deprecated, use parse()'); | ||
return parse(...arguments); | ||
} | ||
export function parseFileSync() { | ||
console.warn('parseFileSync() deprecated, use parseSync()'); | ||
console.warn('parseSync() deprecated, use parseSync()'); | ||
return parseSync(...arguments); | ||
@@ -31,0 +31,0 @@ } |
@@ -24,7 +24,7 @@ export { setPathPrefix, getPathPrefix, resolvePath } from './lib/fetch/file-aliases.js'; | ||
export function parseFile() { | ||
console.warn('parseFile() deprecated, use parse()'); | ||
console.warn('parse() deprecated, use parse()'); | ||
return parse.apply(void 0, arguments); | ||
} | ||
export function parseFileSync() { | ||
console.warn('parseFileSync() deprecated, use parseSync()'); | ||
console.warn('parseSync() deprecated, use parseSync()'); | ||
return parseSync.apply(void 0, arguments); | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "@loaders.gl/core", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Framework-independent loaders for 3D graphics formats", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -68,3 +68,3 @@ // FILE READING AND WRITING | ||
export function parseFile(...args) { | ||
console.warn('parseFile() deprecated, use parse()'); // eslint-disable-line | ||
console.warn('parse() deprecated, use parse()'); // eslint-disable-line | ||
return parse(...args); | ||
@@ -74,3 +74,3 @@ } | ||
export function parseFileSync(...args) { | ||
console.warn('parseFileSync() deprecated, use parseSync()'); // eslint-disable-line | ||
console.warn('parseSync() deprecated, use parseSync()'); // eslint-disable-line | ||
return parseSync(...args); | ||
@@ -77,0 +77,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9414120