text: !function(e){var t={};function r(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(i,s,function(t){return e[t]}.bind(null,s));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=667)}({135:function(e,t,r){"use strict";function i(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",(function(){return i}))},177:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.deserialize=t.registerSerializer=void 0;const i=r(277);let s=i.DefaultSerializer;t.registerSerializer=function(e){s=i.extendSerializer(s,e)},t.deserialize=function(e){return s.deserialize(e)},t.serialize=function(e){return s.serialize(e)}},178:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transfer=t.isTransferDescriptor=void 0;const i=r(278);t.isTransferDescriptor=function(e){return e&&"object"==typeof e&&e[i.$transferable]},t.Transfer=function(e,t){if(!t){if(!(r=e)||"object"!=typeof r)throw Error();t=[e]}var r;return{[i.$transferable]:!0,send:e,transferables:t}}},179:function(e,t,r){"use strict";const i=r(194).default;e.exports=e=>Boolean(e&&e[i]&&e===e[i]())},194:function(e,t,r){"use strict";r.r(t),function(e,i){var s,o=r(135);s="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:i;var n=Object(o.a)(s);t.default=n}.call(this,r(53),r(195)(e))},195:function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},199:function(e,t,r){e.exports=r(276)},247:function(e,t,r){"use strict";e.exports=function(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=r;return t}},248:function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
  /*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},276:function(e,t,r){"use strict";(function(e){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(s,o){function n(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(n,a)}u((i=i.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expose=t.isWorkerRuntime=void 0;const o=s(r(179)),n=r(177),a=r(178),u=r(279),c=s(r(280));var h=r(177);Object.defineProperty(t,"registerSerializer",{enumerable:!0,get:function(){return h.registerSerializer}});var l=r(178);Object.defineProperty(t,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),t.isWorkerRuntime=c.default.isWorkerRuntime;let f=!1;const d=new Map,p=e=>e&&e.type===u.MasterMessageType.run,b=e=>o.default(e)||function(e){return e&&"object"==typeof e&&"function"==typeof e.subscribe}(e);function k(e){return a.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function g(e,t){const{payload:r,transferables:i}=k(t),s={type:u.WorkerMessageType.error,uid:e,error:n.serialize(r)};c.default.postMessageToMaster(s,i)}function m(e,t,r){const{payload:i,transferables:s}=k(r),o={type:u.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:i};c.default.postMessageToMaster(o,s)}function y(e){try{const t={type:u.WorkerMessageType.uncaughtError,error:n.serialize(e)};c.default.postMessageToMaster(t)}catch(t){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\nLatest error:",t,"\nOriginal error:",e)}}function v(e,t,r){return i(this,void 0,void 0,(function*(){let i;try{i=t(...r)}catch(t){return g(e,t)}const s=b(i)?"observable":"promise";if(function(e,t){const r={type:u.WorkerMessageType.running,uid:e,resultType:t};c.default.postMessageToMaster(r)}(e,s),b(i)){const t=i.subscribe(t=>m(e,!1,n.serialize(t)),t=>{g(e,n.serialize(t)),d.delete(e)},()=>{m(e,!0),d.delete(e)});d.set(e,t)}else try{const t=yield i;m(e,!0,n.serialize(t))}catch(t){g(e,n.serialize(t))}}))}t.expose=function(e){if(!c.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(f)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(f=!0,"function"==typeof e)c.default.subscribeToMasterMessages(t=>{p(t)&&!t.method&&v(t.uid,e,t.args.map(n.deserialize))}),function(){const e={type:u.WorkerMessageType.init,exposed:{type:"function"}};c.default.postMessageToMaster(e)}();else{if("object"!=typeof e||!e)throw Error("Invalid argument passed to expose(). Expected a function or an object, got: "+e);c.default.subscribeToMasterMessages(t=>{p(t)&&t.method&&v(t.uid,e[t.method],t.args.map(n.deserialize))});!function(e){const t={type:u.WorkerMessageType.init,exposed:{type:"module",methods:e}};c.default.postMessageToMaster(t)}(Object.keys(e).filter(t=>"function"==typeof e[t]))}c.default.subscribeToMasterMessages(e=>{if((t=e)&&t.type===u.MasterMessageType.cancel){const t=e.uid,r=d.get(t);r&&(r.unsubscribe(),d.delete(t))}var t})},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&c.default.isWorkerRuntime()&&(self.addEventListener("error",e=>{setTimeout(()=>y(e.error||e),250)}),self.addEventListener("unhandledrejection",e=>{const t=e.reason;t&&"string"==typeof t.message&&setTimeout(()=>y(t),250)})),void 0!==e&&"function"==typeof e.on&&c.default.isWorkerRuntime()&&(e.on("uncaughtException",e=>{setTimeout(()=>y(e),250)}),e.on("unhandledRejection",e=>{e&&"string"==typeof e.message&&setTimeout(()=>y(e),250)}))}).call(this,r(56))},277:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSerializer=t.extendSerializer=void 0,t.extendSerializer=function(e,t){const r=e.deserialize.bind(e),i=e.serialize.bind(e);return{deserialize:e=>t.deserialize(e,r),serialize:e=>t.serialize(e,i)}};const i={deserialize:e=>Object.assign(Error(e.message),{name:e.name,stack:e.stack}),serialize:e=>({__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack})};t.DefaultSerializer={deserialize(e){return(t=e)&&"object"==typeof t&&"__error_marker"in t&&"$$error"===t.__error_marker?i.deserialize(e):e;var t},serialize:e=>e instanceof Error?i.serialize(e):e}},278:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$worker=t.$transferable=t.$terminate=t.$events=t.$errors=void 0,t.$errors=Symbol("thread.errors"),t.$events=Symbol("thread.events"),t.$terminate=Symbol("thread.terminate"),t.$transferable=Symbol("thread.transferable"),t.$worker=Symbol("thread.worker")},279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageType=t.MasterMessageType=void 0,function(e){e.cancel="cancel",e.run="run"}(t.MasterMessageType||(t.MasterMessageType={})),function(e){e.error="error",e.init="init",e.result="result",e.running="running",e.uncaughtError="uncaughtError"}(t.WorkerMessageType||(t.WorkerMessageType={}))},280:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={isWorkerRuntime:function(){const e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)},postMessageToMaster:function(e,t){self.postMessage(e,t)},subscribeToMasterMessages:function(e){const t=t=>{e(t.data)};return self.addEventListener("message",t),()=>{self.removeEventListener("message",t)}}}},285:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeNoise4D=t.makeNoise3D=t.makeNoise2D=void 0;var i=r(419);function s(e,t,r){return{dx:-t-e*i.SQUISH_2D,dy:-r-e*i.SQUISH_2D,xsb:t,ysb:r}}function o(e,t,r,s){return{dx:-t-e*i.SQUISH_3D,dy:-r-e*i.SQUISH_3D,dz:-s-e*i.SQUISH_3D,xsb:t,ysb:r,zsb:s}}function n(e,t,r,s,o){return{dx:-t-e*i.SQUISH_4D,dy:-r-e*i.SQUISH_4D,dz:-s-e*i.SQUISH_4D,dw:-o-e*i.SQUISH_4D,xsb:t,ysb:r,zsb:s,wsb:o}}function a(e){var t=new Uint32Array(1);return t[0]=1664525*e[0]+1013904223,t}t.makeNoise2D=function(e){for(var t=[],r=0;r<i.p2D.length;r+=4){for(var o=i.base2D[i.p2D[r]],n=null,u=null,c=0;c<o.length;c+=3)u=s(o[c],o[c+1],o[c+2]),null===n?t[r/4]=u:n.next=u,n=u;u.next=s(i.p2D[r+1],i.p2D[r+2],i.p2D[r+3])}var h=[];for(r=0;r<i.lookupPairs2D.length;r+=2)h[i.lookupPairs2D[r]]=t[i.lookupPairs2D[r+1]];var l=new Uint8Array(256),f=new Uint8Array(256),d=new Uint8Array(256);for(r=0;r<256;r++)d[r]=r;var p=new Uint32Array(1);for(p[0]=e,p=a(a(a(p))),r=255;r>=0;r--){p=a(p);var b=new Uint32Array(1);b[0]=(p[0]+31)%(r+1),b[0]<0&&(b[0]+=r+1),l[r]=d[b[0]],f[r]=14&l[r],d[b[0]]=d[r]}return function(e,t){for(var r=(e+t)*i.STRETCH_2D,s=e+r,o=t+r,n=Math.floor(s),a=Math.floor(o),u=(n+a)*i.SQUISH_2D,c=e-(n+u),d=t-(a+u),p=s-n,b=o-a,k=p+b,g=0,m=h[p-b+1|k<<1|k+b<<2|k+p<<4];void 0!==m;m=m.next){var y=c+m.dx,v=d+m.dy,D=2-y*y-v*v;if(D>0){var M=n+m.xsb,_=a+m.ysb,w=l[255&M],T=f[w+_&255];g+=D*D*D*D*(i.gradients2D[T]*y+i.gradients2D[T+1]*v)}}return g*i.NORM_2D}},t.makeNoise3D=function(e){for(var t=[],r=0;r<i.p3D.length;r+=9){for(var s=i.base3D[i.p3D[r]],n=null,u=null,c=0;c<s.length;c+=4)u=o(s[c],s[c+1],s[c+2],s[c+3]),null===n?t[r/9]=u:n.next=u,n=u;u.next=o(i.p3D[r+1],i.p3D[r+2],i.p3D[r+3],i.p3D[r+4]),u.next.next=o(i.p3D[r+5],i.p3D[r+6],i.p3D[r+7],i.p3D[r+8])}var h=[];for(r=0;r<i.lookupPairs3D.length;r+=2)h[i.lookupPairs3D[r]]=t[i.lookupPairs3D[r+1]];var l=new Uint8Array(256),f=new Uint8Array(256),d=new Uint8Array(256);for(r=0;r<256;r++)d[r]=r;var p=new Uint32Array(1);for(p[0]=e,p=a(a(a(p))),r=255;r>=0;r--){p=a(p);var b=new Uint32Array(1);b[0]=(p[0]+31)%(r+1),b[0]<0&&(b[0]+=r+1),l[r]=d[b[0]],f[r]=l[r]%24*3,d[b[0]]=d[r]}return function(e,t,r){for(var s=(e+t+r)*i.STRETCH_3D,o=e+s,n=t+s,a=r+s,u=Math.floor(o),c=Math.floor(n),d=Math.floor(a),p=(u+c+d)*i.SQUISH_3D,b=e-(u+p),k=t-(c+p),g=r-(d+p),m=o-u,y=n-c,v=a-d,D=m+y+v,M=0,_=h[y-v+1|m-y+1<<1|m-v+1<<2|D<<3|D+v<<5|D+y<<7|D+m<<9];void 0!==_;_=_.next){var w=b+_.dx,T=k+_.dy,j=g+_.dz,N=2-w*w-T*T-j*j;if(N>0){var S=u+_.xsb,x=c+_.ysb,B=d+_.zsb,O=l[255&S],P=l[O+x&255],z=f[P+B&255];M+=N*N*N*N*(i.gradients3D[z]*w+i.gradients3D[z+1]*T+i.gradients3D[z+2]*j)}}return M*i.NORM_3D}},t.makeNoise4D=function(e){for(var t=[],r=0;r<i.p4D.length;r+=16){for(var s=i.base4D[i.p4D[r]],o=null,u=null,c=0;c<s.length;c+=5)u=n(s[c],s[c+1],s[c+2],s[c+3],s[c+4]),null===o?t[r/16]=u:o.next=u,o=u;u.next=n(i.p4D[r+1],i.p4D[r+2],i.p4D[r+3],i.p4D[r+4],i.p4D[r+5]),u.next.next=n(i.p4D[r+6],i.p4D[r+7],i.p4D[r+8],i.p4D[r+9],i.p4D[r+10]),u.next.next.next=n(i.p4D[r+11],i.p4D[r+12],i.p4D[r+13],i.p4D[r+14],i.p4D[r+15])}var h=[];for(r=0;r<i.lookupPairs4D.length;r+=2)h[i.lookupPairs4D[r]]=t[i.lookupPairs4D[r+1]];var l=new Uint8Array(256),f=new Uint8Array(256),d=new Uint8Array(256);for(r=0;r<256;r++)d[r]=r;var p=new Uint32Array(1);for(p[0]=e,p=a(a(a(p))),r=255;r>=0;r--){p=a(p);var b=new Uint32Array(1);b[0]=(p[0]+31)%(r+1),b[0]<0&&(b[0]+=r+1),l[r]=d[b[0]],f[r]=252&l[r],d[b[0]]=d[r]}return function(e,t,r,s){for(var o=(e+t+r+s)*i.STRETCH_4D,n=e+o,a=t+o,u=r+o,c=s+o,d=Math.floor(n),p=Math.floor(a),b=Math.floor(u),k=Math.floor(c),g=(d+p+b+k)*i.SQUISH_4D,m=e-(d+g),y=t-(p+g),v=r-(b+g),D=s-(k+g),M=n-d,_=a-p,w=u-b,T=c-k,j=M+_+w+T,N=0,S=h[w-T+1|_-w+1<<1|_-T+1<<2|M-_+1<<3|M-w+1<<4|M-T+1<<5|j<<6|j+T<<8|j+w<<11|j+_<<14|j+M<<17];void 0!==S;S=S.next){var x=m+S.dx,B=y+S.dy,O=v+S.dz,P=D+S.dw,z=2-x*x-B*B-O*O-P*P;if(z>0){var A=d+S.xsb,U=p+S.ysb,H=b+S.zsb,E=k+S.wsb,R=l[255&A],I=l[R+U&255],W=l[I+H&255],Q=f[W+E&255];N+=z*z*z*z*(i.gradients4D[Q]*x+i.gradients4D[Q+1]*B+i.gradients4D[Q+2]*O+i.gradients4D[Q+3]*P)}}return N*i.NORM_4D}}},286:function(e,t,r){"use strict";e.exports=function(e){"number"!=typeof e&&(e=123);var t=3432918353,r=461845907,i=Math.pow(2,32);return function(){for(var s=arguments.length,o=e,n=0;n<s;n++){var a=0|arguments[n],u=5*(65535&(o=(o^=a=(65535&(a=(a=(65535&a)*t+(((a>>>16)*t&65535)<<16)&4294967295)<<15|a>>>17))*r+(((a>>>16)*r&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295;o=27492+(65535&u)+((58964+(u>>>16)&65535)<<16)}return o^=s,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,((o^=o>>>16)>>>0)/i}}},323:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SavannaBiome=t.BeachBiome=t.OceanBiome=t.IceMountainsBiome=t.MountainsBiome=t.DesertBiome=t.ForestBiome=t.IcePlainsBiome=t.PlainsBiome=t.BaseBiome=void 0;const s=r(285),o=i(r(286));class n{constructor(e,t,r){this.id="base",this.block={},this.height=100,this.feature={},this.block=e,this.feature=t,this.heightNoise=s.makeNoise2D(Math.round(60*r*Math.sin(3^r)*1e4)),this.heightNoise2=s.makeNoise2D(Math.round(60*r*1e4)),this.caveNoise=s.makeNoise3D(Math.round(r*Math.sin(2^r)*1e4)),this.caveNoise2=s.makeNoise3D(Math.round(1e4*r)),this.hash=o.default(2e4^r),this.hash2=o.default(3*r*1e4)}getBlock(e,t,r,i){if(i(e,t,r))return this.block.stone}getHeightMap(e,t,r){return 5*Math.floor(this.heightNoise(e/140,r/140)+1)+50}validate(e,t){return!0}}t.BaseBiome=n;class a extends n{constructor(e,t,r){super(e,t,r),this.id="plains",this.height=120,this.mountainNoise=s.makeNoise2D(5238*r+132)}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3),a=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone)return 0==o?this.block.grass:o==this.block.stone&&n!=this.block.stone||o==this.block.water?this.block.dirt:this.block.stone;if(a==this.block.stone&&0==s){if(this.hash2(e,r)>=.9995)return this.feature.oakTree;if(this.hash2(e,r)<=5e-5)return this.feature.birchTree;if(this.hash(e,r)<=.06)return this.hash(e,t,r)<=.5?this.block.red_flower:this.block.yellow_flower;if(this.hash(e,r)>=.85)return this.block.grass_plant}return this.block.air}getHeightMap(e,t,r){const i=this.caveNoise(e/70,t/70,r/70),s=this.caveNoise2(e/40,t/40,r/40),o=this.heightNoise(e/120,r/120)+.4+(this.heightNoise2(e/10,r/10)+1)/4;return 14*(i*(1-o)+s*o)*(this.mountainNoise(e/60,r/60)+1)+70}}t.PlainsBiome=a;t.IcePlainsBiome=class extends a{constructor(){super(...arguments),this.id="iceplains"}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3),a=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone)return 0==o?this.block.grass_snow:o==this.block.water||o==this.block.stone&&n!=this.block.stone||o==this.block.water?this.block.dirt:this.block.stone;if(a==this.block.stone&&0==s){if(this.hash2(e,r)>=.9985)return this.feature.spruceTree}else if(a==this.block.stone&&s==this.block.water&&0==o&&i(t-2)==this.block.stone)return this.block.ice;return this.block.air}};t.ForestBiome=class extends n{constructor(e,t,r){super(e,t,r),this.id="forest",this.height=120,this.mountainNoise=s.makeNoise2D(5238*r+132)}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3),a=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone)return 0==o?this.block.grass:o==this.block.water||o==this.block.stone&&n!=this.block.stone?this.block.dirt:this.block.stone;if(a==this.block.stone&&0==s){if(this.hash2(e,r)>=.993)return this.feature.oakTree;if(this.hash2(e,r)<=.002)return this.feature.birchTree;if(this.hash(e,r)<=.06)return this.hash(e,t,r)<=.5?this.block.red_flower:this.block.yellow_flower;if(this.hash(e,r)>=.85)return this.block.grass_plant}return this.block.air}getHeightMap(e,t,r){const i=this.caveNoise(e/70,t/70,r/70),s=this.caveNoise2(e/40,t/40,r/40),o=this.heightNoise(e/120,r/120)+(this.heightNoise2(e/10,r/10)+1)/4;return(i*(1-o)+s*o)*(14+10*(this.mountainNoise(e/60,r/60)+1))+72}};t.DesertBiome=class extends n{constructor(e,t,r){super(e,t,r),this.id="desert",this.height=120,this.mountainNoise=s.makeNoise2D(5238*r+132)}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3),a=i(t+6),u=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone)return o==this.block.water||o==this.block.air||o&&!n?this.block.sand:o!=this.block.stone||a?this.block.stone:this.block.sandstone;if(u==this.block.stone&&0==s){if(this.hash2(e,r)<=.01)return this.feature.cactus;if(this.hash(e,r)<=.006)return this.block.deadbush}return this.block.air}getHeightMap(e,t,r){const i=this.caveNoise(e/70,t/70,r/70),s=this.caveNoise2(e/40,t/40,r/40)+.2,o=this.heightNoise(e/120,r/120),n=this.mountainNoise(e/60,r/60)+1;return 24*Math.abs(i*(1-o)+s*o)*n+73}};class u extends n{constructor(e,t,r){super(e,t,r),this.id="mountains",this.height=240,this.hightVariationNoise=s.makeNoise2D(3^r)}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+2),a=i(t+3),u=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone){if(t>135+6*this.hash(e,r)){if(0==o||o==this.block.stone&&0==n)return this.block.snow}else if(t>115+7*this.hash(e,r)){if(0==o)return this.hash(e,t,r)<=.1?this.block.cobblestone:this.block.stone}else{if(0==o)return this.block.grass;if(o==this.block.stone&&a!=this.block.stone)return this.block.dirt;if(o==this.block.water)return this.block.dirt}return this.block.stone}if(u==this.block.stone&&0==s){if(t>120)return this.block.air;if(this.hash(e,r)<=.03)return this.hash(e,t,r)<=.5?this.block.red_flower:this.block.yellow_flower;if(this.hash(e,r)>=.85)return this.block.grass_plant}return this.block.air}getHeightMap(e,t,r){const i=this.caveNoise(e/180,t/80,r/180),s=this.caveNoise(e/20,t/20,r/20),o=Math.abs(this.heightNoise(e/80,r/80)),n=this.heightNoise(e/5,r/5)+1,a=this.heightNoise2(e/10,r/10)+1;return 100*function(e){return e>0?e:e/3}(o-i*s/2)+2*n+3*a+80}}t.MountainsBiome=u;t.IceMountainsBiome=class extends u{constructor(){super(...arguments),this.id="icemountains"}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+2),a=i(t+3),u=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone){if(t>135+6*this.hash(e,r)){if(0==o||o==this.block.stone&&0==n)return this.block.snow}else if(t>115+7*this.hash(e,r)){if(0==o)return this.hash(e,t,r)<=.1?this.block.cobblestone:this.block.snow}else{if(0==o)return this.block.grass_snow;if(o==this.block.stone&&a!=this.block.stone)return this.block.dirt;if(o==this.block.water)return this.block.dirt}return this.block.stone}if(u==this.block.stone&&0==s);else if(u==this.block.stone&&s==this.block.water&&0==o&&i(t-2)==this.block.stone)return this.block.ice;return this.block.air}};t.OceanBiome=class extends n{constructor(){super(...arguments),this.id="ocean",this.height=90}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3);i(t-1);return 0==t?this.block.bedrock:s==this.block.stone?o==this.block.water||o==this.block.air||o==this.block.stone&&n!=this.block.stone?this.block.gravel:this.block.stone:(this.block.stone,this.block.air)}getHeightMap(e,t,r){const i=this.caveNoise(e/70,t/70,r/70),s=this.caveNoise(e/40,t/40,r/40),o=this.heightNoise(e/120,r/120)+.4+(this.heightNoise(e/10,r/10)+.1+1)/3;return 14*(i*(1-o)+s*o)+50}};t.BeachBiome=class extends n{constructor(){super(...arguments),this.id="beach",this.height=100}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3),a=i(t+6);i(t-1);return 0==t?this.block.bedrock:s==this.block.stone?o==this.block.water||o==this.block.air||o==this.block.stone&&n!=this.block.stone?this.block.sand:o!=this.block.stone||a?this.block.stone:this.block.sandstone:(this.block.stone,this.block.air)}getHeightMap(e,t,r){const i=this.caveNoise(e/70,t/70,r/70),s=this.caveNoise(e/40,t/40,r/40),o=this.heightNoise(e/120,r/120)+.4+(this.heightNoise(e/10,r/10)+.1+1)/3;return 8*(i*(1-o)+s*o)+66}};t.SavannaBiome=class extends n{constructor(e,t,r){super(e,t,r),this.id="savanna",this.height=120,this.mountainNoise=s.makeNoise2D(5238*r+132)}getBlock(e,t,r,i){const s=i(t),o=i(t+1),n=i(t+3),a=i(t-1);if(0==t)return this.block.bedrock;if(s==this.block.stone)return 0==o?this.block.grass_yellow:o==this.block.stone&&n!=this.block.stone||o==this.block.water?this.block.dirt:this.block.stone;if(a==this.block.stone&&0==s){if(this.hash2(e,r)>=.9995)return this.feature.yellowOakTree;if(this.hash(e,r)>=.85)return this.block.grass_plant_yellow}return this.block.air}getHeightMap(e,t,r){const i=this.caveNoise(e/70,t/70,r/70),s=this.caveNoise2(e/40,t/40,r/40),o=this.heightNoise(e/70,r/70)+.4+(this.heightNoise2(e/10,r/10)+1)/4;return 23*(i*(1-o)+s*o)*(this.mountainNoise(e/60,r/60)+1)+73}}},419:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.p4D=t.p3D=t.p2D=t.lookupPairs4D=t.lookupPairs3D=t.lookupPairs2D=t.gradients4D=t.gradients3D=t.gradients2D=t.base4D=t.base3D=t.base2D=t.STRETCH_4D=t.STRETCH_3D=t.STRETCH_2D=t.SQUISH_4D=t.SQUISH_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,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],t.lookupPairs2D=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],t.lookupPairs3D=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],t.lookupPairs4D=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],t.p2D=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],t.p3D=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,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,0,0,2,2,1,1,-1,1,3,1,1,0,0,0,2,2,0,0,0,2,1,-1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,1,-1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,-1,1,1,3,1,0,1,0,0,2,0,2,0,0,2,-1,1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,-1,1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,-1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,4,1,1,1,1,3,3,2,0,1,0,3,1,0,2,0,4,1,1,1,1,3,3,0,2,1,0,3,0,1,2,0,4,1,1,1,1,3,3,2,0,0,1,3,1,0,0,2,4,1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,4,1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,4,1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,1,-1,3,3,2,0,1,0,3,1,0,2,0,2,1,1,1,-1,3,3,0,2,1,0,3,0,1,2,0,2,1,1,1,-1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,-1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,1,-1,1,3,3,0,2,0,1,3,0,1,0,2,2,1,1,-1,1,3,3,2,0,1,0,3,1,0,2,0,2,1,-1,1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,-1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,1,-1,1,1,3,3,0,2,1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]},53:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},56:function(e,t){var r,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:n}catch(e){i=n}}();var u,c=[],h=!1,l=-1;function f(){h&&u&&(h=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!h){var e=a(f);h=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,h=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===n||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function b(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||h||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=b,s.addListener=b,s.once=b,s.off=b,s.removeListener=b,s.removeAllListeners=b,s.emit=b,s.prependListener=b,s.prependOnceListener=b,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},667:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return s(t,e),t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(285),u=n(r(286)),c=o(r(323)),h=r(78);let l;const f={setupGenerator(e,t){l=new d(e,t)},generateBaseChunk:(e,t)=>l.generateBaseChunk(e,t).data,getBiomesAt:(e,t)=>l.getBiomesAt(e,t)};r(199).expose(f);class d{constructor(e,t){this.chunkWitdh=32,this.chunkHeight=256,this.waterLevel=65,this.biomeSpacing=100,this.features={oakTree:-1,birchTree:-2,cactus:-3,spruceTree:-4,yellowOakTree:-5},this.seed=e,this.biomeNoise1=a.makeNoise2D(Math.round(e*Math.sin(3^e)*1e4)),this.biomeNoise2=a.makeNoise2D(Math.round(e*Math.sin(4^e)*1e4)),this.biomeNoise3=a.makeNoise2D(Math.round(e*Math.sin(5^e)*1e4)),this.caveNoise1=a.makeNoise3D(Math.round(e*Math.cos(5^e)*1e4)),this.caveNoise2=a.makeNoise3D(Math.round(e*Math.cos(2^e)*1e4)),this.plantSeed=Math.round(e*Math.sin(6^e)*1e4),this.blocks=t,this.hash=u.default(this.plantSeed),this.biomes={mountains:new c.MountainsBiome(this.blocks,this.features,e),plains:new c.PlainsBiome(this.blocks,this.features,e),desert:new c.DesertBiome(this.blocks,this.features,e),forest:new c.ForestBiome(this.blocks,this.features,e),iceplains:new c.IcePlainsBiome(this.blocks,this.features,e),icemountains:new c.IceMountainsBiome(this.blocks,this.features,e),ocean:new c.OceanBiome(this.blocks,this.features,e),beach:new c.BeachBiome(this.blocks,this.features,e),savanna:new c.SavannaBiome(this.blocks,this.features,e)}}getBlock(e,t,r,i){let s=0,o="";for(o in i.possible)s+=this.biomes[o].getHeightMap(e,t,r)*i.possible[o];return s/=i.size,t<=s?this.blocks.stone:t<=this.waterLevel?this.blocks.water:0}getBiome(e,t){const r=this.hash(200,e,t)/90,i=this.biomeNoise1(e/600,t/600)+1+r,s=this.biomeNoise2(e/300,t/300)+1+r,o=this.biomeNoise3(e/400,t/400)+1+r;return o>1.3?this.biomes.ocean:o>1.15?i>1.5?this.biomes.mountains:this.biomes.beach:s>1.4?this.biomes.desert:s>.5?i>1.5?this.biomes.mountains:i>1.3?this.biomes.forest:this.biomes.plains:s<=.6?i>1.5?this.biomes.icemountains:this.biomes.iceplains:void 0}getBiomesAt(e,t){const r=this.getBiome(e,t);let i,s;const o={};let n,a=0,u=0;for(i=-10;i<=10;i++)for(s=-10;s<=10;s++)p(i,s)>10||(n=this.getBiome(e+i,t+s),null==o[n.id]&&(o[n.id]=0),o[n.id]=o[n.id]+1,a<n.height&&(a=n.height),u+=1);return{main:r,possible:o,height:a,size:u}}generateBaseChunk(e,t){const r=e[0]*this.chunkWitdh,i=e[1]*this.chunkWitdh;let s,o,n,a,u=new h(new Uint16Array(this.chunkWitdh*this.chunkHeight*this.chunkWitdh),[this.chunkWitdh,this.chunkHeight,this.chunkWitdh]);for(s=0;s<this.chunkWitdh;s++)for(n=0;n<this.chunkWitdh;n++)for(a=this.getBiomesAt(s+r,n+i),o=0;o<=a.height;o++)u.set(s,o,n,this.getBlock(s+r,o,n+i,a));return u}}function p(e,t){return Math.sqrt(e*e+t*t)}},78:function(e,t,r){var i=r(247),s=r(248),o="undefined"!=typeof Float64Array;function n(e,t){return e[0]-t[0]}function a(){var e,t=this.stride,r=new Array(t.length);for(e=0;e<r.length;++e)r[e]=[Math.abs(t[e]),e];r.sort(n);var i=new Array(r.length);for(e=0;e<i.length;++e)i[e]=r[e][1];return i}function u(e,t){var r=["View",t,"d",e].join("");t<0&&(r="View_Nil"+e);var s="generic"===e;if(-1===t){var o="function "+r+"(a){this.data=a;};var proto="+r+".prototype;proto.dtype='"+e+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+r+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+r+"(a){return new "+r+"(a);}";return new Function(o)()}if(0===t){o="function "+r+"(a,d) {this.data = a;this.offset = d};var proto="+r+".prototype;proto.dtype='"+e+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+r+"_copy() {return new "+r+"(this.data,this.offset)};proto.pick=function "+r+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+r+"_get(){return "+(s?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+r+"_set(v){return "+(s?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+r+"(a,b,c,d){return new "+r+"(a,d)}";return new Function("TrivialArray",o)(c[e][0])}o=["'use strict'"];var n=i(t),u=n.map((function(e){return"i"+e})),h="this.offset+"+n.map((function(e){return"this.stride["+e+"]*i"+e})).join("+"),l=n.map((function(e){return"b"+e})).join(","),f=n.map((function(e){return"c"+e})).join(",");o.push("function "+r+"(a,"+l+","+f+",d){this.data=a","this.shape=["+l+"]","this.stride=["+f+"]","this.offset=d|0}","var proto="+r+".prototype","proto.dtype='"+e+"'","proto.dimension="+t),o.push("Object.defineProperty(proto,'size',{get:function "+r+"_size(){return "+n.map((function(e){return"this.shape["+e+"]"})).join("*"),"}})"),1===t?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),t<4?(o.push("function "+r+"_order(){"),2===t?o.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&o.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),s?o.push("return this.data.set("+h+",v)}"):o.push("return this.data["+h+"]=v}"),o.push("proto.get=function "+r+"_get("+u.join(",")+"){"),s?o.push("return this.data.get("+h+")}"):o.push("return this.data["+h+"]}"),o.push("proto.index=function "+r+"_index(",u.join(),"){return "+h+"}"),o.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+n.map((function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")})).join(",")+","+n.map((function(e){return"this.stride["+e+"]"})).join(",")+",this.offset)}");var d=n.map((function(e){return"a"+e+"=this.shape["+e+"]"})),p=n.map((function(e){return"c"+e+"=this.stride["+e+"]"}));o.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+d.join(",")+","+p.join(","));for(var b=0;b<t;++b)o.push("if(typeof i"+b+"==='number'&&i"+b+">=0){d=i"+b+"|0;b+=c"+b+"*d;a"+b+"-=d}");o.push("return new "+r+"(this.data,"+n.map((function(e){return"a"+e})).join(",")+","+n.map((function(e){return"c"+e})).join(",")+",b)}"),o.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+n.map((function(e){return"a"+e+"=this.shape["+e+"]"})).join(",")+","+n.map((function(e){return"b"+e+"=this.stride["+e+"]"})).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(b=0;b<t;++b)o.push("if(typeof i"+b+"==='number'){d=i"+b+"|0;if(d<0){c+=b"+b+"*(a"+b+"-1);a"+b+"=ceil(-a"+b+"/d)}else{a"+b+"=ceil(a"+b+"/d)}b"+b+"*=d}");o.push("return new "+r+"(this.data,"+n.map((function(e){return"a"+e})).join(",")+","+n.map((function(e){return"b"+e})).join(",")+",c)}");var k=new Array(t),g=new Array(t);for(b=0;b<t;++b)k[b]="a[i"+b+"]",g[b]="b[i"+b+"]";o.push("proto.transpose=function "+r+"_transpose("+u+"){"+u.map((function(e,t){return e+"=("+e+"===undefined?"+t+":"+e+"|0)"})).join(";"),"var a=this.shape,b=this.stride;return new "+r+"(this.data,"+k.join(",")+","+g.join(",")+",this.offset)}"),o.push("proto.pick=function "+r+"_pick("+u+"){var a=[],b=[],c=this.offset");for(b=0;b<t;++b)o.push("if(typeof i"+b+"==='number'&&i"+b+">=0){c=(c+this.stride["+b+"]*i"+b+")|0}else{a.push(this.shape["+b+"]);b.push(this.stride["+b+"])}");return o.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),o.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+n.map((function(e){return"shape["+e+"]"})).join(",")+","+n.map((function(e){return"stride["+e+"]"})).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",o.join("\n"))(c[e],a)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};e.exports=function(e,t,r,i){if(void 0===e)return(0,c.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var n=t.length;if(void 0===r){r=new Array(n);for(var a=n-1,h=1;a>=0;--a)r[a]=h,h*=t[a]}if(void 0===i){i=0;for(a=0;a<n;++a)r[a]<0&&(i-=(t[a]-1)*r[a])}for(var l=function(e){if(s(e))return"buffer";if(o)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(e)?"array":"generic"}(e),f=c[l];f.length<=n+1;)f.push(u(l,f.length-1));return(0,f[n+1])(e,t,r,i)}}});