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

@deck.gl/mesh-layers

Package Overview
Dependencies
Maintainers
9
Versions
402
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deck.gl/mesh-layers - npm Package Compare versions

Comparing version 7.0.9 to 7.1.0-alpha.1

2

dist.min.js

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

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("luma"),require("deck"));else if("function"==typeof define&&define.amd)define(["luma","deck"],e);else{var n="object"==typeof exports?e(require("luma"),require("deck")):e(t.luma,t.deck);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=20)}([function(t,e,n){t.exports=n(28)},function(e,n){e.exports=t},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){t.exports=n(26)},function(t,e){},function(t,n){t.exports=e},function(t,e){"undefined"==typeof TextDecoder?t.exports={}:t.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(t,e,n){n(2);var r=n(24);function o(e,n,i){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=o=Reflect.get:t.exports=o=function(t,e,n){var o=r(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}},o(e,n,i||e)}t.exports=o},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",function(){return i});var o=n(13),i="object"!==(void 0===t?"undefined":Object(o.a)(t))||"[object process]"!==String(t)||t.browser;"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document}).call(this,n(29),n(16))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(22),o=n(23);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e,n){var r=n(25);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&&r(t,e)}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},function(t,e){},function(t,e){},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){(function(e){const r=n(30),o=("undefined"==typeof window?e:window).deck||{};if(!o.Layer)throw new Error("@deck.gl/core is not found");t.exports=Object.assign(o,r)}).call(this,n(16))},,function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},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}},function(t,e,n){var r=n(2);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(27),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,f=e.regeneratorRuntime;if(f)u&&(t.exports=f);else{(f=e.regeneratorRuntime=u?t.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",h="executing",y="completed",v={},d={};d[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==r&&o.call(m,a)&&(d=m);var b=k.prototype=_.prototype=Object.create(d);S.prototype=b.constructor=k,k.constructor=S,k[c]=S.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},f.awrap=function(t){return{__await:t}},P(T.prototype),T.prototype[s]=function(){return this},f.AsyncIterator=T,f.async=function(t,e,n,r){var o=new T(w(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},P(b),b[c]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=E,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},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 r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;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,v):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),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===y){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?y:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=y,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function S(){}function k(){}function P(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function T(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function O(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,O(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function L(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:n,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=u(t,e,n);if("normal"===c.type){if(r=n.done?h:l,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",l="suspendedYield",p="executing",h="completed",y={};function v(){}function d(){}function g(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(L([])));w&&w!==n&&r.call(w,i)&&(m=w);var x=g.prototype=v.prototype=Object.create(m);function _(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){var e;this._invoke=function(n,o){function i(){return new Promise(function(e,i){!function e(n,o,i,a){var s=u(t[n],t,o);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,o,e,i)})}return e=e?e.then(i,i):i()}}function k(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return d.prototype=x.constructor=g,g.constructor=d,g[s]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(S.prototype),S.prototype[a]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,o){var i=new S(c(e,n,r,o));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},_(x),x[s]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.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,y):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),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){var n,r,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(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new y(t,e)),1!==u.length||f||s(h)},y.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=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,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,n){"use strict";n.r(e);var r=n(9),o=n.n(r),i=n(10),a=n.n(i),s=n(11),c=n.n(s),u=n(2),f=n.n(u),l=n(7),p=n.n(l),h=n(12),y=n.n(h),v=n(5),d=n(1),g=n.n(d),m=n(0),b=n.n(m);function w(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function x(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){w(i,r,o,a,s,"next",t)}function s(t){w(i,r,o,a,s,"throw",t)}a(void 0)})}}var _=n(8);function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){S(t,e,n[e])})}return t}function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),t}var L=n(4),A=n.n(L),C=n(14),E=n.n(C),j=n(15),M=n.n(j),I=n(19),N=n.n(I);function F(t,e){if(!t)throw new Error(e||"loader assertion failed.")}var z=n(6),R=function(t){return t&&t instanceof ArrayBuffer},U=function(t){return t&&t instanceof Buffer};function B(t){if(R(t))return t;if(U(t))return new Uint8Array(t).buffer;if(ArrayBuffer.isView(t))return t.buffer;if("string"==typeof t){var e=t;return(new z.TextEncoder).encode(e).buffer}return F(!1)}function D(t){this.wrapped=t}function G(t){var e,n;function r(e,n){try{var i=t[e](n),a=i.value,s=a instanceof D;Promise.resolve(s?a.wrapped:a).then(function(t){s?r("next",t):o(i.done?"return":"normal",t)},function(t){r("throw",t)})}catch(t){o("throw",t)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,o){return new Promise(function(i,a){var s={key:t,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(e=n=s,r(t,o))})},"function"!=typeof t.return&&(this.return=void 0)}function H(t){var e=new ArrayBuffer,n="";return new Promise(function(r,o){t.data(function(t){var r,o,i,a,s;"string"==typeof t?n+=t:(o=t,i=(r=e)instanceof ArrayBuffer?new Uint8Array(r):r,a=o instanceof ArrayBuffer?new Uint8Array(o):o,(s=new Uint8Array(i.byteLength+a.byteLength)).set(i,0),s.set(a,i.byteLength),e=s)}),t.on("error",function(t){return o(t)}),t.on("end",function(){t.complete?r(e||n):o("The connection was terminated while the message was still being sent")})})}function V(t){var e,n,r=t.indexOf(",");return";base64"===t.slice(r-7,r)?(e=new Buffer(t.slice(r+1),"base64"),n=t.slice(5,r-7).trim()):(e=new Buffer(decodeURIComponent(t.slice(r+1))),n=t.slice(5,r).trim()),n?";"===n[0]&&(n="text/plain".concat(n)):n="text/plain;charset=US-ASCII",{buffer:e,mimeType:n}}"function"==typeof Symbol&&Symbol.asyncIterator&&(G.prototype[Symbol.asyncIterator]=function(){return this}),G.prototype.next=function(t){return this._invoke("next",t)},G.prototype.throw=function(t){return this._invoke("throw",t)},G.prototype.return=function(t){return this._invoke("return",t)};var q={dataType:"arrayBuffer"},W=(Boolean(A.a&&A.a.readFile),function(t){return t.startsWith("data:")}),X=function(t){return t.startsWith("http:")||t.startsWith("https:")},Y=function(){function t(e){P(this,t),this.reponse=e}return O(t,[{key:"get",value:function(t){if(this.response.httpResponse)return this.response.httpResponse.getHeaders()[t];switch(t){case"Content-Length":return this._getContentLength()}}},{key:"_getContentLength",value:function(){return this._contentLength}}]),t}(),$=function(){function t(e,n){P(this,t),this.url=e,this.options=n,this.bodyUsed=!1,this._headers=null}return O(t,[{key:"arrayBuffer",value:function(){var t=x(b.a.mark(function t(){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.bodyUsed=!0,t.abrupt("return",K(this.url,this.options));case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"text",value:function(){var t=x(b.a.mark(function t(){var e,n;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.arrayBuffer();case 2:return e=t.sent,n=new z.TextDecoder,t.abrupt("return",n.decode(e));case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"json",value:function(){var t=x(b.a.mark(function t(){var e;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.text();case 2:return e=t.sent,t.abrupt("return",JSON.parse(e));case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"_getHeaders",value:function(){return X(this.url)?new Y(this):W(this.url)?{"Content-Length":this.url.length}:X(this.repsonse.url)?{}:{"Content-Length":A.a.statSync(this.response.url).size}}},{key:"headers",get:function(){this._headers=this._headers||this._getHeaders()}},{key:"body",get:function(){var t=this.url,e=this.options;return this.bodyUsed=!0,tt(t,e)}}]),t}();function J(t,e){return Q.apply(this,arguments)}function Q(){return(Q=x(b.a.mark(function t(e,n){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new $(e,n));case 1:case"end":return t.stop()}},t)}))).apply(this,arguments)}function K(t){return Z.apply(this,arguments)}function Z(){return(Z=x(b.a.mark(function t(e){var n,r,o,i=arguments;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=nt(n=i.length>1&&void 0!==i[1]?i[1]:{}),!W(e)){t.next=4;break}return t.abrupt("return",Promise.resolve(V(e)));case 4:if(!X(e)){t.next=6;break}return t.abrupt("return",new Promise(function(t,r){n=k({},new URL(e),n),(e.startsWith("https:")?M.a.request:E.a.request)(e,function(e){return H(e).then(t,r)})}));case 6:return r=N.a.promisify(A.a.readFile),t.next=9,r(e,n);case 9:return o=t.sent,t.abrupt("return",o instanceof Buffer?B(o):o);case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function tt(t,e){return et.apply(this,arguments)}function et(){return(et=x(b.a.mark(function t(e,n){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!W(e)){t.next=2;break}return t.abrupt("return",V(e));case 2:if(X(e)){t.next=4;break}return t.abrupt("return",A.a.createReadStream(e,n));case 4:return t.abrupt("return",new Promise(function(t,r){n=k({},new URL(e),n),(e.startsWith("https:")?M.a.request:E.a.request)(e,function(e){return t(e)})}));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function nt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=Object.assign({},q,t)).responseType=t.responseType||t.dataType,A.a&&(t.encoding=t.encoding||("text"===t.dataType?"utf8":null)),t}function rt(t,e){return ot.apply(this,arguments)}function ot(){return(ot=x(b.a.mark(function t(e,n){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}var it="",at={};function st(t){for(var e in at)if(t.startsWith(e)){var n=at[e];return t.replace(e,n)}return t+=it}function ct(t,e){return ut.apply(this,arguments)}function ut(){return(ut=x(b.a.mark(function t(e,n){var r;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=st(e),r=_.a?rt:J,t.abrupt("return",r(e,n));case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}function ft(t){return!!t&&(Array.isArray(t)&&(t=t[0]),t.parseTextSync||t.parseSync||t.parse||t.loadAndParse||t.parseStream||t.parseInBatches||t.worker)}function lt(t){var e;return F(ft(t)),Array.isArray(t)&&(e=(t=t[0])[1],t=k({},t,{options:k({},t.options,{options:e})})),t.extension&&(t.extensions=t.extensions||[t.extension],delete t.extension),Array.isArray(t.extensions)||(t.extensions=[t.extensions]),F(t.extensions&&t.extensions.length>0&&t.extensions[0]),t.parseTextSync&&(t.text=!0),t.text||(t.binary=!0),t}var pt=/[^\.]+$/;function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=t.match(pt);if(r&&r[0]){var o=function(t,e){e=e.toLowerCase();var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;lt(s);var c=!0,u=!1,f=void 0;try{for(var l,p=s.extensions[Symbol.iterator]();!(c=(l=p.next()).done);c=!0){var h=l.value;if(h.toLowerCase()===e)return s}}catch(t){u=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(u)throw f}}}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null}(n,r[0]);if(o)return o}var i=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;if(s.testText&&s.testText(e))return s}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null}(n,e);return i||null}var yt=function(){function t(){P(this,t)}return O(t,[{key:"log",value:function(){}},{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(){}}]),t}(),vt={};function dt(){return Object.values(vt)}var gt=new Map;function mt(t,e,n){var r=function(t){var e=gt.get(t);if(!e){var n=new Blob([t],{type:"application/javascript"});e=URL.createObjectURL(n),gt.set(t,e)}return new Worker(e)}(t);n=function(t){null!==(t=Object.assign({},t)).log&&delete t.log;return t}(n);var o=function(t,e){return new Promise(function(n,o){r.onmessage=function(t){switch(t.data.type){case"done":n(t.data.result),r.terminate();break;case"error":o(new Error(t.data.message))}};var i=B(t);r.postMessage({arraybuffer:i,opts:e},[i])})};return e?o(e,n):o}n(13);var bt=function(t){return"undefined"!=typeof window&&t instanceof window.Response||t.arrayBuffer&&t.json&&t.body},wt="Cannot convert supplied data type";function xt(t){return bt(t)?t.url:null}function _t(t,e){if(e.text&&"string"==typeof t)return t;if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){var n=t.buffer||t;return e.text&&!e.binary?new z.TextDecoder("utf8").decode(n):n}throw new Error(wt)}function St(t,e){return kt.apply(this,arguments)}function kt(){return(kt=x(b.a.mark(function t(e,n){var r;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(e=t.sent,r=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!=typeof e&&!r){t.next=6;break}return t.abrupt("return",_t(e,n));case 6:if(!bt(e)){t.next=15;break}if(!n.binary){t.next=13;break}return t.next=10,e.arrayBuffer();case 10:t.t0=t.sent,t.next=14;break;case 13:t.t0=e.text();case 14:return t.abrupt("return",t.t0);case 15:throw new Error(wt);case 16:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Pt(t,e){return Tt.apply(this,arguments)}function Tt(){return(Tt=x(b.a.mark(function t(e,n){var r,o,i=arguments;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},o=(o=i.length>3?i[3]:void 0)||xt(e),t.next=5,St(e,n);case 5:if(e=t.sent,!n.parseTextSync||"string"!=typeof e){t.next=9;break}return r.dataType="text",t.abrupt("return",n.parseTextSync(e,r,o,n));case 9:if(!n.parseSync){t.next=11;break}return t.abrupt("return",n.parseSync(e,r,o,n));case 11:if(!n.parse){t.next=15;break}return t.next=14,n.parse(e,r,o,n);case 14:return t.abrupt("return",t.sent);case 15:if(!n.worker){t.next=19;break}return t.next=18,mt(n.worker,e,r);case 18:return t.abrupt("return",t.sent);case 19:return t.abrupt("return",F(!1));case 20:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Ot(t,e,n,r){return Lt.apply(this,arguments)}function Lt(){return(Lt=x(b.a.mark(function t(e,n,r,o){var i;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(n)||ft(n)||(o=r,r=n,n=null),n=n||dt(),i=Array.isArray(n)?ht(o,e,n):n){t.next=5;break}return t.abrupt("return",null);case 5:return lt(i),r=At(r,i),t.next=9,Pt(e,i,r,o);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}},t)}))).apply(this,arguments)}function At(t,e){return null===(t=Object.assign({},e.DEFAULT_OPTIONS,e.options,t,{dataType:"arraybuffer"})).log&&(t.log=new yt),"log"in t||(t.log=console),t}function Ct(t,e,n){return Et.apply(this,arguments)}function Et(){return(Et=x(b.a.mark(function t(e,n,r){var o,i;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(n)||ft(n)||(r=n,n=null),n=n||dt(),!(o=Array.isArray(n)?ht(e,null,n):n)||!o.loadAndParse){t.next=7;break}return t.next=6,o.loadAndParse(e,r);case 6:return t.abrupt("return",t.sent);case 7:return t.next=9,ct(e,r);case 9:return i=t.sent,t.abrupt("return",Ot(i,n,r,e));case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}var jt=n(3),Mt=n.n(jt);function It(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function Nt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){It(i,r,o,a,s,"next",t)}function s(t){It(i,r,o,a,s,"throw",t)}a(void 0)})}}var Ft=n(17),zt=n.n(Ft),Rt=n(18),Ut=n.n(Rt);function Bt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Dt(t){return Buffer.isBuffer(t)?new Uint8Array(t).buffer:t}var Gt=!1,Ht=!0,Vt=new Map([["image/png",function(t){var e=Yt(t);if(e.byteLength<24||2303741511!==e.getUint32(0,Gt))return null;return{width:e.getUint32(16,Gt),height:e.getUint32(20,Gt)}}],["image/jpeg",function(t){var e=Yt(t);if(e.byteLength<2||65496!==e.getUint16(0,Gt))return null;var n=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var n=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:n}}(),r=n.tableMarkers,o=n.sofMarkers,i=2;for(;i<e.byteLength;){var a=e.getUint16(i,Gt);if(o.has(a))return{height:e.getUint16(i+5,Gt),width:e.getUint16(i+7,Gt)};if(!r.has(a))return null;i+=2,i+=e.getUint16(i,Gt)}return null}],["image/gif",function(t){var e=Yt(t);if(e.byteLength<10||1195984440!==e.getUint32(0,Gt))return null;return{width:e.getUint16(6,Ht),height:e.getUint16(8,Ht)}}],["image/bmp",function(t){var e=Yt(t);if(16973!==e.getUint16(0,Gt))return null;return{width:e.getUint32(18,Ht),height:e.getUint32(22,Ht)}}]]),qt="Invalid MIME type. Supported MIME types are: ".concat(Array.from(Vt.keys()).join(", "));function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var n=Vt.get(e);if(!n)throw new Error(qt);var r=n(t);if(!r)throw new Error("invalid image data for type: ".concat(e));return r}var o=Xt(t,e);if(!o)throw new Error(qt);return o}function Xt(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Vt.entries()[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=Bt(i.value,2),c=s[0],u=(0,s[1])(t);if(u)return u.mimeType=c,u}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null}function Yt(t){if(Dt&&(t=Dt(t)),t instanceof ArrayBuffer||ArrayBuffer.isView(t))return new DataView(t.buffer||t);throw new Error("toDataView")}function $t(t,e){return Jt.apply(this,arguments)}function Jt(){return(Jt=Nt(Mt.a.mark(function t(e,n){var r,o,i,a,s;return Mt.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ut.a.promisify(zt.a),o=Wt(e),i=o.mimeType,a=e instanceof Buffer?e:Buffer.from(e),t.next=5,r(a,i);case 5:return s=t.sent,t.abrupt("return",{width:s.shape[0],height:s.shape[1],data:s.data});case 7:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Qt(t,e){return $t?$t(t,e):function(t){if("undefined"==typeof createImageBitmap)throw new Error("parseImage");var e=new Blob([new Uint8Array(t)]);return createImageBitmap(e)}(t)}function Kt(){return(Kt=Nt(Mt.a.mark(function t(e,n){var r,o;return Mt.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof Image){t.next=8;break}return t.next=3,fetch(e,n);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return o=t.sent,t.abrupt("return",Qt(o));case 8:return t.next=10,Zt(e,n);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Zt(t,e){return te.apply(this,arguments)}function te(){return(te=Nt(Mt.a.mark(function t(e,n){var r,o,i;return Mt.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!/\.svg((\?|#).*)?$/.test(e)){t.next=10;break}return t.next=3,fetch(e,n);case 3:return o=t.sent,t.next=6,o.text();case 6:i=t.sent,r="data:image/svg+xml;base64,".concat(btoa(i)),t.next=13;break;case 10:return t.next=12,e;case 12:r=t.sent;case 13:return t.next=15,new Promise(function(t,o){try{var i=new Image;i.onload=function(){return t(i)},i.onerror=function(t){return o(new Error("Could not load image ".concat(e,": ").concat(t)))},i.crossOrigin=n&&n.crossOrigin||"anonymous",i.src=r}catch(t){o(t)}});case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}},t)}))).apply(this,arguments)}var ee=Math.PI/180,ne=new Float32Array(16),re=new Float32Array(12);function oe(t,e,n){var r=e[0]*ee,o=e[1]*ee,i=e[2]*ee,a=Math.sin(i),s=Math.sin(r),c=Math.sin(o),u=Math.cos(i),f=Math.cos(r),l=Math.cos(o),p=n[0],h=n[1],y=n[2];t[0]=p*l*f,t[1]=p*c*f,t[2]=p*-s,t[3]=h*(-c*u+l*s*a),t[4]=h*(l*u+c*s*a),t[5]=h*f*a,t[6]=y*(c*a+l*s*u),t[7]=y*(-l*a+c*s*u),t[8]=y*f*u}function ie(t){return t[0]=t[0],t[1]=t[1],t[2]=t[2],t[3]=t[4],t[4]=t[5],t[5]=t[6],t[6]=t[8],t[7]=t[9],t[8]=t[10],t[9]=t[12],t[10]=t[13],t[11]=t[14],t.subarray(0,12)}var ae={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrix__LOCATION_0:{size:3,stride:48,offset:0},instanceModelMatrix__LOCATION_1:{size:3,stride:48,offset:12},instanceModelMatrix__LOCATION_2:{size:3,stride:48,offset:24},instanceTranslation:{size:3,stride:48,offset:36}},update:function(t){var e=this.props,n=e.data,r=e.getOrientation,o=e.getScale,i=e.getTranslation,a=e.getTransformMatrix,s=Array.isArray(a),c=s&&16===a.length,u=Array.isArray(o),f=Array.isArray(r),l=Array.isArray(i),p=c||!s&&Boolean(a(n[0]));t.constant=p?c:f&&u&&l;var h=t.value;if(t.constant){var y;if(p)ne.set(a),y=ie(ne);else oe(y=re,r,o),y.set(i,9);t.value=new Float32Array(y)}else{var d=0,g=Object(v.createIterable)(n),m=g.iterable,b=g.objectInfo,w=!0,x=!1,_=void 0;try{for(var S,k=m[Symbol.iterator]();!(w=(S=k.next()).done);w=!0){var P=S.value;b.index++;var T=void 0;if(p)ne.set(c?a:a(P,b)),T=ie(ne);else oe(T=re,f?r:r(P,b),u?o:o(P,b)),T.set(l?i:i(P,b),9);h[d++]=T[0],h[d++]=T[1],h[d++]=T[2],h[d++]=T[3],h[d++]=T[4],h[d++]=T[5],h[d++]=T[6],h[d++]=T[7],h[d++]=T[8],h[d++]=T[9],h[d++]=T[10],h[d++]=T[11]}}catch(t){x=!0,_=t}finally{try{w||null==k.return||k.return()}finally{if(x)throw _}}}}},se=d.fp64.fp64LowPart;function ce(t,e,n){return"string"==typeof e?function(t,e){return Kt.apply(this,arguments)}(e).then(function(e){return ue(t,e,n)}).catch(function(t){throw new Error("Could not load texture from ".concat(e,": ").concat(t))}):new Promise(function(r){return r(ue(t,e,n))})}function ue(t,e,n){return e instanceof d.Texture2D?e:new d.Texture2D(t,Object.assign({data:e},n))}function fe(t){!function(t,e){if(!t)throw new Error("deck.gl: ".concat(e))}(t.positions||t.POSITION,'SimpleMeshLayer requires "postions" or "POSITION" attribute in mesh property.')}function le(t){if(t.attributes)return fe(t.attributes),t instanceof d.Geometry?t:new d.Geometry(t);if(t.positions||t.POSITION)return fe(t),new d.Geometry({attributes:t});throw Error("Invalid mesh")}var pe=new d.PhongMaterial,he={fetch:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){return"mesh"===e.propName?Ct(t):fetch(t).then(function(t){return t.json()})}),mesh:{value:null,type:"object",async:!0},texture:null,sizeScale:{type:"number",value:1,min:0},parameters:{depthTest:!0,depthFunc:g.a.LEQUAL},fp64:!1,wireframe:!1,material:pe,getPosition:{type:"accessor",value:function(t){return t.position}},getColor:{type:"accessor",value:[0,0,0,255]},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]}},ye=function(t){function e(){return o()(this,e),c()(this,f()(e).apply(this,arguments))}return y()(e,t),a()(e,[{key:"getShaders",value:function(){var t=this.use64bitProjection()?"project64":"project32",e=Object(d.isWebGL2)(this.context.gl);return{vs:e?"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\n\n// Primitive attributes\nin vec3 positions;\nin vec3 normals;\nin vec2 texCoords;\n\n// Instance attributes\nin vec3 instancePositions;\nin vec2 instancePositions64xy;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\n\n// Outputs to fragment shader\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vTexCoord = texCoords;\n cameraPosition = project_uCameraPosition;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n vColor = instanceColors;\n\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n\n picking_setPickingColor(instancePickingColors);\n}\n":"\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\n\n// Primitive attributes\nattribute vec3 positions;\nattribute vec3 normals;\nattribute vec2 texCoords;\n\n// Instance attributes\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\n\n// Outputs to fragment shader\nvarying vec2 vTexCoord;\nvarying vec3 cameraPosition;\nvarying vec3 normals_commonspace;\nvarying vec4 position_commonspace;\nvarying vec4 vColor;\n\nvoid main(void) {\n vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vTexCoord = texCoords;\n cameraPosition = project_uCameraPosition;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n vColor = instanceColors;\n\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n\n picking_setPickingColor(instancePickingColors);\n}\n",fs:e?"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform vec4 color;\nuniform bool flatShading;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n vec3 normal;\n if (flatShading) {\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor / 255.;\n vec3 lightColor = lighting_getLightColor(color.rgb * 255., cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor / 255., color.a);\n\n // use highlight color if this fragment belongs to the selected object.\n fragColor = picking_filterHighlightColor(fragColor);\n\n // use picking color if rendering to picking FBO.\n fragColor = picking_filterPickingColor(fragColor);\n}\n":"\n#define SHADER_NAME simple-mesh-layer-fs\n\n// Note(Tarek): headless-gl supports derivatives, but doesn't report it via getExtension. Awesome!\n#ifdef DERIVATIVES\n#define FLAT_SHADE_NORMAL normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)))\n#else\n#define FLAT_SHADE_NORMAL vec3(0.0, 0.0, 1.0)\n#endif\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform vec4 color;\nuniform bool flatShading;\n\nvarying vec2 vTexCoord;\nvarying vec3 cameraPosition;\nvarying vec3 normals_commonspace;\nvarying vec4 position_commonspace;\nvarying vec4 vColor;\n\nvoid main(void) {\n vec3 normal;\n if (flatShading) {\n normal = FLAT_SHADE_NORMAL;\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture2D(sampler, vTexCoord) : vColor / 255.;\n vec3 lightColor = lighting_getLightColor(color.rgb * 255., cameraPosition, position_commonspace.xyz, normal);\n gl_FragColor = vec4(lightColor / 255., color.a);\n\n // use highlight color if this fragment belongs to the selected object.\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n // use picking color if rendering to picking FBO.\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n",modules:[t,"phong-lighting","picking"]}}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{transition:!0,size:3,accessor:"getPosition"},instancePositions64xy:{size:2,accessor:"getPosition",update:this.calculateInstancePositions64xyLow},instanceColors:{transition:!0,size:4,accessor:"getColor",defaultValue:[0,0,0,255]},instanceModelMatrix:ae}),this.setState({emptyTexture:new d.Texture2D(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}},{key:"updateState",value:function(t){var n=t.props,r=t.oldProps,o=t.changeFlags;if(p()(f()(e.prototype),"updateState",this).call(this,{props:n,oldProps:r,changeFlags:o}),n.mesh!==r.mesh||n.fp64!==r.fp64){if(this.state.model&&this.state.model.delete(),n.mesh){this.setState({model:this.getModel(n.mesh)});var i=n.mesh.attributes||n.mesh;this.setState({hasNormals:Boolean(i.NORMAL||i.normals)})}this.getAttributeManager().invalidateAll()}n.texture!==r.texture&&this.setTexture(n.texture),this.state.model&&this.state.model.setDrawMode(this.props.wireframe?g.a.LINE_STRIP:g.a.TRIANGLES)}},{key:"finalizeState",value:function(){p()(f()(e.prototype),"finalizeState",this).call(this),this.state.emptyTexture.delete(),this.state.texture&&this.state.texture.delete()}},{key:"draw",value:function(t){var e=t.uniforms;if(this.state.model){var n=this.props.sizeScale;this.state.model.draw({uniforms:Object.assign({},e,{sizeScale:n,flatShade:!this.state.hasNormals})})}}},{key:"getModel",value:function(t){var e=new d.Model(this.context.gl,Object.assign({},this.getShaders(),{id:this.props.id,geometry:le(t),isInstanced:!0,shaderCache:this.context.shaderCache}));return this.state.texture?e.setUniforms({sampler:this.state.texture,hasTexture:1}):e.setUniforms({sampler:this.state.emptyTexture,hasTexture:0}),e}},{key:"setTexture",value:function(t){var e=this,n=this.context.gl,r=this.state.emptyTexture;this.state.texture&&this.state.texture.delete(),t?ce(n,t).then(function(t){e.setState({texture:t}),e.state.model&&e.state.model.setUniforms({sampler:e.state.texture,hasTexture:1})}):(this.setState({texture:null}),this.state.model&&this.state.model.setUniforms({sampler:r,hasTexture:0}))}},{key:"calculateInstancePositions64xyLow",value:function(t){var e=this.use64bitPositions();if(t.constant=!e,e){var n=this.props,r=n.data,o=n.getPosition,i=t.value,a=0,s=Object(v.createIterable)(r),c=s.iterable,u=s.objectInfo,f=!0,l=!1,p=void 0;try{for(var h,y=c[Symbol.iterator]();!(f=(h=y.next()).done);f=!0){var d=h.value;u.index++;var g=o(d,u);i[a++]=se(g[0]),i[a++]=se(g[1])}}catch(t){l=!0,p=t}finally{try{f||null==y.return||y.return()}finally{if(l)throw p}}}else t.value=new Float32Array(2)}}]),e}(v.Layer);ye.layerName="SimpleMeshLayer",ye.defaultProps=he;var ve=d.fp64.fp64LowPart,de=[255,255,255,255],ge={scenegraph:{type:"object",value:null,async:!0},fetch:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){var n=e.propName,r=e.layer;return"scenegraph"===n?Ct(t,r.getLoadOptions()).then(function(t){return t.scenes[0]}):fetch(t).then(function(t){return t.json()})}),sizeScale:{type:"number",value:1,min:0},getPosition:{type:"accessor",value:function(t){return t.position}},getColor:{type:"accessor",value:de},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]}},me=function(t){function e(){return o()(this,e),c()(this,f()(e).apply(this,arguments))}return y()(e,t),a()(e,[{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,accessor:"getPosition",transition:!0},instancePositions64xy:{size:2,accessor:"getPosition",update:this.calculateInstancePositions64xyLow},instanceColors:{size:4,accessor:"getColor",defaultValue:de,transition:!0},instanceModelMatrix:ae})}},{key:"calculateInstancePositions64xyLow",value:function(t){var e=this.use64bitPositions();if(t.constant=!e,e){var n=this.props,r=n.data,o=n.getPosition,i=t.value,a=0,s=!0,c=!1,u=void 0;try{for(var f,l=r[Symbol.iterator]();!(s=(f=l.next()).done);s=!0){var p=o(f.value);i[a++]=ve(p[0]),i[a++]=ve(p[1])}}catch(t){c=!0,u=t}finally{try{s||null==l.return||l.return()}finally{if(c)throw u}}}else t.value=new Float32Array(2)}},{key:"updateState",value:function(t){p()(f()(e.prototype),"updateState",this).call(this,t);var n=t.props,r=t.oldProps;n.scenegraph!==r.scenegraph&&(n.scenegraph instanceof d.ScenegraphNode?(this._deleteScenegraph(),this._applyAllAttributes(n.scenegraph),this.setState({scenegraph:n.scenegraph})):null!==n.scenegraph&&d.log.warn("bad scenegraph:",n.scenegraph)())}},{key:"finalizeState",value:function(){this._deleteScenegraph()}},{key:"_applyAllAttributes",value:function(t){var e=this,n=this.getAttributeManager().getAttributes();t.traverse(function(t){e._setModelAttributes(t.model,n)})}},{key:"_deleteScenegraph",value:function(){var t=this.state.scenegraph;t instanceof d.ScenegraphNode&&t.delete()}},{key:"getLoadOptions",value:function(){return{gl:this.context.gl,waitForFullLoad:!0,modelOptions:{vs:"// Instance attributes\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\n\n// Uniforms\nuniform float sizeScale;\n\n// Attributes\nattribute vec4 POSITION;\n\n#ifdef HAS_UV\n attribute vec2 TEXCOORD_0;\n varying vec2 vTEXCOORD_0;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n vTEXCOORD_0 = TEXCOORD_0;\n #endif\n vColor = instanceColors;\n\n vec3 pos = (instanceModelMatrix * POSITION.xyz) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vec4 position_commonspace;\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n picking_setPickingColor(instancePickingColors);\n}\n",fs:"#ifdef HAS_UV\n varying vec2 vTEXCOORD_0;\n uniform sampler2D u_BaseColorSampler;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n gl_FragColor = (vColor / 255.) * texture2D(u_BaseColorSampler, vTEXCOORD_0);\n #else\n gl_FragColor = vColor / 255.;\n #endif\n\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n",modules:["project32","picking"],isInstanced:!0}}}},{key:"updateAttributes",value:function(t){var n=this;if(p()(f()(e.prototype),"updateAttributes",this).call(this,t),this.state.scenegraph){var r=this.getAttributeManager().getChangedAttributes({clearChangedFlags:!0});this.state.scenegraph.traverse(function(t){n._setModelAttributes(t.model,r)})}}},{key:"draw",value:function(t){var e=t.moduleParameters,n=void 0===e?null:e,r=t.parameters,o=void 0===r?{}:r;if(this.state.scenegraph){var i=this.props.sizeScale,a=this.getNumInstances();this.state.scenegraph.traverse(function(t){t.model.setInstanceCount(a),t.updateModuleSettings(n),t.draw({parameters:o,uniforms:{sizeScale:i}})})}}}]),e}(v.Layer);me.layerName="ScenegraphLayer",me.defaultProps=ge,n.d(e,"SimpleMeshLayer",function(){return ye}),n.d(e,"ScenegraphLayer",function(){return me})}])});
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("luma"),require("deck"));else if("function"==typeof define&&define.amd)define(["luma","deck"],e);else{var n="object"==typeof exports?e(require("luma"),require("deck")):e(t.luma,t.deck);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=20)}([function(t,e,n){t.exports=n(28)},function(e,n){e.exports=t},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){t.exports=n(26)},function(t,e){},function(t,n){t.exports=e},function(t,e){"undefined"==typeof TextDecoder?t.exports={}:t.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(t,e,n){n(2);var r=n(24);function o(e,n,i){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=o=Reflect.get:t.exports=o=function(t,e,n){var o=r(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}},o(e,n,i||e)}t.exports=o},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",function(){return i});var o=n(13),i="object"!==(void 0===t?"undefined":Object(o.a)(t))||"[object process]"!==String(t)||t.browser;"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document}).call(this,n(29),n(16))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(22),o=n(23);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e,n){var r=n(25);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&&r(t,e)}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},function(t,e){},function(t,e){},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){(function(e){const r=n(30),o=("undefined"==typeof window?e:window).deck||{};if(!o.Layer)throw new Error("@deck.gl/core is not found");t.exports=Object.assign(o,r)}).call(this,n(16))},,function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},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}},function(t,e,n){var r=n(2);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(27),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,f=e.regeneratorRuntime;if(f)u&&(t.exports=f);else{(f=e.regeneratorRuntime=u?t.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",h="executing",y="completed",v={},d={};d[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==r&&o.call(g,a)&&(d=g);var b=k.prototype=_.prototype=Object.create(d);S.prototype=b.constructor=k,k.constructor=S,k[c]=S.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},f.awrap=function(t){return{__await:t}},P(O.prototype),O.prototype[s]=function(){return this},f.AsyncIterator=O,f.async=function(t,e,n,r){var o=new O(w(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},P(b),b[c]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=j,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},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 r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;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,v):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),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===y){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?y:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=y,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function S(){}function k(){}function P(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function T(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,T(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function L(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:n,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=u(t,e,n);if("normal"===c.type){if(r=n.done?h:l,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",l="suspendedYield",p="executing",h="completed",y={};function v(){}function d(){}function m(){}var g={};g[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(L([])));w&&w!==n&&r.call(w,i)&&(g=w);var x=m.prototype=v.prototype=Object.create(g);function _(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){var e;this._invoke=function(n,o){function i(){return new Promise(function(e,i){!function e(n,o,i,a){var s=u(t[n],t,o);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,o,e,i)})}return e=e?e.then(i,i):i()}}function k(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return d.prototype=x.constructor=m,m.constructor=d,m[s]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(S.prototype),S.prototype[a]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,o){var i=new S(c(e,n,r,o));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},_(x),x[s]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.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,y):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),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){var n,r,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(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new y(t,e)),1!==u.length||f||s(h)},y.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=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,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,n){"use strict";n.r(e);var r=n(9),o=n.n(r),i=n(10),a=n.n(i),s=n(11),c=n.n(s),u=n(2),f=n.n(u),l=n(7),p=n.n(l),h=n(12),y=n.n(h),v=n(5),d=n(1),m=n.n(d),g=n(0),b=n.n(g);function w(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function x(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){w(i,r,o,a,s,"next",t)}function s(t){w(i,r,o,a,s,"throw",t)}a(void 0)})}}var _=n(8);function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){S(t,e,n[e])})}return t}function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function T(t,e,n){return e&&O(t.prototype,e),n&&O(t,n),t}var L=n(4),A=n.n(L),C=n(14),j=n.n(C),E=n(15),M=n.n(E),I=n(19),N=n.n(I);function F(t,e){if(!t)throw new Error(e||"loader assertion failed.")}var z=n(6),R=function(t){return t&&t instanceof ArrayBuffer},U=function(t){return t&&t instanceof Buffer};function B(t){if(R(t))return t;if(U(t))return new Uint8Array(t).buffer;if(ArrayBuffer.isView(t))return t.buffer;if("string"==typeof t){var e=t;return(new z.TextEncoder).encode(e).buffer}return F(!1)}function D(t){this.wrapped=t}function G(t){var e,n;function r(e,n){try{var i=t[e](n),a=i.value,s=a instanceof D;Promise.resolve(s?a.wrapped:a).then(function(t){s?r("next",t):o(i.done?"return":"normal",t)},function(t){r("throw",t)})}catch(t){o("throw",t)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,o){return new Promise(function(i,a){var s={key:t,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(e=n=s,r(t,o))})},"function"!=typeof t.return&&(this.return=void 0)}function H(t){var e=new ArrayBuffer,n="";return new Promise(function(r,o){t.data(function(t){var r,o,i,a,s;"string"==typeof t?n+=t:(o=t,i=(r=e)instanceof ArrayBuffer?new Uint8Array(r):r,a=o instanceof ArrayBuffer?new Uint8Array(o):o,(s=new Uint8Array(i.byteLength+a.byteLength)).set(i,0),s.set(a,i.byteLength),e=s)}),t.on("error",function(t){return o(t)}),t.on("end",function(){t.complete?r(e||n):o("The connection was terminated while the message was still being sent")})})}function V(t){var e,n,r=t.indexOf(",");return";base64"===t.slice(r-7,r)?(e=new Buffer(t.slice(r+1),"base64"),n=t.slice(5,r-7).trim()):(e=new Buffer(decodeURIComponent(t.slice(r+1))),n=t.slice(5,r).trim()),n?";"===n[0]&&(n="text/plain".concat(n)):n="text/plain;charset=US-ASCII",{buffer:e,mimeType:n}}"function"==typeof Symbol&&Symbol.asyncIterator&&(G.prototype[Symbol.asyncIterator]=function(){return this}),G.prototype.next=function(t){return this._invoke("next",t)},G.prototype.throw=function(t){return this._invoke("throw",t)},G.prototype.return=function(t){return this._invoke("return",t)};var q={dataType:"arrayBuffer"},W=(Boolean(A.a&&A.a.readFile),function(t){return t.startsWith("data:")}),X=function(t){return t.startsWith("http:")||t.startsWith("https:")},Y=function(){function t(e){P(this,t),this.reponse=e}return T(t,[{key:"get",value:function(t){if(this.response.httpResponse)return this.response.httpResponse.getHeaders()[t];switch(t){case"Content-Length":return this._getContentLength()}}},{key:"_getContentLength",value:function(){return this._contentLength}}]),t}(),$=function(){function t(e,n){P(this,t),this.url=e,this.options=n,this.bodyUsed=!1,this._headers=null}return T(t,[{key:"arrayBuffer",value:function(){var t=x(b.a.mark(function t(){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.bodyUsed=!0,t.abrupt("return",K(this.url,this.options));case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"text",value:function(){var t=x(b.a.mark(function t(){var e,n;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.arrayBuffer();case 2:return e=t.sent,n=new z.TextDecoder,t.abrupt("return",n.decode(e));case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"json",value:function(){var t=x(b.a.mark(function t(){var e;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.text();case 2:return e=t.sent,t.abrupt("return",JSON.parse(e));case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"_getHeaders",value:function(){return X(this.url)?new Y(this):W(this.url)?{"Content-Length":this.url.length}:X(this.repsonse.url)?{}:{"Content-Length":A.a.statSync(this.response.url).size}}},{key:"headers",get:function(){this._headers=this._headers||this._getHeaders()}},{key:"body",get:function(){var t=this.url,e=this.options;return this.bodyUsed=!0,tt(t,e)}}]),t}();function J(t,e){return Q.apply(this,arguments)}function Q(){return(Q=x(b.a.mark(function t(e,n){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new $(e,n));case 1:case"end":return t.stop()}},t)}))).apply(this,arguments)}function K(t){return Z.apply(this,arguments)}function Z(){return(Z=x(b.a.mark(function t(e){var n,r,o,i=arguments;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=nt(n=i.length>1&&void 0!==i[1]?i[1]:{}),!W(e)){t.next=4;break}return t.abrupt("return",Promise.resolve(V(e)));case 4:if(!X(e)){t.next=6;break}return t.abrupt("return",new Promise(function(t,r){n=k({},new URL(e),n),(e.startsWith("https:")?M.a.request:j.a.request)(e,function(e){return H(e).then(t,r)})}));case 6:return r=N.a.promisify(A.a.readFile),t.next=9,r(e,n);case 9:return o=t.sent,t.abrupt("return",o instanceof Buffer?B(o):o);case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function tt(t,e){return et.apply(this,arguments)}function et(){return(et=x(b.a.mark(function t(e,n){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!W(e)){t.next=2;break}return t.abrupt("return",V(e));case 2:if(X(e)){t.next=4;break}return t.abrupt("return",A.a.createReadStream(e,n));case 4:return t.abrupt("return",new Promise(function(t,r){n=k({},new URL(e),n),(e.startsWith("https:")?M.a.request:j.a.request)(e,function(e){return t(e)})}));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function nt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=Object.assign({},q,t)).responseType=t.responseType||t.dataType,A.a&&(t.encoding=t.encoding||("text"===t.dataType?"utf8":null)),t}function rt(t,e){return ot.apply(this,arguments)}function ot(){return(ot=x(b.a.mark(function t(e,n){return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}var it="",at={};function st(t){for(var e in at)if(t.startsWith(e)){var n=at[e];return t.replace(e,n)}return t+=it}function ct(t,e){return ut.apply(this,arguments)}function ut(){return(ut=x(b.a.mark(function t(e,n){var r;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=st(e),r=_.a?rt:J,t.abrupt("return",r(e,n));case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}function ft(t){return!!t&&(Array.isArray(t)&&(t=t[0]),t.parseTextSync||t.parseSync||t.parse||t.loadAndParse||t.parseStream||t.parseInBatches||t.worker)}function lt(t){var e;return F(ft(t)),Array.isArray(t)&&(e=(t=t[0])[1],t=k({},t,{options:k({},t.options,{options:e})})),t.extension&&(t.extensions=t.extensions||[t.extension],delete t.extension),Array.isArray(t.extensions)||(t.extensions=[t.extensions]),F(t.extensions&&t.extensions.length>0&&t.extensions[0]),t.parseTextSync&&(t.text=!0),t.text||(t.binary=!0),t}var pt=/[^\.]+$/;function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=t.match(pt);if(r&&r[0]){var o=function(t,e){e=e.toLowerCase();var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;lt(s);var c=!0,u=!1,f=void 0;try{for(var l,p=s.extensions[Symbol.iterator]();!(c=(l=p.next()).done);c=!0){var h=l.value;if(h.toLowerCase()===e)return s}}catch(t){u=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(u)throw f}}}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null}(n,r[0]);if(o)return o}var i=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;if(s.testText&&s.testText(e))return s}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null}(n,e);return i||null}var yt=function(){function t(){P(this,t)}return T(t,[{key:"log",value:function(){}},{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(){}}]),t}(),vt={};function dt(){return Object.values(vt)}var mt=new Map;function gt(t,e,n){var r=function(t){var e=mt.get(t);if(!e){var n=new Blob([t],{type:"application/javascript"});e=URL.createObjectURL(n),mt.set(t,e)}return new Worker(e)}(t);n=function(t){null!==(t=Object.assign({},t)).log&&delete t.log;return t}(n);var o=function(t,e){return new Promise(function(n,o){r.onmessage=function(t){switch(t.data.type){case"done":n(t.data.result),r.terminate();break;case"error":o(new Error(t.data.message))}};var i=B(t);r.postMessage({arraybuffer:i,opts:e},[i])})};return e?o(e,n):o}n(13);var bt=function(t){return"undefined"!=typeof window&&t instanceof window.Response||t.arrayBuffer&&t.json&&t.body},wt="Cannot convert supplied data type";function xt(t){return bt(t)?t.url:null}function _t(t,e){if(e.text&&"string"==typeof t)return t;if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){var n=t.buffer||t;return e.text&&!e.binary?new z.TextDecoder("utf8").decode(n):n}throw new Error(wt)}function St(t,e){return kt.apply(this,arguments)}function kt(){return(kt=x(b.a.mark(function t(e,n){var r;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(e=t.sent,r=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!=typeof e&&!r){t.next=6;break}return t.abrupt("return",_t(e,n));case 6:if(!bt(e)){t.next=15;break}if(!n.binary){t.next=13;break}return t.next=10,e.arrayBuffer();case 10:t.t0=t.sent,t.next=14;break;case 13:t.t0=e.text();case 14:return t.abrupt("return",t.t0);case 15:throw new Error(wt);case 16:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Pt(t,e){return Ot.apply(this,arguments)}function Ot(){return(Ot=x(b.a.mark(function t(e,n){var r,o,i=arguments;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},o=(o=i.length>3?i[3]:void 0)||xt(e),t.next=5,St(e,n);case 5:if(e=t.sent,!n.parseTextSync||"string"!=typeof e){t.next=9;break}return r.dataType="text",t.abrupt("return",n.parseTextSync(e,r,o,n));case 9:if(!n.parseSync){t.next=11;break}return t.abrupt("return",n.parseSync(e,r,o,n));case 11:if(!n.parse){t.next=15;break}return t.next=14,n.parse(e,r,o,n);case 14:return t.abrupt("return",t.sent);case 15:if(!n.worker){t.next=19;break}return t.next=18,gt(n.worker,e,r);case 18:return t.abrupt("return",t.sent);case 19:return t.abrupt("return",F(!1));case 20:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Tt(t,e,n,r){return Lt.apply(this,arguments)}function Lt(){return(Lt=x(b.a.mark(function t(e,n,r,o){var i;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(n)||ft(n)||(o=r,r=n,n=null),n=n||dt(),i=Array.isArray(n)?ht(o,e,n):n){t.next=5;break}return t.abrupt("return",null);case 5:return lt(i),r=At(r,i),t.next=9,Pt(e,i,r,o);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}},t)}))).apply(this,arguments)}function At(t,e){return null===(t=Object.assign({},e.DEFAULT_OPTIONS,e.options,t,{dataType:"arraybuffer"})).log&&(t.log=new yt),"log"in t||(t.log=console),t}function Ct(t,e,n){return jt.apply(this,arguments)}function jt(){return(jt=x(b.a.mark(function t(e,n,r){var o,i;return b.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(n)||ft(n)||(r=n,n=null),n=n||dt(),!(o=Array.isArray(n)?ht(e,null,n):n)||!o.loadAndParse){t.next=7;break}return t.next=6,o.loadAndParse(e,r);case 6:return t.abrupt("return",t.sent);case 7:return t.next=9,ct(e,r);case 9:return i=t.sent,t.abrupt("return",Tt(i,n,r,e));case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}var Et=n(3),Mt=n.n(Et);function It(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function Nt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){It(i,r,o,a,s,"next",t)}function s(t){It(i,r,o,a,s,"throw",t)}a(void 0)})}}var Ft=n(17),zt=n.n(Ft),Rt=n(18),Ut=n.n(Rt);function Bt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Dt(t){return Buffer.isBuffer(t)?new Uint8Array(t).buffer:t}var Gt=!1,Ht=!0,Vt=new Map([["image/png",function(t){var e=Yt(t);if(e.byteLength<24||2303741511!==e.getUint32(0,Gt))return null;return{width:e.getUint32(16,Gt),height:e.getUint32(20,Gt)}}],["image/jpeg",function(t){var e=Yt(t);if(e.byteLength<2||65496!==e.getUint16(0,Gt))return null;var n=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var n=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:n}}(),r=n.tableMarkers,o=n.sofMarkers,i=2;for(;i<e.byteLength;){var a=e.getUint16(i,Gt);if(o.has(a))return{height:e.getUint16(i+5,Gt),width:e.getUint16(i+7,Gt)};if(!r.has(a))return null;i+=2,i+=e.getUint16(i,Gt)}return null}],["image/gif",function(t){var e=Yt(t);if(e.byteLength<10||1195984440!==e.getUint32(0,Gt))return null;return{width:e.getUint16(6,Ht),height:e.getUint16(8,Ht)}}],["image/bmp",function(t){var e=Yt(t);if(16973!==e.getUint16(0,Gt))return null;return{width:e.getUint32(18,Ht),height:e.getUint32(22,Ht)}}]]),qt="Invalid MIME type. Supported MIME types are: ".concat(Array.from(Vt.keys()).join(", "));function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var n=Vt.get(e);if(!n)throw new Error(qt);var r=n(t);if(!r)throw new Error("invalid image data for type: ".concat(e));return r}var o=Xt(t,e);if(!o)throw new Error(qt);return o}function Xt(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Vt.entries()[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=Bt(i.value,2),c=s[0],u=(0,s[1])(t);if(u)return u.mimeType=c,u}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null}function Yt(t){if(Dt&&(t=Dt(t)),t instanceof ArrayBuffer||ArrayBuffer.isView(t))return new DataView(t.buffer||t);throw new Error("toDataView")}function $t(t,e){return Jt.apply(this,arguments)}function Jt(){return(Jt=Nt(Mt.a.mark(function t(e,n){var r,o,i,a,s;return Mt.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ut.a.promisify(zt.a),o=Wt(e),i=o.mimeType,a=e instanceof Buffer?e:Buffer.from(e),t.next=5,r(a,i);case 5:return s=t.sent,t.abrupt("return",{width:s.shape[0],height:s.shape[1],data:s.data});case 7:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Qt(t,e){return $t?$t(t,e):function(t){if("undefined"==typeof createImageBitmap)throw new Error("parseImage");var e=new Blob([new Uint8Array(t)]);return createImageBitmap(e)}(t)}function Kt(){return(Kt=Nt(Mt.a.mark(function t(e,n){var r,o;return Mt.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof Image){t.next=8;break}return t.next=3,fetch(e,n);case 3:return r=t.sent,t.next=6,r.arrayBuffer();case 6:return o=t.sent,t.abrupt("return",Qt(o));case 8:return t.next=10,Zt(e,n);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Zt(t,e){return te.apply(this,arguments)}function te(){return(te=Nt(Mt.a.mark(function t(e,n){var r,o,i;return Mt.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!/\.svg((\?|#).*)?$/.test(e)){t.next=10;break}return t.next=3,fetch(e,n);case 3:return o=t.sent,t.next=6,o.text();case 6:i=t.sent,r="data:image/svg+xml;base64,".concat(btoa(i)),t.next=13;break;case 10:return t.next=12,e;case 12:r=t.sent;case 13:return t.next=15,new Promise(function(t,o){try{var i=new Image;i.onload=function(){return t(i)},i.onerror=function(t){return o(new Error("Could not load image ".concat(e,": ").concat(t)))},i.crossOrigin=n&&n.crossOrigin||"anonymous",i.src=r}catch(t){o(t)}});case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}},t)}))).apply(this,arguments)}var ee=Math.PI/180,ne=new Float32Array(16),re=new Float32Array(12);function oe(t,e,n){var r=e[0]*ee,o=e[1]*ee,i=e[2]*ee,a=Math.sin(i),s=Math.sin(r),c=Math.sin(o),u=Math.cos(i),f=Math.cos(r),l=Math.cos(o),p=n[0],h=n[1],y=n[2];t[0]=p*l*f,t[1]=p*c*f,t[2]=p*-s,t[3]=h*(-c*u+l*s*a),t[4]=h*(l*u+c*s*a),t[5]=h*f*a,t[6]=y*(c*a+l*s*u),t[7]=y*(-l*a+c*s*u),t[8]=y*f*u}function ie(t){return t[0]=t[0],t[1]=t[1],t[2]=t[2],t[3]=t[4],t[4]=t[5],t[5]=t[6],t[6]=t[8],t[7]=t[9],t[8]=t[10],t[9]=t[12],t[10]=t[13],t[11]=t[14],t.subarray(0,12)}var ae={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrix__LOCATION_0:{size:3,stride:48,offset:0},instanceModelMatrix__LOCATION_1:{size:3,stride:48,offset:12},instanceModelMatrix__LOCATION_2:{size:3,stride:48,offset:24},instanceTranslation:{size:3,stride:48,offset:36}},update:function(t){var e=this.props,n=e.data,r=e.getOrientation,o=e.getScale,i=e.getTranslation,a=e.getTransformMatrix,s=Array.isArray(a),c=s&&16===a.length,u=Array.isArray(o),f=Array.isArray(r),l=Array.isArray(i),p=c||!s&&Boolean(a(n[0]));t.constant=p?c:f&&u&&l;var h=t.value;if(t.constant){var y;if(p)ne.set(a),y=ie(ne);else oe(y=re,r,o),y.set(i,9);t.value=new Float32Array(y)}else{var d=0,m=Object(v.createIterable)(n),g=m.iterable,b=m.objectInfo,w=!0,x=!1,_=void 0;try{for(var S,k=g[Symbol.iterator]();!(w=(S=k.next()).done);w=!0){var P=S.value;b.index++;var O=void 0;if(p)ne.set(c?a:a(P,b)),O=ie(ne);else oe(O=re,f?r:r(P,b),u?o:o(P,b)),O.set(l?i:i(P,b),9);h[d++]=O[0],h[d++]=O[1],h[d++]=O[2],h[d++]=O[3],h[d++]=O[4],h[d++]=O[5],h[d++]=O[6],h[d++]=O[7],h[d++]=O[8],h[d++]=O[9],h[d++]=O[10],h[d++]=O[11]}}catch(t){x=!0,_=t}finally{try{w||null==k.return||k.return()}finally{if(x)throw _}}}}},se=d.fp64.fp64LowPart;function ce(t,e,n){return"string"==typeof e?function(t,e){return Kt.apply(this,arguments)}(e).then(function(e){return ue(t,e,n)}).catch(function(t){throw new Error("Could not load texture from ".concat(e,": ").concat(t))}):new Promise(function(r){return r(ue(t,e,n))})}function ue(t,e,n){return e instanceof d.Texture2D?e:new d.Texture2D(t,Object.assign({data:e},n))}function fe(t){!function(t,e){if(!t)throw new Error("deck.gl: ".concat(e))}(t.positions||t.POSITION,'SimpleMeshLayer requires "postions" or "POSITION" attribute in mesh property.')}function le(t){if(t.attributes)return fe(t.attributes),t instanceof d.Geometry?t:new d.Geometry(t);if(t.positions||t.POSITION)return fe(t),new d.Geometry({attributes:t});throw Error("Invalid mesh")}var pe=new d.PhongMaterial,he={fetch:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){return"mesh"===e.propName?Ct(t):fetch(t).then(function(t){return t.json()})}),mesh:{value:null,type:"object",async:!0},texture:null,sizeScale:{type:"number",value:1,min:0},parameters:{depthTest:!0,depthFunc:m.a.LEQUAL},fp64:!1,wireframe:!1,material:pe,getPosition:{type:"accessor",value:function(t){return t.position}},getColor:{type:"accessor",value:[0,0,0,255]},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]}},ye=function(t){function e(){return o()(this,e),c()(this,f()(e).apply(this,arguments))}return y()(e,t),a()(e,[{key:"getShaders",value:function(){var t=this.use64bitProjection()?"project64":"project32",e=Object(d.isWebGL2)(this.context.gl);return{vs:e?"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\n\n// Primitive attributes\nin vec3 positions;\nin vec3 normals;\nin vec2 texCoords;\n\n// Instance attributes\nin vec3 instancePositions;\nin vec2 instancePositions64xy;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\n\n// Outputs to fragment shader\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vTexCoord = texCoords;\n cameraPosition = project_uCameraPosition;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n vColor = instanceColors;\n\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n\n picking_setPickingColor(instancePickingColors);\n}\n":"\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\n\n// Primitive attributes\nattribute vec3 positions;\nattribute vec3 normals;\nattribute vec2 texCoords;\n\n// Instance attributes\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\n\n// Outputs to fragment shader\nvarying vec2 vTexCoord;\nvarying vec3 cameraPosition;\nvarying vec3 normals_commonspace;\nvarying vec4 position_commonspace;\nvarying vec4 vColor;\n\nvoid main(void) {\n vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vTexCoord = texCoords;\n cameraPosition = project_uCameraPosition;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n vColor = instanceColors;\n\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n\n picking_setPickingColor(instancePickingColors);\n}\n",fs:e?"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform vec4 color;\nuniform bool flatShading;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n vec3 normal;\n if (flatShading) {\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor / 255.;\n vec3 lightColor = lighting_getLightColor(color.rgb * 255., cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor / 255., color.a);\n\n // use highlight color if this fragment belongs to the selected object.\n fragColor = picking_filterHighlightColor(fragColor);\n\n // use picking color if rendering to picking FBO.\n fragColor = picking_filterPickingColor(fragColor);\n}\n":"\n#define SHADER_NAME simple-mesh-layer-fs\n\n// Note(Tarek): headless-gl supports derivatives, but doesn't report it via getExtension. Awesome!\n#ifdef DERIVATIVES\n#define FLAT_SHADE_NORMAL normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)))\n#else\n#define FLAT_SHADE_NORMAL vec3(0.0, 0.0, 1.0)\n#endif\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform vec4 color;\nuniform bool flatShading;\n\nvarying vec2 vTexCoord;\nvarying vec3 cameraPosition;\nvarying vec3 normals_commonspace;\nvarying vec4 position_commonspace;\nvarying vec4 vColor;\n\nvoid main(void) {\n vec3 normal;\n if (flatShading) {\n normal = FLAT_SHADE_NORMAL;\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture2D(sampler, vTexCoord) : vColor / 255.;\n vec3 lightColor = lighting_getLightColor(color.rgb * 255., cameraPosition, position_commonspace.xyz, normal);\n gl_FragColor = vec4(lightColor / 255., color.a);\n\n // use highlight color if this fragment belongs to the selected object.\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n // use picking color if rendering to picking FBO.\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n",modules:[t,"phong-lighting","picking"]}}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{transition:!0,size:3,accessor:"getPosition"},instancePositions64xy:{size:2,accessor:"getPosition",update:this.calculateInstancePositions64xyLow},instanceColors:{transition:!0,size:4,accessor:"getColor",defaultValue:[0,0,0,255]},instanceModelMatrix:ae}),this.setState({emptyTexture:new d.Texture2D(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}},{key:"updateState",value:function(t){var n=t.props,r=t.oldProps,o=t.changeFlags;if(p()(f()(e.prototype),"updateState",this).call(this,{props:n,oldProps:r,changeFlags:o}),n.mesh!==r.mesh||n.fp64!==r.fp64){if(this.state.model&&this.state.model.delete(),n.mesh){this.setState({model:this.getModel(n.mesh)});var i=n.mesh.attributes||n.mesh;this.setState({hasNormals:Boolean(i.NORMAL||i.normals)})}this.getAttributeManager().invalidateAll()}n.texture!==r.texture&&this.setTexture(n.texture),this.state.model&&this.state.model.setDrawMode(this.props.wireframe?m.a.LINE_STRIP:m.a.TRIANGLES)}},{key:"finalizeState",value:function(){p()(f()(e.prototype),"finalizeState",this).call(this),this.state.emptyTexture.delete(),this.state.texture&&this.state.texture.delete()}},{key:"draw",value:function(t){var e=t.uniforms;if(this.state.model){var n=this.props.sizeScale;this.state.model.draw({uniforms:Object.assign({},e,{sizeScale:n,flatShade:!this.state.hasNormals})})}}},{key:"getModel",value:function(t){var e=new d.Model(this.context.gl,Object.assign({},this.getShaders(),{id:this.props.id,geometry:le(t),isInstanced:!0,shaderCache:this.context.shaderCache}));return this.state.texture?e.setUniforms({sampler:this.state.texture,hasTexture:1}):e.setUniforms({sampler:this.state.emptyTexture,hasTexture:0}),e}},{key:"setTexture",value:function(t){var e=this,n=this.context.gl,r=this.state.emptyTexture;this.state.texture&&this.state.texture.delete(),t?ce(n,t).then(function(t){e.setState({texture:t}),e.state.model&&e.state.model.setUniforms({sampler:e.state.texture,hasTexture:1})}):(this.setState({texture:null}),this.state.model&&this.state.model.setUniforms({sampler:r,hasTexture:0}))}},{key:"calculateInstancePositions64xyLow",value:function(t){var e=this.use64bitPositions();if(t.constant=!e,e){var n=this.props,r=n.data,o=n.getPosition,i=t.value,a=0,s=Object(v.createIterable)(r),c=s.iterable,u=s.objectInfo,f=!0,l=!1,p=void 0;try{for(var h,y=c[Symbol.iterator]();!(f=(h=y.next()).done);f=!0){var d=h.value;u.index++;var m=o(d,u);i[a++]=se(m[0]),i[a++]=se(m[1])}}catch(t){l=!0,p=t}finally{try{f||null==y.return||y.return()}finally{if(l)throw p}}}else t.value=new Float32Array(2)}}]),e}(v.Layer);ye.layerName="SimpleMeshLayer",ye.defaultProps=he;var ve=d.fp64.fp64LowPart,de=[255,255,255,255],me={scenegraph:{type:"object",value:null,async:!0},fetch:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){var n=e.propName,r=e.layer;return"scenegraph"===n?Ct(t,r.getLoadOptions()):fetch(t).then(function(t){return t.json()})}),getScene:function(t){return t&&t.scenes?t.scenes[0]:t},getAnimator:function(t){return t&&t.animator},sizeScale:{type:"number",value:1,min:0},getPosition:{type:"accessor",value:function(t){return t.position}},getColor:{type:"accessor",value:de},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]}},ge=function(t){function e(){return o()(this,e),c()(this,f()(e).apply(this,arguments))}return y()(e,t),a()(e,[{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,accessor:"getPosition",transition:!0},instancePositions64xy:{size:2,accessor:"getPosition",update:this.calculateInstancePositions64xyLow},instanceColors:{size:4,accessor:"getColor",defaultValue:de,transition:!0},instanceModelMatrix:ae})}},{key:"calculateInstancePositions64xyLow",value:function(t){var e=this.use64bitPositions();if(t.constant=!e,e){var n=this.props,r=n.data,o=n.getPosition,i=t.value,a=0,s=!0,c=!1,u=void 0;try{for(var f,l=r[Symbol.iterator]();!(s=(f=l.next()).done);s=!0){var p=o(f.value);i[a++]=ve(p[0]),i[a++]=ve(p[1])}}catch(t){c=!0,u=t}finally{try{s||null==l.return||l.return()}finally{if(c)throw u}}}else t.value=new Float32Array(2)}},{key:"updateState",value:function(t){p()(f()(e.prototype),"updateState",this).call(this,t);var n=t.props,r=t.oldProps;if(n.scenegraph!==r.scenegraph){var o=n.getScene(n.scenegraph),i=n.getAnimator(n.scenegraph);o instanceof d.ScenegraphNode?(this._deleteScenegraph(),this._applyAllAttributes(o),this._applyAnimationsProp(o,i,n._animations),this.setState({scenegraph:o,animator:i})):null!==o&&d.log.warn("invalid scenegraph:",o)()}else n._animations!==r._animations&&this._applyAnimationsProp(this.state.scenegraph,this.state.animator,n._animations)}},{key:"finalizeState",value:function(){this._deleteScenegraph()}},{key:"_applyAllAttributes",value:function(t){var e=this,n=this.getAttributeManager().getAttributes();t.traverse(function(t){e._setModelAttributes(t.model,n)})}},{key:"_applyAnimationsProp",value:function(t,e,n){if(t&&e&&n){var r=e.getAnimations();Object.keys(n).forEach(function(t){var e=n[t];if("*"===t)r.forEach(function(t){Object.assign(t,e)});else if(Number.isFinite(Number(t))){var o=Number(t);o>=0&&o<r.length?Object.assign(r[o],e):d.log.warn("animation ".concat(t," not found"))()}else{var i=r.find(function(e){return e.name===t});i?Object.assign(i,e):d.log.warn("animation ".concat(t," not found"))()}})}}},{key:"_deleteScenegraph",value:function(){var t=this.state.scenegraph;t instanceof d.ScenegraphNode&&t.delete()}},{key:"getLoadOptions",value:function(){return{gl:this.context.gl,waitForFullLoad:!0,modelOptions:{vs:"// Instance attributes\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\n\n// Uniforms\nuniform float sizeScale;\nuniform mat4 sceneModelMatrix;\n\n// Attributes\nattribute vec4 POSITION;\n\n#ifdef HAS_UV\n attribute vec2 TEXCOORD_0;\n varying vec2 vTEXCOORD_0;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n vTEXCOORD_0 = TEXCOORD_0;\n #endif\n vColor = instanceColors;\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vec4 position_commonspace;\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n picking_setPickingColor(instancePickingColors);\n}\n",fs:"#ifdef HAS_UV\n varying vec2 vTEXCOORD_0;\n uniform sampler2D u_BaseColorSampler;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n gl_FragColor = (vColor / 255.) * texture2D(u_BaseColorSampler, vTEXCOORD_0);\n #else\n gl_FragColor = vColor / 255.;\n #endif\n\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n",modules:["project32","picking"],isInstanced:!0}}}},{key:"updateAttributes",value:function(t){var n=this;if(p()(f()(e.prototype),"updateAttributes",this).call(this,t),this.state.scenegraph){var r=this.getAttributeManager().getChangedAttributes({clearChangedFlags:!0});this.state.scenegraph.traverse(function(t){n._setModelAttributes(t.model,r)})}}},{key:"draw",value:function(t){var e=t.moduleParameters,n=void 0===e?null:e,r=t.parameters,o=void 0===r?{}:r,i=t.context;if(this.state.scenegraph){this.props._animations&&this.state.animator&&this.state.animator.animate(i.animationProps.time);var a=this.props.sizeScale,s=this.getNumInstances();this.state.scenegraph.traverse(function(t,e){var r=e.worldMatrix;t.model.setInstanceCount(s),t.updateModuleSettings(n),t.draw({parameters:o,uniforms:{sizeScale:a,sceneModelMatrix:r}})})}}}]),e}(v.Layer);ge.layerName="ScenegraphLayer",ge.defaultProps=me,n.d(e,"SimpleMeshLayer",function(){return ye}),n.d(e,"ScenegraphLayer",function(){return ge})}])});

@@ -7,4 +7,4 @@ "use strict";

exports.default = void 0;
var _default = "\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\nuniform float sizeScale;\nattribute vec4 POSITION;\n\n#ifdef HAS_UV\n attribute vec2 TEXCOORD_0;\n varying vec2 vTEXCOORD_0;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n vTEXCOORD_0 = TEXCOORD_0;\n #endif\n vColor = instanceColors;\n\n vec3 pos = (instanceModelMatrix * POSITION.xyz) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vec4 position_commonspace;\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n picking_setPickingColor(instancePickingColors);\n}\n";
var _default = "\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\nuniform float sizeScale;\nuniform mat4 sceneModelMatrix;\nattribute vec4 POSITION;\n\n#ifdef HAS_UV\n attribute vec2 TEXCOORD_0;\n varying vec2 vTEXCOORD_0;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n vTEXCOORD_0 = TEXCOORD_0;\n #endif\n vColor = instanceColors;\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vec4 position_commonspace;\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n picking_setPickingColor(instancePickingColors);\n}\n";
exports.default = _default;
//# sourceMappingURL=scenegraph-layer-vertex.glsl.js.map

@@ -57,6 +57,3 @@ "use strict";

if (propName === 'scenegraph') {
return (0, _core3.load)(url, layer.getLoadOptions()).then(function (_ref2) {
var scenes = _ref2.scenes;
return scenes[0];
});
return (0, _core3.load)(url, layer.getLoadOptions());
}

@@ -68,2 +65,8 @@

}),
getScene: function getScene(scenegraph) {
return scenegraph && scenegraph.scenes ? scenegraph.scenes[0] : scenegraph;
},
getAnimator: function getAnimator(scenegraph) {
return scenegraph && scenegraph.animator;
},
sizeScale: {

@@ -184,13 +187,21 @@ type: 'number',

if (props.scenegraph !== oldProps.scenegraph) {
if (props.scenegraph instanceof _core2.ScenegraphNode) {
var scenegraph = props.getScene(props.scenegraph);
var animator = props.getAnimator(props.scenegraph);
if (scenegraph instanceof _core2.ScenegraphNode) {
this._deleteScenegraph();
this._applyAllAttributes(props.scenegraph);
this._applyAllAttributes(scenegraph);
this._applyAnimationsProp(scenegraph, animator, props._animations);
this.setState({
scenegraph: props.scenegraph
scenegraph: scenegraph,
animator: animator
});
} else if (props.scenegraph !== null) {
_core2.log.warn('bad scenegraph:', props.scenegraph)();
} else if (scenegraph !== null) {
_core2.log.warn('invalid scenegraph:', scenegraph)();
}
} else if (props._animations !== oldProps._animations) {
this._applyAnimationsProp(this.state.scenegraph, this.state.animator, props._animations);
}

@@ -214,2 +225,39 @@ }

}, {
key: "_applyAnimationsProp",
value: function _applyAnimationsProp(scenegraph, animator, animationsProp) {
if (!scenegraph || !animator || !animationsProp) {
return;
}
var animations = animator.getAnimations();
Object.keys(animationsProp).forEach(function (key) {
var value = animationsProp[key];
if (key === '*') {
animations.forEach(function (animation) {
Object.assign(animation, value);
});
} else if (Number.isFinite(Number(key))) {
var number = Number(key);
if (number >= 0 && number < animations.length) {
Object.assign(animations[number], value);
} else {
_core2.log.warn("animation ".concat(key, " not found"))();
}
} else {
var findResult = animations.find(function (_ref2) {
var name = _ref2.name;
return name === key;
});
if (findResult) {
Object.assign(findResult, value);
} else {
_core2.log.warn("animation ".concat(key, " not found"))();
}
}
});
}
}, {
key: "_deleteScenegraph",

@@ -258,7 +306,14 @@ value: function _deleteScenegraph() {

_ref3$parameters = _ref3.parameters,
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters;
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters,
context = _ref3.context;
if (!this.state.scenegraph) return;
if (this.props._animations && this.state.animator) {
this.state.animator.animate(context.animationProps.time);
}
var sizeScale = this.props.sizeScale;
var numInstances = this.getNumInstances();
this.state.scenegraph.traverse(function (model) {
this.state.scenegraph.traverse(function (model, _ref4) {
var worldMatrix = _ref4.worldMatrix;
model.model.setInstanceCount(numInstances);

@@ -269,3 +324,4 @@ model.updateModuleSettings(moduleParameters);

uniforms: {
sizeScale: sizeScale
sizeScale: sizeScale,
sceneModelMatrix: worldMatrix
}

@@ -272,0 +328,0 @@ });

@@ -12,2 +12,3 @@ export default `\

uniform float sizeScale;
uniform mat4 sceneModelMatrix;

@@ -29,3 +30,3 @@ // Attributes

vec3 pos = (instanceModelMatrix * POSITION.xyz) * sizeScale + instanceTranslation;
vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale + instanceTranslation;
pos = project_size(pos);

@@ -32,0 +33,0 @@

@@ -30,6 +30,3 @@ import { Layer } from '@deck.gl/core';

if (propName === 'scenegraph') {
return load(url, layer.getLoadOptions()).then((_ref2) => {
let scenes = _ref2.scenes;
return scenes[0];
});
return load(url, layer.getLoadOptions());
}

@@ -39,2 +36,4 @@

}),
getScene: scenegraph => scenegraph && scenegraph.scenes ? scenegraph.scenes[0] : scenegraph,
getAnimator: scenegraph => scenegraph && scenegraph.animator,
sizeScale: {

@@ -122,13 +121,21 @@ type: 'number',

if (props.scenegraph !== oldProps.scenegraph) {
if (props.scenegraph instanceof ScenegraphNode) {
const scenegraph = props.getScene(props.scenegraph);
const animator = props.getAnimator(props.scenegraph);
if (scenegraph instanceof ScenegraphNode) {
this._deleteScenegraph();
this._applyAllAttributes(props.scenegraph);
this._applyAllAttributes(scenegraph);
this._applyAnimationsProp(scenegraph, animator, props._animations);
this.setState({
scenegraph: props.scenegraph
scenegraph,
animator
});
} else if (props.scenegraph !== null) {
log.warn('bad scenegraph:', props.scenegraph)();
} else if (scenegraph !== null) {
log.warn('invalid scenegraph:', scenegraph)();
}
} else if (props._animations !== oldProps._animations) {
this._applyAnimationsProp(this.state.scenegraph, this.state.animator, props._animations);
}

@@ -148,2 +155,38 @@ }

_applyAnimationsProp(scenegraph, animator, animationsProp) {
if (!scenegraph || !animator || !animationsProp) {
return;
}
const animations = animator.getAnimations();
Object.keys(animationsProp).forEach(key => {
const value = animationsProp[key];
if (key === '*') {
animations.forEach(animation => {
Object.assign(animation, value);
});
} else if (Number.isFinite(Number(key))) {
const number = Number(key);
if (number >= 0 && number < animations.length) {
Object.assign(animations[number], value);
} else {
log.warn(`animation ${key} not found`)();
}
} else {
const findResult = animations.find((_ref2) => {
let name = _ref2.name;
return name === key;
});
if (findResult) {
Object.assign(findResult, value);
} else {
log.warn(`animation ${key} not found`)();
}
}
});
}
_deleteScenegraph() {

@@ -186,7 +229,14 @@ const scenegraph = this.state.scenegraph;

_ref3$parameters = _ref3.parameters,
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters;
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters,
context = _ref3.context;
if (!this.state.scenegraph) return;
if (this.props._animations && this.state.animator) {
this.state.animator.animate(context.animationProps.time);
}
const sizeScale = this.props.sizeScale;
const numInstances = this.getNumInstances();
this.state.scenegraph.traverse(model => {
this.state.scenegraph.traverse((model, _ref4) => {
let worldMatrix = _ref4.worldMatrix;
model.model.setInstanceCount(numInstances);

@@ -197,3 +247,4 @@ model.updateModuleSettings(moduleParameters);

uniforms: {
sizeScale
sizeScale,
sceneModelMatrix: worldMatrix
}

@@ -200,0 +251,0 @@ });

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

export default "\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\nuniform float sizeScale;\nattribute vec4 POSITION;\n\n#ifdef HAS_UV\n attribute vec2 TEXCOORD_0;\n varying vec2 vTEXCOORD_0;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n vTEXCOORD_0 = TEXCOORD_0;\n #endif\n vColor = instanceColors;\n\n vec3 pos = (instanceModelMatrix * POSITION.xyz) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vec4 position_commonspace;\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n picking_setPickingColor(instancePickingColors);\n}\n";
export default "\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xy;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute mat3 instanceModelMatrix;\nattribute vec3 instanceTranslation;\nuniform float sizeScale;\nuniform mat4 sceneModelMatrix;\nattribute vec4 POSITION;\n\n#ifdef HAS_UV\n attribute vec2 TEXCOORD_0;\n varying vec2 vTEXCOORD_0;\n#endif\nvarying vec4 vColor;\n\nvoid main(void) {\n #ifdef HAS_UV\n vTEXCOORD_0 = TEXCOORD_0;\n #endif\n vColor = instanceColors;\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale + instanceTranslation;\n pos = project_size(pos);\n\n vec4 position_commonspace;\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64xy, pos, position_commonspace);\n picking_setPickingColor(instancePickingColors);\n}\n";
//# sourceMappingURL=scenegraph-layer-vertex.glsl.js.map

@@ -36,6 +36,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";

if (propName === 'scenegraph') {
return load(url, layer.getLoadOptions()).then(function (_ref2) {
var scenes = _ref2.scenes;
return scenes[0];
});
return load(url, layer.getLoadOptions());
}

@@ -47,2 +44,8 @@

}),
getScene: function getScene(scenegraph) {
return scenegraph && scenegraph.scenes ? scenegraph.scenes[0] : scenegraph;
},
getAnimator: function getAnimator(scenegraph) {
return scenegraph && scenegraph.animator;
},
sizeScale: {

@@ -165,13 +168,21 @@ type: 'number',

if (props.scenegraph !== oldProps.scenegraph) {
if (props.scenegraph instanceof ScenegraphNode) {
var scenegraph = props.getScene(props.scenegraph);
var animator = props.getAnimator(props.scenegraph);
if (scenegraph instanceof ScenegraphNode) {
this._deleteScenegraph();
this._applyAllAttributes(props.scenegraph);
this._applyAllAttributes(scenegraph);
this._applyAnimationsProp(scenegraph, animator, props._animations);
this.setState({
scenegraph: props.scenegraph
scenegraph: scenegraph,
animator: animator
});
} else if (props.scenegraph !== null) {
log.warn('bad scenegraph:', props.scenegraph)();
} else if (scenegraph !== null) {
log.warn('invalid scenegraph:', scenegraph)();
}
} else if (props._animations !== oldProps._animations) {
this._applyAnimationsProp(this.state.scenegraph, this.state.animator, props._animations);
}

@@ -195,2 +206,39 @@ }

}, {
key: "_applyAnimationsProp",
value: function _applyAnimationsProp(scenegraph, animator, animationsProp) {
if (!scenegraph || !animator || !animationsProp) {
return;
}
var animations = animator.getAnimations();
Object.keys(animationsProp).forEach(function (key) {
var value = animationsProp[key];
if (key === '*') {
animations.forEach(function (animation) {
Object.assign(animation, value);
});
} else if (Number.isFinite(Number(key))) {
var number = Number(key);
if (number >= 0 && number < animations.length) {
Object.assign(animations[number], value);
} else {
log.warn("animation ".concat(key, " not found"))();
}
} else {
var findResult = animations.find(function (_ref2) {
var name = _ref2.name;
return name === key;
});
if (findResult) {
Object.assign(findResult, value);
} else {
log.warn("animation ".concat(key, " not found"))();
}
}
});
}
}, {
key: "_deleteScenegraph",

@@ -240,7 +288,14 @@ value: function _deleteScenegraph() {

_ref3$parameters = _ref3.parameters,
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters;
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters,
context = _ref3.context;
if (!this.state.scenegraph) return;
if (this.props._animations && this.state.animator) {
this.state.animator.animate(context.animationProps.time);
}
var sizeScale = this.props.sizeScale;
var numInstances = this.getNumInstances();
this.state.scenegraph.traverse(function (model) {
this.state.scenegraph.traverse(function (model, _ref4) {
var worldMatrix = _ref4.worldMatrix;
model.model.setInstanceCount(numInstances);

@@ -251,3 +306,4 @@ model.updateModuleSettings(moduleParameters);

uniforms: {
sizeScale: sizeScale
sizeScale: sizeScale,
sceneModelMatrix: worldMatrix
}

@@ -254,0 +310,0 @@ });

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "7.0.9",
"version": "7.1.0-alpha.1",
"publishConfig": {

@@ -8,0 +8,0 @@ "access": "public"

@@ -12,2 +12,3 @@ export default `\

uniform float sizeScale;
uniform mat4 sceneModelMatrix;

@@ -29,3 +30,3 @@ // Attributes

vec3 pos = (instanceModelMatrix * POSITION.xyz) * sizeScale + instanceTranslation;
vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale + instanceTranslation;
pos = project_size(pos);

@@ -32,0 +33,0 @@

@@ -41,3 +41,3 @@ // Copyright (c) 2019 Uber Technologies, Inc.

if (propName === 'scenegraph') {
return load(url, layer.getLoadOptions()).then(({scenes}) => scenes[0]);
return load(url, layer.getLoadOptions());
}

@@ -48,2 +48,5 @@

getScene: scenegraph => (scenegraph && scenegraph.scenes ? scenegraph.scenes[0] : scenegraph),
getAnimator: scenegraph => scenegraph && scenegraph.animator,
sizeScale: {type: 'number', value: 1, min: 0},

@@ -111,9 +114,15 @@ getPosition: {type: 'accessor', value: x => x.position},

if (props.scenegraph !== oldProps.scenegraph) {
if (props.scenegraph instanceof ScenegraphNode) {
const scenegraph = props.getScene(props.scenegraph);
const animator = props.getAnimator(props.scenegraph);
if (scenegraph instanceof ScenegraphNode) {
this._deleteScenegraph();
this._applyAllAttributes(props.scenegraph);
this.setState({scenegraph: props.scenegraph});
} else if (props.scenegraph !== null) {
log.warn('bad scenegraph:', props.scenegraph)();
this._applyAllAttributes(scenegraph);
this._applyAnimationsProp(scenegraph, animator, props._animations);
this.setState({scenegraph, animator});
} else if (scenegraph !== null) {
log.warn('invalid scenegraph:', scenegraph)();
}
} else if (props._animations !== oldProps._animations) {
this._applyAnimationsProp(this.state.scenegraph, this.state.animator, props._animations);
}

@@ -133,2 +142,38 @@ }

_applyAnimationsProp(scenegraph, animator, animationsProp) {
if (!scenegraph || !animator || !animationsProp) {
return;
}
const animations = animator.getAnimations();
Object.keys(animationsProp).forEach(key => {
// Key can be:
// - number for index number
// - name for animation name
// - * to affect all animations
const value = animationsProp[key];
if (key === '*') {
animations.forEach(animation => {
Object.assign(animation, value);
});
} else if (Number.isFinite(Number(key))) {
const number = Number(key);
if (number >= 0 && number < animations.length) {
Object.assign(animations[number], value);
} else {
log.warn(`animation ${key} not found`)();
}
} else {
const findResult = animations.find(({name}) => name === key);
if (findResult) {
Object.assign(findResult, value);
} else {
log.warn(`animation ${key} not found`)();
}
}
});
}
_deleteScenegraph() {

@@ -165,8 +210,12 @@ const {scenegraph} = this.state;

draw({moduleParameters = null, parameters = {}}) {
draw({moduleParameters = null, parameters = {}, context}) {
if (!this.state.scenegraph) return;
if (this.props._animations && this.state.animator) {
this.state.animator.animate(context.animationProps.time);
}
const {sizeScale} = this.props;
const numInstances = this.getNumInstances();
this.state.scenegraph.traverse(model => {
this.state.scenegraph.traverse((model, {worldMatrix}) => {
model.model.setInstanceCount(numInstances);

@@ -177,3 +226,4 @@ model.updateModuleSettings(moduleParameters);

uniforms: {
sizeScale
sizeScale,
sceneModelMatrix: worldMatrix
}

@@ -180,0 +230,0 @@ });

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc