@loaders.gl/i3s 3.0.10 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=42)}([function(t,e,r){t.exports=r(32)},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(41);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(33),o=r(34),i=r(25),a=r(35);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s})),r.d(e,"d",(function(){return u})),r.d(e,"c",(function(){return c}));var o=r(6),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u="function"==typeof importScripts,c="undefined"!=typeof window&&void 0!==window.orientation,f=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);f&&parseFloat(f[1])}).call(this,r(19),r(13))},,function(t,e,r){"use strict";(function(t,n){r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return a}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document,process:"object"==typeof n&&n},i=o.window||o.self||o.global,a=o.process||{};console}).call(this,r(19),r(13))},function(t,e,r){var n=r(26);t.exports=function(t){return new n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||s(p)},d.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s}));var o=r(6),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window,s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);u&&parseFloat(u[1])}).call(this,r(19),r(13))},function(t,e,r){var n=r(37);t.exports=function(t){return function(){return new n(t.apply(this,arguments))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(38),o=r(39),i=r(25),a=r(40);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e){},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(24);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){this.wrapped=t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var n=r(28);function o(){return!("object"==typeof t&&"[object process]"===String(t)&&!t.browser)||Object(n.a)()}}).call(this,r(13))},function(t,e,r){"use strict";(function(t){function n(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==t&&"object"==typeof t.versions&&Boolean(t.versions.electron))return!0;const r="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,n=e||r;return!!(n&&n.indexOf("Electron")>=0)}r.d(e,"a",(function(){return n}))}).call(this,r(13))},function(t,e,r){var n=r(6).default,o=r(8);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new w(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function l(){}function h(){}function p(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(d=_);var v=p.prototype=l.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}return h.prototype=v.constructor=p,p.constructor=h,h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(24);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,r){var n=r(26);function o(t){var e,r;function o(e,r){try{var a=t[e](r),s=a.value,u=s instanceof n;Promise.resolve(u?s.wrapped:s).then((function(t){u?o("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){o("throw",t)}))}catch(t){i("throw",t)}}function i(t,n){switch(t){case"return":e.resolve({value:n,done:!0});break;case"throw":e.reject(n);break;default:e.resolve({value:n,done:!1})}(e=e.next)?o(e.key,e.arg):r=null}this._invoke=function(t,n){return new Promise((function(i,a){var s={key:t,arg:n,resolve:i,reject:a,next:null};r?r=r.next=s:(e=r=s,o(t,n))}))},"function"!=typeof t.return&&(this.return=void 0)}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)},t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";r.r(e);var n=r(1),o=r.n(n),i=r(2),a=r.n(i),s=r(0),u=r.n(s),c=r(3),f=r.n(c),l=r(5),h=r.n(l),p=r(6),d=r.n(p);function y(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,n=r||new Set;if(t){if(_(t))n.add(t);else if(_(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"===d()(t))for(var o in t)y(t[o],e,n)}else;return void 0===r?Array.from(n):[]}function _(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var v=new Map,g=function(){function t(){f()(this,t)}return h()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(m(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=v.get(t);e||(e=function(e){if(m(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=v.get(t);v.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=y(e);self.postMessage(r,n)}}}]),t}();function m(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var E=0;function w(t,e){return new Promise((function(r,n){var o=E++;g.addEventListener((function t(e,i){if(i.id===o)switch(e){case"done":g.removeEventListener(t),r(i.result);break;case"error":g.removeEventListener(t),n(i.error)}}));var i={id:o,input:t,options:e};g.postMessage("process",i)}))}function A(t){return R.apply(this,arguments)}function R(){return(R=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,i=e.context,!r.parseSync&&!r.parse){t.next=6;break}a=n,s=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}c=new TextDecoder,a=c.decode(n),s=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=S(S({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,s(a,S({},o),i,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var x=r(7),O=r.n(x),T=function(t){return"boolean"==typeof t},M=function(t){return"function"==typeof t},C=function(t){return null!==t&&"object"===d()(t)},P=function(t){return C(t)&&t.constructor==={}.constructor},D=function(t){return t&&"function"==typeof t[Symbol.iterator]},k=function(t){return t&&"function"==typeof t[Symbol.asyncIterator]},I=function(t){return"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},L=function(t){return"undefined"!=typeof Blob&&t instanceof Blob},B=function(t){return function(t){return"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||C(t)&&M(t.tee)&&M(t.cancel)&&M(t.getReader)}(t)||function(t){return C(t)&&M(t.read)&&M(t.pipe)&&T(t.readable)}(t)};function G(t,e){if(!t)throw new Error(e||"loader assertion failed.")}function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function U(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?j(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function N(t){var e;return!!t&&(Array.isArray(t)&&(t=t[0]),Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions))}function H(t){var e,r,n;return G(t,"null loader"),G(N(t),"invalid loader"),Array.isArray(t)&&(n=t[1],t=U(U({},t=t[0]),{},{options:U(U({},t.options),n)})),(null!==(e=t)&&void 0!==e&&e.parseTextSync||null!==(r=t)&&void 0!==r&&r.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}var F=r(48),X="",K={};function z(t){for(var e in K)if(t.startsWith(e)){var r=K[e];t=t.replace(e,r)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(X).concat(t)),t}var W=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,V=/^([-\w.]+\/[-\w.+]+)/;function q(t){var e=W.exec(t);return e?e[1]:""}var Q=/\?.*/;function Z(t){if(I(t)){var e=J(t.url||""),r=t.headers.get("content-type")||"";return{url:e,type:(n=r,o=V.exec(n),(o?o[1]:n)||q(e))}}var n,o;return L(t)?{url:J(t.name||""),type:t.type||""}:"string"==typeof t?{url:J(t),type:q(t)}:{url:"",type:""}}function Y(t){return I(t)?t.headers["content-length"]||-1:L(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function J(t){return t.replace(Q,"")}function $(t){return tt.apply(this,arguments)}function tt(){return(tt=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!I(e)){t.next=2;break}return t.abrupt("return",e);case 2:return r={},(n=Y(e))>=0&&(r["content-length"]=String(n)),o=Z(e),i=o.url,(a=o.type)&&(r["content-type"]=a),t.next=9,it(e);case 9:return(s=t.sent)&&(r["x-first-bytes"]=s),"string"==typeof e&&(e=(new TextEncoder).encode(e)),c=new Response(e,{headers:r}),Object.defineProperty(c,"url",{value:i}),t.abrupt("return",c);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function et(t){return rt.apply(this,arguments)}function rt(){return(rt=a()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,nt(e);case 3:throw r=t.sent,new Error(r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nt(t){return ot.apply(this,arguments)}function ot(){return(ot=a()(u.a.mark((function t(e){var r,n,o;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,n=e.headers.get("Content-Type"),o=e.statusText,!n.includes("application/json")){t.next=11;break}return t.t0=o,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,o=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:r=(r+=o).length>60?"".concat(r.slice(60),"..."):r,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",r);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function it(t){return at.apply(this,arguments)}function at(){return(at=a()(u.a.mark((function t(e){var r,n,o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=5,"string"!=typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,r)));case 3:if(!(e instanceof Blob)){t.next=8;break}return n=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){var r;return t(null==e||null===(r=e.target)||void 0===r?void 0:r.result)},e.readAsDataURL(n)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return o=e.slice(0,r),i=st(o),t.abrupt("return","data:base64,".concat(i));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function st(t){for(var e="",r=new Uint8Array(t),n=0;n<r.byteLength;n++)e+=String.fromCharCode(r[n]);return btoa(e)}function ut(t,e){return ct.apply(this,arguments)}function ct(){return(ct=a()(u.a.mark((function t(e,r){var n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"!=typeof e){t.next=7;break}return e=z(e),n=r,null!=r&&r.fetch&&"function"!=typeof(null==r?void 0:r.fetch)&&(n=r.fetch),t.next=6,fetch(e,n);case 6:return t.abrupt("return",t.sent);case 7:return t.next=9,$(e);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ft=r(27);const lt="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",ht=Object(ft.a)();class pt{constructor(t,e,r="sessionStorage"){this.storage=function(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch(t){return null}}(r),this.id=t,this.config={},Object.assign(this.config,e),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){return this.config={},this.updateConfiguration(t)}updateConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function dt(t,e,r,n=600){const o=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));const i=t.width*r,a=t.height*r,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(i/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(o,");"),"background-size:".concat(i,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),s]}const yt={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function _t(t){return"string"==typeof t?yt[t.toUpperCase()]||yt.WHITE:t}function vt(t,e){if(!t)throw new Error(e||"Assertion failed")}var gt=r(11);function mt(){let t;if(ht&&gt.b.performance)t=gt.b.performance.now();else if(gt.a.hrtime){const e=gt.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const bt={debug:ht&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},St={enabled:!0,level:0};function Et(){}const wt={},At={once:!0};function Rt(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}class xt{constructor({id:t}={id:""}){this.id=t,this.VERSION=lt,this._startTs=mt(),this._deltaTs=mt(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new pt("__probe-".concat(this.id,"__"),St),this.userData={},this.timeStamp("".concat(this.id," started")),function(t,e=["constructor"]){const r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r);for(const r of n)"function"==typeof t[r]&&(e.find(t=>r===t)||(t[r]=t[r].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((mt()-this._startTs).toPrecision(10))}getDelta(){return Number((mt()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.updateConfiguration({enabled:t}),this}setLevel(t){return this._storage.updateConfiguration({level:t}),this}assert(t,e){vt(t,e)}warn(t){return this._getLogFunction(0,t,bt.warn,arguments,At)}error(t){return this._getLogFunction(0,t,bt.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,bt.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,bt.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,bt.debug||bt.info,arguments,At)}table(t,e,r){return e?this._getLogFunction(t,e,console.table||Et,r&&[r],{tag:Rt(e)}):Et}image({logLevel:t,priority:e,image:n,message:o="",scale:i=1}){return this._shouldLog(t||e)?ht?function({image:t,message:e="",scale:r=1}){if("string"==typeof t){const n=new Image;return n.onload=()=>{const t=dt(n,e,r);console.log(...t)},n.src=t,Et}const n=t.nodeName||"";if("img"===n.toLowerCase())return console.log(...dt(t,e,r)),Et;if("canvas"===n.toLowerCase()){const n=new Image;return n.onload=()=>console.log(...dt(n,e,r)),n.src=t.toDataURL(),Et}return Et}({image:n,message:o,scale:i}):function({image:t,message:e="",scale:n=1}){let o=null;try{o=r(36)}catch(t){}if(o)return()=>o(t,{fit:"box",width:"".concat(Math.round(80*n),"%")}).then(t=>console.log(t));return Et}({image:n,message:o,scale:i}):Et}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(t){return this._storage.config[t]}set(t,e){this._storage.updateConfiguration({[t]:e})}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||Et)}group(t,e,r={collapsed:!1}){r=Tt({logLevel:t,message:e,opts:r});const{collapsed:n}=r;return r.method=(n?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e,r={}){return this.group(t,e,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||Et)}withGroup(t,e,r){this.group(t,e)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=Ot(t)}_getLogFunction(t,e,r,n=[],o){if(this._shouldLog(t)){o=Tt({logLevel:t,message:e,args:n,opts:o}),vt(r=r||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=mt();const i=o.tag||o.message;if(o.once){if(wt[i])return Et;wt[i]=mt()}return e=function(t,e,r){if("string"==typeof e){const a=r.time?function(t,e=8){const r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(r.total)):"";e=r.time?"".concat(t,": ").concat(a," ").concat(e):"".concat(t,": ").concat(e),n=e,o=r.color,i=r.background,ht||"string"!=typeof n||(o&&(o=_t(o),n="[".concat(o,"m").concat(n,"")),i&&(o=_t(i),n="[".concat(i+10,"m").concat(n,""))),e=n}var n,o,i;return e}(this.id,o.message,o),r.bind(console,e,...o.args)}return Et}}function Ot(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return vt(Number.isFinite(e)&&e>=0),e}function Tt(t){const{logLevel:e,message:r}=t;t.logLevel=Ot(e);const n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(t.args=n,typeof e){case"string":case"function":void 0!==r&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const o=typeof t.message;return vt("string"===o||"object"===o),Object.assign(t,t.opts)}xt.VERSION=lt;var Mt=new xt({id:"loaders.gl"}),Ct=function(){function t(){f()(this,t)}return h()(t,[{key:"log",value:function(){return function(){}}},{key:"info",value:function(){return function(){}}},{key:"warn",value:function(){return function(){}}},{key:"error",value:function(){return function(){}}}]),t}(),Pt={fetch:null,mimeType:void 0,nothrow:!1,log:new(function(){function t(){f()(this,t),o()(this,"console",void 0),this.console=console}return h()(t,[{key:"log",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.log).bind.apply(t,[this.console].concat(r))}},{key:"info",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.info).bind.apply(t,[this.console].concat(r))}},{key:"warn",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.warn).bind.apply(t,[this.console].concat(r))}},{key:"error",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.error).bind.apply(t,[this.console].concat(r))}}]),t}()),CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},Dt={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function kt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return It(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return It(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function It(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gt(){F.a.loaders=F.a.loaders||{};var t=F.a.loaders;return t._state=t._state||{},t._state}var jt=function(){var t=Gt();return t.globalOptions=t.globalOptions||Bt({},Pt),t.globalOptions};function Ut(t,e,r,n){return r=r||[],function(t,e){Ht(t,null,Pt,Dt,e);var r,n=kt(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=t&&t[o.id]||{},a=o.options&&o.options[o.id]||{},s=o.deprecatedOptions&&o.deprecatedOptions[o.id]||{};Ht(i,o.id,a,s,e)}}catch(t){n.e(t)}finally{n.f()}}(t,r=Array.isArray(r)?r:[r]),Xt(e,t,n)}function Nt(t,e){var r=jt(),n=t||r;return"function"==typeof n.fetch?n.fetch:C(n.fetch)?function(t){return ut(t,n)}:null!=e&&e.fetch?null==e?void 0:e.fetch:ut}function Ht(t,e,r,n,o){var i=e||"Top level",a=e?"".concat(e,"."):"";for(var s in t){var u=!e&&C(t[s]);if(!(s in r)&&!("baseUri"===s&&!e)&&!("workerUrl"===s&&e))if(s in n)Mt.warn("".concat(i," loader option '").concat(a).concat(s,"' no longer supported, use '").concat(n[s],"'"))();else if(!u){var c=Ft(s,o);Mt.warn("".concat(i," loader option '").concat(a).concat(s,"' not recognized. ").concat(c))()}}}function Ft(t,e){var r,n=t.toLowerCase(),o="",i=kt(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;for(var s in a.options){if(t===s)return"Did you mean '".concat(a.id,".").concat(s,"'?");var u=s.toLowerCase();(n.startsWith(u)||u.startsWith(n))&&(o=o||"Did you mean '".concat(a.id,".").concat(s,"'?"))}}}catch(t){i.e(t)}finally{i.f()}return o}function Xt(t,e,r){var n=Bt({},t.options||{});return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(n,r),null===n.log&&(n.log=new Ct),Kt(n,jt()),Kt(n,e),n}function Kt(t,e){for(var r in e)if(r in e){var n=e[r];P(n)&&P(t[r])?t[r]=Bt(Bt({},t[r]),e[r]):t[r]=e[r]}}function zt(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"3.0.10";zt(t,"no worker provided");var r=t.version;return!(!e||!r)}var Vt=r(9),qt=new Map;function Qt(t){zt(t.source&&!t.url||!t.source&&t.url);var e=qt.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return Zt((e=t,"try {\n importScripts('".concat(e,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var e}(t.url),qt.set(t.url,e)),t.source&&(e=Zt(t.source),qt.set(t.source,e))),zt(e),e}function Zt(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}var Yt=function(){},Jt=function(){function t(e){f()(this,t),o()(this,"name",void 0),o()(this,"source",void 0),o()(this,"url",void 0),o()(this,"terminated",!1),o()(this,"worker",void 0),o()(this,"onMessage",void 0),o()(this,"onError",void 0),o()(this,"_loadableURL","");var r=e.name,n=e.source,i=e.url;zt(n||i),this.name=r,this.source=n,this.url=i,this.onMessage=Yt,this.onError=function(t){return console.log(t)},this.worker=this._createBrowserWorker()}return h()(t,[{key:"destroy",value:function(){this.onMessage=Yt,this.onError=Yt,this.worker.terminate(),this.terminated=!0}},{key:"isRunning",get:function(){return Boolean(this.onMessage)}},{key:"postMessage",value:function(t,e){e=e||y(t),this.worker.postMessage(t,e)}},{key:"_getErrorFromErrorEvent",value:function(t){var e="Failed to load ";return e+="worker ".concat(this.name,". "),t.message&&(e+="".concat(t.message," in ")),t.lineno&&(e+=":".concat(t.lineno,":").concat(t.colno)),new Error(e)}},{key:"_createBrowserWorker",value:function(){var t=this;this._loadableURL=Qt({source:this.source,url:this.url});var e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=function(e){e.data?t.onMessage(e.data):t.onError(new Error("No data received"))},e.onerror=function(e){t.onError(t._getErrorFromErrorEvent(e)),t.terminated=!0},e.onmessageerror=function(t){return console.error(t)},e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof Worker}}]),t}(),$t=function(){function t(e,r){var n=this;f()(this,t),o()(this,"name",void 0),o()(this,"workerThread",void 0),o()(this,"isRunning",void 0),o()(this,"result",void 0),o()(this,"_resolve",void 0),o()(this,"_reject",void 0),this.name=e,this.workerThread=r,this.isRunning=!0,this._resolve=function(){},this._reject=function(){},this.result=new Promise((function(t,e){n._resolve=t,n._reject=e}))}return h()(t,[{key:"postMessage",value:function(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}},{key:"done",value:function(t){zt(this.isRunning),this.isRunning=!1,this._resolve(t)}},{key:"error",value:function(t){zt(this.isRunning),this.isRunning=!1,this._reject(t)}}]),t}();function te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ee(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?te(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var re=function(){function t(e){f()(this,t),o()(this,"name","unnamed"),o()(this,"source",void 0),o()(this,"url",void 0),o()(this,"maxConcurrency",1),o()(this,"maxMobileConcurrency",1),o()(this,"onDebug",(function(){})),o()(this,"reuseWorkers",!0),o()(this,"props",{}),o()(this,"jobQueue",[]),o()(this,"idleQueue",[]),o()(this,"count",0),o()(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}var e,r;return h()(t,[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"setProps",value:function(t){this.props=ee(ee({},this.props),t),void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}},{key:"startJob",value:(r=a()(u.a.mark((function t(e){var r,n,o,i=this,a=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:function(t,e,r){return t.done(r)},n=a.length>2&&void 0!==a[2]?a[2]:function(t,e){return t.error(e)},o=new Promise((function(t){return i.jobQueue.push({name:e,onMessage:r,onError:n,onStart:t}),i})),this._startQueuedJob(),t.next=6,o;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"_startQueuedJob",value:(e=a()(u.a.mark((function t(){var e,r,n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:if(!(r=this.jobQueue.shift())){t.next=18;break}return this.onDebug({message:"Starting job",name:r.name,workerThread:e,backlog:this.jobQueue.length}),n=new $t(r.name,e),e.onMessage=function(t){return r.onMessage(n,t.type,t.payload)},e.onError=function(t){return r.onError(n,t)},r.onStart(n),t.prev=12,t.next=15,n.result;case 15:return t.prev=15,this.returnWorkerToQueue(e),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[12,,15,18]])}))),function(){return e.apply(this,arguments)})},{key:"returnWorkerToQueue",value:function(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;var t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new Jt({name:t,source:this.source,url:this.url})}return null}},{key:"_getMaxConcurrency",value:function(){return Vt.c?this.maxMobileConcurrency:this.maxConcurrency}}]),t}();function ne(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return oe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oe(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ie(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ae(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var se={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},ue=function(){function t(e){f()(this,t),o()(this,"props",void 0),o()(this,"workerPools",new Map),this.props=ae({},se),this.setProps(e),this.workerPools=new Map}return h()(t,[{key:"destroy",value:function(){var t,e=ne(this.workerPools.values());try{for(e.s();!(t=e.n()).done;){t.value.destroy()}}catch(t){e.e(t)}finally{e.f()}}},{key:"setProps",value:function(t){this.props=ae(ae({},this.props),t);var e,r=ne(this.workerPools.values());try{for(r.s();!(e=r.n()).done;){e.value.setProps(this._getWorkerPoolProps())}}catch(t){r.e(t)}finally{r.f()}}},{key:"getWorkerPool",value:function(t){var e=t.name,r=t.source,n=t.url,o=this.workerPools.get(e);return o||((o=new re({name:e,source:r,url:n})).setProps(this._getWorkerPoolProps()),this.workerPools.set(e,o)),o}},{key:"_getWorkerPoolProps",value:function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}],[{key:"isSupported",value:function(){return Jt.isSupported()}},{key:"getWorkerFarm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t._workerFarm=t._workerFarm||new t({}),t._workerFarm.setProps(e),t._workerFarm}}]),t}();o()(ue,"_workerFarm",void 0);function ce(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e[t.id]||{},n="".concat(t.id,"-worker.js"),o=r.workerUrl;if("test"===e._workerType&&(o="modules/".concat(t.module,"/dist/").concat(n)),!o){var i=t.version;"latest"===i&&(i="latest");var a=i?"@".concat(i):"";o="https://unpkg.com/@loaders.gl/".concat(t.module).concat(a,"/dist/").concat(n)}return zt(o),o}function fe(t,e){return!!ue.isSupported()&&(t.worker&&(null==e?void 0:e.worker))}function le(t,e,r,n,o){return he.apply(this,arguments)}function he(){return(he=a()(u.a.mark((function t(e,r,n,o,i){var a,s,c,f,l,h;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.id,s=ce(e,n),c=ue.getWorkerFarm(n),f=c.getWorkerPool({name:a,url:s}),n=JSON.parse(JSON.stringify(n)),t.next=7,f.startJob("process-on-worker",pe.bind(null,i));case 7:return(l=t.sent).postMessage("process",{input:r,options:n}),t.next=11,l.result;case 11:return h=t.sent,t.next=14,h.result;case 14:return t.abrupt("return",t.sent);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pe(t,e,r,n){return de.apply(this,arguments)}function de(){return(de=a()(u.a.mark((function t(e,r,n,o){var i,a,s,c,f;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n,t.next="done"===t.t0?3:"error"===t.t0?5:"process"===t.t0?7:20;break;case 3:return r.done(o),t.abrupt("break",21);case 5:return r.error(o.error),t.abrupt("break",21);case 7:return i=o.id,a=o.input,s=o.options,t.prev=8,t.next=11,e(a,s);case 11:c=t.sent,r.postMessage("done",{id:i,result:c}),t.next=19;break;case 15:t.prev=15,t.t1=t.catch(8),f=t.t1 instanceof Error?t.t1.message:"unknown error",r.postMessage("error",{id:i,error:f});case 19:return t.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(n));case 21:case"end":return t.stop()}}),t,null,[[8,15]])})))).apply(this,arguments)}var ye=r(16),_e=r.n(ye),ve=r(22);function ge(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return me(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return me(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function me(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function be(t){if(ve.toArrayBuffer&&(t=ve.toArrayBuffer(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.buffer;if("string"==typeof t){var e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"===d()(t)&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function Se(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,o=e.map((function(t){return t instanceof ArrayBuffer?new Uint8Array(t):t})),i=o.reduce((function(t,e){return t+e.byteLength}),0),a=new Uint8Array(i),s=0,u=ge(o);try{for(u.s();!(n=u.n()).done;){var c=n.value;a.set(c,s),s+=c.byteLength}}catch(t){u.e(t)}finally{u.f()}return a.buffer}function Ee(t){return we.apply(this,arguments)}function we(){return(we=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c,f;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[],n=!0,o=!1,t.prev=3,a=_e()(e);case 5:return t.next=7,a.next();case 7:return s=t.sent,n=s.done,t.next=11,s.value;case 11:if(c=t.sent,n){t.next=18;break}f=c,r.push(f);case 15:n=!0,t.next=5;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(3),o=!0,i=t.t0;case 24:if(t.prev=24,t.prev=25,n||null==a.return){t.next=29;break}return t.next=29,a.return();case 29:if(t.prev=29,!o){t.next=32;break}throw i;case 32:return t.finish(29);case 33:return t.finish(24);case 34:return t.abrupt("return",Se.apply(void 0,r));case 35:case"end":return t.stop()}}),t,null,[[3,20,24,34],[25,,29,33]])})))).apply(this,arguments)}var Ae=u.a.mark(Re);function Re(t,e){var r,n,o,i,a;return u.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=(null==e?void 0:e.chunkSize)||262144,n=0,o=new TextEncoder;case 3:if(!(n<t.length)){s.next=11;break}return i=Math.min(t.length-n,r),a=t.slice(n,n+i),n+=i,s.next=9,o.encode(a);case 9:s.next=3;break;case 11:case"end":return s.stop()}}),Ae)}var xe=u.a.mark(Oe);function Oe(t){var e,r,n,o,i,a,s,c=arguments;return u.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:e=c.length>1&&void 0!==c[1]?c[1]:{},r=e.chunkSize,n=void 0===r?262144:r,o=0;case 3:if(!(o<t.byteLength)){u.next=14;break}return i=Math.min(t.byteLength-o,n),a=new ArrayBuffer(i),s=new Uint8Array(t,o,i),new Uint8Array(a).set(s),o+=i,u.next=12,a;case 12:u.next=3;break;case 14:case"end":return u.stop()}}),xe)}var Te=r(12),Me=r.n(Te),Ce=r(15),Pe=r.n(Ce);function De(){return(De=Pe()(u.a.mark((function t(e,r){var n,o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(null==r?void 0:r.chunkSize)||1048576,o=0;case 2:if(!(o<e.size)){t.next=12;break}return i=o+n,t.next=6,Me()(e.slice(o,i).arrayBuffer());case 6:return a=t.sent,o=i,t.next=10,a;case 10:t.next=2;break;case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ke(t,e){return F.b?function(t,e){return Ie.apply(this,arguments)}(t,e):function(t,e){return Le.apply(this,arguments)}(t,e)}function Ie(){return(Ie=Pe()(u.a.mark((function t(e,r){var n,o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.getReader(),t.prev=1;case 2:return i=o||n.read(),null!=r&&r._streamReadAhead&&(o=n.read()),t.next=7,Me()(i);case 7:if(a=t.sent,s=a.done,c=a.value,!s){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,be(c);case 14:t.next=2;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(1),n.releaseLock();case 21:case"end":return t.stop()}}),t,null,[[1,18]])})))).apply(this,arguments)}function Le(){return(Le=Pe()(u.a.mark((function t(e,r){var n,o,i,a,s,c,f;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=!0,o=!1,t.prev=2,a=_e()(e);case 4:return t.next=6,Me()(a.next());case 6:return s=t.sent,n=s.done,t.next=10,Me()(s.value);case 10:if(c=t.sent,n){t.next=18;break}return f=c,t.next=15,be(f);case 15:n=!0,t.next=4;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(2),o=!0,i=t.t0;case 24:if(t.prev=24,t.prev=25,n||null==a.return){t.next=29;break}return t.next=29,Me()(a.return());case 29:if(t.prev=29,!o){t.next=32;break}throw i;case 32:return t.finish(29);case 33:return t.finish(24);case 34:case"end":return t.stop()}}),t,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function Be(t,e){if("string"==typeof t)return Re(t,e);if(t instanceof ArrayBuffer)return Oe(t,e);if(L(t))return function(t,e){return De.apply(this,arguments)}(t,e);if(B(t))return ke(t,e);if(I(t))return ke(t.body,e);throw new Error("makeIterator")}var Ge="Cannot convert supplied data type";function je(t,e,r){if(e.text&&"string"==typeof t)return t;var n;if((n=t)&&"object"===d()(n)&&n.isBuffer&&(t=t.buffer),t instanceof ArrayBuffer){var o=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var i=t.buffer,a=t.byteLength||t.length;return 0===t.byteOffset&&a===i.byteLength||(i=i.slice(t.byteOffset,t.byteOffset+a)),i}throw new Error(Ge)}function Ue(t,e,r){return Ne.apply(this,arguments)}function Ne(){return(Ne=a()(u.a.mark((function t(e,r,n){var o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!=typeof e&&!o){t.next=3;break}return t.abrupt("return",je(e,r));case 3:if(!L(e)){t.next=7;break}return t.next=6,$(e);case 6:e=t.sent;case 7:if(!I(e)){t.next=21;break}return i=e,t.next=11,et(i);case 11:if(!r.binary){t.next=17;break}return t.next=14,i.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,i.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if(B(e)&&(e=Be(e,n)),!D(e)&&!k(e)){t.next=24;break}return t.abrupt("return",Ee(e));case 24:throw new Error(Ge);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function He(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?He(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xe(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(r)return r;var n=Fe({fetch:Nt(e,t)},t);return Array.isArray(n.loaders)||(n.loaders=null),n}function Ke(t,e){if(!e&&t&&!Array.isArray(t))return t;var r;if(t&&(r=Array.isArray(t)?t:[t]),e&&e.loaders){var n=Array.isArray(e.loaders)?e.loaders:[e.loaders];r=r?[].concat(O()(r),O()(n)):n}return r&&r.length?r:null}var ze=function(){var t=Gt();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function We(){return ze()}function Ve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ve(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Ze(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ze(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ye=/\.([^.]+)$/;function Je(t){return $e.apply(this,arguments)}function $e(){return($e=a()(u.a.mark((function t(e){var r,n,o,i,a=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>1&&void 0!==a[1]?a[1]:[],n=a.length>2?a[2]:void 0,o=a.length>3?a[3]:void 0,rr(e)){t.next=5;break}return t.abrupt("return",null);case 5:if(!(i=tr(e,r,qe(qe({},n),{},{nothrow:!0}),o))){t.next=8;break}return t.abrupt("return",i);case 8:if(!L(e)){t.next=13;break}return t.next=11,e.slice(0,10).arrayBuffer();case 11:e=t.sent,i=tr(e,r,n,o);case 13:if(i||null!=n&&n.nothrow){t.next=15;break}throw new Error(nr(e));case 15:return t.abrupt("return",i);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;if(!rr(t))return null;if(e&&!Array.isArray(e))return H(e);var o,i=[];(e&&(i=i.concat(e)),null!=r&&r.ignoreRegisteredLoaders)||(o=i).push.apply(o,O()(We()));or(i);var a=er(t,i,r,n);if(!(a||null!=r&&r.nothrow))throw new Error(nr(t));return a}function er(t,e,r,n){var o=Z(t),i=o.url,a=o.type,s=i||(null==n?void 0:n.url),u=null;return null!=r&&r.mimeType&&(u=ir(e,null==r?void 0:r.mimeType)),u=(u=(u=(u=u||function(t,e){var r=e&&Ye.exec(e),n=r&&r[1];return n?function(t,e){e=e.toLowerCase();var r,n=Qe(t);try{for(n.s();!(r=n.n()).done;){var o,i=r.value,a=Qe(i.extensions);try{for(a.s();!(o=a.n()).done;){if(o.value.toLowerCase()===e)return i}}catch(t){a.e(t)}finally{a.f()}}}catch(t){n.e(t)}finally{n.f()}return null}(t,n):null}(e,s))||ir(e,a))||function(t,e){if(!e)return null;var r,n=Qe(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if("string"==typeof e){if(ar(e,o))return o}else if(ArrayBuffer.isView(e)){if(sr(e.buffer,e.byteOffset,o))return o}else if(e instanceof ArrayBuffer){if(sr(e,0,o))return o}}}catch(t){n.e(t)}finally{n.f()}return null}(e,t))||ir(e,null==r?void 0:r.fallbackMimeType)}function rr(t){return!(t instanceof Response&&204===t.status)}function nr(t){var e=Z(t),r=e.url,n=e.type,o="No valid loader found";return t&&(o+=' data: "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return ur(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var r=0;return ur(t,r,e)}return""}(t),'", contentType: "').concat(n,'"')),r&&(o+=" url: ".concat(r)),o}function or(t){var e,r=Qe(t);try{for(r.s();!(e=r.n()).done;){H(e.value)}}catch(t){r.e(t)}finally{r.f()}}function ir(t,e){var r,n=Qe(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.mimeTypes&&o.mimeTypes.includes(e))return o;if(e==="application/x.".concat(o.id))return o}}catch(t){n.e(t)}finally{n.f()}return null}function ar(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some((function(e){return t.startsWith(e)}))}function sr(t,e,r){return(Array.isArray(r.tests)?r.tests:[r.tests]).some((function(n){return function(t,e,r,n){if(n instanceof ArrayBuffer)return function(t,e,r){if(r=r||t.byteLength,t.byteLength<r||e.byteLength<r)return!1;for(var n=new Uint8Array(t),o=new Uint8Array(e),i=0;i<n.length;++i)if(n[i]!==o[i])return!1;return!0}(n,t,n.byteLength);switch(d()(n)){case"function":return n(t,r);case"string":var o=ur(t,e,n.length);return n===o;default:return!1}}(t,e,r,n)}))}function ur(t,e,r){if(t.byteLength<e+r)return"";for(var n=new DataView(t),o="",i=0;i<r;i++)o+=String.fromCharCode(n.getUint8(e+i));return o}function cr(t,e,r,n){return fr.apply(this,arguments)}function fr(){return(fr=a()(u.a.mark((function t(e,r,n,o){var i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return zt(!o||"object"===d()(o)),!r||Array.isArray(r)||N(r)||(o=void 0,n=r,r=void 0),t.next=4,e;case 4:return e=t.sent,n=n||{},i=Z(e),a=i.url,s=Ke(r,o),t.next=11,Je(e,s,n);case 11:if(c=t.sent){t.next=14;break}return t.abrupt("return",null);case 14:return n=Ut(n,c,s,a),o=Xe({url:a,parse:cr,loaders:s},n,o),t.next=18,lr(c,e,n,o);case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function lr(t,e,r,n){return hr.apply(this,arguments)}function hr(){return(hr=a()(u.a.mark((function t(e,r,n,o){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Wt(e),t.next=3,Ue(r,e,n);case 3:if(r=t.sent,!e.parseTextSync||"string"!=typeof r){t.next=7;break}return n.dataType="text",t.abrupt("return",e.parseTextSync(r,n,o,e));case 7:if(!fe(e,n)){t.next=11;break}return t.next=10,le(e,r,n,o,cr);case 10:return t.abrupt("return",t.sent);case 11:if(!e.parseText||"string"!=typeof r){t.next=15;break}return t.next=14,e.parseText(r,n,o,e);case 14:return t.abrupt("return",t.sent);case 15:if(!e.parse){t.next=19;break}return t.next=18,e.parse(r,n,o,e);case 18:return t.abrupt("return",t.sent);case 19:throw zt(!e.parseSync),new Error("".concat(e.id," loader - no parser found and worker is disabled"));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pr(t,e,r,n){return dr.apply(this,arguments)}function dr(){return(dr=a()(u.a.mark((function t(e,r,n,o){var i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(r)||N(r)||(void 0,n=r,r=void 0),i=Nt(n),a=e,"string"!=typeof e){t.next=7;break}return t.next=6,i(e);case 6:a=t.sent;case 7:if(!L(e)){t.next=11;break}return t.next=10,i(e);case 10:a=t.sent;case 11:return t.next=13,cr(a,r,n);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yr(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const _r=1/Math.PI*180,vr=1/180*Math.PI,gr={};function mr(t,{precision:e=gr.precision||4}={}){return t=function(t){return Math.round(t/gr.EPSILON)*gr.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function br(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Sr(t,e,r){if(br(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function Er(t){return function(t,e){return Sr(t,t=>t*vr,e)}(t)}function wr(t){return function(t,e){return Sr(t,t=>t*_r,e)}(t)}function Ar(t,e,r){const n=gr.EPSILON;r&&(gr.EPSILON=r);try{if(t===e)return!0;if(br(t)&&br(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Ar(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=gr.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{gr.EPSILON=n}}gr.EPSILON=1e-12,gr.debug=!1,gr.precision=4,gr.printTypes=!1,gr.printDegrees=!1,gr.printRowMajor=!0;class Rr extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return yr(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:br(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(gr)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+mr(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!Ar(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const o=t[n];this[n]=o+r*(e[n]-o)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(gr.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}function xr(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function Or(t,e,r=""){if(gr.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}const Tr={};function Mr(t,e){Tr[t]||(Tr[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}class Cr extends Rr{get ELEMENTS(){return yr(!1),0}copy(t){return yr(!1),this}get x(){return this[0]}set x(t){this[0]=xr(t)}get y(){return this[1]}set y(t){this[1]=xr(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return xr(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return xr(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return yr(t>=0&&t<this.ELEMENTS,"index is out of range"),xr(this[t])}setComponent(t,e){return yr(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}var Pr=1e-6,Dr="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function kr(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function Ir(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Lr(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/a,t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Br,Gr;Br=new Dr(3),Dr!=Float32Array&&(Br[0]=0,Br[1]=0,Br[2]=0),Gr=Br;function jr(t,e,r){const n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i||1;return t[0]=(r[0]*n+r[4]*o+r[8]*i)/a,t[1]=(r[1]*n+r[5]*o+r[9]*i)/a,t[2]=(r[2]*n+r[6]*o+r[10]*i)/a,t}const Ur=[0,0,0],Nr={};class Hr extends Cr{static get ZERO(){return Nr.ZERO=Nr.ZERO||Object.freeze(new Hr(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&br(t)?this.copy(t):(gr.debug&&(xr(t),xr(e),xr(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return gr.debug&&(xr(t.x),xr(t.y),xr(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=xr(t)}angle(t){return r=t,n=(e=this)[0],o=e[1],i=e[2],a=r[0],s=r[1],u=r[2],c=Math.sqrt(n*n+o*o+i*i)*Math.sqrt(a*a+s*s+u*u),f=c&&Ir(e,r)/c,Math.acos(Math.min(Math.max(f,-1),1));var e,r,n,o,i,a,s,u,c,f}cross(t){return function(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[0],s=r[1],u=r[2];t[0]=o*u-i*s,t[1]=i*a-n*u,t[2]=n*s-o*a}(this,this,t),this.check()}rotateX({radians:t,origin:e=Ur}){return function(t,e,r,n){var o=[],i=[];o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(n)-o[2]*Math.sin(n),i[2]=o[1]*Math.sin(n)+o[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2]}(this,this,e,t),this.check()}rotateY({radians:t,origin:e=Ur}){return function(t,e,r,n){var o=[],i=[];o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],i[0]=o[2]*Math.sin(n)+o[0]*Math.cos(n),i[1]=o[1],i[2]=o[2]*Math.cos(n)-o[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2]}(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=Ur}){return function(t,e,r,n){var o=[],i=[];o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],i[0]=o[0]*Math.cos(n)-o[1]*Math.sin(n),i[1]=o[0]*Math.sin(n)+o[1]*Math.cos(n),i[2]=o[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2]}(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return Lr(this,this,t),this.check()}transformAsVector(t){return jr(this,this,t),this.check()}transformByMatrix3(t){return function(t,e,r){var n=e[0],o=e[1],i=e[2];t[0]=n*r[0]+o*r[3]+i*r[6],t[1]=n*r[1]+o*r[4]+i*r[7],t[2]=n*r[2]+o*r[5]+i*r[8]}(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],o=e[1];t[0]=r[0]*n+r[2]*o,t[1]=r[1]*n+r[3]*o,t[2]=e[2]}(this,this,t),this.check()}transformByQuaternion(t){return function(t,e,r){var n=r[0],o=r[1],i=r[2],a=r[3],s=e[0],u=e[1],c=e[2],f=o*c-i*u,l=i*s-n*c,h=n*u-o*s,p=o*h-i*l,d=i*f-n*h,y=n*l-o*f,_=2*a;f*=_,l*=_,h*=_,p*=2,d*=2,y*=2,t[0]=s+f+p,t[1]=u+l+d,t[2]=c+h+y}(this,this,t),this.check()}}class Fr extends Rr{get ELEMENTS(){return yr(!1),0}get RANK(){return yr(!1),0}toString(){let t="[";if(gr.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=xr(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}function Xr(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],p=e[10],d=e[11],y=e[12],_=e[13],v=e[14],g=e[15],m=r[0],b=r[1],S=r[2],E=r[3];return t[0]=m*n+b*s+S*l+E*y,t[1]=m*o+b*u+S*h+E*_,t[2]=m*i+b*c+S*p+E*v,t[3]=m*a+b*f+S*d+E*g,m=r[4],b=r[5],S=r[6],E=r[7],t[4]=m*n+b*s+S*l+E*y,t[5]=m*o+b*u+S*h+E*_,t[6]=m*i+b*c+S*p+E*v,t[7]=m*a+b*f+S*d+E*g,m=r[8],b=r[9],S=r[10],E=r[11],t[8]=m*n+b*s+S*l+E*y,t[9]=m*o+b*u+S*h+E*_,t[10]=m*i+b*c+S*p+E*v,t[11]=m*a+b*f+S*d+E*g,m=r[12],b=r[13],S=r[14],E=r[15],t[12]=m*n+b*s+S*l+E*y,t[13]=m*o+b*u+S*h+E*_,t[14]=m*i+b*c+S*p+E*v,t[15]=m*a+b*f+S*d+E*g,t}function Kr(t,e,r){var n=r[0],o=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}!function(){var t=function(){var t=new Dr(2);return Dr!=Float32Array&&(t[0]=0,t[1]=0),t}()}();!function(){var t=function(){var t=new Dr(4);return Dr!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();const zr=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Wr=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Vr=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),qr={};class Qr extends Fr{static get IDENTITY(){return qr.IDENTITY=qr.IDENTITY||Object.freeze(new Qr(zr)),qr.IDENTITY}static get ZERO(){return qr.ZERO=qr.ZERO||Object.freeze(new Qr(Wr)),qr.ZERO}get INDICES(){return Vr}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,o,i,a,s,u,c,f,l,h,p,d,y){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=o,this[5]=i,this[6]=a,this[7]=s,this[8]=u,this[9]=c,this[10]=f,this[11]=l,this[12]=h,this[13]=p,this[14]=d,this[15]=y,this.check()}setRowMajor(t,e,r,n,o,i,a,s,u,c,f,l,h,p,d,y){return this[0]=t,this[1]=o,this[2]=u,this[3]=h,this[4]=e,this[5]=i,this[6]=c,this[7]=p,this[8]=r,this[9]=a,this[10]=f,this[11]=d,this[12]=n,this[13]=s,this[14]=l,this[15]=y,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(zr)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=r+r,s=n+n,u=o+o,c=r*a,f=n*a,l=n*s,h=o*a,p=o*s,d=o*u,y=i*a,_=i*s,v=i*u;t[0]=1-l-d,t[1]=f+v,t[2]=h-_,t[3]=0,t[4]=f-v,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=h+_,t[9]=p-y,t[10]=1-c-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:o,far:i}){return i===1/0?Qr._computeInfinitePerspectiveOffCenter(this,t,e,r,n,o):function(t,e,r,n,o,i,a){var s=1/(r-e),u=1/(o-n),c=1/(i-a);t[0]=2*i*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*u,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(o+n)*u,t[10]=(a+i)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*i*2*c,t[15]=0}(this,t,e,r,n,o,i),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,o,i){const a=2*i/(r-e),s=2*i/(o-n),u=(r+e)/(r-e),c=(o+n)/(o-n),f=-2*i;return t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),function(t,e,r,n){var o,i,a,s,u,c,f,l,h,p,d=e[0],y=e[1],_=e[2],v=n[0],g=n[1],m=n[2],b=r[0],S=r[1],E=r[2];Math.abs(d-b)<Pr&&Math.abs(y-S)<Pr&&Math.abs(_-E)<Pr?function(t){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(t):(f=d-b,l=y-S,h=_-E,o=g*(h*=p=1/Math.hypot(f,l,h))-m*(l*=p),i=m*(f*=p)-v*h,a=v*l-g*f,(p=Math.hypot(o,i,a))?(o*=p=1/p,i*=p,a*=p):(o=0,i=0,a=0),s=l*a-h*i,u=h*o-f*a,c=f*i-l*o,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),t[0]=o,t[1]=s,t[2]=f,t[3]=0,t[4]=i,t[5]=u,t[6]=l,t[7]=0,t[8]=a,t[9]=c,t[10]=h,t[11]=0,t[12]=-(o*d+i*y+a*_),t[13]=-(s*d+u*y+c*_),t[14]=-(f*d+l*y+h*_),t[15]=1)}(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:o=.1,far:i=500}){return function(t,e,r,n,o,i,a){var s=1/(e-r),u=1/(n-o),c=1/(i-a);t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(o+n)*u,t[14]=(a+i)*c,t[15]=1}(this,t,e,r,n,o,i),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:o=500}){if(t>2*Math.PI)throw Error("radians");const i=t/2,a=r*Math.tan(i),s=a*e;return(new Qr).ortho({left:-s,right:s,bottom:-a,top:a,near:n,far:o})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:o=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return function(t,e,r,n,o){var i,a=1/Math.tan(e/2);t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(n-o),t[10]=(o+n)*i,t[14]=2*o*n*i):(t[10]=-1,t[14]=-2*n)}(this,t,r,n,o),this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],o=t[3],i=t[4],a=t[5],s=t[6],u=t[7],c=t[8],f=t[9],l=t[10],h=t[11],p=t[12],d=t[13],y=t[14],_=t[15],(e*a-r*i)*(l*_-h*y)-(e*s-n*i)*(f*_-h*d)+(e*u-o*i)*(f*y-l*d)+(r*s-n*a)*(c*_-h*p)-(r*u-o*a)*(c*y-l*p)+(n*u-o*s)*(c*d-f*p);var t,e,r,n,o,i,a,s,u,c,f,l,h,p,d,y,_}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],o=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*o,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*o,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*o,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],o=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*o,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*o,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*o,t[8]=this[10]*i,t}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],o=e[3],i=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=o,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],s=e[5],u=e[6],c=e[7],f=e[8],l=e[9],h=e[10],p=e[11],d=e[12],y=e[13],_=e[14],v=e[15],g=r*s-n*a,m=r*u-o*a,b=r*c-i*a,S=n*u-o*s,E=n*c-i*s,w=o*c-i*u,A=f*y-l*d,R=f*_-h*d,x=f*v-p*d,O=l*_-h*y,T=l*v-p*y,M=h*v-p*_,C=g*M-m*T+b*O+S*x-E*R+w*A;C&&(C=1/C,t[0]=(s*M-u*T+c*O)*C,t[1]=(o*T-n*M-i*O)*C,t[2]=(y*w-_*E+v*S)*C,t[3]=(h*E-l*w-p*S)*C,t[4]=(u*x-a*M-c*R)*C,t[5]=(r*M-o*x+i*R)*C,t[6]=(_*b-d*w-v*m)*C,t[7]=(f*w-h*b+p*m)*C,t[8]=(a*T-s*x+c*A)*C,t[9]=(n*x-r*T-i*A)*C,t[10]=(d*E-y*b+v*g)*C,t[11]=(l*b-f*E-p*g)*C,t[12]=(s*R-a*O-u*A)*C,t[13]=(r*O-n*R+o*A)*C,t[14]=(y*m-d*S-_*g)*C,t[15]=(f*S-l*m+h*g)*C)}(this,this),this.check()}multiplyLeft(t){return Xr(this,t,this),this.check()}multiplyRight(t){return Xr(this,this,t),this.check()}rotateX(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[4],a=e[5],s=e[6],u=e[7],c=e[8],f=e[9],l=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*o+c*n,t[5]=a*o+f*n,t[6]=s*o+l*n,t[7]=u*o+h*n,t[8]=c*o-i*n,t[9]=f*o-a*n,t[10]=l*o-s*n,t[11]=h*o-u*n}(this,this,t),this.check()}rotateY(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[0],a=e[1],s=e[2],u=e[3],c=e[8],f=e[9],l=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o-c*n,t[1]=a*o-f*n,t[2]=s*o-l*n,t[3]=u*o-h*n,t[8]=i*n+c*o,t[9]=a*n+f*o,t[10]=s*n+l*o,t[11]=u*n+h*o}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],l=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o+c*n,t[1]=a*o+f*n,t[2]=s*o+l*n,t[3]=u*o+h*n,t[4]=c*o-i*n,t[5]=f*o-a*n,t[6]=l*o-s*n,t[7]=h*o-u*n}(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return function(t,e,r,n){var o,i,a,s,u,c,f,l,h,p,d,y,_,v,g,m,b,S,E,w,A,R,x,O,T=n[0],M=n[1],C=n[2],P=Math.hypot(T,M,C);P<Pr||(T*=P=1/P,M*=P,C*=P,o=Math.sin(r),a=1-(i=Math.cos(r)),s=e[0],u=e[1],c=e[2],f=e[3],l=e[4],h=e[5],p=e[6],d=e[7],y=e[8],_=e[9],v=e[10],g=e[11],m=T*T*a+i,b=M*T*a+C*o,S=C*T*a-M*o,E=T*M*a-C*o,w=M*M*a+i,A=C*M*a+T*o,R=T*C*a+M*o,x=M*C*a-T*o,O=C*C*a+i,t[0]=s*m+l*b+y*S,t[1]=u*m+h*b+_*S,t[2]=c*m+p*b+v*S,t[3]=f*m+d*b+g*S,t[4]=s*E+l*w+y*A,t[5]=u*E+h*w+_*A,t[6]=c*E+p*w+v*A,t[7]=f*E+d*w+g*A,t[8]=s*R+l*x+y*O,t[9]=u*R+h*x+_*O,t[10]=c*R+p*x+v*O,t[11]=f*R+d*x+g*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?Kr(this,this,t):Kr(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n,o,i,a,s,u,c,f,l,h,p,d,y=r[0],_=r[1],v=r[2];e===t?(t[12]=e[0]*y+e[4]*_+e[8]*v+e[12],t[13]=e[1]*y+e[5]*_+e[9]*v+e[13],t[14]=e[2]*y+e[6]*_+e[10]*v+e[14],t[15]=e[3]*y+e[7]*_+e[11]*v+e[15]):(n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=o,t[2]=i,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=f,t[8]=l,t[9]=h,t[10]=p,t[11]=d,t[12]=n*y+s*_+l*v+e[12],t[13]=o*y+u*_+h*v+e[13],t[14]=i*y+c*_+p*v+e[14],t[15]=a*y+f*_+d*v+e[15])}(this,this,t),this.check()}transform(t,e){return 4===t.length?(Or(e=function(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3];return t[0]=r[0]*n+r[4]*o+r[8]*i+r[12]*a,t[1]=r[1]*n+r[5]*o+r[9]*i+r[13]*a,t[2]=r[2]*n+r[6]*o+r[10]*i+r[14]*a,t[3]=r[3]*n+r[7]*o+r[11]*i+r[15]*a,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=function(t,e,r){var n=e[0],o=e[1];return t[0]=r[0]*n+r[4]*o+r[12],t[1]=r[1]*n+r[5]*o+r[13],t}(e||[-0,-0],t,this);break;case 3:e=Lr(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Or(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=function(t,e,r){const n=e[0],o=e[1],i=r[3]*n+r[7]*o||1;return t[0]=(r[0]*n+r[4]*o)/i,t[1]=(r[1]*n+r[5]*o)/i,t}(e||[-0,-0],t,this);break;case 3:e=jr(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Or(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return Mr("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return Mr("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return Mr("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}var Zr=.1,Yr=1e-12,Jr=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;Math.max(6378137,6378137,6356752.314245179);const $r=t=>t,tn=new Hr;function en(t,e,r=$r){return br(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function rn(t,e,r=$r){return br(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const nn=new Hr,on=new Hr,an=new Hr;const sn=new Hr,un={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},cn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},fn={east:new Hr,north:new Hr,up:new Hr,west:new Hr,south:new Hr,down:new Hr},ln=new Hr,hn=new Hr,pn=new Hr;function dn(t,e,r,n,o,i){const a=un[e]&&un[e][r];let s,u,c;yr(a&&(!n||n===a));const f=sn.copy(o);if(Ar(f.x,0,1e-14)&&Ar(f.y,0,1e-14)){const t=Math.sign(f.z);s=ln.fromArray(cn[e]),"east"!==e&&"west"!==e&&s.scale(t),u=hn.fromArray(cn[r]),"east"!==r&&"west"!==r&&u.scale(t),c=pn.fromArray(cn[n]),"east"!==n&&"west"!==n&&c.scale(t)}else{const{up:o,east:i,north:a}=fn;i.set(-f.y,f.x,0).normalize(),t.geodeticSurfaceNormal(f,o),a.copy(o).cross(i);const{down:l,west:h,south:p}=fn;l.copy(o).scale(-1),h.copy(i).scale(-1),p.copy(a).scale(-1),s=fn[e],u=fn[r],c=fn[n]}return i[0]=s.x,i[1]=s.y,i[2]=s.z,i[3]=0,i[4]=u.x,i[5]=u.y,i[6]=u.z,i[7]=0,i[8]=c.x,i[9]=c.y,i[10]=c.z,i[11]=0,i[12]=f.x,i[13]=f.y,i[14]=f.z,i[15]=1,i}const yn=new Hr,_n=new Hr,vn=new Hr,gn=new Hr,mn=new Hr,bn=new Hr;let Sn;class En{static get WGS84(){return Sn=Sn||new En(6378137,6378137,6356752.314245179),Sn}constructor(t=0,e=0,r=0){yr(t>=0),yr(e>=0),yr(r>=0),this.radii=new Hr(t,e,r),this.radiiSquared=new Hr(t*t,e*e,r*r),this.radiiToTheFourth=new Hr(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new Hr(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new Hr(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=Zr,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=_n,n=vn,[,,o]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const i=Math.sqrt(r.dot(n));return n.scale(1/i),r.scale(o),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){bn.from(t);const r=this.scaleToGeodeticSurface(bn,gn);if(!r)return;const n=this.geodeticSurfaceNormal(r,_n),o=mn;o.copy(bn).subtract(r);const i=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=Math.sign(Ir(o,bn))*kr(o);return rn([i,a,s],e,gr._cartographicRadians?$r:wr)}eastNorthUpToFixedFrame(t,e=new Qr){return dn(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,o=new Qr){return dn(this,t,e,r,n,o)}geocentricSurfaceNormal(t,e=[0,0,0]){return yn.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=tn){return en(t,e,gr._cartographicRadians?$r:Er)}(t),n=r[0],o=r[1],i=Math.cos(o);return yn.set(i*Math.cos(n),i*Math.sin(n),Math.sin(o)).normalize(),yn.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return yn.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new Hr){const{oneOverRadii:n,oneOverRadiiSquared:o,centerToleranceSquared:i}=e;nn.from(t);const a=t.x,s=t.y,u=t.z,c=n.x,f=n.y,l=n.z,h=a*a*c*c,p=s*s*f*f,d=u*u*l*l,y=h+p+d,_=Math.sqrt(1/y);if(!Number.isFinite(_))return;const v=on;if(v.copy(t).scale(_),y<i)return v.to(r);const g=o.x,m=o.y,b=o.z,S=an;S.set(v.x*g*2,v.y*m*2,v.z*b*2);let E,w,A,R,x=(1-_)*t.len()/(.5*S.len()),O=0;do{x-=O,E=1/(1+x*g),w=1/(1+x*m),A=1/(1+x*b);const t=E*E,e=w*w,r=A*A;R=h*t+p*e+d*r-1;O=R/(-2*(h*(t*E)*g+p*(e*w)*m+d*(r*A)*b))}while(Math.abs(R)>Yr);return nn.scale([E,w,A]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){gn.from(t);const r=gn.x,n=gn.y,o=gn.z,i=this.oneOverRadiiSquared,a=1/Math.sqrt(r*r*i.x+n*n*i.y+o*o*i.z);return gn.multiplyScalar(a).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return gn.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return gn.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){yr(Ar(this.radii.x,this.radii.y,Jr)),yr(this.radii.z>0),gn.from(t);const n=gn.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return gn.set(0,0,n).to(r)}}function wn(t,e){if(!t)throw new Error(e)}var An=r(14),Rn=An.a._parseImageNode,xn="undefined"!=typeof Image,On="undefined"!=typeof ImageBitmap,Tn=Boolean(Rn),Mn=!!An.b||Tn;function Cn(t){var e=Dn(t);if(!e)throw new Error("Not an image");return e}function Pn(t){switch(Cn(t)){case"data":return t;case"image":case"imagebitmap":var e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function Dn(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"===d()(t)&&t.data&&t.width&&t.height?"data":null}var kn=/^data:image\/svg\+xml/,In=/\.svg((\?|#).*)?$/;function Ln(t){return t&&(kn.test(t)||In.test(t))}function Bn(t,e){if(Ln(e)){var r=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(r=unescape(encodeURIComponent(r)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,".concat(btoa(r))}return Gn(t,e)}function Gn(t,e){if(Ln(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function jn(t,e,r){return Un.apply(this,arguments)}function Un(){return(Un=a()(u.a.mark((function t(e,r,n){var o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=Bn(e,n),i=self.URL||self.webkitURL,a="string"!=typeof o&&i.createObjectURL(o),t.prev=3,t.next=6,Nn(a||o,r);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,a&&i.revokeObjectURL(a),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function Nn(t,e){return Hn.apply(this,arguments)}function Hn(){return(Hn=a()(u.a.mark((function t(e,r){var n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=new Image).src=e,!(r.image&&r.image.decode&&n.decode)){t.next=6;break}return t.next=5,n.decode();case 5:return t.abrupt("return",n);case 6:return t.next=8,new Promise((function(t,r){try{n.onload=function(){return t(n)},n.onerror=function(t){return r(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(t){r(t)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Fn={},Xn=!0;function Kn(t,e,r){return zn.apply(this,arguments)}function zn(){return(zn=a()(u.a.mark((function t(e,r,n){var o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Ln(n)){t.next=7;break}return t.next=3,jn(e,r,n);case 3:i=t.sent,o=i,t.next=8;break;case 7:o=Gn(e,n);case 8:return a=r&&r.imagebitmap,t.next=11,Wn(o,a);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wn(t){return Vn.apply(this,arguments)}function Vn(){return(Vn=a()(u.a.mark((function t(e){var r,n=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!qn(r=n.length>1&&void 0!==n[1]?n[1]:null)&&Xn||(r=null),!r){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,r);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),Xn=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function qn(t){for(var e in t||Fn)return!1;return!0}function Qn(t){var e=Zn(t);return function(t){var e=Zn(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){var e=Zn(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;var r=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var r=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:r}}(),n=r.tableMarkers,o=r.sofMarkers,i=2;for(;i+9<e.byteLength;){var a=e.getUint16(i,!1);if(o.has(a))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(a))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){var e=Zn(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){var e=Zn(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function Zn(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}function Yn(t,e){var r=(Qn(t)||{}).mimeType,n=An.a._parseImageNode;return wn(n),n(t,r,e)}function Jn(){return(Jn=a()(u.a.mark((function t(e,r,n){var o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(r=r||{}).image||{},i=o.type||"auto",a=(n||{}).url,s=$n(i),t.t0=s,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,Kn(e,r,a);case 10:return c=t.sent,t.abrupt("break",21);case 12:return t.next=14,jn(e,r,a);case 14:return c=t.sent,t.abrupt("break",21);case 16:return t.next=18,Yn(e,r);case 18:return c=t.sent,t.abrupt("break",21);case 20:wn(!1);case 21:return"data"===i&&(c=Pn(c)),t.abrupt("return",c);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $n(t){switch(t){case"auto":case"data":return function(){if(On)return"imagebitmap";if(xn)return"image";if(Mn)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return On||xn||Mn;case"imagebitmap":return On;case"image":return xn;case"data":return Mn;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var to={id:"image",module:"images",name:"Images",version:"3.0.10",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:function(t,e,r){return Jn.apply(this,arguments)},tests:[function(t){return Boolean(Qn(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}},eo={name:"Draco",id:"draco",module:"draco",version:"3.0.10",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"==typeof WebAssembly?"undefined":d()(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}},ro=r(20),no=r.n(ro);function oo(t){for(var e=1/0,r=1/0,n=1/0,o=-1/0,i=-1/0,a=-1/0,s=t.POSITION?t.POSITION.value:[],u=s&&s.length,c=0;c<u;c+=3){var f=s[c],l=s[c+1],h=s[c+2];e=f<e?f:e,r=l<r?l:r,n=h<n?h:n,o=f>o?f:o,i=l>i?l:i,a=h>a?h:a}return[[e,r,n],[o,i,a]]}function io(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ao(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ao(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ao(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var so=function(){function t(e,r){f()(this,t),o()(this,"fields",void 0),o()(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(e)),function(t){var e,r={},n=io(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r[o.name]&&console.warn("Schema: duplicated field name",o.name,o),r[o.name]=!0}}catch(t){n.e(t)}finally{n.f()}}(e),this.fields=e,this.metadata=r||new Map}return h()(t,[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var i=0,a=n;i<a.length;i++){var s=a[i];e[s]=!0}var u=this.fields.filter((function(t){return e[t.name]}));return new t(u,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=n.map((function(t){return e.fields[t]})).filter(Boolean);return new t(i,this.metadata)}},{key:"assign",value:function(e){var r,n=this.metadata;if(e instanceof t){var o=e;r=o.fields,n=uo(uo(new Map,this.metadata),o.metadata)}else r=e;var i,a=Object.create(null),s=io(this.fields);try{for(s.s();!(i=s.n()).done;){var u=i.value;a[u.name]=u}}catch(t){s.e(t)}finally{s.f()}var c,f=io(r);try{for(f.s();!(c=f.n()).done;){var l=c.value;a[l.name]=l}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(a),n)}}]),t}();function uo(t,e){return new Map([].concat(O()(t||new Map),O()(e||new Map)))}var co,fo,lo,ho,po=r(8),yo=r.n(po),_o=r(4),vo=r.n(_o),go=r(29),mo=r.n(go),bo=r(23),So=r.n(bo);function Eo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=So()(t);if(e){var o=So()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mo()(this,r)}}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(co||(co={}));var wo=function(){function t(){f()(this,t)}return h()(t,[{key:"typeId",get:function(){return co.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===co.Null}},{key:"isInt",value:function(t){return t&&t.typeId===co.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===co.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===co.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===co.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===co.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===co.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===co.Date}},{key:"isTime",value:function(t){return t&&t.typeId===co.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===co.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===co.Interval}},{key:"isList",value:function(t){return t&&t.typeId===co.List}},{key:"isStruct",value:function(t){return t&&t.typeId===co.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===co.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===co.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===co.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===co.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===co.Dictionary}}]),t}();fo=Symbol.toStringTag;var Ao=function(t){vo()(r,t);var e=Eo(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(yo()(i),"isSigned",void 0),o()(yo()(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=n,i}return h()(r,[{key:"typeId",get:function(){return co.Int}},{key:fo,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),r}(wo),Ro=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!0,8)}return r}(Ao),xo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!0,16)}return r}(Ao),Oo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!0,32)}return r}(Ao),To=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!1,8)}return r}(Ao),Mo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!1,16)}return r}(Ao),Co=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!1,32)}return r}(Ao),Po=32,Do=64;lo=Symbol.toStringTag;var ko=function(t){vo()(r,t);var e=Eo(r);function r(t){var n;return f()(this,r),n=e.call(this),o()(yo()(n),"precision",void 0),n.precision=t,n}return h()(r,[{key:"typeId",get:function(){return co.Float}},{key:lo,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),r}(wo),Io=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,Po)}return r}(ko),Lo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,Do)}return r}(ko);Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;ho=Symbol.toStringTag;var Bo=function(t){vo()(r,t);var e=Eo(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(yo()(i),"listSize",void 0),o()(yo()(i),"children",void 0),i.listSize=t,i.children=[n],i}return h()(r,[{key:"typeId",get:function(){return co.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:ho,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),r}(wo);var Go=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;f()(this,t),o()(this,"name",void 0),o()(this,"type",void 0),o()(this,"nullable",void 0),o()(this,"metadata",void 0),this.name=e,this.type=r,this.nullable=n,this.metadata=i}return h()(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();function jo(t,e,r){var n=No(e.metadata),o=[],i=function(t){var e={};for(var r in t){var n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(var a in t){var s=Uo(a,t[a],i[a]);o.push(s)}if(r){var u=Uo("indices",r);o.push(u)}return new so(o,n)}function Uo(t,e,r){var n=r?No(r.metadata):void 0,o=function(t){switch(t.constructor){case Int8Array:return new Ro;case Uint8Array:return new To;case Int16Array:return new xo;case Uint16Array:return new Mo;case Int32Array:return new Oo;case Uint32Array:return new Co;case Float32Array:return new Io;case Float64Array:return new Lo;default:throw new Error("array type not supported")}}(e.value);return new Go(t,new Bo(e.size,new Go("value",o)),!1,n)}function No(t){var e=new Map;for(var r in t)e.set("".concat(r,".string"),JSON.stringify(t[r]));return e}function Ho(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Fo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fo(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Fo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ko(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xo(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xo(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var zo={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},Wo={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},Vo=function(){function t(e){f()(this,t),o()(this,"draco",void 0),o()(this,"decoder",void 0),o()(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}return h()(t,[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);var n=this.decoder.GetEncodedGeometryType(r),o=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var i;switch(n){case this.draco.TRIANGULAR_MESH:i=this.decoder.DecodeBufferToMesh(r,o);break;case this.draco.POINT_CLOUD:i=this.decoder.DecodeBufferToPointCloud(r,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!i.ok()||!o.ptr){var a="DRACO decompression failed: ".concat(i.error_msg());throw new Error(a)}var s=this._getDracoLoaderData(o,n,e),u=this._getMeshData(o,s,e),c=oo(u.attributes),f=jo(u.attributes,s,u.indices),l=Ko(Ko({loader:"draco",loaderData:s,header:{vertexCount:o.num_points(),boundingBox:c}},u),{},{schema:f});return l}finally{this.draco.destroy(r),o&&this.draco.destroy(o)}}},{key:"_getDracoLoaderData",value:function(t,e,r){var n=this._getTopLevelMetadata(t),o=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:o}}},{key:"_getDracoAttributes",value:function(t,e){for(var r={},n=0;n<t.num_attributes();n++){var o=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[o.unique_id()]={unique_id:o.unique_id(),attribute_type:o.attribute_type(),data_type:o.data_type(),num_components:o.num_components(),byte_offset:o.byte_offset(),byte_stride:o.byte_stride(),normalized:o.normalized(),attribute_index:n,metadata:i};var a=this._getQuantizationTransform(o,e);a&&(r[o.unique_id()].quantization_transform=a);var s=this._getOctahedronTransform(o,e);s&&(r[o.unique_id()].octahedron_transform=s)}return r}},{key:"_getMeshData",value:function(t,e,r){var n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}},{key:"_getMeshAttributes",value:function(t,e,r){for(var n={},o=0,i=Object.values(t.attributes);o<i.length;o++){var a=i[o],s=this._deduceAttributeName(a,r);a.name=s;var u=this._getAttributeValues(e,a),c=u.value,f=u.size;n[s]={value:c,size:f,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return n}},{key:"_getTriangleListIndices",value:function(t){var e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}},{key:"_getTriangleStripIndices",value:function(t){var e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}},{key:"_getAttributeValues",value:function(t,e){var r,n=Wo[e.data_type],o=e.num_components,i=t.num_points()*o,a=i*n.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,n),u=this.draco._malloc(a);try{var c=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,c,s,a,u),r=new n(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:r,size:o}}},{key:"_deduceAttributeName",value:function(t,e){for(var r=t.unique_id,n=0,o=Object.entries(e.extraAttributes||{});n<o.length;n++){var i=no()(o[n],2),a=i[0];if(i[1]===r)return a}var s=t.attribute_type;for(var u in zo){if(this.draco[u]===s)return zo[u]}var c=e.attributeNameEntry||"name";return t.metadata[c]?t.metadata[c].string:"CUSTOM_ATTRIBUTE_".concat(r)}},{key:"_getTopLevelMetadata",value:function(t){var e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}},{key:"_getAttributeMetadata",value:function(t,e){var r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}},{key:"_getDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},r=this.metadataQuerier.NumEntries(t),n=0;n<r;n++){var o=this.metadataQuerier.GetEntryName(t,n);e[o]=this._getDracoMetadataField(t,o)}return e}},{key:"_getDracoMetadataField",value:function(t,e){var r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);var n=function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}},{key:"_disableAttributeTransforms",value:function(t){var e,r=t.quantizedAttributes,n=void 0===r?[]:r,o=t.octahedronAttributes,i=void 0===o?[]:o,a=Ho([].concat(O()(n),O()(i)));try{for(a.s();!(e=a.n()).done;){var s=e.value;this.decoder.SkipAttributeTransform(this.draco[s])}}catch(t){a.e(t)}finally{a.f()}}},{key:"_getQuantizationTransform",value:function(t,e){var r=this,n=e.quantizedAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits(),range:a.range(),min_values:new Float32Array([1,2,3]).map((function(t){return a.min_value(t)}))}}finally{this.draco.destroy(a)}}return null}},{key:"_getOctahedronTransform",value:function(t,e){var r=this,n=e.octahedronAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits()}}finally{this.draco.destroy(a)}}return null}}]),t}();var qo=r(17),Qo={};function Zo(t){return Yo.apply(this,arguments)}function Yo(){return(Yo=a()(u.a.mark((function t(e){var r,n,o=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(e=Jo(e,r,n)),Qo[e]=Qo[e]||$o(e),t.next=6,Qo[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Jo(t,e,r){if(t.startsWith("http"))return t;var n=r.modules||{};return n[t]?n[t]:Vt.b?r.CDN?(zt(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(e,"@").concat("3.0.10","/dist/libs/").concat(t)):Vt.d?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function $o(t){return ti.apply(this,arguments)}function ti(){return(ti=a()(u.a.mark((function t(e){var r,n,o;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(Vt.b){t.next=14;break}if(t.t0=qo.requireFromFile,!t.t0){t.next=13;break}return t.next=12,qo.requireFromFile(e);case 12:t.t0=t.sent;case 13:return t.abrupt("return",t.t0);case 14:if(!Vt.d){t.next=16;break}return t.abrupt("return",importScripts(e));case 16:return t.next=18,fetch(e);case 18:return n=t.sent,t.next=21,n.text();case 21:return o=t.sent,t.abrupt("return",ei(o,e));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ei(t,e){if(!Vt.b)return qo.requireFromString&&qo.requireFromString(t,e);if(Vt.d)return eval.call(Vt.a,t),null;var r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}function ri(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ni(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ri(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var oi,ii="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.js"),ai="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_wasm_wrapper.js"),si="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js");function ui(t){return ci.apply(this,arguments)}function ci(){return(ci=a()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.modules||{},oi=r.draco3d?oi||r.draco3d.createDecoderModule({}).then((function(t){return{draco:t}})):oi||fi(e),t.next=4,oi;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fi(t){return li.apply(this,arguments)}function li(){return(li=a()(u.a.mark((function t(e){var r,n,o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,Zo(ii,"draco",e);case 5:return r=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,Zo(ai,"draco",e);case 10:return t.t2=t.sent,t.next=13,Zo(si,"draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:o=t.sent,i=no()(o,2),r=i[0],n=i[1];case 21:return r=r||globalThis.DracoDecoderModule,t.next=24,hi(r,n);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hi(t,e){var r={};return e&&(r.wasmBinary=e),new Promise((function(e){t(ni(ni({},r),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}function pi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function di(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pi(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var yi=di(di({},eo),{},{parse:function(t,e){return _i.apply(this,arguments)}});function _i(){return(_i=a()(u.a.mark((function t(e,r){var n,o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ui(r);case 2:return n=t.sent,o=n.draco,i=new Vo(o),t.prev=5,t.abrupt("return",i.parseSync(e,null==r?void 0:r.draco));case 7:return t.prev=7,i.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}new Uint8Array([0]);const vi=[171,75,84,88,32,50,48,187,13,10,26,10];var gi,mi,bi,Si,Ei,wi,Ai,Ri,xi;(xi=gi||(gi={}))[xi.NONE=0]="NONE",xi[xi.BASISLZ=1]="BASISLZ",xi[xi.ZSTD=2]="ZSTD",xi[xi.ZLIB=3]="ZLIB",function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(mi||(mi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(bi||(bi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(Si||(Si={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(Ei||(Ei={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(wi||(wi={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(Ai||(Ai={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(Ri||(Ri={}));class Oi{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=gi.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:mi.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:bi.UNSPECIFIED,colorPrimaries:Si.SRGB,transferFunction:Si.SRGB,flags:wi.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class Ti{constructor(t,e,r,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,r),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const r=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&n<t;)n++,this._offset++;return n<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,n)}}function Mi(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function Ci(t,e){for(var r=new Array(e.mipMapLevels),n=e.width,o=e.height,i=0,a=0;a<e.mipMapLevels;++a){var s=Di(e,n,o,t,a),u=Pi(t,a,i,s);r[a]={compressed:!0,format:e.internalFormat,data:u,width:n,height:o,levelSize:s},n=Math.max(1,n>>1),o=Math.max(1,o>>1),i+=s}return r}function Pi(t,e,r,n){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+r,n)}function Di(t,e,r,n,o){return Array.isArray(n)?t.sizeFunction(n[o]):t.sizeFunction(e,r)}var ki={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},Ii={131:ki.COMPRESSED_RGB_S3TC_DXT1_EXT,132:ki.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:ki.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:ki.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:ki.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:ki.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:ki.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:ki.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:ki.COMPRESSED_RED_RGTC1_EXT,140:ki.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:ki.COMPRESSED_RED_GREEN_RGTC2_EXT,142:ki.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:ki.COMPRESSED_RGB8_ETC2,148:ki.COMPRESSED_SRGB8_ETC2,149:ki.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:ki.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:ki.COMPRESSED_RGBA8_ETC2_EAC,152:ki.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:ki.COMPRESSED_R11_EAC,154:ki.COMPRESSED_SIGNED_R11_EAC,155:ki.COMPRESSED_RG11_EAC,156:ki.COMPRESSED_SIGNED_RG11_EAC,157:ki.COMPRESSED_RGBA_ASTC_4x4_KHR,158:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:ki.COMPRESSED_RGBA_ASTC_5x4_KHR,160:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:ki.COMPRESSED_RGBA_ASTC_5x5_KHR,162:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:ki.COMPRESSED_RGBA_ASTC_6x5_KHR,164:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:ki.COMPRESSED_RGBA_ASTC_6x6_KHR,166:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:ki.COMPRESSED_RGBA_ASTC_8x5_KHR,168:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:ki.COMPRESSED_RGBA_ASTC_8x6_KHR,170:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:ki.COMPRESSED_RGBA_ASTC_8x8_KHR,172:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:ki.COMPRESSED_RGBA_ASTC_10x5_KHR,174:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:ki.COMPRESSED_RGBA_ASTC_10x6_KHR,176:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:ki.COMPRESSED_RGBA_ASTC_10x8_KHR,178:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:ki.COMPRESSED_RGBA_ASTC_10x10_KHR,180:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:ki.COMPRESSED_RGBA_ASTC_12x10_KHR,182:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:ki.COMPRESSED_RGBA_ASTC_12x12_KHR,184:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:ki.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:ki.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:ki.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:ki.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:ki.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:ki.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:ki.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:ki.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:ki.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:ki.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:ki.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:ki.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:ki.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:ki.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:ki.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:ki.COMPRESSED_RGBA_ASTC_12x12_KHR};var Li=[171,75,84,88,32,50,48,187,13,10,26,10];function Bi(t){var e,r=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,vi.length);if(e[0]!==vi[0]||e[1]!==vi[1]||e[2]!==vi[2]||e[3]!==vi[3]||e[4]!==vi[4]||e[5]!==vi[5]||e[6]!==vi[6]||e[7]!==vi[7]||e[8]!==vi[8]||e[9]!==vi[9]||e[10]!==vi[10]||e[11]!==vi[11])throw new Error("Missing KTX 2.0 identifier.");const r=new Oi,n=17*Uint32Array.BYTES_PER_ELEMENT,o=new Ti(t,vi.length,n,!0);r.vkFormat=o._nextUint32(),r.typeSize=o._nextUint32(),r.pixelWidth=o._nextUint32(),r.pixelHeight=o._nextUint32(),r.pixelDepth=o._nextUint32(),r.layerCount=o._nextUint32(),r.faceCount=o._nextUint32();const i=o._nextUint32();r.supercompressionScheme=o._nextUint32();const a=o._nextUint32(),s=o._nextUint32(),u=o._nextUint32(),c=o._nextUint32(),f=o._nextUint64(),l=o._nextUint64(),h=new Ti(t,vi.length+n,3*i*8,!0);for(let e=0;e<i;e++)r.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});const p=new Ti(t,a,s,!0),d={vendorId:p._skip(4)._nextUint16(),descriptorType:p._nextUint16(),versionNumber:p._nextUint16(),descriptorBlockSize:p._nextUint16(),colorModel:p._nextUint8(),colorPrimaries:p._nextUint8(),transferFunction:p._nextUint8(),flags:p._nextUint8(),texelBlockDimension:{x:p._nextUint8()+1,y:p._nextUint8()+1,z:p._nextUint8()+1,w:p._nextUint8()+1},bytesPlane:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],samples:[]},y=(d.descriptorBlockSize/4-6)/4;for(let t=0;t<y;t++)d.samples[t]={bitOffset:p._nextUint16(),bitLength:p._nextUint8(),channelID:p._nextUint8(),samplePosition:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],sampleLower:p._nextUint32(),sampleUpper:p._nextUint32()};r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(d);const _=new Ti(t,u,c,!0);for(;_._offset<c;){const t=_._nextUint32(),e=_._scan(t),n=Mi(e),o=_._scan(t-e.byteLength);r.keyValue[n]=n.match(/^ktx/i)?Mi(o):o,t%4&&_._skip(4-t%4)}if(l<=0)return r;const v=new Ti(t,f,l,!0),g=v._nextUint16(),m=v._nextUint16(),b=v._nextUint32(),S=v._nextUint32(),E=v._nextUint32(),w=v._nextUint32(),A=[];for(let t=0;t<i;t++)A.push({imageFlags:v._nextUint32(),rgbSliceByteOffset:v._nextUint32(),rgbSliceByteLength:v._nextUint32(),alphaSliceByteOffset:v._nextUint32(),alphaSliceByteLength:v._nextUint32()});const R=f+v._offset,x=R+b,O=x+S,T=O+E,M=new Uint8Array(t.buffer,t.byteOffset+R,b),C=new Uint8Array(t.buffer,t.byteOffset+x,S),P=new Uint8Array(t.buffer,t.byteOffset+O,E),D=new Uint8Array(t.buffer,t.byteOffset+T,w);return r.globalData={endpointCount:g,selectorCount:m,imageDescs:A,endpointsData:M,selectorsData:C,tablesData:P,extendedData:D},r}(new Uint8Array(t)),n=Math.max(1,r.levels.length),o=r.pixelWidth,i=r.pixelHeight,a=(e=r.vkFormat,Ii[e]);return Ci(r.levels,{mipMapLevels:n,width:o,height:i,sizeFunction:function(t){return t.uncompressedByteLength},internalFormat:a})}var Gi={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:ki.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:ki.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:ki.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":ki.COMPRESSED_RGB_ATC_WEBGL,ATCA:ki.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:ki.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:Ui,DXT3:Ni,DXT5:Ni,"ATC ":Ui,ATCA:Ni,ATCI:Ni}};function ji(t){var e=new Int32Array(t,0,Gi.HEADER_LENGTH),r=e[Gi.HEADER_PF_FOURCC_INDEX];G(Boolean(e[Gi.HEADER_PF_FLAGS_INDEX]&Gi.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");var n,o=(n=r,String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)),i=Gi.PIXEL_FORMATS[o],a=Gi.SIZE_FUNCTIONS[o];G(i&&a,"DDS: Unknown pixel format ".concat(r));var s=1;e[Gi.HEADER_FLAGS_INDEX]&Gi.DDSD_MIPMAPCOUNT&&(s=Math.max(1,e[Gi.MIPMAPCOUNT_INDEX]));var u=e[Gi.HEADER_WIDTH_INDEX],c=e[Gi.HEADER_HEIGHT_INDEX],f=e[Gi.HEADER_SIZE_INDEX]+4;return Ci(new Uint8Array(t,f),{mipMapLevels:s,width:u,height:c,sizeFunction:a,internalFormat:i})}function Ui(t,e){return(t+3>>2)*(e+3>>2)*8}function Ni(t,e){return(t+3>>2)*(e+3>>2)*16}var Hi=55727696,Fi=1347834371,Xi=13,Ki=52,zi=0,Wi=2,Vi=4,qi=6,Qi=7,Zi=11,Yi=12,Ji={0:[ki.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[ki.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[ki.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[ki.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[ki.COMPRESSED_RGB_ETC1_WEBGL],7:[ki.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[ki.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[ki.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[ki.COMPRESSED_RGB8_ETC2],23:[ki.COMPRESSED_RGBA8_ETC2_EAC],24:[ki.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[ki.COMPRESSED_R11_EAC],26:[ki.COMPRESSED_RG11_EAC],27:[ki.COMPRESSED_RGBA_ASTC_4X4_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[ki.COMPRESSED_RGBA_ASTC_5X4_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[ki.COMPRESSED_RGBA_ASTC_5X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[ki.COMPRESSED_RGBA_ASTC_6X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[ki.COMPRESSED_RGBA_ASTC_6X6_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[ki.COMPRESSED_RGBA_ASTC_8X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[ki.COMPRESSED_RGBA_ASTC_8X6_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[ki.COMPRESSED_RGBA_ASTC_8X8_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[ki.COMPRESSED_RGBA_ASTC_10X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[ki.COMPRESSED_RGBA_ASTC_10X6_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[ki.COMPRESSED_RGBA_ASTC_10X8_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[ki.COMPRESSED_RGBA_ASTC_10X10_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[ki.COMPRESSED_RGBA_ASTC_12X10_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[ki.COMPRESSED_RGBA_ASTC_12X12_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},$i={0:ta,1:ta,2:ea,3:ea,6:ra,7:ra,9:na,11:na,22:ra,23:na,24:ra,25:ra,26:na,27:na,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function ta(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function ea(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function ra(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function na(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function oa(t){if(function(t){var e=new Uint8Array(t.buffer||t,t.byteOffset||0,Li.length);return!(e[0]!==Li[0]||e[1]!==Li[1]||e[2]!==Li[2]||e[3]!==Li[3]||e[4]!==Li[4]||e[5]!==Li[5]||e[6]!==Li[6]||e[7]!==Li[7]||e[8]!==Li[8]||e[9]!==Li[9]||e[10]!==Li[10]||e[11]!==Li[11])}(t))return Bi(t);if(function(t){return new Uint32Array(t,0,Gi.HEADER_LENGTH)[Gi.MAGIC_NUMBER_INDEX]===Gi.MAGIC_NUMBER}(t))return ji(t);if(function(t){var e=new Uint32Array(t,0,Xi)[zi];return e===Hi||e===Fi}(t))return function(t){var e=new Uint32Array(t,0,Xi),r=e[Wi],n=e[Vi],o=Ji[r]||[],i=o.length>1&&n?o[1]:o[0],a=$i[r],s=e[Zi],u=e[Qi],c=e[qi],f=Ki+e[Yi];return Ci(new Uint8Array(t,f),{mipMapLevels:s,width:u,height:c,sizeFunction:a,internalFormat:i})}(t);throw new Error("Texture container format not recognized")}function ia(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function aa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ia(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var sa,ua={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.10",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},ca=aa(aa({},ua),{},{parse:(sa=a()(u.a.mark((function t(e){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",oa(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return sa.apply(this,arguments)})});function fa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?"".concat(t,"?token=").concat(e):t}var la=5121,ha=5125,pa=5126,da=5130,ya={UInt8:Uint8Array,UInt16:Uint16Array,UInt32:Uint32Array,Float32:Float32Array,UInt64:Float64Array},_a={UInt8:la,UInt16:ha,Float32:pa,UInt32:ha,UInt64:da},va={position:"position",normal:"normal",uv0:"uv0",color:"color",region:"region"},ga={vertexAttributes:"vertexAttributes",featureAttributeOrder:"featureAttributeOrder",featureAttributes:"featureAttributes"},ma="header",ba="vertexCount",Sa="featureCount",Ea={UInt8:1,UInt16:2,UInt32:4,Float32:4,UInt64:8};function wa(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Aa(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Aa(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function xa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ra(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ra(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Oa=new Hr([0,0,0]),Ta={jpeg:to,png:to,"ktx-etc2":ca,dds:ca};function Ma(t,e,r,n,o){return Ca.apply(this,arguments)}function Ca(){return(Ca=a()(u.a.mark((function t(e,r,n,o,i){var a,s,c,f,l,h,p;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.content=r.content||{},r.content.featureIds=r.content.featureIds||null,r.content.featureData=Ba(r,n),r.content.attributes={},!r.textureUrl){t.next=25;break}return s=fa(r.textureUrl,null==o||null===(a=o.i3s)||void 0===a?void 0:a.token),c=Ta[r.textureFormat]||to,t.next=9,fetch(s);case 9:return f=t.sent,t.next=12,f.arrayBuffer();case 12:if(l=t.sent,c!==to){t.next=20;break}return h={image:{type:"data"}},t.next=17,i.parse(l,h);case 17:r.content.texture=t.sent,t.next=25;break;case 20:if(c!==ca){t.next=25;break}return t.next=23,pr(l,ca);case 23:p=t.sent,r.content.texture={compressed:!0,mipmaps:!1,width:p[0].width,height:p[0].height,data:p};case 25:return r.content.material=Ha(r.materialDefinition,r.content.texture),r.content.material&&(r.content.texture=null),t.next=29,Pa(e,r,i);case 29:return t.abrupt("return",t.sent);case 30:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Pa(t){return Da.apply(this,arguments)}function Da(){return(Da=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c,f,l,h,p,d,y,_,v,g,m,b,S,E,w,A,R,x,O,T,M,C,P,D,k,I,L,B=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=B.length>1&&void 0!==B[1]?B[1]:{},B.length>2?B[2]:void 0,r.content){t.next=4;break}return t.abrupt("return",r);case 4:if(n=r.content,a=0,s=0,!r.isDracoGeometry){t.next=20;break}return t.next=10,cr(e,yi,{draco:{attributeNameEntry:"i3s-attribute-type"}});case 10:c=t.sent,i=c.header.vertexCount,f=c.indices.value,l=c.attributes,h=l.POSITION,p=l.NORMAL,d=l.COLOR_0,y=l.TEXCOORD_0,_=l["feature-index"],v=l["uv-region"],ka(o={position:h,normal:p,color:d,uv0:y,uvRegion:v,id:_,indices:f},c),(g=za(_))&&Ka(o,g),t.next=29;break;case 20:m=n.featureData,b=m.vertexAttributes,S=m.attributesOrder,E=m.featureAttributes,w=m.featureAttributeOrder,A=Ga(n,e),a=A.byteOffset,i=A.vertexCount,s=A.featureCount,R=ja(e,a,b,i,S),x=R.attributes,O=R.byteOffset,T=ja(e,O,E,s,w),Xa(M=T.attributes),o=Ia(x,M);case 29:for(L in C=Na(o.position,r),P=C.enuMatrix,D=C.cartographicOrigin,k=C.cartesianOrigin,I=(new Qr).multiplyRight(P),n.attributes={positions:o.position,normals:o.normal,colors:La(o.color),texCoords:o.uv0,uvRegions:La(o.uvRegion)},n.indices=o.indices||null,o.id&&o.id.value&&(r.content.featureIds=o.id.value),n.attributes)n.attributes[L]||delete n.attributes[L];return n.vertexCount=i,n.cartographicCenter=D,n.cartesianOrigin=k,n.modelMatrix=I.invert(),n.byteLength=e.byteLength,t.abrupt("return",r);case 41:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ka(t,e){for(var r in e.loaderData.attributes){var n=e.loaderData.attributes[r];switch(n.name){case"POSITION":t.position.metadata=n.metadata;break;case"feature-index":t.id.metadata=n.metadata}}}function Ia(t,e){return xa(xa({},t),e)}function La(t){return t?(t.normalized=!0,t):t}function Ba(t,e){var r=e.store.defaultGeometrySchema,n=r;for(var o in ga)for(var i in va){var a=r[o][i];if(a){var s=a.byteOffset,u=void 0===s?0:s,c=a.count,f=void 0===c?0:c,l=a.valueType,h=a.valuesPerElement;n[o][i]={valueType:l,valuesPerElement:h,byteOffset:u,count:f}}}return n.attributesOrder=r.ordering,n}function Ga(t,e){var r=0,n=0,o=0,i=t.featureData[ma];for(var a in i){var s=i[a],u=s.property,c=s.type,f=ya[c];u===ba&&(n=new f(e,0,4)[0],r+=Ea[c]),u===Sa&&(o=new f(e,4,4)[0],r+=Ea[c])}return{vertexCount:n,featureCount:o,byteOffset:r}}function ja(t,e,r,n,o){var i,a={},s=wa(o);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(r[u]){var c=r[u],f=c.valueType,l=c.valuesPerElement,h=n;if(e+h*l>t.byteLength)break;var p=t.slice(e),d=[];if("UInt64"===f)d=Ua(p,h*l,Ea[f]);else d=new(0,ya[f])(p,0,h*l);switch(a[u]={value:d,type:_a[f],size:l},u){case"color":a.color.normalized=!0}e+=h*l*Ea[f]}}}catch(t){s.e(t)}finally{s.f()}return{attributes:a,byteOffset:e}}function Ua(t,e,r){for(var n=[],o=new DataView(t),i=0,a=0;a<e;a++){var s=o.getUint32(i,!0),u=o.getUint32(i+4,!0),c=s+Math.pow(2,32)*u;n.push(c),i+=r}return n}function Na(t,e){var r=e.mbs,n=t.value,o=t.metadata,i=new Qr,a=new Hr(r[0],r[1],r[2]),s=new Hr;return En.WGS84.cartographicToCartesian(a,s),En.WGS84.eastNorthUpToFixedFrame(s,i),t.value=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=new Float64Array(t.length),o=e["i3s-scale_x"]&&e["i3s-scale_x"].double||1,i=e["i3s-scale_y"]&&e["i3s-scale_y"].double||1,a=0;a<n.length;a+=3)n[a]=t[a]*o+r.x,n[a+1]=t[a+1]*i+r.y,n[a+2]=t[a+2]+r.z;for(var s=0;s<n.length;s+=3)En.WGS84.cartographicToCartesian(n.subarray(s,s+3),Oa),n[s]=Oa.x,n[s+1]=Oa.y,n[s+2]=Oa.z;return n}(n,o,a),{enuMatrix:i,fixedFrameToENUMatrix:i.invert(),cartographicOrigin:a,cartesianOrigin:s}}function Ha(t,e){var r;return t?r=xa(xa({},t),{},{pbrMetallicRoughness:t.pbrMetallicRoughness?xa({},t.pbrMetallicRoughness):{baseColorFactor:[255,255,255,255]}}):(r={pbrMetallicRoughness:{}},e?r.pbrMetallicRoughness.baseColorTexture={texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]),r.alphaCutoff=r.alphaCutoff||.25,r.alphaMode&&(r.alphaMode=r.alphaMode.toUpperCase()),r.emissiveFactor&&(r.emissiveFactor=Fa(r.emissiveFactor)),r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorFactor&&(r.pbrMetallicRoughness.baseColorFactor=Fa(r.pbrMetallicRoughness.baseColorFactor)),function(t,e){var r={source:{image:e}};t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?t.pbrMetallicRoughness.baseColorTexture=xa(xa({},t.pbrMetallicRoughness.baseColorTexture),{},{texture:r}):t.emissiveTexture?t.emissiveTexture=xa(xa({},t.emissiveTexture),{},{texture:r}):t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?t.pbrMetallicRoughness.metallicRoughnessTexture=xa(xa({},t.pbrMetallicRoughness.metallicRoughnessTexture),{},{texture:r}):t.normalTexture?t.normalTexture=xa(xa({},t.normalTexture),{},{texture:r}):t.occlusionTexture&&(t.occlusionTexture=xa(xa({},t.occlusionTexture),{},{texture:r}))}(r,e),r}function Fa(t){for(var e=O()(t),r=0;r<t.length;r++)e[r]=t[r]/255;return e}function Xa(t){var e=t.id,r=t.faceRange;if(e&&r){for(var n=e.value,o=r.value,i=o[o.length-1]+1,a=new Uint32Array(3*i),s=0,u=0,c=1;c<o.length;c+=2){var f=Number(n[s]),l=u+3*(o[c]-o[c-1]+1);a.fill(f,u,l),s++,u=l}t.id.value=a}}function Ka(t,e){for(var r=t.id.value,n=new Float32Array(r.length),o=0;o<r.length;o++)n[o]=e[r[o]];t.id.value=n}function za(t){return t&&t.metadata&&t.metadata["i3s-feature-ids"]&&t.metadata["i3s-feature-ids"].intArray}var Wa;function Va(){return(Va=a()(u.a.mark((function t(e,r,n){var o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=(null==r?void 0:r.i3s)||{},i=o.tile,a=o.tileset,t.next=3,Ma(e,i,a,r,n);case 3:return t.abrupt("return",i.content);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}Wa={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:"3.0.10",mimeTypes:["application/octet-stream"],parse:function(t,e,r){return Va.apply(this,arguments)},extensions:["bin"],options:{"i3s-content":{}}},"undefined"!=typeof self&&(g.onmessage=function(){var t=a()(u.a.mark((function t(e,r){var n,o,i,a,s;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,t.next=7,A({loader:Wa,arrayBuffer:n,options:i,context:{parse:w}});case 7:a=t.sent,g.postMessage("done",{result:a}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),s=t.t1 instanceof Error?t.t1.message:"",g.postMessage("error",{error:s});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())},,,,,,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s}));var o=r(6),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);u&&parseFloat(u[1])}).call(this,r(19),r(13))}]);
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=42)}([function(t,e,r){t.exports=r(32)},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(41);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(33),o=r(34),i=r(25),a=r(35);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s})),r.d(e,"d",(function(){return u})),r.d(e,"c",(function(){return c}));var o=r(6),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u="function"==typeof importScripts,c="undefined"!=typeof window&&void 0!==window.orientation,f=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);f&&parseFloat(f[1])}).call(this,r(20),r(13))},,function(t,e,r){"use strict";(function(t,n){r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return a}));const o={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document,process:"object"==typeof n&&n},i=o.window||o.self||o.global,a=o.process||{};console}).call(this,r(20),r(13))},function(t,e,r){var n=r(26);t.exports=function(t){return new n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||s(p)},d.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s}));var o=r(6),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window,s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);u&&parseFloat(u[1])}).call(this,r(20),r(13))},function(t,e,r){var n=r(37);t.exports=function(t){return function(){return new n(t.apply(this,arguments))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){var e;if("undefined"!=typeof Symbol&&(Symbol.asyncIterator&&(e=t[Symbol.asyncIterator]),null==e&&Symbol.iterator&&(e=t[Symbol.iterator])),null==e&&(e=t["@@asyncIterator"]),null==e&&(e=t["@@iterator"]),null==e)throw new TypeError("Object is not async iterable");return e.call(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e){},,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(38),o=r(39),i=r(25),a=r(40);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,r(e)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){var n=r(24);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){this.wrapped=t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var n=r(28);function o(){return!("object"==typeof t&&"[object process]"===String(t)&&!t.browser)||Object(n.a)()}}).call(this,r(13))},function(t,e,r){"use strict";(function(t){function n(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==t&&"object"==typeof t.versions&&Boolean(t.versions.electron))return!0;const r="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,n=e||r;return!!(n&&n.indexOf("Electron")>=0)}r.d(e,"a",(function(){return n}))}).call(this,r(13))},function(t,e,r){var n=r(6).default,o=r(8);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},,,function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new w(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=b(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function l(){}function h(){}function p(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,_=y&&y(y(A([])));_&&_!==e&&r.call(_,o)&&(d=_);var v=p.prototype=l.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function A(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}return h.prototype=v.constructor=p,p.constructor=h,h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(24);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,r){var n=r(26);function o(t){var e,r;function o(e,r){try{var a=t[e](r),s=a.value,u=s instanceof n;Promise.resolve(u?s.wrapped:s).then((function(t){u?o("return"===e?"return":"next",t):i(a.done?"return":"normal",t)}),(function(t){o("throw",t)}))}catch(t){i("throw",t)}}function i(t,n){switch(t){case"return":e.resolve({value:n,done:!0});break;case"throw":e.reject(n);break;default:e.resolve({value:n,done:!1})}(e=e.next)?o(e.key,e.arg):r=null}this._invoke=function(t,n){return new Promise((function(i,a){var s={key:t,arg:n,resolve:i,reject:a,next:null};r?r=r.next=s:(e=r=s,o(t,n))}))},"function"!=typeof t.return&&(this.return=void 0)}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)},t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,r(e,n)}t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";r.r(e);var n=r(1),o=r.n(n),i=r(2),a=r.n(i),s=r(0),u=r.n(s),c=r(3),f=r.n(c),l=r(5),h=r.n(l),p=r(6),d=r.n(p);function y(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,n=r||new Set;if(t){if(_(t))n.add(t);else if(_(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"===d()(t))for(var o in t)y(t[o],e,n)}else;return void 0===r?Array.from(n):[]}function _(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var v=new Map,g=function(){function t(){f()(this,t)}return h()(t,null,[{key:"onmessage",set:function(t){self.onmessage=function(e){if(m(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}}},{key:"addEventListener",value:function(t){var e=v.get(t);e||(e=function(e){if(m(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)}},{key:"removeEventListener",value:function(t){var e=v.get(t);v.delete(t),self.removeEventListener("message",e)}},{key:"postMessage",value:function(t,e){if(self){var r={source:"loaders.gl",type:t,payload:e},n=y(e);self.postMessage(r,n)}}}]),t}();function m(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&r.source.startsWith("loaders.gl")}function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var E=0;function w(t,e){return new Promise((function(r,n){var o=E++;g.addEventListener((function t(e,i){if(i.id===o)switch(e){case"done":g.removeEventListener(t),r(i.result);break;case"error":g.removeEventListener(t),n(i.error)}}));var i={id:o,input:t,options:e};g.postMessage("process",i)}))}function A(t){return R.apply(this,arguments)}function R(){return(R=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.loader,n=e.arrayBuffer,o=e.options,i=e.context,!r.parseSync&&!r.parse){t.next=6;break}a=n,s=r.parseSync||r.parse,t.next=13;break;case 6:if(!r.parseTextSync){t.next=12;break}c=new TextDecoder,a=c.decode(n),s=r.parseTextSync,t.next=13;break;case 12:throw new Error("Could not load data with ".concat(r.name," loader"));case 13:return o=S(S({},o),{},{modules:r&&r.options&&r.options.modules||{},worker:!1}),t.next=16,s(a,S({},o),i,r);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var x=r(7),O=r.n(x),T=function(t){return"boolean"==typeof t},M=function(t){return"function"==typeof t},C=function(t){return null!==t&&"object"===d()(t)},P=function(t){return C(t)&&t.constructor==={}.constructor},D=function(t){return t&&"function"==typeof t[Symbol.iterator]},k=function(t){return t&&"function"==typeof t[Symbol.asyncIterator]},I=function(t){return"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},L=function(t){return"undefined"!=typeof Blob&&t instanceof Blob},B=function(t){return function(t){return"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||C(t)&&M(t.tee)&&M(t.cancel)&&M(t.getReader)}(t)||function(t){return C(t)&&M(t.read)&&M(t.pipe)&&T(t.readable)}(t)};function G(t,e){if(!t)throw new Error(e||"loader assertion failed.")}function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function U(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?j(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function N(t){var e;return!!t&&(Array.isArray(t)&&(t=t[0]),Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions))}function H(t){var e,r,n;return G(t,"null loader"),G(N(t),"invalid loader"),Array.isArray(t)&&(n=t[1],t=U(U({},t=t[0]),{},{options:U(U({},t.options),n)})),(null!==(e=t)&&void 0!==e&&e.parseTextSync||null!==(r=t)&&void 0!==r&&r.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}var F=r(48),X="",K={};function z(t){for(var e in K)if(t.startsWith(e)){var r=K[e];t=t.replace(e,r)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(X).concat(t)),t}var W=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,V=/^([-\w.]+\/[-\w.+]+)/;function q(t){var e=W.exec(t);return e?e[1]:""}var Q=/\?.*/;function Z(t){if(I(t)){var e=J(t.url||""),r=t.headers.get("content-type")||"";return{url:e,type:(n=r,o=V.exec(n),(o?o[1]:n)||q(e))}}var n,o;return L(t)?{url:J(t.name||""),type:t.type||""}:"string"==typeof t?{url:J(t),type:q(t)}:{url:"",type:""}}function Y(t){return I(t)?t.headers["content-length"]||-1:L(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function J(t){return t.replace(Q,"")}function $(t){return tt.apply(this,arguments)}function tt(){return(tt=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!I(e)){t.next=2;break}return t.abrupt("return",e);case 2:return r={},(n=Y(e))>=0&&(r["content-length"]=String(n)),o=Z(e),i=o.url,(a=o.type)&&(r["content-type"]=a),t.next=9,it(e);case 9:return(s=t.sent)&&(r["x-first-bytes"]=s),"string"==typeof e&&(e=(new TextEncoder).encode(e)),c=new Response(e,{headers:r}),Object.defineProperty(c,"url",{value:i}),t.abrupt("return",c);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function et(t){return rt.apply(this,arguments)}function rt(){return(rt=a()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,nt(e);case 3:throw r=t.sent,new Error(r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nt(t){return ot.apply(this,arguments)}function ot(){return(ot=a()(u.a.mark((function t(e){var r,n,o;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,n=e.headers.get("Content-Type"),o=e.statusText,!n.includes("application/json")){t.next=11;break}return t.t0=o,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,o=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:r=(r+=o).length>60?"".concat(r.slice(60),"..."):r,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",r);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function it(t){return at.apply(this,arguments)}function at(){return(at=a()(u.a.mark((function t(e){var r,n,o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=5,"string"!=typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,r)));case 3:if(!(e instanceof Blob)){t.next=8;break}return n=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){var r;return t(null==e||null===(r=e.target)||void 0===r?void 0:r.result)},e.readAsDataURL(n)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return o=e.slice(0,r),i=st(o),t.abrupt("return","data:base64,".concat(i));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function st(t){for(var e="",r=new Uint8Array(t),n=0;n<r.byteLength;n++)e+=String.fromCharCode(r[n]);return btoa(e)}function ut(t,e){return ct.apply(this,arguments)}function ct(){return(ct=a()(u.a.mark((function t(e,r){var n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"!=typeof e){t.next=7;break}return e=z(e),n=r,null!=r&&r.fetch&&"function"!=typeof(null==r?void 0:r.fetch)&&(n=r.fetch),t.next=6,fetch(e,n);case 6:return t.abrupt("return",t.sent);case 7:return t.next=9,$(e);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ft=r(27);const lt="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",ht=Object(ft.a)();class pt{constructor(t,e,r="sessionStorage"){this.storage=function(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch(t){return null}}(r),this.id=t,this.config={},Object.assign(this.config,e),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){return this.config={},this.updateConfiguration(t)}updateConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function dt(t,e,r,n=600){const o=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));const i=t.width*r,a=t.height*r,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(i/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(o,");"),"background-size:".concat(i,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),s]}const yt={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function _t(t){return"string"==typeof t?yt[t.toUpperCase()]||yt.WHITE:t}function vt(t,e){if(!t)throw new Error(e||"Assertion failed")}var gt=r(11);function mt(){let t;if(ht&&gt.b.performance)t=gt.b.performance.now();else if(gt.a.hrtime){const e=gt.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const bt={debug:ht&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},St={enabled:!0,level:0};function Et(){}const wt={},At={once:!0};function Rt(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}class xt{constructor({id:t}={id:""}){this.id=t,this.VERSION=lt,this._startTs=mt(),this._deltaTs=mt(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new pt("__probe-".concat(this.id,"__"),St),this.userData={},this.timeStamp("".concat(this.id," started")),function(t,e=["constructor"]){const r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r);for(const r of n)"function"==typeof t[r]&&(e.find(t=>r===t)||(t[r]=t[r].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((mt()-this._startTs).toPrecision(10))}getDelta(){return Number((mt()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.updateConfiguration({enabled:t}),this}setLevel(t){return this._storage.updateConfiguration({level:t}),this}assert(t,e){vt(t,e)}warn(t){return this._getLogFunction(0,t,bt.warn,arguments,At)}error(t){return this._getLogFunction(0,t,bt.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,bt.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,bt.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,bt.debug||bt.info,arguments,At)}table(t,e,r){return e?this._getLogFunction(t,e,console.table||Et,r&&[r],{tag:Rt(e)}):Et}image({logLevel:t,priority:e,image:n,message:o="",scale:i=1}){return this._shouldLog(t||e)?ht?function({image:t,message:e="",scale:r=1}){if("string"==typeof t){const n=new Image;return n.onload=()=>{const t=dt(n,e,r);console.log(...t)},n.src=t,Et}const n=t.nodeName||"";if("img"===n.toLowerCase())return console.log(...dt(t,e,r)),Et;if("canvas"===n.toLowerCase()){const n=new Image;return n.onload=()=>console.log(...dt(n,e,r)),n.src=t.toDataURL(),Et}return Et}({image:n,message:o,scale:i}):function({image:t,message:e="",scale:n=1}){let o=null;try{o=r(36)}catch(t){}if(o)return()=>o(t,{fit:"box",width:"".concat(Math.round(80*n),"%")}).then(t=>console.log(t));return Et}({image:n,message:o,scale:i}):Et}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(t){return this._storage.config[t]}set(t,e){this._storage.updateConfiguration({[t]:e})}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||Et)}group(t,e,r={collapsed:!1}){r=Tt({logLevel:t,message:e,opts:r});const{collapsed:n}=r;return r.method=(n?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e,r={}){return this.group(t,e,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||Et)}withGroup(t,e,r){this.group(t,e)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=Ot(t)}_getLogFunction(t,e,r,n=[],o){if(this._shouldLog(t)){o=Tt({logLevel:t,message:e,args:n,opts:o}),vt(r=r||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=mt();const i=o.tag||o.message;if(o.once){if(wt[i])return Et;wt[i]=mt()}return e=function(t,e,r){if("string"==typeof e){const a=r.time?function(t,e=8){const r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(r.total)):"";e=r.time?"".concat(t,": ").concat(a," ").concat(e):"".concat(t,": ").concat(e),n=e,o=r.color,i=r.background,ht||"string"!=typeof n||(o&&(o=_t(o),n="[".concat(o,"m").concat(n,"")),i&&(o=_t(i),n="[".concat(i+10,"m").concat(n,""))),e=n}var n,o,i;return e}(this.id,o.message,o),r.bind(console,e,...o.args)}return Et}}function Ot(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return vt(Number.isFinite(e)&&e>=0),e}function Tt(t){const{logLevel:e,message:r}=t;t.logLevel=Ot(e);const n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(t.args=n,typeof e){case"string":case"function":void 0!==r&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const o=typeof t.message;return vt("string"===o||"object"===o),Object.assign(t,t.opts)}xt.VERSION=lt;var Mt=new xt({id:"loaders.gl"}),Ct=function(){function t(){f()(this,t)}return h()(t,[{key:"log",value:function(){return function(){}}},{key:"info",value:function(){return function(){}}},{key:"warn",value:function(){return function(){}}},{key:"error",value:function(){return function(){}}}]),t}(),Pt={fetch:null,mimeType:void 0,nothrow:!1,log:new(function(){function t(){f()(this,t),o()(this,"console",void 0),this.console=console}return h()(t,[{key:"log",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.log).bind.apply(t,[this.console].concat(r))}},{key:"info",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.info).bind.apply(t,[this.console].concat(r))}},{key:"warn",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.warn).bind.apply(t,[this.console].concat(r))}},{key:"error",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.console.error).bind.apply(t,[this.console].concat(r))}}]),t}()),CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},Dt={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function kt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return It(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return It(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function It(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lt(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gt(){F.a.loaders=F.a.loaders||{};var t=F.a.loaders;return t._state=t._state||{},t._state}var jt=function(){var t=Gt();return t.globalOptions=t.globalOptions||Bt({},Pt),t.globalOptions};function Ut(t,e,r,n){return r=r||[],function(t,e){Ht(t,null,Pt,Dt,e);var r,n=kt(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=t&&t[o.id]||{},a=o.options&&o.options[o.id]||{},s=o.deprecatedOptions&&o.deprecatedOptions[o.id]||{};Ht(i,o.id,a,s,e)}}catch(t){n.e(t)}finally{n.f()}}(t,r=Array.isArray(r)?r:[r]),Xt(e,t,n)}function Nt(t,e){var r=jt(),n=t||r;return"function"==typeof n.fetch?n.fetch:C(n.fetch)?function(t){return ut(t,n)}:null!=e&&e.fetch?null==e?void 0:e.fetch:ut}function Ht(t,e,r,n,o){var i=e||"Top level",a=e?"".concat(e,"."):"";for(var s in t){var u=!e&&C(t[s]);if(!(s in r)&&!("baseUri"===s&&!e)&&!("workerUrl"===s&&e))if(s in n)Mt.warn("".concat(i," loader option '").concat(a).concat(s,"' no longer supported, use '").concat(n[s],"'"))();else if(!u){var c=Ft(s,o);Mt.warn("".concat(i," loader option '").concat(a).concat(s,"' not recognized. ").concat(c))()}}}function Ft(t,e){var r,n=t.toLowerCase(),o="",i=kt(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;for(var s in a.options){if(t===s)return"Did you mean '".concat(a.id,".").concat(s,"'?");var u=s.toLowerCase();(n.startsWith(u)||u.startsWith(n))&&(o=o||"Did you mean '".concat(a.id,".").concat(s,"'?"))}}}catch(t){i.e(t)}finally{i.f()}return o}function Xt(t,e,r){var n=Bt({},t.options||{});return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(n,r),null===n.log&&(n.log=new Ct),Kt(n,jt()),Kt(n,e),n}function Kt(t,e){for(var r in e)if(r in e){var n=e[r];P(n)&&P(t[r])?t[r]=Bt(Bt({},t[r]),e[r]):t[r]=e[r]}}function zt(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"3.0.14";zt(t,"no worker provided");var r=t.version;return!(!e||!r)}var Vt=r(9),qt=new Map;function Qt(t){zt(t.source&&!t.url||!t.source&&t.url);var e=qt.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return Zt((e=t,"try {\n importScripts('".concat(e,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var e}(t.url),qt.set(t.url,e)),t.source&&(e=Zt(t.source),qt.set(t.source,e))),zt(e),e}function Zt(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}var Yt=function(){},Jt=function(){function t(e){f()(this,t),o()(this,"name",void 0),o()(this,"source",void 0),o()(this,"url",void 0),o()(this,"terminated",!1),o()(this,"worker",void 0),o()(this,"onMessage",void 0),o()(this,"onError",void 0),o()(this,"_loadableURL","");var r=e.name,n=e.source,i=e.url;zt(n||i),this.name=r,this.source=n,this.url=i,this.onMessage=Yt,this.onError=function(t){return console.log(t)},this.worker=this._createBrowserWorker()}return h()(t,[{key:"destroy",value:function(){this.onMessage=Yt,this.onError=Yt,this.worker.terminate(),this.terminated=!0}},{key:"isRunning",get:function(){return Boolean(this.onMessage)}},{key:"postMessage",value:function(t,e){e=e||y(t),this.worker.postMessage(t,e)}},{key:"_getErrorFromErrorEvent",value:function(t){var e="Failed to load ";return e+="worker ".concat(this.name,". "),t.message&&(e+="".concat(t.message," in ")),t.lineno&&(e+=":".concat(t.lineno,":").concat(t.colno)),new Error(e)}},{key:"_createBrowserWorker",value:function(){var t=this;this._loadableURL=Qt({source:this.source,url:this.url});var e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=function(e){e.data?t.onMessage(e.data):t.onError(new Error("No data received"))},e.onerror=function(e){t.onError(t._getErrorFromErrorEvent(e)),t.terminated=!0},e.onmessageerror=function(t){return console.error(t)},e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof Worker}}]),t}(),$t=function(){function t(e,r){var n=this;f()(this,t),o()(this,"name",void 0),o()(this,"workerThread",void 0),o()(this,"isRunning",void 0),o()(this,"result",void 0),o()(this,"_resolve",void 0),o()(this,"_reject",void 0),this.name=e,this.workerThread=r,this.isRunning=!0,this._resolve=function(){},this._reject=function(){},this.result=new Promise((function(t,e){n._resolve=t,n._reject=e}))}return h()(t,[{key:"postMessage",value:function(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}},{key:"done",value:function(t){zt(this.isRunning),this.isRunning=!1,this._resolve(t)}},{key:"error",value:function(t){zt(this.isRunning),this.isRunning=!1,this._reject(t)}}]),t}();function te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ee(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?te(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var re=function(){function t(e){f()(this,t),o()(this,"name","unnamed"),o()(this,"source",void 0),o()(this,"url",void 0),o()(this,"maxConcurrency",1),o()(this,"maxMobileConcurrency",1),o()(this,"onDebug",(function(){})),o()(this,"reuseWorkers",!0),o()(this,"props",{}),o()(this,"jobQueue",[]),o()(this,"idleQueue",[]),o()(this,"count",0),o()(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}var e,r;return h()(t,[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"setProps",value:function(t){this.props=ee(ee({},this.props),t),void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}},{key:"startJob",value:(r=a()(u.a.mark((function t(e){var r,n,o,i=this,a=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:function(t,e,r){return t.done(r)},n=a.length>2&&void 0!==a[2]?a[2]:function(t,e){return t.error(e)},o=new Promise((function(t){return i.jobQueue.push({name:e,onMessage:r,onError:n,onStart:t}),i})),this._startQueuedJob(),t.next=6,o;case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"_startQueuedJob",value:(e=a()(u.a.mark((function t(){var e,r,n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:if(!(r=this.jobQueue.shift())){t.next=18;break}return this.onDebug({message:"Starting job",name:r.name,workerThread:e,backlog:this.jobQueue.length}),n=new $t(r.name,e),e.onMessage=function(t){return r.onMessage(n,t.type,t.payload)},e.onError=function(t){return r.onError(n,t)},r.onStart(n),t.prev=12,t.next=15,n.result;case 15:return t.prev=15,this.returnWorkerToQueue(e),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[12,,15,18]])}))),function(){return e.apply(this,arguments)})},{key:"returnWorkerToQueue",value:function(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;var t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new Jt({name:t,source:this.source,url:this.url})}return null}},{key:"_getMaxConcurrency",value:function(){return Vt.c?this.maxMobileConcurrency:this.maxConcurrency}}]),t}();function ne(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return oe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oe(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ie(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ae(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var se={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},ue=function(){function t(e){f()(this,t),o()(this,"props",void 0),o()(this,"workerPools",new Map),this.props=ae({},se),this.setProps(e),this.workerPools=new Map}return h()(t,[{key:"destroy",value:function(){var t,e=ne(this.workerPools.values());try{for(e.s();!(t=e.n()).done;){t.value.destroy()}}catch(t){e.e(t)}finally{e.f()}}},{key:"setProps",value:function(t){this.props=ae(ae({},this.props),t);var e,r=ne(this.workerPools.values());try{for(r.s();!(e=r.n()).done;){e.value.setProps(this._getWorkerPoolProps())}}catch(t){r.e(t)}finally{r.f()}}},{key:"getWorkerPool",value:function(t){var e=t.name,r=t.source,n=t.url,o=this.workerPools.get(e);return o||((o=new re({name:e,source:r,url:n})).setProps(this._getWorkerPoolProps()),this.workerPools.set(e,o)),o}},{key:"_getWorkerPoolProps",value:function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}],[{key:"isSupported",value:function(){return Jt.isSupported()}},{key:"getWorkerFarm",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t._workerFarm=t._workerFarm||new t({}),t._workerFarm.setProps(e),t._workerFarm}}]),t}();o()(ue,"_workerFarm",void 0);function ce(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e[t.id]||{},n="".concat(t.id,"-worker.js"),o=r.workerUrl;if(o||"compression"!==t.id||(o=e.workerUrl),"test"===e._workerType&&(o="modules/".concat(t.module,"/dist/").concat(n)),!o){var i=t.version;"latest"===i&&(i="latest");var a=i?"@".concat(i):"";o="https://unpkg.com/@loaders.gl/".concat(t.module).concat(a,"/dist/").concat(n)}return zt(o),o}function fe(t,e){return!!ue.isSupported()&&(t.worker&&(null==e?void 0:e.worker))}function le(t,e,r,n,o){return he.apply(this,arguments)}function he(){return(he=a()(u.a.mark((function t(e,r,n,o,i){var a,s,c,f,l,h;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.id,s=ce(e,n),c=ue.getWorkerFarm(n),f=c.getWorkerPool({name:a,url:s}),n=JSON.parse(JSON.stringify(n)),t.next=7,f.startJob("process-on-worker",pe.bind(null,i));case 7:return(l=t.sent).postMessage("process",{input:r,options:n}),t.next=11,l.result;case 11:return h=t.sent,t.next=14,h.result;case 14:return t.abrupt("return",t.sent);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pe(t,e,r,n){return de.apply(this,arguments)}function de(){return(de=a()(u.a.mark((function t(e,r,n,o){var i,a,s,c,f;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n,t.next="done"===t.t0?3:"error"===t.t0?5:"process"===t.t0?7:20;break;case 3:return r.done(o),t.abrupt("break",21);case 5:return r.error(o.error),t.abrupt("break",21);case 7:return i=o.id,a=o.input,s=o.options,t.prev=8,t.next=11,e(a,s);case 11:c=t.sent,r.postMessage("done",{id:i,result:c}),t.next=19;break;case 15:t.prev=15,t.t1=t.catch(8),f=t.t1 instanceof Error?t.t1.message:"unknown error",r.postMessage("error",{id:i,error:f});case 19:return t.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(n));case 21:case"end":return t.stop()}}),t,null,[[8,15]])})))).apply(this,arguments)}var ye=r(16),_e=r.n(ye),ve=r(17);function ge(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return me(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return me(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function me(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function be(t){var e;if((e=t)&&"object"===d()(e)&&e.isBuffer&&(t=function(t){return ve.toArrayBuffer?ve.toArrayBuffer(t):t}(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if("string"==typeof t){var r=t;return(new TextEncoder).encode(r).buffer}if(t&&"object"===d()(t)&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function Se(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,o=e.map((function(t){return t instanceof ArrayBuffer?new Uint8Array(t):t})),i=o.reduce((function(t,e){return t+e.byteLength}),0),a=new Uint8Array(i),s=0,u=ge(o);try{for(u.s();!(n=u.n()).done;){var c=n.value;a.set(c,s),s+=c.byteLength}}catch(t){u.e(t)}finally{u.f()}return a.buffer}function Ee(t){return we.apply(this,arguments)}function we(){return(we=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c,f;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[],n=!0,o=!1,t.prev=3,a=_e()(e);case 5:return t.next=7,a.next();case 7:return s=t.sent,n=s.done,t.next=11,s.value;case 11:if(c=t.sent,n){t.next=18;break}f=c,r.push(f);case 15:n=!0,t.next=5;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(3),o=!0,i=t.t0;case 24:if(t.prev=24,t.prev=25,n||null==a.return){t.next=29;break}return t.next=29,a.return();case 29:if(t.prev=29,!o){t.next=32;break}throw i;case 32:return t.finish(29);case 33:return t.finish(24);case 34:return t.abrupt("return",Se.apply(void 0,r));case 35:case"end":return t.stop()}}),t,null,[[3,20,24,34],[25,,29,33]])})))).apply(this,arguments)}var Ae=u.a.mark(Re);function Re(t,e){var r,n,o,i,a;return u.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=(null==e?void 0:e.chunkSize)||262144,n=0,o=new TextEncoder;case 3:if(!(n<t.length)){s.next=11;break}return i=Math.min(t.length-n,r),a=t.slice(n,n+i),n+=i,s.next=9,o.encode(a);case 9:s.next=3;break;case 11:case"end":return s.stop()}}),Ae)}var xe=u.a.mark(Oe);function Oe(t){var e,r,n,o,i,a,s,c=arguments;return u.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:e=c.length>1&&void 0!==c[1]?c[1]:{},r=e.chunkSize,n=void 0===r?262144:r,o=0;case 3:if(!(o<t.byteLength)){u.next=14;break}return i=Math.min(t.byteLength-o,n),a=new ArrayBuffer(i),s=new Uint8Array(t,o,i),new Uint8Array(a).set(s),o+=i,u.next=12,a;case 12:u.next=3;break;case 14:case"end":return u.stop()}}),xe)}var Te=r(12),Me=r.n(Te),Ce=r(15),Pe=r.n(Ce);function De(){return(De=Pe()(u.a.mark((function t(e,r){var n,o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(null==r?void 0:r.chunkSize)||1048576,o=0;case 2:if(!(o<e.size)){t.next=12;break}return i=o+n,t.next=6,Me()(e.slice(o,i).arrayBuffer());case 6:return a=t.sent,o=i,t.next=10,a;case 10:t.next=2;break;case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ke(t,e){return F.b?function(t,e){return Ie.apply(this,arguments)}(t,e):function(t,e){return Le.apply(this,arguments)}(t,e)}function Ie(){return(Ie=Pe()(u.a.mark((function t(e,r){var n,o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.getReader(),t.prev=1;case 2:return i=o||n.read(),null!=r&&r._streamReadAhead&&(o=n.read()),t.next=7,Me()(i);case 7:if(a=t.sent,s=a.done,c=a.value,!s){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,be(c);case 14:t.next=2;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(1),n.releaseLock();case 21:case"end":return t.stop()}}),t,null,[[1,18]])})))).apply(this,arguments)}function Le(){return(Le=Pe()(u.a.mark((function t(e,r){var n,o,i,a,s,c,f;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=!0,o=!1,t.prev=2,a=_e()(e);case 4:return t.next=6,Me()(a.next());case 6:return s=t.sent,n=s.done,t.next=10,Me()(s.value);case 10:if(c=t.sent,n){t.next=18;break}return f=c,t.next=15,be(f);case 15:n=!0,t.next=4;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(2),o=!0,i=t.t0;case 24:if(t.prev=24,t.prev=25,n||null==a.return){t.next=29;break}return t.next=29,Me()(a.return());case 29:if(t.prev=29,!o){t.next=32;break}throw i;case 32:return t.finish(29);case 33:return t.finish(24);case 34:case"end":return t.stop()}}),t,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function Be(t,e){if("string"==typeof t)return Re(t,e);if(t instanceof ArrayBuffer)return Oe(t,e);if(L(t))return function(t,e){return De.apply(this,arguments)}(t,e);if(B(t))return ke(t,e);if(I(t))return ke(t.body,e);throw new Error("makeIterator")}var Ge="Cannot convert supplied data type";function je(t,e,r){if(e.text&&"string"==typeof t)return t;var n;if((n=t)&&"object"===d()(n)&&n.isBuffer&&(t=t.buffer),t instanceof ArrayBuffer){var o=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var i=t.buffer,a=t.byteLength||t.length;return 0===t.byteOffset&&a===i.byteLength||(i=i.slice(t.byteOffset,t.byteOffset+a)),i}throw new Error(Ge)}function Ue(t,e,r){return Ne.apply(this,arguments)}function Ne(){return(Ne=a()(u.a.mark((function t(e,r,n){var o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!=typeof e&&!o){t.next=3;break}return t.abrupt("return",je(e,r));case 3:if(!L(e)){t.next=7;break}return t.next=6,$(e);case 6:e=t.sent;case 7:if(!I(e)){t.next=21;break}return i=e,t.next=11,et(i);case 11:if(!r.binary){t.next=17;break}return t.next=14,i.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,i.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if(B(e)&&(e=Be(e,n)),!D(e)&&!k(e)){t.next=24;break}return t.abrupt("return",Ee(e));case 24:throw new Error(Ge);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function He(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?He(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xe(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(r)return r;var n=Fe({fetch:Nt(e,t)},t);return Array.isArray(n.loaders)||(n.loaders=null),n}function Ke(t,e){if(!e&&t&&!Array.isArray(t))return t;var r;if(t&&(r=Array.isArray(t)?t:[t]),e&&e.loaders){var n=Array.isArray(e.loaders)?e.loaders:[e.loaders];r=r?[].concat(O()(r),O()(n)):n}return r&&r.length?r:null}var ze=function(){var t=Gt();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function We(){return ze()}function Ve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ve(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Ze(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ze(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ye=/\.([^.]+)$/;function Je(t){return $e.apply(this,arguments)}function $e(){return($e=a()(u.a.mark((function t(e){var r,n,o,i,a=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>1&&void 0!==a[1]?a[1]:[],n=a.length>2?a[2]:void 0,o=a.length>3?a[3]:void 0,rr(e)){t.next=5;break}return t.abrupt("return",null);case 5:if(!(i=tr(e,r,qe(qe({},n),{},{nothrow:!0}),o))){t.next=8;break}return t.abrupt("return",i);case 8:if(!L(e)){t.next=13;break}return t.next=11,e.slice(0,10).arrayBuffer();case 11:e=t.sent,i=tr(e,r,n,o);case 13:if(i||null!=n&&n.nothrow){t.next=15;break}throw new Error(nr(e));case 15:return t.abrupt("return",i);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;if(!rr(t))return null;if(e&&!Array.isArray(e))return H(e);var o,i=[];(e&&(i=i.concat(e)),null!=r&&r.ignoreRegisteredLoaders)||(o=i).push.apply(o,O()(We()));or(i);var a=er(t,i,r,n);if(!(a||null!=r&&r.nothrow))throw new Error(nr(t));return a}function er(t,e,r,n){var o=Z(t),i=o.url,a=o.type,s=i||(null==n?void 0:n.url),u=null;return null!=r&&r.mimeType&&(u=ir(e,null==r?void 0:r.mimeType)),u=(u=(u=(u=u||function(t,e){var r=e&&Ye.exec(e),n=r&&r[1];return n?function(t,e){e=e.toLowerCase();var r,n=Qe(t);try{for(n.s();!(r=n.n()).done;){var o,i=r.value,a=Qe(i.extensions);try{for(a.s();!(o=a.n()).done;){if(o.value.toLowerCase()===e)return i}}catch(t){a.e(t)}finally{a.f()}}}catch(t){n.e(t)}finally{n.f()}return null}(t,n):null}(e,s))||ir(e,a))||function(t,e){if(!e)return null;var r,n=Qe(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if("string"==typeof e){if(ar(e,o))return o}else if(ArrayBuffer.isView(e)){if(sr(e.buffer,e.byteOffset,o))return o}else if(e instanceof ArrayBuffer){if(sr(e,0,o))return o}}}catch(t){n.e(t)}finally{n.f()}return null}(e,t))||ir(e,null==r?void 0:r.fallbackMimeType)}function rr(t){return!(t instanceof Response&&204===t.status)}function nr(t){var e=Z(t),r=e.url,n=e.type,o="No valid loader found";return t&&(o+=' data: "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return ur(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var r=0;return ur(t,r,e)}return""}(t),'", contentType: "').concat(n,'"')),r&&(o+=" url: ".concat(r)),o}function or(t){var e,r=Qe(t);try{for(r.s();!(e=r.n()).done;){H(e.value)}}catch(t){r.e(t)}finally{r.f()}}function ir(t,e){var r,n=Qe(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(o.mimeTypes&&o.mimeTypes.includes(e))return o;if(e==="application/x.".concat(o.id))return o}}catch(t){n.e(t)}finally{n.f()}return null}function ar(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some((function(e){return t.startsWith(e)}))}function sr(t,e,r){return(Array.isArray(r.tests)?r.tests:[r.tests]).some((function(n){return function(t,e,r,n){if(n instanceof ArrayBuffer)return function(t,e,r){if(r=r||t.byteLength,t.byteLength<r||e.byteLength<r)return!1;for(var n=new Uint8Array(t),o=new Uint8Array(e),i=0;i<n.length;++i)if(n[i]!==o[i])return!1;return!0}(n,t,n.byteLength);switch(d()(n)){case"function":return n(t,r);case"string":var o=ur(t,e,n.length);return n===o;default:return!1}}(t,e,r,n)}))}function ur(t,e,r){if(t.byteLength<e+r)return"";for(var n=new DataView(t),o="",i=0;i<r;i++)o+=String.fromCharCode(n.getUint8(e+i));return o}function cr(t,e,r,n){return fr.apply(this,arguments)}function fr(){return(fr=a()(u.a.mark((function t(e,r,n,o){var i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return zt(!o||"object"===d()(o)),!r||Array.isArray(r)||N(r)||(o=void 0,n=r,r=void 0),t.next=4,e;case 4:return e=t.sent,n=n||{},i=Z(e),a=i.url,s=Ke(r,o),t.next=11,Je(e,s,n);case 11:if(c=t.sent){t.next=14;break}return t.abrupt("return",null);case 14:return n=Ut(n,c,s,a),o=Xe({url:a,parse:cr,loaders:s},n,o),t.next=18,lr(c,e,n,o);case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function lr(t,e,r,n){return hr.apply(this,arguments)}function hr(){return(hr=a()(u.a.mark((function t(e,r,n,o){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Wt(e),t.next=3,Ue(r,e,n);case 3:if(r=t.sent,!e.parseTextSync||"string"!=typeof r){t.next=7;break}return n.dataType="text",t.abrupt("return",e.parseTextSync(r,n,o,e));case 7:if(!fe(e,n)){t.next=11;break}return t.next=10,le(e,r,n,o,cr);case 10:return t.abrupt("return",t.sent);case 11:if(!e.parseText||"string"!=typeof r){t.next=15;break}return t.next=14,e.parseText(r,n,o,e);case 14:return t.abrupt("return",t.sent);case 15:if(!e.parse){t.next=19;break}return t.next=18,e.parse(r,n,o,e);case 18:return t.abrupt("return",t.sent);case 19:throw zt(!e.parseSync),new Error("".concat(e.id," loader - no parser found and worker is disabled"));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pr(t,e,r,n){return dr.apply(this,arguments)}function dr(){return(dr=a()(u.a.mark((function t(e,r,n,o){var i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(r)||N(r)||(void 0,n=r,r=void 0),i=Nt(n),a=e,"string"!=typeof e){t.next=7;break}return t.next=6,i(e);case 6:a=t.sent;case 7:if(!L(e)){t.next=11;break}return t.next=10,i(e);case 10:a=t.sent;case 11:return t.next=13,cr(a,r,n);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yr(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const _r=1/Math.PI*180,vr=1/180*Math.PI,gr={};function mr(t,{precision:e=gr.precision||4}={}){return t=function(t){return Math.round(t/gr.EPSILON)*gr.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function br(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Sr(t,e,r){if(br(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function Er(t){return function(t,e){return Sr(t,t=>t*vr,e)}(t)}function wr(t){return function(t,e){return Sr(t,t=>t*_r,e)}(t)}function Ar(t,e,r){const n=gr.EPSILON;r&&(gr.EPSILON=r);try{if(t===e)return!0;if(br(t)&&br(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Ar(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=gr.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{gr.EPSILON=n}}gr.EPSILON=1e-12,gr.debug=!1,gr.precision=4,gr.printTypes=!1,gr.printDegrees=!1,gr.printRowMajor=!0;class Rr extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return yr(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:br(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(gr)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+mr(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!Ar(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const o=t[n];this[n]=o+r*(e[n]-o)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(gr.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}function xr(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function Or(t,e,r=""){if(gr.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}const Tr={};function Mr(t,e){Tr[t]||(Tr[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}class Cr extends Rr{get ELEMENTS(){return yr(!1),0}copy(t){return yr(!1),this}get x(){return this[0]}set x(t){this[0]=xr(t)}get y(){return this[1]}set y(t){this[1]=xr(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return xr(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return xr(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return yr(t>=0&&t<this.ELEMENTS,"index is out of range"),xr(this[t])}setComponent(t,e){return yr(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}var Pr=1e-6,Dr="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function kr(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function Ir(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Lr(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return a=a||1,t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/a,t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Br,Gr;Br=new Dr(3),Dr!=Float32Array&&(Br[0]=0,Br[1]=0,Br[2]=0),Gr=Br;function jr(t,e,r){const n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i||1;return t[0]=(r[0]*n+r[4]*o+r[8]*i)/a,t[1]=(r[1]*n+r[5]*o+r[9]*i)/a,t[2]=(r[2]*n+r[6]*o+r[10]*i)/a,t}const Ur=[0,0,0],Nr={};class Hr extends Cr{static get ZERO(){return Nr.ZERO=Nr.ZERO||Object.freeze(new Hr(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&br(t)?this.copy(t):(gr.debug&&(xr(t),xr(e),xr(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return gr.debug&&(xr(t.x),xr(t.y),xr(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=xr(t)}angle(t){return r=t,n=(e=this)[0],o=e[1],i=e[2],a=r[0],s=r[1],u=r[2],c=Math.sqrt(n*n+o*o+i*i)*Math.sqrt(a*a+s*s+u*u),f=c&&Ir(e,r)/c,Math.acos(Math.min(Math.max(f,-1),1));var e,r,n,o,i,a,s,u,c,f}cross(t){return function(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[0],s=r[1],u=r[2];t[0]=o*u-i*s,t[1]=i*a-n*u,t[2]=n*s-o*a}(this,this,t),this.check()}rotateX({radians:t,origin:e=Ur}){return function(t,e,r,n){var o=[],i=[];o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(n)-o[2]*Math.sin(n),i[2]=o[1]*Math.sin(n)+o[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2]}(this,this,e,t),this.check()}rotateY({radians:t,origin:e=Ur}){return function(t,e,r,n){var o=[],i=[];o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],i[0]=o[2]*Math.sin(n)+o[0]*Math.cos(n),i[1]=o[1],i[2]=o[2]*Math.cos(n)-o[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2]}(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=Ur}){return function(t,e,r,n){var o=[],i=[];o[0]=e[0]-r[0],o[1]=e[1]-r[1],o[2]=e[2]-r[2],i[0]=o[0]*Math.cos(n)-o[1]*Math.sin(n),i[1]=o[0]*Math.sin(n)+o[1]*Math.cos(n),i[2]=o[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2]}(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return Lr(this,this,t),this.check()}transformAsVector(t){return jr(this,this,t),this.check()}transformByMatrix3(t){return function(t,e,r){var n=e[0],o=e[1],i=e[2];t[0]=n*r[0]+o*r[3]+i*r[6],t[1]=n*r[1]+o*r[4]+i*r[7],t[2]=n*r[2]+o*r[5]+i*r[8]}(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],o=e[1];t[0]=r[0]*n+r[2]*o,t[1]=r[1]*n+r[3]*o,t[2]=e[2]}(this,this,t),this.check()}transformByQuaternion(t){return function(t,e,r){var n=r[0],o=r[1],i=r[2],a=r[3],s=e[0],u=e[1],c=e[2],f=o*c-i*u,l=i*s-n*c,h=n*u-o*s,p=o*h-i*l,d=i*f-n*h,y=n*l-o*f,_=2*a;f*=_,l*=_,h*=_,p*=2,d*=2,y*=2,t[0]=s+f+p,t[1]=u+l+d,t[2]=c+h+y}(this,this,t),this.check()}}class Fr extends Rr{get ELEMENTS(){return yr(!1),0}get RANK(){return yr(!1),0}toString(){let t="[";if(gr.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=xr(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}function Xr(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],p=e[10],d=e[11],y=e[12],_=e[13],v=e[14],g=e[15],m=r[0],b=r[1],S=r[2],E=r[3];return t[0]=m*n+b*s+S*l+E*y,t[1]=m*o+b*u+S*h+E*_,t[2]=m*i+b*c+S*p+E*v,t[3]=m*a+b*f+S*d+E*g,m=r[4],b=r[5],S=r[6],E=r[7],t[4]=m*n+b*s+S*l+E*y,t[5]=m*o+b*u+S*h+E*_,t[6]=m*i+b*c+S*p+E*v,t[7]=m*a+b*f+S*d+E*g,m=r[8],b=r[9],S=r[10],E=r[11],t[8]=m*n+b*s+S*l+E*y,t[9]=m*o+b*u+S*h+E*_,t[10]=m*i+b*c+S*p+E*v,t[11]=m*a+b*f+S*d+E*g,m=r[12],b=r[13],S=r[14],E=r[15],t[12]=m*n+b*s+S*l+E*y,t[13]=m*o+b*u+S*h+E*_,t[14]=m*i+b*c+S*p+E*v,t[15]=m*a+b*f+S*d+E*g,t}function Kr(t,e,r){var n=r[0],o=r[1],i=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}!function(){var t=function(){var t=new Dr(2);return Dr!=Float32Array&&(t[0]=0,t[1]=0),t}()}();!function(){var t=function(){var t=new Dr(4);return Dr!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();const zr=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Wr=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Vr=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),qr={};class Qr extends Fr{static get IDENTITY(){return qr.IDENTITY=qr.IDENTITY||Object.freeze(new Qr(zr)),qr.IDENTITY}static get ZERO(){return qr.ZERO=qr.ZERO||Object.freeze(new Qr(Wr)),qr.ZERO}get INDICES(){return Vr}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,o,i,a,s,u,c,f,l,h,p,d,y){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=o,this[5]=i,this[6]=a,this[7]=s,this[8]=u,this[9]=c,this[10]=f,this[11]=l,this[12]=h,this[13]=p,this[14]=d,this[15]=y,this.check()}setRowMajor(t,e,r,n,o,i,a,s,u,c,f,l,h,p,d,y){return this[0]=t,this[1]=o,this[2]=u,this[3]=h,this[4]=e,this[5]=i,this[6]=c,this[7]=p,this[8]=r,this[9]=a,this[10]=f,this[11]=d,this[12]=n,this[13]=s,this[14]=l,this[15]=y,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(zr)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=r+r,s=n+n,u=o+o,c=r*a,f=n*a,l=n*s,h=o*a,p=o*s,d=o*u,y=i*a,_=i*s,v=i*u;t[0]=1-l-d,t[1]=f+v,t[2]=h-_,t[3]=0,t[4]=f-v,t[5]=1-c-d,t[6]=p+y,t[7]=0,t[8]=h+_,t[9]=p-y,t[10]=1-c-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:o,far:i}){return i===1/0?Qr._computeInfinitePerspectiveOffCenter(this,t,e,r,n,o):function(t,e,r,n,o,i,a){var s=1/(r-e),u=1/(o-n),c=1/(i-a);t[0]=2*i*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*u,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(o+n)*u,t[10]=(a+i)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*i*2*c,t[15]=0}(this,t,e,r,n,o,i),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,o,i){const a=2*i/(r-e),s=2*i/(o-n),u=(r+e)/(r-e),c=(o+n)/(o-n),f=-2*i;return t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=f,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),function(t,e,r,n){var o,i,a,s,u,c,f,l,h,p,d=e[0],y=e[1],_=e[2],v=n[0],g=n[1],m=n[2],b=r[0],S=r[1],E=r[2];Math.abs(d-b)<Pr&&Math.abs(y-S)<Pr&&Math.abs(_-E)<Pr?function(t){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(t):(f=d-b,l=y-S,h=_-E,o=g*(h*=p=1/Math.hypot(f,l,h))-m*(l*=p),i=m*(f*=p)-v*h,a=v*l-g*f,(p=Math.hypot(o,i,a))?(o*=p=1/p,i*=p,a*=p):(o=0,i=0,a=0),s=l*a-h*i,u=h*o-f*a,c=f*i-l*o,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),t[0]=o,t[1]=s,t[2]=f,t[3]=0,t[4]=i,t[5]=u,t[6]=l,t[7]=0,t[8]=a,t[9]=c,t[10]=h,t[11]=0,t[12]=-(o*d+i*y+a*_),t[13]=-(s*d+u*y+c*_),t[14]=-(f*d+l*y+h*_),t[15]=1)}(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:o=.1,far:i=500}){return function(t,e,r,n,o,i,a){var s=1/(e-r),u=1/(n-o),c=1/(i-a);t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(o+n)*u,t[14]=(a+i)*c,t[15]=1}(this,t,e,r,n,o,i),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:o=500}){if(t>2*Math.PI)throw Error("radians");const i=t/2,a=r*Math.tan(i),s=a*e;return(new Qr).ortho({left:-s,right:s,bottom:-a,top:a,near:n,far:o})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:o=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return function(t,e,r,n,o){var i,a=1/Math.tan(e/2);t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(n-o),t[10]=(o+n)*i,t[14]=2*o*n*i):(t[10]=-1,t[14]=-2*n)}(this,t,r,n,o),this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],o=t[3],i=t[4],a=t[5],s=t[6],u=t[7],c=t[8],f=t[9],l=t[10],h=t[11],p=t[12],d=t[13],y=t[14],_=t[15],(e*a-r*i)*(l*_-h*y)-(e*s-n*i)*(f*_-h*d)+(e*u-o*i)*(f*y-l*d)+(r*s-n*a)*(c*_-h*p)-(r*u-o*a)*(c*y-l*p)+(n*u-o*s)*(c*d-f*p);var t,e,r,n,o,i,a,s,u,c,f,l,h,p,d,y,_}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],o=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*o,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*o,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*o,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],o=1/r[1],i=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*o,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*o,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*o,t[8]=this[10]*i,t}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],o=e[3],i=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=o,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],s=e[5],u=e[6],c=e[7],f=e[8],l=e[9],h=e[10],p=e[11],d=e[12],y=e[13],_=e[14],v=e[15],g=r*s-n*a,m=r*u-o*a,b=r*c-i*a,S=n*u-o*s,E=n*c-i*s,w=o*c-i*u,A=f*y-l*d,R=f*_-h*d,x=f*v-p*d,O=l*_-h*y,T=l*v-p*y,M=h*v-p*_,C=g*M-m*T+b*O+S*x-E*R+w*A;C&&(C=1/C,t[0]=(s*M-u*T+c*O)*C,t[1]=(o*T-n*M-i*O)*C,t[2]=(y*w-_*E+v*S)*C,t[3]=(h*E-l*w-p*S)*C,t[4]=(u*x-a*M-c*R)*C,t[5]=(r*M-o*x+i*R)*C,t[6]=(_*b-d*w-v*m)*C,t[7]=(f*w-h*b+p*m)*C,t[8]=(a*T-s*x+c*A)*C,t[9]=(n*x-r*T-i*A)*C,t[10]=(d*E-y*b+v*g)*C,t[11]=(l*b-f*E-p*g)*C,t[12]=(s*R-a*O-u*A)*C,t[13]=(r*O-n*R+o*A)*C,t[14]=(y*m-d*S-_*g)*C,t[15]=(f*S-l*m+h*g)*C)}(this,this),this.check()}multiplyLeft(t){return Xr(this,t,this),this.check()}multiplyRight(t){return Xr(this,this,t),this.check()}rotateX(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[4],a=e[5],s=e[6],u=e[7],c=e[8],f=e[9],l=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*o+c*n,t[5]=a*o+f*n,t[6]=s*o+l*n,t[7]=u*o+h*n,t[8]=c*o-i*n,t[9]=f*o-a*n,t[10]=l*o-s*n,t[11]=h*o-u*n}(this,this,t),this.check()}rotateY(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[0],a=e[1],s=e[2],u=e[3],c=e[8],f=e[9],l=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o-c*n,t[1]=a*o-f*n,t[2]=s*o-l*n,t[3]=u*o-h*n,t[8]=i*n+c*o,t[9]=a*n+f*o,t[10]=s*n+l*o,t[11]=u*n+h*o}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){var n=Math.sin(r),o=Math.cos(r),i=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],l=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o+c*n,t[1]=a*o+f*n,t[2]=s*o+l*n,t[3]=u*o+h*n,t[4]=c*o-i*n,t[5]=f*o-a*n,t[6]=l*o-s*n,t[7]=h*o-u*n}(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return function(t,e,r,n){var o,i,a,s,u,c,f,l,h,p,d,y,_,v,g,m,b,S,E,w,A,R,x,O,T=n[0],M=n[1],C=n[2],P=Math.hypot(T,M,C);P<Pr||(T*=P=1/P,M*=P,C*=P,o=Math.sin(r),a=1-(i=Math.cos(r)),s=e[0],u=e[1],c=e[2],f=e[3],l=e[4],h=e[5],p=e[6],d=e[7],y=e[8],_=e[9],v=e[10],g=e[11],m=T*T*a+i,b=M*T*a+C*o,S=C*T*a-M*o,E=T*M*a-C*o,w=M*M*a+i,A=C*M*a+T*o,R=T*C*a+M*o,x=M*C*a-T*o,O=C*C*a+i,t[0]=s*m+l*b+y*S,t[1]=u*m+h*b+_*S,t[2]=c*m+p*b+v*S,t[3]=f*m+d*b+g*S,t[4]=s*E+l*w+y*A,t[5]=u*E+h*w+_*A,t[6]=c*E+p*w+v*A,t[7]=f*E+d*w+g*A,t[8]=s*R+l*x+y*O,t[9]=u*R+h*x+_*O,t[10]=c*R+p*x+v*O,t[11]=f*R+d*x+g*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?Kr(this,this,t):Kr(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n,o,i,a,s,u,c,f,l,h,p,d,y=r[0],_=r[1],v=r[2];e===t?(t[12]=e[0]*y+e[4]*_+e[8]*v+e[12],t[13]=e[1]*y+e[5]*_+e[9]*v+e[13],t[14]=e[2]*y+e[6]*_+e[10]*v+e[14],t[15]=e[3]*y+e[7]*_+e[11]*v+e[15]):(n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=o,t[2]=i,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=f,t[8]=l,t[9]=h,t[10]=p,t[11]=d,t[12]=n*y+s*_+l*v+e[12],t[13]=o*y+u*_+h*v+e[13],t[14]=i*y+c*_+p*v+e[14],t[15]=a*y+f*_+d*v+e[15])}(this,this,t),this.check()}transform(t,e){return 4===t.length?(Or(e=function(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3];return t[0]=r[0]*n+r[4]*o+r[8]*i+r[12]*a,t[1]=r[1]*n+r[5]*o+r[9]*i+r[13]*a,t[2]=r[2]*n+r[6]*o+r[10]*i+r[14]*a,t[3]=r[3]*n+r[7]*o+r[11]*i+r[15]*a,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=function(t,e,r){var n=e[0],o=e[1];return t[0]=r[0]*n+r[4]*o+r[12],t[1]=r[1]*n+r[5]*o+r[13],t}(e||[-0,-0],t,this);break;case 3:e=Lr(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Or(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=function(t,e,r){const n=e[0],o=e[1],i=r[3]*n+r[7]*o||1;return t[0]=(r[0]*n+r[4]*o)/i,t[1]=(r[1]*n+r[5]*o)/i,t}(e||[-0,-0],t,this);break;case 3:e=jr(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Or(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return Mr("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return Mr("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return Mr("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}var Zr=.1,Yr=1e-12,Jr=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;Math.max(6378137,6378137,6356752.314245179);const $r=t=>t,tn=new Hr;function en(t,e,r=$r){return br(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function rn(t,e,r=$r){return br(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const nn=new Hr,on=new Hr,an=new Hr;const sn=new Hr,un={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},cn={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},fn={east:new Hr,north:new Hr,up:new Hr,west:new Hr,south:new Hr,down:new Hr},ln=new Hr,hn=new Hr,pn=new Hr;function dn(t,e,r,n,o,i){const a=un[e]&&un[e][r];let s,u,c;yr(a&&(!n||n===a));const f=sn.copy(o);if(Ar(f.x,0,1e-14)&&Ar(f.y,0,1e-14)){const t=Math.sign(f.z);s=ln.fromArray(cn[e]),"east"!==e&&"west"!==e&&s.scale(t),u=hn.fromArray(cn[r]),"east"!==r&&"west"!==r&&u.scale(t),c=pn.fromArray(cn[n]),"east"!==n&&"west"!==n&&c.scale(t)}else{const{up:o,east:i,north:a}=fn;i.set(-f.y,f.x,0).normalize(),t.geodeticSurfaceNormal(f,o),a.copy(o).cross(i);const{down:l,west:h,south:p}=fn;l.copy(o).scale(-1),h.copy(i).scale(-1),p.copy(a).scale(-1),s=fn[e],u=fn[r],c=fn[n]}return i[0]=s.x,i[1]=s.y,i[2]=s.z,i[3]=0,i[4]=u.x,i[5]=u.y,i[6]=u.z,i[7]=0,i[8]=c.x,i[9]=c.y,i[10]=c.z,i[11]=0,i[12]=f.x,i[13]=f.y,i[14]=f.z,i[15]=1,i}const yn=new Hr,_n=new Hr,vn=new Hr,gn=new Hr,mn=new Hr,bn=new Hr;let Sn;class En{static get WGS84(){return Sn=Sn||new En(6378137,6378137,6356752.314245179),Sn}constructor(t=0,e=0,r=0){yr(t>=0),yr(e>=0),yr(r>=0),this.radii=new Hr(t,e,r),this.radiiSquared=new Hr(t*t,e*e,r*r),this.radiiToTheFourth=new Hr(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new Hr(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new Hr(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=Zr,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=_n,n=vn,[,,o]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const i=Math.sqrt(r.dot(n));return n.scale(1/i),r.scale(o),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){bn.from(t);const r=this.scaleToGeodeticSurface(bn,gn);if(!r)return;const n=this.geodeticSurfaceNormal(r,_n),o=mn;o.copy(bn).subtract(r);const i=Math.atan2(n.y,n.x),a=Math.asin(n.z),s=Math.sign(Ir(o,bn))*kr(o);return rn([i,a,s],e,gr._cartographicRadians?$r:wr)}eastNorthUpToFixedFrame(t,e=new Qr){return dn(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,o=new Qr){return dn(this,t,e,r,n,o)}geocentricSurfaceNormal(t,e=[0,0,0]){return yn.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=tn){return en(t,e,gr._cartographicRadians?$r:Er)}(t),n=r[0],o=r[1],i=Math.cos(o);return yn.set(i*Math.cos(n),i*Math.sin(n),Math.sin(o)).normalize(),yn.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return yn.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new Hr){const{oneOverRadii:n,oneOverRadiiSquared:o,centerToleranceSquared:i}=e;nn.from(t);const a=t.x,s=t.y,u=t.z,c=n.x,f=n.y,l=n.z,h=a*a*c*c,p=s*s*f*f,d=u*u*l*l,y=h+p+d,_=Math.sqrt(1/y);if(!Number.isFinite(_))return;const v=on;if(v.copy(t).scale(_),y<i)return v.to(r);const g=o.x,m=o.y,b=o.z,S=an;S.set(v.x*g*2,v.y*m*2,v.z*b*2);let E,w,A,R,x=(1-_)*t.len()/(.5*S.len()),O=0;do{x-=O,E=1/(1+x*g),w=1/(1+x*m),A=1/(1+x*b);const t=E*E,e=w*w,r=A*A;R=h*t+p*e+d*r-1;O=R/(-2*(h*(t*E)*g+p*(e*w)*m+d*(r*A)*b))}while(Math.abs(R)>Yr);return nn.scale([E,w,A]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){gn.from(t);const r=gn.x,n=gn.y,o=gn.z,i=this.oneOverRadiiSquared,a=1/Math.sqrt(r*r*i.x+n*n*i.y+o*o*i.z);return gn.multiplyScalar(a).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return gn.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return gn.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){yr(Ar(this.radii.x,this.radii.y,Jr)),yr(this.radii.z>0),gn.from(t);const n=gn.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return gn.set(0,0,n).to(r)}}function wn(t,e){if(!t)throw new Error(e)}var An=r(14),Rn=An.a._parseImageNode,xn="undefined"!=typeof Image,On="undefined"!=typeof ImageBitmap,Tn=Boolean(Rn),Mn=!!An.b||Tn;function Cn(t){var e=Dn(t);if(!e)throw new Error("Not an image");return e}function Pn(t){switch(Cn(t)){case"data":return t;case"image":case"imagebitmap":var e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function Dn(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"===d()(t)&&t.data&&t.width&&t.height?"data":null}var kn=/^data:image\/svg\+xml/,In=/\.svg((\?|#).*)?$/;function Ln(t){return t&&(kn.test(t)||In.test(t))}function Bn(t,e){if(Ln(e)){var r=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(r=unescape(encodeURIComponent(r)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,".concat(btoa(r))}return Gn(t,e)}function Gn(t,e){if(Ln(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function jn(t,e,r){return Un.apply(this,arguments)}function Un(){return(Un=a()(u.a.mark((function t(e,r,n){var o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=Bn(e,n),i=self.URL||self.webkitURL,a="string"!=typeof o&&i.createObjectURL(o),t.prev=3,t.next=6,Nn(a||o,r);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,a&&i.revokeObjectURL(a),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function Nn(t,e){return Hn.apply(this,arguments)}function Hn(){return(Hn=a()(u.a.mark((function t(e,r){var n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=new Image).src=e,!(r.image&&r.image.decode&&n.decode)){t.next=6;break}return t.next=5,n.decode();case 5:return t.abrupt("return",n);case 6:return t.next=8,new Promise((function(t,r){try{n.onload=function(){return t(n)},n.onerror=function(t){return r(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(t){r(t)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Fn={},Xn=!0;function Kn(t,e,r){return zn.apply(this,arguments)}function zn(){return(zn=a()(u.a.mark((function t(e,r,n){var o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Ln(n)){t.next=7;break}return t.next=3,jn(e,r,n);case 3:i=t.sent,o=i,t.next=8;break;case 7:o=Gn(e,n);case 8:return a=r&&r.imagebitmap,t.next=11,Wn(o,a);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wn(t){return Vn.apply(this,arguments)}function Vn(){return(Vn=a()(u.a.mark((function t(e){var r,n=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!qn(r=n.length>1&&void 0!==n[1]?n[1]:null)&&Xn||(r=null),!r){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,r);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),Xn=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function qn(t){for(var e in t||Fn)return!1;return!0}function Qn(t){var e=Zn(t);return function(t){var e=Zn(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){var e=Zn(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;var r=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var r=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:r}}(),n=r.tableMarkers,o=r.sofMarkers,i=2;for(;i+9<e.byteLength;){var a=e.getUint16(i,!1);if(o.has(a))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(a))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){var e=Zn(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){var e=Zn(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function Zn(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}function Yn(t,e){var r=(Qn(t)||{}).mimeType,n=An.a._parseImageNode;return wn(n),n(t,r,e)}function Jn(){return(Jn=a()(u.a.mark((function t(e,r,n){var o,i,a,s,c;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(r=r||{}).image||{},i=o.type||"auto",a=(n||{}).url,s=$n(i),t.t0=s,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,Kn(e,r,a);case 10:return c=t.sent,t.abrupt("break",21);case 12:return t.next=14,jn(e,r,a);case 14:return c=t.sent,t.abrupt("break",21);case 16:return t.next=18,Yn(e,r);case 18:return c=t.sent,t.abrupt("break",21);case 20:wn(!1);case 21:return"data"===i&&(c=Pn(c)),t.abrupt("return",c);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $n(t){switch(t){case"auto":case"data":return function(){if(On)return"imagebitmap";if(xn)return"image";if(Mn)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return On||xn||Mn;case"imagebitmap":return On;case"image":return xn;case"data":return Mn;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var to={id:"image",module:"images",name:"Images",version:"3.0.14",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:function(t,e,r){return Jn.apply(this,arguments)},tests:[function(t){return Boolean(Qn(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}},eo={name:"Draco",id:"draco",module:"draco",version:"3.0.14",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"==typeof WebAssembly?"undefined":d()(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}},ro=r(21),no=r.n(ro);function oo(t){for(var e=1/0,r=1/0,n=1/0,o=-1/0,i=-1/0,a=-1/0,s=t.POSITION?t.POSITION.value:[],u=s&&s.length,c=0;c<u;c+=3){var f=s[c],l=s[c+1],h=s[c+2];e=f<e?f:e,r=l<r?l:r,n=h<n?h:n,o=f>o?f:o,i=l>i?l:i,a=h>a?h:a}return[[e,r,n],[o,i,a]]}function io(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ao(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ao(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ao(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var so=function(){function t(e,r){f()(this,t),o()(this,"fields",void 0),o()(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(e)),function(t){var e,r={},n=io(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r[o.name]&&console.warn("Schema: duplicated field name",o.name,o),r[o.name]=!0}}catch(t){n.e(t)}finally{n.f()}}(e),this.fields=e,this.metadata=r||new Map}return h()(t,[{key:"compareTo",value:function(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(var e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}},{key:"select",value:function(){for(var e=Object.create(null),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var i=0,a=n;i<a.length;i++){var s=a[i];e[s]=!0}var u=this.fields.filter((function(t){return e[t.name]}));return new t(u,this.metadata)}},{key:"selectAt",value:function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=n.map((function(t){return e.fields[t]})).filter(Boolean);return new t(i,this.metadata)}},{key:"assign",value:function(e){var r,n=this.metadata;if(e instanceof t){var o=e;r=o.fields,n=uo(uo(new Map,this.metadata),o.metadata)}else r=e;var i,a=Object.create(null),s=io(this.fields);try{for(s.s();!(i=s.n()).done;){var u=i.value;a[u.name]=u}}catch(t){s.e(t)}finally{s.f()}var c,f=io(r);try{for(f.s();!(c=f.n()).done;){var l=c.value;a[l.name]=l}}catch(t){f.e(t)}finally{f.f()}return new t(Object.values(a),n)}}]),t}();function uo(t,e){return new Map([].concat(O()(t||new Map),O()(e||new Map)))}var co,fo,lo,ho,po=r(8),yo=r.n(po),_o=r(4),vo=r.n(_o),go=r(29),mo=r.n(go),bo=r(23),So=r.n(bo);function Eo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=So()(t);if(e){var o=So()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mo()(this,r)}}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(co||(co={}));var wo=function(){function t(){f()(this,t)}return h()(t,[{key:"typeId",get:function(){return co.NONE}},{key:"compareTo",value:function(t){return this===t}}],[{key:"isNull",value:function(t){return t&&t.typeId===co.Null}},{key:"isInt",value:function(t){return t&&t.typeId===co.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===co.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===co.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===co.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===co.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===co.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===co.Date}},{key:"isTime",value:function(t){return t&&t.typeId===co.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===co.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===co.Interval}},{key:"isList",value:function(t){return t&&t.typeId===co.List}},{key:"isStruct",value:function(t){return t&&t.typeId===co.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===co.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===co.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===co.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===co.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===co.Dictionary}}]),t}();fo=Symbol.toStringTag;var Ao=function(t){vo()(r,t);var e=Eo(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(yo()(i),"isSigned",void 0),o()(yo()(i),"bitWidth",void 0),i.isSigned=t,i.bitWidth=n,i}return h()(r,[{key:"typeId",get:function(){return co.Int}},{key:fo,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),r}(wo),Ro=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!0,8)}return r}(Ao),xo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!0,16)}return r}(Ao),Oo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!0,32)}return r}(Ao),To=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!1,8)}return r}(Ao),Mo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!1,16)}return r}(Ao),Co=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,!1,32)}return r}(Ao),Po=32,Do=64;lo=Symbol.toStringTag;var ko=function(t){vo()(r,t);var e=Eo(r);function r(t){var n;return f()(this,r),n=e.call(this),o()(yo()(n),"precision",void 0),n.precision=t,n}return h()(r,[{key:"typeId",get:function(){return co.Float}},{key:lo,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}]),r}(wo),Io=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,Po)}return r}(ko),Lo=function(t){vo()(r,t);var e=Eo(r);function r(){return f()(this,r),e.call(this,Do)}return r}(ko);Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;Symbol.toStringTag;ho=Symbol.toStringTag;var Bo=function(t){vo()(r,t);var e=Eo(r);function r(t,n){var i;return f()(this,r),i=e.call(this),o()(yo()(i),"listSize",void 0),o()(yo()(i),"children",void 0),i.listSize=t,i.children=[n],i}return h()(r,[{key:"typeId",get:function(){return co.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:ho,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),r}(wo);var Go=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;f()(this,t),o()(this,"name",void 0),o()(this,"type",void 0),o()(this,"nullable",void 0),o()(this,"metadata",void 0),this.name=e,this.type=r,this.nullable=n,this.metadata=i}return h()(t,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new t(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}]),t}();function jo(t,e,r){var n=No(e.metadata),o=[],i=function(t){var e={};for(var r in t){var n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(var a in t){var s=Uo(a,t[a],i[a]);o.push(s)}if(r){var u=Uo("indices",r);o.push(u)}return new so(o,n)}function Uo(t,e,r){var n=r?No(r.metadata):void 0,o=function(t){switch(t.constructor){case Int8Array:return new Ro;case Uint8Array:return new To;case Int16Array:return new xo;case Uint16Array:return new Mo;case Int32Array:return new Oo;case Uint32Array:return new Co;case Float32Array:return new Io;case Float64Array:return new Lo;default:throw new Error("array type not supported")}}(e.value);return new Go(t,new Bo(e.size,new Go("value",o)),!1,n)}function No(t){var e=new Map;for(var r in t)e.set("".concat(r,".string"),JSON.stringify(t[r]));return e}function Ho(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Fo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fo(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Fo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ko(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xo(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xo(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var zo={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},Wo={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},Vo=function(){function t(e){f()(this,t),o()(this,"draco",void 0),o()(this,"decoder",void 0),o()(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}return h()(t,[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);var n=this.decoder.GetEncodedGeometryType(r),o=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var i;switch(n){case this.draco.TRIANGULAR_MESH:i=this.decoder.DecodeBufferToMesh(r,o);break;case this.draco.POINT_CLOUD:i=this.decoder.DecodeBufferToPointCloud(r,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!i.ok()||!o.ptr){var a="DRACO decompression failed: ".concat(i.error_msg());throw new Error(a)}var s=this._getDracoLoaderData(o,n,e),u=this._getMeshData(o,s,e),c=oo(u.attributes),f=jo(u.attributes,s,u.indices),l=Ko(Ko({loader:"draco",loaderData:s,header:{vertexCount:o.num_points(),boundingBox:c}},u),{},{schema:f});return l}finally{this.draco.destroy(r),o&&this.draco.destroy(o)}}},{key:"_getDracoLoaderData",value:function(t,e,r){var n=this._getTopLevelMetadata(t),o=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:o}}},{key:"_getDracoAttributes",value:function(t,e){for(var r={},n=0;n<t.num_attributes();n++){var o=this.decoder.GetAttribute(t,n),i=this._getAttributeMetadata(t,n);r[o.unique_id()]={unique_id:o.unique_id(),attribute_type:o.attribute_type(),data_type:o.data_type(),num_components:o.num_components(),byte_offset:o.byte_offset(),byte_stride:o.byte_stride(),normalized:o.normalized(),attribute_index:n,metadata:i};var a=this._getQuantizationTransform(o,e);a&&(r[o.unique_id()].quantization_transform=a);var s=this._getOctahedronTransform(o,e);s&&(r[o.unique_id()].octahedron_transform=s)}return r}},{key:"_getMeshData",value:function(t,e,r){var n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}},{key:"_getMeshAttributes",value:function(t,e,r){for(var n={},o=0,i=Object.values(t.attributes);o<i.length;o++){var a=i[o],s=this._deduceAttributeName(a,r);a.name=s;var u=this._getAttributeValues(e,a),c=u.value,f=u.size;n[s]={value:c,size:f,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return n}},{key:"_getTriangleListIndices",value:function(t){var e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}},{key:"_getTriangleStripIndices",value:function(t){var e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}},{key:"_getAttributeValues",value:function(t,e){var r,n=Wo[e.data_type],o=e.num_components,i=t.num_points()*o,a=i*n.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,n),u=this.draco._malloc(a);try{var c=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,c,s,a,u),r=new n(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:r,size:o}}},{key:"_deduceAttributeName",value:function(t,e){for(var r=t.unique_id,n=0,o=Object.entries(e.extraAttributes||{});n<o.length;n++){var i=no()(o[n],2),a=i[0];if(i[1]===r)return a}var s=t.attribute_type;for(var u in zo){if(this.draco[u]===s)return zo[u]}var c=e.attributeNameEntry||"name";return t.metadata[c]?t.metadata[c].string:"CUSTOM_ATTRIBUTE_".concat(r)}},{key:"_getTopLevelMetadata",value:function(t){var e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}},{key:"_getAttributeMetadata",value:function(t,e){var r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}},{key:"_getDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},r=this.metadataQuerier.NumEntries(t),n=0;n<r;n++){var o=this.metadataQuerier.GetEntryName(t,n);e[o]=this._getDracoMetadataField(t,o)}return e}},{key:"_getDracoMetadataField",value:function(t,e){var r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);var n=function(t){for(var e=t.size(),r=new Int32Array(e),n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}},{key:"_disableAttributeTransforms",value:function(t){var e,r=t.quantizedAttributes,n=void 0===r?[]:r,o=t.octahedronAttributes,i=void 0===o?[]:o,a=Ho([].concat(O()(n),O()(i)));try{for(a.s();!(e=a.n()).done;){var s=e.value;this.decoder.SkipAttributeTransform(this.draco[s])}}catch(t){a.e(t)}finally{a.f()}}},{key:"_getQuantizationTransform",value:function(t,e){var r=this,n=e.quantizedAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits(),range:a.range(),min_values:new Float32Array([1,2,3]).map((function(t){return a.min_value(t)}))}}finally{this.draco.destroy(a)}}return null}},{key:"_getOctahedronTransform",value:function(t,e){var r=this,n=e.octahedronAttributes,o=void 0===n?[]:n,i=t.attribute_type();if(o.map((function(t){return r.decoder[t]})).includes(i)){var a=new this.draco.AttributeQuantizationTransform;try{if(a.InitFromAttribute(t))return{quantization_bits:a.quantization_bits()}}finally{this.draco.destroy(a)}}return null}}]),t}();var qo=r(18),Qo={};function Zo(t){return Yo.apply(this,arguments)}function Yo(){return(Yo=a()(u.a.mark((function t(e){var r,n,o=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]?o[2]:{},r&&(e=Jo(e,r,n)),Qo[e]=Qo[e]||$o(e),t.next=6,Qo[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Jo(t,e,r){if(t.startsWith("http"))return t;var n=r.modules||{};return n[t]?n[t]:Vt.b?r.CDN?(zt(r.CDN.startsWith("http")),"".concat(r.CDN,"/").concat(e,"@").concat("3.0.14","/dist/libs/").concat(t)):Vt.d?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function $o(t){return ti.apply(this,arguments)}function ti(){return(ti=a()(u.a.mark((function t(e){var r,n,o;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(Vt.b){t.next=14;break}if(t.t0=qo.requireFromFile,!t.t0){t.next=13;break}return t.next=12,qo.requireFromFile(e);case 12:t.t0=t.sent;case 13:return t.abrupt("return",t.t0);case 14:if(!Vt.d){t.next=16;break}return t.abrupt("return",importScripts(e));case 16:return t.next=18,fetch(e);case 18:return n=t.sent,t.next=21,n.text();case 21:return o=t.sent,t.abrupt("return",ei(o,e));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ei(t,e){if(!Vt.b)return qo.requireFromString&&qo.requireFromString(t,e);if(Vt.d)return eval.call(Vt.a,t),null;var r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}function ri(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ni(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ri(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var oi,ii="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.js"),ai="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_wasm_wrapper.js"),si="https://www.gstatic.com/draco/versioned/decoders/".concat("1.4.1","/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js");function ui(t){return ci.apply(this,arguments)}function ci(){return(ci=a()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.modules||{},oi=r.draco3d?oi||r.draco3d.createDecoderModule({}).then((function(t){return{draco:t}})):oi||fi(e),t.next=4,oi;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fi(t){return li.apply(this,arguments)}function li(){return(li=a()(u.a.mark((function t(e){var r,n,o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,Zo(ii,"draco",e);case 5:return r=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,Zo(ai,"draco",e);case 10:return t.t2=t.sent,t.next=13,Zo(si,"draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:o=t.sent,i=no()(o,2),r=i[0],n=i[1];case 21:return r=r||globalThis.DracoDecoderModule,t.next=24,hi(r,n);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hi(t,e){var r={};return e&&(r.wasmBinary=e),new Promise((function(e){t(ni(ni({},r),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}function pi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function di(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pi(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var yi=di(di({},eo),{},{parse:function(t,e){return _i.apply(this,arguments)}});function _i(){return(_i=a()(u.a.mark((function t(e,r){var n,o,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ui(r);case 2:return n=t.sent,o=n.draco,i=new Vo(o),t.prev=5,t.abrupt("return",i.parseSync(e,null==r?void 0:r.draco));case 7:return t.prev=7,i.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}new Uint8Array([0]);const vi=[171,75,84,88,32,50,48,187,13,10,26,10];var gi,mi,bi,Si,Ei,wi,Ai,Ri,xi;(xi=gi||(gi={}))[xi.NONE=0]="NONE",xi[xi.BASISLZ=1]="BASISLZ",xi[xi.ZSTD=2]="ZSTD",xi[xi.ZLIB=3]="ZLIB",function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(mi||(mi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(bi||(bi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(Si||(Si={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(Ei||(Ei={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(wi||(wi={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(Ai||(Ai={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(Ri||(Ri={}));class Oi{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=gi.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:mi.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:bi.UNSPECIFIED,colorPrimaries:Si.SRGB,transferFunction:Si.SRGB,flags:wi.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class Ti{constructor(t,e,r,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,r),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const r=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&n<t;)n++,this._offset++;return n<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,n)}}function Mi(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function Ci(t,e){for(var r=new Array(e.mipMapLevels),n=e.width,o=e.height,i=0,a=0;a<e.mipMapLevels;++a){var s=Di(e,n,o,t,a),u=Pi(t,a,i,s);r[a]={compressed:!0,format:e.internalFormat,data:u,width:n,height:o,levelSize:s},n=Math.max(1,n>>1),o=Math.max(1,o>>1),i+=s}return r}function Pi(t,e,r,n){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+r,n)}function Di(t,e,r,n,o){return Array.isArray(n)?t.sizeFunction(n[o]):t.sizeFunction(e,r)}var ki={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},Ii={131:ki.COMPRESSED_RGB_S3TC_DXT1_EXT,132:ki.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:ki.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:ki.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:ki.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:ki.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:ki.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:ki.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:ki.COMPRESSED_RED_RGTC1_EXT,140:ki.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:ki.COMPRESSED_RED_GREEN_RGTC2_EXT,142:ki.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:ki.COMPRESSED_RGB8_ETC2,148:ki.COMPRESSED_SRGB8_ETC2,149:ki.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:ki.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:ki.COMPRESSED_RGBA8_ETC2_EAC,152:ki.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:ki.COMPRESSED_R11_EAC,154:ki.COMPRESSED_SIGNED_R11_EAC,155:ki.COMPRESSED_RG11_EAC,156:ki.COMPRESSED_SIGNED_RG11_EAC,157:ki.COMPRESSED_RGBA_ASTC_4x4_KHR,158:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:ki.COMPRESSED_RGBA_ASTC_5x4_KHR,160:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:ki.COMPRESSED_RGBA_ASTC_5x5_KHR,162:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:ki.COMPRESSED_RGBA_ASTC_6x5_KHR,164:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:ki.COMPRESSED_RGBA_ASTC_6x6_KHR,166:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:ki.COMPRESSED_RGBA_ASTC_8x5_KHR,168:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:ki.COMPRESSED_RGBA_ASTC_8x6_KHR,170:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:ki.COMPRESSED_RGBA_ASTC_8x8_KHR,172:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:ki.COMPRESSED_RGBA_ASTC_10x5_KHR,174:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:ki.COMPRESSED_RGBA_ASTC_10x6_KHR,176:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:ki.COMPRESSED_RGBA_ASTC_10x8_KHR,178:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:ki.COMPRESSED_RGBA_ASTC_10x10_KHR,180:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:ki.COMPRESSED_RGBA_ASTC_12x10_KHR,182:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:ki.COMPRESSED_RGBA_ASTC_12x12_KHR,184:ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:ki.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:ki.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:ki.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:ki.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:ki.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:ki.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:ki.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:ki.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:ki.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:ki.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:ki.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:ki.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:ki.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:ki.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:ki.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:ki.COMPRESSED_RGBA_ASTC_12x12_KHR};var Li=[171,75,84,88,32,50,48,187,13,10,26,10];function Bi(t){var e,r=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,vi.length);if(e[0]!==vi[0]||e[1]!==vi[1]||e[2]!==vi[2]||e[3]!==vi[3]||e[4]!==vi[4]||e[5]!==vi[5]||e[6]!==vi[6]||e[7]!==vi[7]||e[8]!==vi[8]||e[9]!==vi[9]||e[10]!==vi[10]||e[11]!==vi[11])throw new Error("Missing KTX 2.0 identifier.");const r=new Oi,n=17*Uint32Array.BYTES_PER_ELEMENT,o=new Ti(t,vi.length,n,!0);r.vkFormat=o._nextUint32(),r.typeSize=o._nextUint32(),r.pixelWidth=o._nextUint32(),r.pixelHeight=o._nextUint32(),r.pixelDepth=o._nextUint32(),r.layerCount=o._nextUint32(),r.faceCount=o._nextUint32();const i=o._nextUint32();r.supercompressionScheme=o._nextUint32();const a=o._nextUint32(),s=o._nextUint32(),u=o._nextUint32(),c=o._nextUint32(),f=o._nextUint64(),l=o._nextUint64(),h=new Ti(t,vi.length+n,3*i*8,!0);for(let e=0;e<i;e++)r.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});const p=new Ti(t,a,s,!0),d={vendorId:p._skip(4)._nextUint16(),descriptorType:p._nextUint16(),versionNumber:p._nextUint16(),descriptorBlockSize:p._nextUint16(),colorModel:p._nextUint8(),colorPrimaries:p._nextUint8(),transferFunction:p._nextUint8(),flags:p._nextUint8(),texelBlockDimension:{x:p._nextUint8()+1,y:p._nextUint8()+1,z:p._nextUint8()+1,w:p._nextUint8()+1},bytesPlane:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],samples:[]},y=(d.descriptorBlockSize/4-6)/4;for(let t=0;t<y;t++)d.samples[t]={bitOffset:p._nextUint16(),bitLength:p._nextUint8(),channelID:p._nextUint8(),samplePosition:[p._nextUint8(),p._nextUint8(),p._nextUint8(),p._nextUint8()],sampleLower:p._nextUint32(),sampleUpper:p._nextUint32()};r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(d);const _=new Ti(t,u,c,!0);for(;_._offset<c;){const t=_._nextUint32(),e=_._scan(t),n=Mi(e),o=_._scan(t-e.byteLength);r.keyValue[n]=n.match(/^ktx/i)?Mi(o):o,t%4&&_._skip(4-t%4)}if(l<=0)return r;const v=new Ti(t,f,l,!0),g=v._nextUint16(),m=v._nextUint16(),b=v._nextUint32(),S=v._nextUint32(),E=v._nextUint32(),w=v._nextUint32(),A=[];for(let t=0;t<i;t++)A.push({imageFlags:v._nextUint32(),rgbSliceByteOffset:v._nextUint32(),rgbSliceByteLength:v._nextUint32(),alphaSliceByteOffset:v._nextUint32(),alphaSliceByteLength:v._nextUint32()});const R=f+v._offset,x=R+b,O=x+S,T=O+E,M=new Uint8Array(t.buffer,t.byteOffset+R,b),C=new Uint8Array(t.buffer,t.byteOffset+x,S),P=new Uint8Array(t.buffer,t.byteOffset+O,E),D=new Uint8Array(t.buffer,t.byteOffset+T,w);return r.globalData={endpointCount:g,selectorCount:m,imageDescs:A,endpointsData:M,selectorsData:C,tablesData:P,extendedData:D},r}(new Uint8Array(t)),n=Math.max(1,r.levels.length),o=r.pixelWidth,i=r.pixelHeight,a=(e=r.vkFormat,Ii[e]);return Ci(r.levels,{mipMapLevels:n,width:o,height:i,sizeFunction:function(t){return t.uncompressedByteLength},internalFormat:a})}var Gi={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:ki.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:ki.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:ki.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":ki.COMPRESSED_RGB_ATC_WEBGL,ATCA:ki.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:ki.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:Ui,DXT3:Ni,DXT5:Ni,"ATC ":Ui,ATCA:Ni,ATCI:Ni}};function ji(t){var e=new Int32Array(t,0,Gi.HEADER_LENGTH),r=e[Gi.HEADER_PF_FOURCC_INDEX];G(Boolean(e[Gi.HEADER_PF_FLAGS_INDEX]&Gi.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");var n,o=(n=r,String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)),i=Gi.PIXEL_FORMATS[o],a=Gi.SIZE_FUNCTIONS[o];G(i&&a,"DDS: Unknown pixel format ".concat(r));var s=1;e[Gi.HEADER_FLAGS_INDEX]&Gi.DDSD_MIPMAPCOUNT&&(s=Math.max(1,e[Gi.MIPMAPCOUNT_INDEX]));var u=e[Gi.HEADER_WIDTH_INDEX],c=e[Gi.HEADER_HEIGHT_INDEX],f=e[Gi.HEADER_SIZE_INDEX]+4;return Ci(new Uint8Array(t,f),{mipMapLevels:s,width:u,height:c,sizeFunction:a,internalFormat:i})}function Ui(t,e){return(t+3>>2)*(e+3>>2)*8}function Ni(t,e){return(t+3>>2)*(e+3>>2)*16}var Hi=55727696,Fi=1347834371,Xi=13,Ki=52,zi=0,Wi=2,Vi=4,qi=6,Qi=7,Zi=11,Yi=12,Ji={0:[ki.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[ki.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[ki.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[ki.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[ki.COMPRESSED_RGB_ETC1_WEBGL],7:[ki.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[ki.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[ki.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[ki.COMPRESSED_RGB8_ETC2],23:[ki.COMPRESSED_RGBA8_ETC2_EAC],24:[ki.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[ki.COMPRESSED_R11_EAC],26:[ki.COMPRESSED_RG11_EAC],27:[ki.COMPRESSED_RGBA_ASTC_4X4_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[ki.COMPRESSED_RGBA_ASTC_5X4_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[ki.COMPRESSED_RGBA_ASTC_5X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[ki.COMPRESSED_RGBA_ASTC_6X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[ki.COMPRESSED_RGBA_ASTC_6X6_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[ki.COMPRESSED_RGBA_ASTC_8X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[ki.COMPRESSED_RGBA_ASTC_8X6_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[ki.COMPRESSED_RGBA_ASTC_8X8_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[ki.COMPRESSED_RGBA_ASTC_10X5_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[ki.COMPRESSED_RGBA_ASTC_10X6_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[ki.COMPRESSED_RGBA_ASTC_10X8_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[ki.COMPRESSED_RGBA_ASTC_10X10_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[ki.COMPRESSED_RGBA_ASTC_12X10_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[ki.COMPRESSED_RGBA_ASTC_12X12_KHR,ki.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},$i={0:ta,1:ta,2:ea,3:ea,6:ra,7:ra,9:na,11:na,22:ra,23:na,24:ra,25:ra,26:na,27:na,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function ta(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function ea(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function ra(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function na(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function oa(t){if(function(t){var e=new Uint8Array(t.buffer||t,t.byteOffset||0,Li.length);return!(e[0]!==Li[0]||e[1]!==Li[1]||e[2]!==Li[2]||e[3]!==Li[3]||e[4]!==Li[4]||e[5]!==Li[5]||e[6]!==Li[6]||e[7]!==Li[7]||e[8]!==Li[8]||e[9]!==Li[9]||e[10]!==Li[10]||e[11]!==Li[11])}(t))return Bi(t);if(function(t){return new Uint32Array(t,0,Gi.HEADER_LENGTH)[Gi.MAGIC_NUMBER_INDEX]===Gi.MAGIC_NUMBER}(t))return ji(t);if(function(t){var e=new Uint32Array(t,0,Xi)[zi];return e===Hi||e===Fi}(t))return function(t){var e=new Uint32Array(t,0,Xi),r=e[Wi],n=e[Vi],o=Ji[r]||[],i=o.length>1&&n?o[1]:o[0],a=$i[r],s=e[Zi],u=e[Qi],c=e[qi],f=Ki+e[Yi];return Ci(new Uint8Array(t,f),{mipMapLevels:s,width:u,height:c,sizeFunction:a,internalFormat:i})}(t);throw new Error("Texture container format not recognized")}function ia(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function aa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ia(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var sa,ua={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.14",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},ca=aa(aa({},ua),{},{parse:(sa=a()(u.a.mark((function t(e){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",oa(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return sa.apply(this,arguments)})});function fa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?"".concat(t,"?token=").concat(e):t}var la=5121,ha=5125,pa=5126,da=5130,ya={UInt8:Uint8Array,UInt16:Uint16Array,UInt32:Uint32Array,Float32:Float32Array,UInt64:Float64Array},_a={UInt8:la,UInt16:ha,Float32:pa,UInt32:ha,UInt64:da},va={position:"position",normal:"normal",uv0:"uv0",color:"color",region:"region"},ga={vertexAttributes:"vertexAttributes",featureAttributeOrder:"featureAttributeOrder",featureAttributes:"featureAttributes"},ma="header",ba="vertexCount",Sa="featureCount",Ea={UInt8:1,UInt16:2,UInt32:4,Float32:4,UInt64:8};function wa(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Aa(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Aa(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function xa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ra(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ra(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Oa=new Hr([0,0,0]),Ta={jpeg:to,png:to,"ktx-etc2":ca,dds:ca};function Ma(t,e,r,n,o){return Ca.apply(this,arguments)}function Ca(){return(Ca=a()(u.a.mark((function t(e,r,n,o,i){var a,s,c,f,l,h,p;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.content=r.content||{},r.content.featureIds=r.content.featureIds||null,r.content.featureData=Ba(r,n),r.content.attributes={},!r.textureUrl){t.next=25;break}return s=fa(r.textureUrl,null==o||null===(a=o.i3s)||void 0===a?void 0:a.token),c=Ta[r.textureFormat]||to,t.next=9,fetch(s);case 9:return f=t.sent,t.next=12,f.arrayBuffer();case 12:if(l=t.sent,c!==to){t.next=20;break}return h={image:{type:"data"}},t.next=17,i.parse(l,h);case 17:r.content.texture=t.sent,t.next=25;break;case 20:if(c!==ca){t.next=25;break}return t.next=23,pr(l,ca);case 23:p=t.sent,r.content.texture={compressed:!0,mipmaps:!1,width:p[0].width,height:p[0].height,data:p};case 25:return r.content.material=Ha(r.materialDefinition,r.content.texture),r.content.material&&(r.content.texture=null),t.next=29,Pa(e,r,i);case 29:return t.abrupt("return",t.sent);case 30:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Pa(t){return Da.apply(this,arguments)}function Da(){return(Da=a()(u.a.mark((function t(e){var r,n,o,i,a,s,c,f,l,h,p,d,y,_,v,g,m,b,S,E,w,A,R,x,O,T,M,C,P,D,k,I,L,B=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=B.length>1&&void 0!==B[1]?B[1]:{},B.length>2?B[2]:void 0,r.content){t.next=4;break}return t.abrupt("return",r);case 4:if(n=r.content,a=0,s=0,!r.isDracoGeometry){t.next=20;break}return t.next=10,cr(e,yi,{draco:{attributeNameEntry:"i3s-attribute-type"}});case 10:c=t.sent,i=c.header.vertexCount,f=c.indices.value,l=c.attributes,h=l.POSITION,p=l.NORMAL,d=l.COLOR_0,y=l.TEXCOORD_0,_=l["feature-index"],v=l["uv-region"],ka(o={position:h,normal:p,color:d,uv0:y,uvRegion:v,id:_,indices:f},c),(g=za(_))&&Ka(o,g),t.next=29;break;case 20:m=n.featureData,b=m.vertexAttributes,S=m.attributesOrder,E=m.featureAttributes,w=m.featureAttributeOrder,A=Ga(n,e),a=A.byteOffset,i=A.vertexCount,s=A.featureCount,R=ja(e,a,b,i,S),x=R.attributes,O=R.byteOffset,T=ja(e,O,E,s,w),Xa(M=T.attributes),o=Ia(x,M);case 29:for(L in C=Na(o.position,r),P=C.enuMatrix,D=C.cartographicOrigin,k=C.cartesianOrigin,I=(new Qr).multiplyRight(P),n.attributes={positions:o.position,normals:o.normal,colors:La(o.color),texCoords:o.uv0,uvRegions:La(o.uvRegion)},n.indices=o.indices||null,o.id&&o.id.value&&(r.content.featureIds=o.id.value),n.attributes)n.attributes[L]||delete n.attributes[L];return n.vertexCount=i,n.cartographicCenter=D,n.cartesianOrigin=k,n.modelMatrix=I.invert(),n.byteLength=e.byteLength,t.abrupt("return",r);case 41:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ka(t,e){for(var r in e.loaderData.attributes){var n=e.loaderData.attributes[r];switch(n.name){case"POSITION":t.position.metadata=n.metadata;break;case"feature-index":t.id.metadata=n.metadata}}}function Ia(t,e){return xa(xa({},t),e)}function La(t){return t?(t.normalized=!0,t):t}function Ba(t,e){var r=e.store.defaultGeometrySchema,n=r;for(var o in ga)for(var i in va){var a=r[o][i];if(a){var s=a.byteOffset,u=void 0===s?0:s,c=a.count,f=void 0===c?0:c,l=a.valueType,h=a.valuesPerElement;n[o][i]={valueType:l,valuesPerElement:h,byteOffset:u,count:f}}}return n.attributesOrder=r.ordering,n}function Ga(t,e){var r=0,n=0,o=0,i=t.featureData[ma];for(var a in i){var s=i[a],u=s.property,c=s.type,f=ya[c];u===ba&&(n=new f(e,0,4)[0],r+=Ea[c]),u===Sa&&(o=new f(e,4,4)[0],r+=Ea[c])}return{vertexCount:n,featureCount:o,byteOffset:r}}function ja(t,e,r,n,o){var i,a={},s=wa(o);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(r[u]){var c=r[u],f=c.valueType,l=c.valuesPerElement,h=n;if(e+h*l>t.byteLength)break;var p=t.slice(e),d=[];if("UInt64"===f)d=Ua(p,h*l,Ea[f]);else d=new(0,ya[f])(p,0,h*l);switch(a[u]={value:d,type:_a[f],size:l},u){case"color":a.color.normalized=!0}e+=h*l*Ea[f]}}}catch(t){s.e(t)}finally{s.f()}return{attributes:a,byteOffset:e}}function Ua(t,e,r){for(var n=[],o=new DataView(t),i=0,a=0;a<e;a++){var s=o.getUint32(i,!0),u=o.getUint32(i+4,!0),c=s+Math.pow(2,32)*u;n.push(c),i+=r}return n}function Na(t,e){var r=e.mbs,n=t.value,o=t.metadata,i=new Qr,a=new Hr(r[0],r[1],r[2]),s=new Hr;return En.WGS84.cartographicToCartesian(a,s),En.WGS84.eastNorthUpToFixedFrame(s,i),t.value=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=new Float64Array(t.length),o=e["i3s-scale_x"]&&e["i3s-scale_x"].double||1,i=e["i3s-scale_y"]&&e["i3s-scale_y"].double||1,a=0;a<n.length;a+=3)n[a]=t[a]*o+r.x,n[a+1]=t[a+1]*i+r.y,n[a+2]=t[a+2]+r.z;for(var s=0;s<n.length;s+=3)En.WGS84.cartographicToCartesian(n.subarray(s,s+3),Oa),n[s]=Oa.x,n[s+1]=Oa.y,n[s+2]=Oa.z;return n}(n,o,a),{enuMatrix:i,fixedFrameToENUMatrix:i.invert(),cartographicOrigin:a,cartesianOrigin:s}}function Ha(t,e){var r;return t?r=xa(xa({},t),{},{pbrMetallicRoughness:t.pbrMetallicRoughness?xa({},t.pbrMetallicRoughness):{baseColorFactor:[255,255,255,255]}}):(r={pbrMetallicRoughness:{}},e?r.pbrMetallicRoughness.baseColorTexture={texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]),r.alphaCutoff=r.alphaCutoff||.25,r.alphaMode&&(r.alphaMode=r.alphaMode.toUpperCase()),r.emissiveFactor&&(r.emissiveFactor=Fa(r.emissiveFactor)),r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorFactor&&(r.pbrMetallicRoughness.baseColorFactor=Fa(r.pbrMetallicRoughness.baseColorFactor)),function(t,e){var r={source:{image:e}};t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?t.pbrMetallicRoughness.baseColorTexture=xa(xa({},t.pbrMetallicRoughness.baseColorTexture),{},{texture:r}):t.emissiveTexture?t.emissiveTexture=xa(xa({},t.emissiveTexture),{},{texture:r}):t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?t.pbrMetallicRoughness.metallicRoughnessTexture=xa(xa({},t.pbrMetallicRoughness.metallicRoughnessTexture),{},{texture:r}):t.normalTexture?t.normalTexture=xa(xa({},t.normalTexture),{},{texture:r}):t.occlusionTexture&&(t.occlusionTexture=xa(xa({},t.occlusionTexture),{},{texture:r}))}(r,e),r}function Fa(t){for(var e=O()(t),r=0;r<t.length;r++)e[r]=t[r]/255;return e}function Xa(t){var e=t.id,r=t.faceRange;if(e&&r){for(var n=e.value,o=r.value,i=o[o.length-1]+1,a=new Uint32Array(3*i),s=0,u=0,c=1;c<o.length;c+=2){var f=Number(n[s]),l=u+3*(o[c]-o[c-1]+1);a.fill(f,u,l),s++,u=l}t.id.value=a}}function Ka(t,e){for(var r=t.id.value,n=new Float32Array(r.length),o=0;o<r.length;o++)n[o]=e[r[o]];t.id.value=n}function za(t){return t&&t.metadata&&t.metadata["i3s-feature-ids"]&&t.metadata["i3s-feature-ids"].intArray}var Wa;function Va(){return(Va=a()(u.a.mark((function t(e,r,n){var o,i,a;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=(null==r?void 0:r.i3s)||{},i=o.tile,a=o.tileset,t.next=3,Ma(e,i,a,r,n);case 3:return t.abrupt("return",i.content);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}Wa={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:"3.0.14",mimeTypes:["application/octet-stream"],parse:function(t,e,r){return Va.apply(this,arguments)},extensions:["bin"],options:{"i3s-content":{}}},"undefined"!=typeof self&&(g.onmessage=function(){var t=a()(u.a.mark((function t(e,r){var n,o,i,a,s;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="process"===t.t0?3:16;break;case 3:return t.prev=3,n=r.input,o=r.options,i=void 0===o?{}:o,t.next=7,A({loader:Wa,arrayBuffer:n,options:i,context:{parse:w}});case 7:a=t.sent,g.postMessage("done",{result:a}),t.next=15;break;case 11:t.prev=11,t.t1=t.catch(3),s=t.t1 instanceof Error?t.t1.message:"",g.postMessage("error",{error:s});case 15:return t.abrupt("break",16);case 16:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e,r){return t.apply(this,arguments)}}())},,,,,,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s}));var o=r(6),i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},a=i.global||i.self||i.window||{},s="object"!==(void 0===n?"undefined":r.n(o)()(n))||"[object process]"!==String(n)||n.browser,u=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);u&&parseFloat(u[1])}).call(this,r(20),r(13))}]);
2
2
  //# sourceMappingURL=i3s-content-worker.js.map