minecraft-renderer 0.1.54 → 0.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- var Na=Object.create;var n5=Object.defineProperty;var Wa=Object.getOwnPropertyDescriptor;var Va=Object.getOwnPropertyNames;var ja=Object.getPrototypeOf,Ya=Object.prototype.hasOwnProperty;var Qa=(n,e,t)=>e in n?n5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Ka=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ee=(n,e)=>()=>(n&&(e=n(n=0)),e);var ie=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Z5=(n,e)=>{for(var t in e)n5(n,t,{get:e[t],enumerable:!0})},gn=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Va(e))!Ya.call(n,i)&&i!==t&&n5(n,i,{get:()=>e[i],enumerable:!(r=Wa(e,i))||r.enumerable});return n};var s5=(n,e,t)=>(t=n!=null?Na(ja(n)):{},gn(e||!n||!n.__esModule?n5(t,"default",{value:n,enumerable:!0}):t,n)),Ja=n=>gn(n5({},"__esModule",{value:!0}),n);var u=(n,e,t)=>(Qa(n,typeof e!="symbol"?e+"":e,t),t);var E=ee(()=>{});var x=ee(()=>{});var F={};Z5(F,{_debugEnd:()=>o2,_debugProcess:()=>s2,_events:()=>A2,_eventsCount:()=>E2,_exiting:()=>Un,_fatalExceptions:()=>t2,_getActiveHandles:()=>Vn,_getActiveRequests:()=>Wn,_kill:()=>Yn,_linkedBinding:()=>zn,_maxListeners:()=>w2,_preload_modules:()=>b2,_rawDebug:()=>Fn,_startProfilerIdleNotifier:()=>a2,_stopProfilerIdleNotifier:()=>v2,_tickCallback:()=>n2,abort:()=>u2,addListener:()=>x2,allowedNodeEnvironmentFlags:()=>Xn,arch:()=>An,argv:()=>Rn,argv0:()=>g2,assert:()=>$n,binding:()=>Cn,browser:()=>On,chdir:()=>In,config:()=>Gn,cpuUsage:()=>e1,cwd:()=>Pn,debugPort:()=>p2,default:()=>I2,dlopen:()=>Nn,domain:()=>Ln,emit:()=>S2,emitWarning:()=>Sn,env:()=>xn,execArgv:()=>kn,execPath:()=>m2,exit:()=>qn,features:()=>e2,hasUncaughtExceptionCaptureCallback:()=>i2,hrtime:()=>$5,kill:()=>Jn,listeners:()=>P2,memoryUsage:()=>Kn,moduleLoadList:()=>Dn,nextTick:()=>yn,off:()=>k2,on:()=>we,once:()=>R2,openStdin:()=>Zn,pid:()=>f2,platform:()=>En,ppid:()=>h2,prependListener:()=>C2,prependOnceListener:()=>B2,reallyExit:()=>jn,release:()=>Hn,removeAllListeners:()=>M2,removeListener:()=>T2,resourceUsage:()=>Qn,setSourceMapsEnabled:()=>y2,setUncaughtExceptionCaptureCallback:()=>r2,stderr:()=>c2,stdin:()=>d2,stdout:()=>l2,title:()=>wn,umask:()=>Bn,uptime:()=>_2,version:()=>Tn,versions:()=>Mn});function Er(n){throw new Error("Node.js process "+n+" is not supported by JSPM core outside of Node.js")}function qa(){!Rt||!Ke||(Rt=!1,Ke.length?_e=Ke.concat(_e):X5=-1,_e.length&&bn())}function bn(){if(!Rt){var n=setTimeout(qa,0);Rt=!0;for(var e=_e.length;e;){for(Ke=_e,_e=[];++X5<e;)Ke&&Ke[X5].run();X5=-1,e=_e.length}Ke=null,Rt=!1,clearTimeout(n)}}function yn(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];_e.push(new _n(n,e)),_e.length===1&&!Rt&&setTimeout(bn,0)}function _n(n,e){this.fun=n,this.array=e}function W0(){}function zn(n){Er("_linkedBinding")}function Nn(n){Er("dlopen")}function Wn(){return[]}function Vn(){return[]}function $n(n,e){if(!n)throw new Error(e||"assertion error")}function i2(){return!1}function _2(){return Be.now()/1e3}function $5(n){var e=Math.floor((Date.now()-Be.now())*.001),t=Be.now()*.001,r=Math.floor(t)+e,i=Math.floor(t%1*1e9);return n&&(r=r-n[0],i=i-n[1],i<0&&(r--,i+=Ar)),[r,i]}function we(){return I2}function P2(n){return[]}var _e,Rt,Ke,X5,wn,An,En,xn,Rn,kn,Tn,Mn,Sn,Cn,Bn,Pn,In,Hn,On,Fn,Dn,Ln,Un,Gn,jn,Yn,e1,Qn,Kn,Jn,qn,Zn,Xn,e2,t2,r2,n2,s2,o2,a2,v2,l2,c2,d2,u2,f2,h2,m2,p2,g2,b2,y2,Be,wr,Ar,w2,A2,E2,x2,R2,k2,T2,M2,S2,C2,B2,I2,H2=ee(()=>{E();x();k();R();_e=[],Rt=!1,X5=-1;_n.prototype.run=function(){this.fun.apply(null,this.array)};wn="browser",An="x64",En="browser",xn={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Rn=["/usr/bin/node"],kn=[],Tn="v16.8.0",Mn={},Sn=function(n,e){},Cn=function(n){Er("binding")},Bn=function(n){return 0},Pn=function(){return"/"},In=function(n){},Hn={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};On=!0,Fn=W0,Dn=[];Ln={},Un=!1,Gn={};jn=W0,Yn=W0,e1=function(){return{}},Qn=e1,Kn=e1,Jn=W0,qn=W0,Zn=W0,Xn={};e2={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},t2=W0,r2=W0;n2=W0,s2=W0,o2=W0,a2=W0,v2=W0,l2=void 0,c2=void 0,d2=void 0,u2=W0,f2=2,h2=1,m2="/bin/usr/node",p2=9229,g2="node",b2=[],y2=W0,Be={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Be.now===void 0&&(wr=Date.now(),Be.timing&&Be.timing.navigationStart&&(wr=Be.timing.navigationStart),Be.now=()=>Date.now()-wr);Ar=1e9;$5.bigint=function(n){var e=$5(n);return typeof BigInt>"u"?e[0]*Ar+e[1]:BigInt(e[0]*Ar)+BigInt(e[1])};w2=10,A2={},E2=0;x2=we,R2=we,k2=we,T2=we,M2=we,S2=W0,C2=we,B2=we;I2={version:Tn,versions:Mn,arch:An,platform:En,browser:On,release:Hn,_rawDebug:Fn,moduleLoadList:Dn,binding:Cn,_linkedBinding:zn,_events:A2,_eventsCount:E2,_maxListeners:w2,on:we,addListener:x2,once:R2,off:k2,removeListener:T2,removeAllListeners:M2,emit:S2,prependListener:C2,prependOnceListener:B2,listeners:P2,domain:Ln,_exiting:Un,config:Gn,dlopen:Nn,uptime:_2,_getActiveRequests:Wn,_getActiveHandles:Vn,reallyExit:jn,_kill:Yn,cpuUsage:e1,resourceUsage:Qn,memoryUsage:Kn,kill:Jn,exit:qn,openStdin:Zn,allowedNodeEnvironmentFlags:Xn,assert:$n,features:e2,_fatalExceptions:t2,setUncaughtExceptionCaptureCallback:r2,hasUncaughtExceptionCaptureCallback:i2,emitWarning:Sn,nextTick:yn,_tickCallback:n2,_debugProcess:s2,_debugEnd:o2,_startProfilerIdleNotifier:a2,_stopProfilerIdleNotifier:v2,stdout:l2,stdin:d2,stderr:c2,abort:u2,umask:Bn,chdir:In,cwd:Pn,env:xn,title:wn,argv:Rn,execArgv:kn,pid:f2,ppid:h2,execPath:m2,debugPort:p2,hrtime:$5,argv0:g2,_preload_modules:b2,setSourceMapsEnabled:y2}});var R=ee(()=>{H2()});function Za(){if(O2)return o5;O2=!0,o5.byteLength=a,o5.toByteArray=l,o5.fromByteArray=f;for(var n=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=r.length;i<s;++i)n[i]=r[i],e[r.charCodeAt(i)]=i;e[45]=62,e[95]=63;function o(m){var g=m.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=m.indexOf("=");b===-1&&(b=g);var w=b===g?0:4-b%4;return[b,w]}function a(m){var g=o(m),b=g[0],w=g[1];return(b+w)*3/4-w}function v(m,g,b){return(g+b)*3/4-b}function l(m){var g,b=o(m),w=b[0],y=b[1],A=new t(v(m,w,y)),C=0,M=y>0?w-4:w,S;for(S=0;S<M;S+=4)g=e[m.charCodeAt(S)]<<18|e[m.charCodeAt(S+1)]<<12|e[m.charCodeAt(S+2)]<<6|e[m.charCodeAt(S+3)],A[C++]=g>>16&255,A[C++]=g>>8&255,A[C++]=g&255;return y===2&&(g=e[m.charCodeAt(S)]<<2|e[m.charCodeAt(S+1)]>>4,A[C++]=g&255),y===1&&(g=e[m.charCodeAt(S)]<<10|e[m.charCodeAt(S+1)]<<4|e[m.charCodeAt(S+2)]>>2,A[C++]=g>>8&255,A[C++]=g&255),A}function c(m){return n[m>>18&63]+n[m>>12&63]+n[m>>6&63]+n[m&63]}function d(m,g,b){for(var w,y=[],A=g;A<b;A+=3)w=(m[A]<<16&16711680)+(m[A+1]<<8&65280)+(m[A+2]&255),y.push(c(w));return y.join("")}function f(m){for(var g,b=m.length,w=b%3,y=[],A=16383,C=0,M=b-w;C<M;C+=A)y.push(d(m,C,C+A>M?M:C+A));return w===1?(g=m[b-1],y.push(n[g>>2]+n[g<<4&63]+"==")):w===2&&(g=(m[b-2]<<8)+m[b-1],y.push(n[g>>10]+n[g>>4&63]+n[g<<2&63]+"=")),y.join("")}return o5}function Xa(){if(F2)return t1;F2=!0;return t1.read=function(n,e,t,r,i){var s,o,a=i*8-r-1,v=(1<<a)-1,l=v>>1,c=-7,d=t?i-1:0,f=t?-1:1,m=n[e+d];for(d+=f,s=m&(1<<-c)-1,m>>=-c,c+=a;c>0;s=s*256+n[e+d],d+=f,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=o*256+n[e+d],d+=f,c-=8);if(s===0)s=1-l;else{if(s===v)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-l}return(m?-1:1)*o*Math.pow(2,s-r)},t1.write=function(n,e,t,r,i,s){var o,a,v,l=s*8-i-1,c=(1<<l)-1,d=c>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:s-1,g=r?1:-1,b=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(v=Math.pow(2,-o))<1&&(o--,v*=2),o+d>=1?e+=f/v:e+=f*Math.pow(2,1-d),e*v>=2&&(o++,v/=2),o+d>=c?(a=0,o=c):o+d>=1?(a=(e*v-1)*Math.pow(2,i),o=o+d):(a=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;n[t+m]=a&255,m+=g,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;n[t+m]=o&255,m+=g,o/=256,l-=8);n[t+m-g]|=b*128},t1}function z2(){if(D2)return Je;D2=!0;let n=Za(),e=Xa(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Je.Buffer=o,Je.SlowBuffer=y,Je.INSPECT_MAX_BYTES=50;let r=2147483647;Je.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u";function i(){try{let _=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(_,h),_.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(_){if(_>r)throw new RangeError('The value "'+_+'" is invalid for option "size"');let h=new Uint8Array(_);return Object.setPrototypeOf(h,o.prototype),h}function o(_,h,p){if(typeof _=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(_)}return a(_,h,p)}o.poolSize=8192;function a(_,h,p){if(typeof _=="string")return d(_,h);if(ArrayBuffer.isView(_))return m(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(S0(_,ArrayBuffer)||_&&S0(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(S0(_,SharedArrayBuffer)||_&&S0(_.buffer,SharedArrayBuffer)))return g(_,h,p);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let T=_.valueOf&&_.valueOf();if(T!=null&&T!==_)return o.from(T,h,p);let P=b(_);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return o.from(_[Symbol.toPrimitive]("string"),h,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}o.from=function(_,h,p){return a(_,h,p)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function v(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function l(_,h,p){return v(_),_<=0?s(_):h!==void 0?typeof p=="string"?s(_).fill(h,p):s(_).fill(h):s(_)}o.alloc=function(_,h,p){return l(_,h,p)};function c(_){return v(_),s(_<0?0:w(_)|0)}o.allocUnsafe=function(_){return c(_)},o.allocUnsafeSlow=function(_){return c(_)};function d(_,h){if((typeof h!="string"||h==="")&&(h="utf8"),!o.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let p=A(_,h)|0,T=s(p),P=T.write(_,h);return P!==p&&(T=T.slice(0,P)),T}function f(_){let h=_.length<0?0:w(_.length)|0,p=s(h);for(let T=0;T<h;T+=1)p[T]=_[T]&255;return p}function m(_){if(S0(_,Uint8Array)){let h=new Uint8Array(_);return g(h.buffer,h.byteOffset,h.byteLength)}return f(_)}function g(_,h,p){if(h<0||_.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<h+(p||0))throw new RangeError('"length" is outside of buffer bounds');let T;return h===void 0&&p===void 0?T=new Uint8Array(_):p===void 0?T=new Uint8Array(_,h):T=new Uint8Array(_,h,p),Object.setPrototypeOf(T,o.prototype),T}function b(_){if(o.isBuffer(_)){let h=w(_.length)|0,p=s(h);return p.length===0||_.copy(p,0,0,h),p}if(_.length!==void 0)return typeof _.length!="number"||Et(_.length)?s(0):f(_);if(_.type==="Buffer"&&Array.isArray(_.data))return f(_.data)}function w(_){if(_>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return _|0}function y(_){return+_!=_&&(_=0),o.alloc(+_)}o.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==o.prototype},o.compare=function(h,p){if(S0(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),S0(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(h)||!o.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===p)return 0;let T=h.length,P=p.length;for(let D=0,N=Math.min(T,P);D<N;++D)if(h[D]!==p[D]){T=h[D],P=p[D];break}return T<P?-1:P<T?1:0},o.isEncoding=function(h){switch(String(h).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(h,p){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return o.alloc(0);let T;if(p===void 0)for(p=0,T=0;T<h.length;++T)p+=h[T].length;let P=o.allocUnsafe(p),D=0;for(T=0;T<h.length;++T){let N=h[T];if(S0(N,Uint8Array))D+N.length>P.length?(o.isBuffer(N)||(N=o.from(N)),N.copy(P,D)):Uint8Array.prototype.set.call(P,N,D);else if(o.isBuffer(N))N.copy(P,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=N.length}return P};function A(_,h){if(o.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||S0(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);let p=_.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&p===0)return 0;let P=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return At(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return _r(_).length;default:if(P)return T?-1:At(_).length;h=(""+h).toLowerCase(),P=!0}}o.byteLength=A;function C(_,h,p){let T=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,h>>>=0,p<=h))return"";for(_||(_="utf8");;)switch(_){case"hex":return p0(this,h,p);case"utf8":case"utf-8":return X(this,h,p);case"ascii":return l0(this,h,p);case"latin1":case"binary":return m0(this,h,p);case"base64":return J(this,h,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A0(this,h,p);default:if(T)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(_,h,p){let T=_[h];_[h]=_[p],_[p]=T}o.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<h;p+=2)M(this,p,p+1);return this},o.prototype.swap32=function(){let h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<h;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},o.prototype.swap64=function(){let h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<h;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},o.prototype.toString=function(){let h=this.length;return h===0?"":arguments.length===0?X(this,0,h):C.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(h){if(!o.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:o.compare(this,h)===0},o.prototype.inspect=function(){let h="",p=Je.INSPECT_MAX_BYTES;return h=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(h+=" ... "),"<Buffer "+h+">"},t&&(o.prototype[t]=o.prototype.inspect),o.prototype.compare=function(h,p,T,P,D){if(S0(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(p===void 0&&(p=0),T===void 0&&(T=h?h.length:0),P===void 0&&(P=0),D===void 0&&(D=this.length),p<0||T>h.length||P<0||D>this.length)throw new RangeError("out of range index");if(P>=D&&p>=T)return 0;if(P>=D)return-1;if(p>=T)return 1;if(p>>>=0,T>>>=0,P>>>=0,D>>>=0,this===h)return 0;let N=D-P,i0=T-p,b0=Math.min(N,i0),f0=this.slice(P,D),h0=h.slice(p,T);for(let c0=0;c0<b0;++c0)if(f0[c0]!==h0[c0]){N=f0[c0],i0=h0[c0];break}return N<i0?-1:i0<N?1:0};function S(_,h,p,T,P){if(_.length===0)return-1;if(typeof p=="string"?(T=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,Et(p)&&(p=P?0:_.length-1),p<0&&(p=_.length+p),p>=_.length){if(P)return-1;p=_.length-1}else if(p<0)if(P)p=0;else return-1;if(typeof h=="string"&&(h=o.from(h,T)),o.isBuffer(h))return h.length===0?-1:H(_,h,p,T,P);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(_,h,p):Uint8Array.prototype.lastIndexOf.call(_,h,p):H(_,[h],p,T,P);throw new TypeError("val must be string, number or Buffer")}function H(_,h,p,T,P){let D=1,N=_.length,i0=h.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(_.length<2||h.length<2)return-1;D=2,N/=2,i0/=2,p/=2}function b0(h0,c0){return D===1?h0[c0]:h0.readUInt16BE(c0*D)}let f0;if(P){let h0=-1;for(f0=p;f0<N;f0++)if(b0(_,f0)===b0(h,h0===-1?0:f0-h0)){if(h0===-1&&(h0=f0),f0-h0+1===i0)return h0*D}else h0!==-1&&(f0-=f0-h0),h0=-1}else for(p+i0>N&&(p=N-i0),f0=p;f0>=0;f0--){let h0=!0;for(let c0=0;c0<i0;c0++)if(b0(_,f0+c0)!==b0(h,c0)){h0=!1;break}if(h0)return f0}return-1}o.prototype.includes=function(h,p,T){return this.indexOf(h,p,T)!==-1},o.prototype.indexOf=function(h,p,T){return S(this,h,p,T,!0)},o.prototype.lastIndexOf=function(h,p,T){return S(this,h,p,T,!1)};function B(_,h,p,T){p=Number(p)||0;let P=_.length-p;T?(T=Number(T),T>P&&(T=P)):T=P;let D=h.length;T>D/2&&(T=D/2);let N;for(N=0;N<T;++N){let i0=parseInt(h.substr(N*2,2),16);if(Et(i0))return N;_[p+N]=i0}return N}function I(_,h,p,T){return Z0(At(h,_.length-p),_,p,T)}function G(_,h,p,T){return Z0(J5(h),_,p,T)}function O(_,h,p,T){return Z0(_r(h),_,p,T)}function j(_,h,p,T){return Z0(q5(h,_.length-p),_,p,T)}o.prototype.write=function(h,p,T,P){if(p===void 0)P="utf8",T=this.length,p=0;else if(T===void 0&&typeof p=="string")P=p,T=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(T)?(T=T>>>0,P===void 0&&(P="utf8")):(P=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let D=this.length-p;if((T===void 0||T>D)&&(T=D),h.length>0&&(T<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let N=!1;for(;;)switch(P){case"hex":return B(this,h,p,T);case"utf8":case"utf-8":return I(this,h,p,T);case"ascii":case"latin1":case"binary":return G(this,h,p,T);case"base64":return O(this,h,p,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,h,p,T);default:if(N)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),N=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(_,h,p){return h===0&&p===_.length?n.fromByteArray(_):n.fromByteArray(_.slice(h,p))}function X(_,h,p){p=Math.min(_.length,p);let T=[],P=h;for(;P<p;){let D=_[P],N=null,i0=D>239?4:D>223?3:D>191?2:1;if(P+i0<=p){let b0,f0,h0,c0;switch(i0){case 1:D<128&&(N=D);break;case 2:b0=_[P+1],(b0&192)===128&&(c0=(D&31)<<6|b0&63,c0>127&&(N=c0));break;case 3:b0=_[P+1],f0=_[P+2],(b0&192)===128&&(f0&192)===128&&(c0=(D&15)<<12|(b0&63)<<6|f0&63,c0>2047&&(c0<55296||c0>57343)&&(N=c0));break;case 4:b0=_[P+1],f0=_[P+2],h0=_[P+3],(b0&192)===128&&(f0&192)===128&&(h0&192)===128&&(c0=(D&15)<<18|(b0&63)<<12|(f0&63)<<6|h0&63,c0>65535&&c0<1114112&&(N=c0))}}N===null?(N=65533,i0=1):N>65535&&(N-=65536,T.push(N>>>10&1023|55296),N=56320|N&1023),T.push(N),P+=i0}return d0(T)}let t0=4096;function d0(_){let h=_.length;if(h<=t0)return String.fromCharCode.apply(String,_);let p="",T=0;for(;T<h;)p+=String.fromCharCode.apply(String,_.slice(T,T+=t0));return p}function l0(_,h,p){let T="";p=Math.min(_.length,p);for(let P=h;P<p;++P)T+=String.fromCharCode(_[P]&127);return T}function m0(_,h,p){let T="";p=Math.min(_.length,p);for(let P=h;P<p;++P)T+=String.fromCharCode(_[P]);return T}function p0(_,h,p){let T=_.length;(!h||h<0)&&(h=0),(!p||p<0||p>T)&&(p=T);let P="";for(let D=h;D<p;++D)P+=i5[_[D]];return P}function A0(_,h,p){let T=_.slice(h,p),P="";for(let D=0;D<T.length-1;D+=2)P+=String.fromCharCode(T[D]+T[D+1]*256);return P}o.prototype.slice=function(h,p){let T=this.length;h=~~h,p=p===void 0?T:~~p,h<0?(h+=T,h<0&&(h=0)):h>T&&(h=T),p<0?(p+=T,p<0&&(p=0)):p>T&&(p=T),p<h&&(p=h);let P=this.subarray(h,p);return Object.setPrototypeOf(P,o.prototype),P};function n0(_,h,p){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+h>p)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=this[h],D=1,N=0;for(;++N<p&&(D*=256);)P+=this[h+N]*D;return P},o.prototype.readUintBE=o.prototype.readUIntBE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=this[h+--p],D=1;for(;p>0&&(D*=256);)P+=this[h+--p]*D;return P},o.prototype.readUint8=o.prototype.readUInt8=function(h,p){return h=h>>>0,p||n0(h,1,this.length),this[h]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(h,p){return h=h>>>0,p||n0(h,2,this.length),this[h]|this[h+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(h,p){return h=h>>>0,p||n0(h,2,this.length),this[h]<<8|this[h+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},o.prototype.readBigUInt64LE=oe(function(h){h=h>>>0,Ce(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&Ye(h,this.length-8);let P=p+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,D=this[++h]+this[++h]*2**8+this[++h]*2**16+T*2**24;return BigInt(P)+(BigInt(D)<<BigInt(32))}),o.prototype.readBigUInt64BE=oe(function(h){h=h>>>0,Ce(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&Ye(h,this.length-8);let P=p*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],D=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+T;return(BigInt(P)<<BigInt(32))+BigInt(D)}),o.prototype.readIntLE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=this[h],D=1,N=0;for(;++N<p&&(D*=256);)P+=this[h+N]*D;return D*=128,P>=D&&(P-=Math.pow(2,8*p)),P},o.prototype.readIntBE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=p,D=1,N=this[h+--P];for(;P>0&&(D*=256);)N+=this[h+--P]*D;return D*=128,N>=D&&(N-=Math.pow(2,8*p)),N},o.prototype.readInt8=function(h,p){return h=h>>>0,p||n0(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},o.prototype.readInt16LE=function(h,p){h=h>>>0,p||n0(h,2,this.length);let T=this[h]|this[h+1]<<8;return T&32768?T|4294901760:T},o.prototype.readInt16BE=function(h,p){h=h>>>0,p||n0(h,2,this.length);let T=this[h+1]|this[h]<<8;return T&32768?T|4294901760:T},o.prototype.readInt32LE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},o.prototype.readInt32BE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},o.prototype.readBigInt64LE=oe(function(h){h=h>>>0,Ce(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&Ye(h,this.length-8);let P=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(T<<24);return(BigInt(P)<<BigInt(32))+BigInt(p+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),o.prototype.readBigInt64BE=oe(function(h){h=h>>>0,Ce(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&Ye(h,this.length-8);let P=(p<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(P)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+T)}),o.prototype.readFloatLE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),e.read(this,h,!0,23,4)},o.prototype.readFloatBE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),e.read(this,h,!1,23,4)},o.prototype.readDoubleLE=function(h,p){return h=h>>>0,p||n0(h,8,this.length),e.read(this,h,!0,52,8)},o.prototype.readDoubleBE=function(h,p){return h=h>>>0,p||n0(h,8,this.length),e.read(this,h,!1,52,8)};function Y(_,h,p,T,P,D){if(!o.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>P||h<D)throw new RangeError('"value" argument is out of bounds');if(p+T>_.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(h,p,T,P){if(h=+h,p=p>>>0,T=T>>>0,!P){let i0=Math.pow(2,8*T)-1;Y(this,h,p,T,i0,0)}let D=1,N=0;for(this[p]=h&255;++N<T&&(D*=256);)this[p+N]=h/D&255;return p+T},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(h,p,T,P){if(h=+h,p=p>>>0,T=T>>>0,!P){let i0=Math.pow(2,8*T)-1;Y(this,h,p,T,i0,0)}let D=T-1,N=1;for(this[p+D]=h&255;--D>=0&&(N*=256);)this[p+D]=h/N&255;return p+T},o.prototype.writeUint8=o.prototype.writeUInt8=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,1,255,0),this[p]=h&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,65535,0),this[p]=h&255,this[p+1]=h>>>8,p+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,65535,0),this[p]=h>>>8,this[p+1]=h&255,p+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,4294967295,0),this[p+3]=h>>>24,this[p+2]=h>>>16,this[p+1]=h>>>8,this[p]=h&255,p+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,4294967295,0),this[p]=h>>>24,this[p+1]=h>>>16,this[p+2]=h>>>8,this[p+3]=h&255,p+4};function o0(_,h,p,T,P){je(h,T,P,_,p,7);let D=Number(h&BigInt(4294967295));_[p++]=D,D=D>>8,_[p++]=D,D=D>>8,_[p++]=D,D=D>>8,_[p++]=D;let N=Number(h>>BigInt(32)&BigInt(4294967295));return _[p++]=N,N=N>>8,_[p++]=N,N=N>>8,_[p++]=N,N=N>>8,_[p++]=N,p}function g0(_,h,p,T,P){je(h,T,P,_,p,7);let D=Number(h&BigInt(4294967295));_[p+7]=D,D=D>>8,_[p+6]=D,D=D>>8,_[p+5]=D,D=D>>8,_[p+4]=D;let N=Number(h>>BigInt(32)&BigInt(4294967295));return _[p+3]=N,N=N>>8,_[p+2]=N,N=N>>8,_[p+1]=N,N=N>>8,_[p]=N,p+8}o.prototype.writeBigUInt64LE=oe(function(h,p=0){return o0(this,h,p,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=oe(function(h,p=0){return g0(this,h,p,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(h,p,T,P){if(h=+h,p=p>>>0,!P){let b0=Math.pow(2,8*T-1);Y(this,h,p,T,b0-1,-b0)}let D=0,N=1,i0=0;for(this[p]=h&255;++D<T&&(N*=256);)h<0&&i0===0&&this[p+D-1]!==0&&(i0=1),this[p+D]=(h/N>>0)-i0&255;return p+T},o.prototype.writeIntBE=function(h,p,T,P){if(h=+h,p=p>>>0,!P){let b0=Math.pow(2,8*T-1);Y(this,h,p,T,b0-1,-b0)}let D=T-1,N=1,i0=0;for(this[p+D]=h&255;--D>=0&&(N*=256);)h<0&&i0===0&&this[p+D+1]!==0&&(i0=1),this[p+D]=(h/N>>0)-i0&255;return p+T},o.prototype.writeInt8=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,1,127,-128),h<0&&(h=255+h+1),this[p]=h&255,p+1},o.prototype.writeInt16LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,32767,-32768),this[p]=h&255,this[p+1]=h>>>8,p+2},o.prototype.writeInt16BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,32767,-32768),this[p]=h>>>8,this[p+1]=h&255,p+2},o.prototype.writeInt32LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,2147483647,-2147483648),this[p]=h&255,this[p+1]=h>>>8,this[p+2]=h>>>16,this[p+3]=h>>>24,p+4},o.prototype.writeInt32BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[p]=h>>>24,this[p+1]=h>>>16,this[p+2]=h>>>8,this[p+3]=h&255,p+4},o.prototype.writeBigInt64LE=oe(function(h,p=0){return o0(this,h,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=oe(function(h,p=0){return g0(this,h,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function U0(_,h,p,T,P,D){if(p+T>_.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function O0(_,h,p,T,P){return h=+h,p=p>>>0,P||U0(_,h,p,4),e.write(_,h,p,T,23,4),p+4}o.prototype.writeFloatLE=function(h,p,T){return O0(this,h,p,!0,T)},o.prototype.writeFloatBE=function(h,p,T){return O0(this,h,p,!1,T)};function $0(_,h,p,T,P){return h=+h,p=p>>>0,P||U0(_,h,p,8),e.write(_,h,p,T,52,8),p+8}o.prototype.writeDoubleLE=function(h,p,T){return $0(this,h,p,!0,T)},o.prototype.writeDoubleBE=function(h,p,T){return $0(this,h,p,!1,T)},o.prototype.copy=function(h,p,T,P){if(!o.isBuffer(h))throw new TypeError("argument should be a Buffer");if(T||(T=0),!P&&P!==0&&(P=this.length),p>=h.length&&(p=h.length),p||(p=0),P>0&&P<T&&(P=T),P===T||h.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),h.length-p<P-T&&(P=h.length-p+T);let D=P-T;return this===h&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,T,P):Uint8Array.prototype.set.call(h,this.subarray(T,P),p),D},o.prototype.fill=function(h,p,T,P){if(typeof h=="string"){if(typeof p=="string"?(P=p,p=0,T=this.length):typeof T=="string"&&(P=T,T=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!o.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(h.length===1){let N=h.charCodeAt(0);(P==="utf8"&&N<128||P==="latin1")&&(h=N)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(p<0||this.length<p||this.length<T)throw new RangeError("Out of range index");if(T<=p)return this;p=p>>>0,T=T===void 0?this.length:T>>>0,h||(h=0);let D;if(typeof h=="number")for(D=p;D<T;++D)this[D]=h;else{let N=o.isBuffer(h)?h:o.from(h,P),i0=N.length;if(i0===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(D=0;D<T-p;++D)this[D+p]=N[D%i0]}return this};let u0={};function fe(_,h,p){u0[_]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}fe("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),fe("ERR_INVALID_ARG_TYPE",function(_,h){return`The "${_}" argument must be of type number. Received type ${typeof h}`},TypeError),fe("ERR_OUT_OF_RANGE",function(_,h,p){let T=`The value of "${_}" is out of range.`,P=p;return Number.isInteger(p)&&Math.abs(p)>2**32?P=t5(String(p)):typeof p=="bigint"&&(P=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(P=t5(P)),P+="n"),T+=` It must be ${h}. Received ${P}`,T},RangeError);function t5(_){let h="",p=_.length,T=_[0]==="-"?1:0;for(;p>=T+4;p-=3)h=`_${_.slice(p-3,p)}${h}`;return`${_.slice(0,p)}${h}`}function r5(_,h,p){Ce(h,"offset"),(_[h]===void 0||_[h+p]===void 0)&&Ye(h,_.length-(p+1))}function je(_,h,p,T,P,D){if(_>p||_<h){let N=typeof h=="bigint"?"n":"",i0;throw h===0||h===BigInt(0)?i0=`>= 0${N} and < 2${N} ** ${(D+1)*8}${N}`:i0=`>= -(2${N} ** ${(D+1)*8-1}${N}) and < 2 ** ${(D+1)*8-1}${N}`,new u0.ERR_OUT_OF_RANGE("value",i0,_)}r5(T,P,D)}function Ce(_,h){if(typeof _!="number")throw new u0.ERR_INVALID_ARG_TYPE(h,"number",_)}function Ye(_,h,p){throw Math.floor(_)!==_?(Ce(_,p),new u0.ERR_OUT_OF_RANGE("offset","an integer",_)):h<0?new u0.ERR_BUFFER_OUT_OF_BOUNDS:new u0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,_)}let K5=/[^+/0-9A-Za-z-_]/g;function Qe(_){if(_=_.split("=")[0],_=_.trim().replace(K5,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function At(_,h){h=h||1/0;let p,T=_.length,P=null,D=[];for(let N=0;N<T;++N){if(p=_.charCodeAt(N),p>55295&&p<57344){if(!P){if(p>56319){(h-=3)>-1&&D.push(239,191,189);continue}else if(N+1===T){(h-=3)>-1&&D.push(239,191,189);continue}P=p;continue}if(p<56320){(h-=3)>-1&&D.push(239,191,189),P=p;continue}p=(P-55296<<10|p-56320)+65536}else P&&(h-=3)>-1&&D.push(239,191,189);if(P=null,p<128){if((h-=1)<0)break;D.push(p)}else if(p<2048){if((h-=2)<0)break;D.push(p>>6|192,p&63|128)}else if(p<65536){if((h-=3)<0)break;D.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((h-=4)<0)break;D.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return D}function J5(_){let h=[];for(let p=0;p<_.length;++p)h.push(_.charCodeAt(p)&255);return h}function q5(_,h){let p,T,P,D=[];for(let N=0;N<_.length&&!((h-=2)<0);++N)p=_.charCodeAt(N),T=p>>8,P=p%256,D.push(P),D.push(T);return D}function _r(_){return n.toByteArray(Qe(_))}function Z0(_,h,p,T){let P;for(P=0;P<T&&!(P+p>=h.length||P>=_.length);++P)h[P+p]=_[P];return P}function S0(_,h){return _ instanceof h||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===h.name}function Et(_){return _!==_}let i5=function(){let _="0123456789abcdef",h=new Array(256);for(let p=0;p<16;++p){let T=p*16;for(let P=0;P<16;++P)h[T+P]=_[p]+_[P]}return h}();function oe(_){return typeof BigInt>"u"?xt:_}function xt(){throw new Error("BigInt not supported")}return Je}var o5,O2,t1,F2,Je,D2,L2=ee(()=>{E();x();k();R();o5={},O2=!1;t1={},F2=!1;Je={},D2=!1});var qe,z,Fl,Dl,U2=ee(()=>{E();x();k();R();L2();qe=z2();qe.Buffer;qe.SlowBuffer;qe.INSPECT_MAX_BYTES;qe.kMaxLength;z=qe.Buffer,Fl=qe.INSPECT_MAX_BYTES,Dl=qe.kMaxLength});var k=ee(()=>{U2()});var ps=ie((Lr,Ur)=>{E();x();k();R();(function(n,e){typeof Lr=="object"&&typeof Ur<"u"?Ur.exports=e():typeof define=="function"&&define.amd?define(e):n.Stats=e()})(Lr,function(){var n=function(){function e(d){return i.appendChild(d.dom),d}function t(d){for(var f=0;f<i.children.length;f++)i.children[f].style.display=f===d?"block":"none";r=d}var r=0,i=document.createElement("div");i.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",i.addEventListener("click",function(d){d.preventDefault(),t(++r%i.children.length)},!1);var s=(performance||Date).now(),o=s,a=0,v=e(new n.Panel("FPS","#0ff","#002")),l=e(new n.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new n.Panel("MB","#f08","#201"));return t(0),{REVISION:16,dom:i,addPanel:e,showPanel:t,begin:function(){s=(performance||Date).now()},end:function(){a++;var d=(performance||Date).now();if(l.update(d-s,200),d>o+1e3&&(v.update(1e3*a/(d-o),100),o=d,a=0,c)){var f=performance.memory;c.update(f.usedJSHeapSize/1048576,f.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:i,setMode:t}};return n.Panel=function(e,t,r){var i=1/0,s=0,o=Math.round,a=o(window.devicePixelRatio||1),v=80*a,l=48*a,c=3*a,d=2*a,f=3*a,m=15*a,g=74*a,b=30*a,w=document.createElement("canvas");w.width=v,w.height=l,w.style.cssText="width:80px;height:48px";var y=w.getContext("2d");return y.font="bold "+9*a+"px Helvetica,Arial,sans-serif",y.textBaseline="top",y.fillStyle=r,y.fillRect(0,0,v,l),y.fillStyle=t,y.fillText(e,c,d),y.fillRect(f,m,g,b),y.fillStyle=r,y.globalAlpha=.9,y.fillRect(f,m,g,b),{dom:w,update:function(A,C){i=Math.min(i,A),s=Math.max(s,A),y.fillStyle=r,y.globalAlpha=1,y.fillRect(0,0,v,m),y.fillStyle=t,y.fillText(o(A)+" "+e+" ("+o(i)+"-"+o(s)+")",c,d),y.drawImage(w,f+a,m,g-a,b,f,m,g-a,b),y.fillRect(f+g-a,m,a,b),y.fillStyle=r,y.globalAlpha=.9,y.fillRect(f+g-a,m,a,o((1-A/C)*b))}}},n})});var Ss=ie((Ms,E1)=>{E();x();k();R();(function(n,e){typeof E1=="object"&&E1.exports?E1.exports=e():n.nearley=e()})(Ms,function(){function n(v,l,c){return this.id=++n.highestId,this.name=v,this.symbols=l,this.postprocess=c,this}n.highestId=0,n.prototype.toString=function(v){var l=typeof v>"u"?this.symbols.map(a).join(" "):this.symbols.slice(0,v).map(a).join(" ")+" \u25CF "+this.symbols.slice(v).map(a).join(" ");return this.name+" \u2192 "+l};function e(v,l,c,d){this.rule=v,this.dot=l,this.reference=c,this.data=[],this.wantedBy=d,this.isComplete=this.dot===v.symbols.length}e.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},e.prototype.nextState=function(v){var l=new e(this.rule,this.dot+1,this.reference,this.wantedBy);return l.left=this,l.right=v,l.isComplete&&(l.data=l.build(),l.right=void 0),l},e.prototype.build=function(){var v=[],l=this;do v.push(l.right.data),l=l.left;while(l.left);return v.reverse(),v},e.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function t(v,l){this.grammar=v,this.index=l,this.states=[],this.wants={},this.scannable=[],this.completed={}}t.prototype.process=function(v){for(var l=this.states,c=this.wants,d=this.completed,f=0;f<l.length;f++){var m=l[f];if(m.isComplete){if(m.finish(),m.data!==s.fail){for(var g=m.wantedBy,b=g.length;b--;){var w=g[b];this.complete(w,m)}if(m.reference===this.index){var y=m.rule.name;(this.completed[y]=this.completed[y]||[]).push(m)}}}else{var y=m.rule.symbols[m.dot];if(typeof y!="string"){this.scannable.push(m);continue}if(c[y]){if(c[y].push(m),d.hasOwnProperty(y))for(var A=d[y],b=0;b<A.length;b++){var C=A[b];this.complete(m,C)}}else c[y]=[m],this.predict(y)}}},t.prototype.predict=function(v){for(var l=this.grammar.byName[v]||[],c=0;c<l.length;c++){var d=l[c],f=this.wants[v],m=new e(d,0,this.index,f);this.states.push(m)}},t.prototype.complete=function(v,l){var c=v.nextState(l);this.states.push(c)};function r(v,l){this.rules=v,this.start=l||this.rules[0].name;var c=this.byName={};this.rules.forEach(function(d){c.hasOwnProperty(d.name)||(c[d.name]=[]),c[d.name].push(d)})}r.fromCompiled=function(d,l){var c=d.Lexer;d.ParserStart&&(l=d.ParserStart,d=d.ParserRules);var d=d.map(function(m){return new n(m.name,m.symbols,m.postprocess)}),f=new r(d,l);return f.lexer=c,f};function i(){this.reset("")}i.prototype.reset=function(v,l){this.buffer=v,this.index=0,this.line=l?l.line:1,this.lastLineBreak=l?-l.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var v=this.buffer[this.index++];return v===`
2
- `&&(this.line+=1,this.lastLineBreak=this.index),{value:v}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(v,l){var c=this.buffer;if(typeof c=="string"){var d=c.split(`
1
+ var Ca=Object.create;var t5=Object.defineProperty;var Ba=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var Ia=Object.getPrototypeOf,Ha=Object.prototype.hasOwnProperty;var Oa=(n,e,t)=>e in n?t5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Fa=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var X0=(n,e)=>()=>(n&&(e=n(n=0)),e);var te=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),j5=(n,e)=>{for(var t in e)t5(n,t,{get:e[t],enumerable:!0})},$i=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Pa(e))!Ha.call(n,i)&&i!==t&&t5(n,i,{get:()=>e[i],enumerable:!(r=Ba(e,i))||r.enumerable});return n};var r5=(n,e,t)=>(t=n!=null?Ca(Ia(n)):{},$i(e||!n||!n.__esModule?t5(t,"default",{value:n,enumerable:!0}):t,n)),Da=n=>$i(t5({},"__esModule",{value:!0}),n);var d=(n,e,t)=>(Oa(n,typeof e!="symbol"?e+"":e,t),t);var E=X0(()=>{});var x=X0(()=>{});var F={};j5(F,{_debugEnd:()=>Wn,_debugProcess:()=>Nn,_events:()=>s2,_eventsCount:()=>o2,_exiting:()=>En,_fatalExceptions:()=>zn,_getActiveHandles:()=>Tn,_getActiveRequests:()=>kn,_kill:()=>Sn,_linkedBinding:()=>wn,_maxListeners:()=>n2,_preload_modules:()=>t2,_rawDebug:()=>yn,_startProfilerIdleNotifier:()=>Vn,_stopProfilerIdleNotifier:()=>jn,_tickCallback:()=>Gn,abort:()=>Jn,addListener:()=>a2,allowedNodeEnvironmentFlags:()=>On,arch:()=>sn,argv:()=>vn,argv0:()=>e2,assert:()=>Fn,binding:()=>fn,browser:()=>bn,chdir:()=>pn,config:()=>xn,cpuUsage:()=>K5,cwd:()=>mn,debugPort:()=>$n,default:()=>p2,dlopen:()=>Rn,domain:()=>An,emit:()=>u2,emitWarning:()=>un,env:()=>an,execArgv:()=>ln,execPath:()=>Xn,exit:()=>In,features:()=>Dn,hasUncaughtExceptionCaptureCallback:()=>Un,hrtime:()=>Q5,kill:()=>Pn,listeners:()=>m2,memoryUsage:()=>Bn,moduleLoadList:()=>_n,nextTick:()=>tn,off:()=>l2,on:()=>ye,once:()=>v2,openStdin:()=>Hn,pid:()=>qn,platform:()=>on,ppid:()=>Zn,prependListener:()=>f2,prependOnceListener:()=>h2,reallyExit:()=>Mn,release:()=>gn,removeAllListeners:()=>d2,removeListener:()=>c2,resourceUsage:()=>Cn,setSourceMapsEnabled:()=>r2,setUncaughtExceptionCaptureCallback:()=>Ln,stderr:()=>Qn,stdin:()=>Kn,stdout:()=>Yn,title:()=>nn,umask:()=>hn,uptime:()=>i2,version:()=>cn,versions:()=>dn});function fr(n){throw new Error("Node.js process "+n+" is not supported by JSPM core outside of Node.js")}function za(){!At||!je||(At=!1,je.length?be=je.concat(be):Y5=-1,be.length&&en())}function en(){if(!At){var n=setTimeout(za,0);At=!0;for(var e=be.length;e;){for(je=be,be=[];++Y5<e;)je&&je[Y5].run();Y5=-1,e=be.length}je=null,At=!1,clearTimeout(n)}}function tn(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];be.push(new rn(n,e)),be.length===1&&!At&&setTimeout(en,0)}function rn(n,e){this.fun=n,this.array=e}function W0(){}function wn(n){fr("_linkedBinding")}function Rn(n){fr("dlopen")}function kn(){return[]}function Tn(){return[]}function Fn(n,e){if(!n)throw new Error(e||"assertion error")}function Un(){return!1}function i2(){return Se.now()/1e3}function Q5(n){var e=Math.floor((Date.now()-Se.now())*.001),t=Se.now()*.001,r=Math.floor(t)+e,i=Math.floor(t%1*1e9);return n&&(r=r-n[0],i=i-n[1],i<0&&(r--,i+=ur)),[r,i]}function ye(){return p2}function m2(n){return[]}var be,At,je,Y5,nn,sn,on,an,vn,ln,cn,dn,un,fn,hn,mn,pn,gn,bn,yn,_n,An,En,xn,Mn,Sn,K5,Cn,Bn,Pn,In,Hn,On,Dn,zn,Ln,Gn,Nn,Wn,Vn,jn,Yn,Qn,Kn,Jn,qn,Zn,Xn,$n,e2,t2,r2,Se,dr,ur,n2,s2,o2,a2,v2,l2,c2,d2,u2,f2,h2,p2,g2=X0(()=>{E();x();k();R();be=[],At=!1,Y5=-1;rn.prototype.run=function(){this.fun.apply(null,this.array)};nn="browser",sn="x64",on="browser",an={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},vn=["/usr/bin/node"],ln=[],cn="v16.8.0",dn={},un=function(n,e){},fn=function(n){fr("binding")},hn=function(n){return 0},mn=function(){return"/"},pn=function(n){},gn={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};bn=!0,yn=W0,_n=[];An={},En=!1,xn={};Mn=W0,Sn=W0,K5=function(){return{}},Cn=K5,Bn=K5,Pn=W0,In=W0,Hn=W0,On={};Dn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},zn=W0,Ln=W0;Gn=W0,Nn=W0,Wn=W0,Vn=W0,jn=W0,Yn=void 0,Qn=void 0,Kn=void 0,Jn=W0,qn=2,Zn=1,Xn="/bin/usr/node",$n=9229,e2="node",t2=[],r2=W0,Se={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Se.now===void 0&&(dr=Date.now(),Se.timing&&Se.timing.navigationStart&&(dr=Se.timing.navigationStart),Se.now=()=>Date.now()-dr);ur=1e9;Q5.bigint=function(n){var e=Q5(n);return typeof BigInt>"u"?e[0]*ur+e[1]:BigInt(e[0]*ur)+BigInt(e[1])};n2=10,s2={},o2=0;a2=ye,v2=ye,l2=ye,c2=ye,d2=ye,u2=W0,f2=ye,h2=ye;p2={version:cn,versions:dn,arch:sn,platform:on,browser:bn,release:gn,_rawDebug:yn,moduleLoadList:_n,binding:fn,_linkedBinding:wn,_events:s2,_eventsCount:o2,_maxListeners:n2,on:ye,addListener:a2,once:v2,off:l2,removeListener:c2,removeAllListeners:d2,emit:u2,prependListener:f2,prependOnceListener:h2,listeners:m2,domain:An,_exiting:En,config:xn,dlopen:Rn,uptime:i2,_getActiveRequests:kn,_getActiveHandles:Tn,reallyExit:Mn,_kill:Sn,cpuUsage:K5,resourceUsage:Cn,memoryUsage:Bn,kill:Pn,exit:In,openStdin:Hn,allowedNodeEnvironmentFlags:On,assert:Fn,features:Dn,_fatalExceptions:zn,setUncaughtExceptionCaptureCallback:Ln,hasUncaughtExceptionCaptureCallback:Un,emitWarning:un,nextTick:tn,_tickCallback:Gn,_debugProcess:Nn,_debugEnd:Wn,_startProfilerIdleNotifier:Vn,_stopProfilerIdleNotifier:jn,stdout:Yn,stdin:Kn,stderr:Qn,abort:Jn,umask:hn,chdir:pn,cwd:mn,env:an,title:nn,argv:vn,execArgv:ln,pid:qn,ppid:Zn,execPath:Xn,debugPort:$n,hrtime:Q5,argv0:e2,_preload_modules:t2,setSourceMapsEnabled:r2}});var R=X0(()=>{g2()});function La(){if(b2)return i5;b2=!0,i5.byteLength=v,i5.toByteArray=l,i5.fromByteArray=f;for(var n=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=r.length;i<s;++i)n[i]=r[i],e[r.charCodeAt(i)]=i;e[45]=62,e[95]=63;function o(m){var g=m.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=m.indexOf("=");y===-1&&(y=g);var w=y===g?0:4-y%4;return[y,w]}function v(m){var g=o(m),y=g[0],w=g[1];return(y+w)*3/4-w}function a(m,g,y){return(g+y)*3/4-y}function l(m){var g,y=o(m),w=y[0],b=y[1],A=new t(a(m,w,b)),C=0,M=b>0?w-4:w,S;for(S=0;S<M;S+=4)g=e[m.charCodeAt(S)]<<18|e[m.charCodeAt(S+1)]<<12|e[m.charCodeAt(S+2)]<<6|e[m.charCodeAt(S+3)],A[C++]=g>>16&255,A[C++]=g>>8&255,A[C++]=g&255;return b===2&&(g=e[m.charCodeAt(S)]<<2|e[m.charCodeAt(S+1)]>>4,A[C++]=g&255),b===1&&(g=e[m.charCodeAt(S)]<<10|e[m.charCodeAt(S+1)]<<4|e[m.charCodeAt(S+2)]>>2,A[C++]=g>>8&255,A[C++]=g&255),A}function c(m){return n[m>>18&63]+n[m>>12&63]+n[m>>6&63]+n[m&63]}function u(m,g,y){for(var w,b=[],A=g;A<y;A+=3)w=(m[A]<<16&16711680)+(m[A+1]<<8&65280)+(m[A+2]&255),b.push(c(w));return b.join("")}function f(m){for(var g,y=m.length,w=y%3,b=[],A=16383,C=0,M=y-w;C<M;C+=A)b.push(u(m,C,C+A>M?M:C+A));return w===1?(g=m[y-1],b.push(n[g>>2]+n[g<<4&63]+"==")):w===2&&(g=(m[y-2]<<8)+m[y-1],b.push(n[g>>10]+n[g>>4&63]+n[g<<2&63]+"=")),b.join("")}return i5}function Ua(){if(y2)return J5;y2=!0;return J5.read=function(n,e,t,r,i){var s,o,v=i*8-r-1,a=(1<<v)-1,l=a>>1,c=-7,u=t?i-1:0,f=t?-1:1,m=n[e+u];for(u+=f,s=m&(1<<-c)-1,m>>=-c,c+=v;c>0;s=s*256+n[e+u],u+=f,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=o*256+n[e+u],u+=f,c-=8);if(s===0)s=1-l;else{if(s===a)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-l}return(m?-1:1)*o*Math.pow(2,s-r)},J5.write=function(n,e,t,r,i,s){var o,v,a,l=s*8-i-1,c=(1<<l)-1,u=c>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:s-1,g=r?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+u>=1?e+=f/a:e+=f*Math.pow(2,1-u),e*a>=2&&(o++,a/=2),o+u>=c?(v=0,o=c):o+u>=1?(v=(e*a-1)*Math.pow(2,i),o=o+u):(v=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;n[t+m]=v&255,m+=g,v/=256,i-=8);for(o=o<<i|v,l+=i;l>0;n[t+m]=o&255,m+=g,o/=256,l-=8);n[t+m-g]|=y*128},J5}function w2(){if(_2)return Ye;_2=!0;let n=La(),e=Ua(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=o,Ye.SlowBuffer=b,Ye.INSPECT_MAX_BYTES=50;let r=2147483647;Ye.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u";function i(){try{let _=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(_,h),_.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(_){if(_>r)throw new RangeError('The value "'+_+'" is invalid for option "size"');let h=new Uint8Array(_);return Object.setPrototypeOf(h,o.prototype),h}function o(_,h,p){if(typeof _=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(_)}return v(_,h,p)}o.poolSize=8192;function v(_,h,p){if(typeof _=="string")return u(_,h);if(ArrayBuffer.isView(_))return m(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(S0(_,ArrayBuffer)||_&&S0(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(S0(_,SharedArrayBuffer)||_&&S0(_.buffer,SharedArrayBuffer)))return g(_,h,p);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let T=_.valueOf&&_.valueOf();if(T!=null&&T!==_)return o.from(T,h,p);let P=y(_);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return o.from(_[Symbol.toPrimitive]("string"),h,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}o.from=function(_,h,p){return v(_,h,p)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function a(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function l(_,h,p){return a(_),_<=0?s(_):h!==void 0?typeof p=="string"?s(_).fill(h,p):s(_).fill(h):s(_)}o.alloc=function(_,h,p){return l(_,h,p)};function c(_){return a(_),s(_<0?0:w(_)|0)}o.allocUnsafe=function(_){return c(_)},o.allocUnsafeSlow=function(_){return c(_)};function u(_,h){if((typeof h!="string"||h==="")&&(h="utf8"),!o.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let p=A(_,h)|0,T=s(p),P=T.write(_,h);return P!==p&&(T=T.slice(0,P)),T}function f(_){let h=_.length<0?0:w(_.length)|0,p=s(h);for(let T=0;T<h;T+=1)p[T]=_[T]&255;return p}function m(_){if(S0(_,Uint8Array)){let h=new Uint8Array(_);return g(h.buffer,h.byteOffset,h.byteLength)}return f(_)}function g(_,h,p){if(h<0||_.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<h+(p||0))throw new RangeError('"length" is outside of buffer bounds');let T;return h===void 0&&p===void 0?T=new Uint8Array(_):p===void 0?T=new Uint8Array(_,h):T=new Uint8Array(_,h,p),Object.setPrototypeOf(T,o.prototype),T}function y(_){if(o.isBuffer(_)){let h=w(_.length)|0,p=s(h);return p.length===0||_.copy(p,0,0,h),p}if(_.length!==void 0)return typeof _.length!="number"||_t(_.length)?s(0):f(_);if(_.type==="Buffer"&&Array.isArray(_.data))return f(_.data)}function w(_){if(_>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return _|0}function b(_){return+_!=_&&(_=0),o.alloc(+_)}o.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==o.prototype},o.compare=function(h,p){if(S0(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),S0(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(h)||!o.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===p)return 0;let T=h.length,P=p.length;for(let D=0,N=Math.min(T,P);D<N;++D)if(h[D]!==p[D]){T=h[D],P=p[D];break}return T<P?-1:P<T?1:0},o.isEncoding=function(h){switch(String(h).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(h,p){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return o.alloc(0);let T;if(p===void 0)for(p=0,T=0;T<h.length;++T)p+=h[T].length;let P=o.allocUnsafe(p),D=0;for(T=0;T<h.length;++T){let N=h[T];if(S0(N,Uint8Array))D+N.length>P.length?(o.isBuffer(N)||(N=o.from(N)),N.copy(P,D)):Uint8Array.prototype.set.call(P,N,D);else if(o.isBuffer(N))N.copy(P,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=N.length}return P};function A(_,h){if(o.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||S0(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);let p=_.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&p===0)return 0;let P=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return yt(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return cr(_).length;default:if(P)return T?-1:yt(_).length;h=(""+h).toLowerCase(),P=!0}}o.byteLength=A;function C(_,h,p){let T=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,h>>>=0,p<=h))return"";for(_||(_="utf8");;)switch(_){case"hex":return p0(this,h,p);case"utf8":case"utf-8":return X(this,h,p);case"ascii":return l0(this,h,p);case"latin1":case"binary":return m0(this,h,p);case"base64":return J(this,h,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E0(this,h,p);default:if(T)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(_,h,p){let T=_[h];_[h]=_[p],_[p]=T}o.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<h;p+=2)M(this,p,p+1);return this},o.prototype.swap32=function(){let h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<h;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},o.prototype.swap64=function(){let h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<h;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},o.prototype.toString=function(){let h=this.length;return h===0?"":arguments.length===0?X(this,0,h):C.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(h){if(!o.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:o.compare(this,h)===0},o.prototype.inspect=function(){let h="",p=Ye.INSPECT_MAX_BYTES;return h=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(h+=" ... "),"<Buffer "+h+">"},t&&(o.prototype[t]=o.prototype.inspect),o.prototype.compare=function(h,p,T,P,D){if(S0(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(p===void 0&&(p=0),T===void 0&&(T=h?h.length:0),P===void 0&&(P=0),D===void 0&&(D=this.length),p<0||T>h.length||P<0||D>this.length)throw new RangeError("out of range index");if(P>=D&&p>=T)return 0;if(P>=D)return-1;if(p>=T)return 1;if(p>>>=0,T>>>=0,P>>>=0,D>>>=0,this===h)return 0;let N=D-P,i0=T-p,b0=Math.min(N,i0),f0=this.slice(P,D),h0=h.slice(p,T);for(let c0=0;c0<b0;++c0)if(f0[c0]!==h0[c0]){N=f0[c0],i0=h0[c0];break}return N<i0?-1:i0<N?1:0};function S(_,h,p,T,P){if(_.length===0)return-1;if(typeof p=="string"?(T=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=P?0:_.length-1),p<0&&(p=_.length+p),p>=_.length){if(P)return-1;p=_.length-1}else if(p<0)if(P)p=0;else return-1;if(typeof h=="string"&&(h=o.from(h,T)),o.isBuffer(h))return h.length===0?-1:H(_,h,p,T,P);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(_,h,p):Uint8Array.prototype.lastIndexOf.call(_,h,p):H(_,[h],p,T,P);throw new TypeError("val must be string, number or Buffer")}function H(_,h,p,T,P){let D=1,N=_.length,i0=h.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(_.length<2||h.length<2)return-1;D=2,N/=2,i0/=2,p/=2}function b0(h0,c0){return D===1?h0[c0]:h0.readUInt16BE(c0*D)}let f0;if(P){let h0=-1;for(f0=p;f0<N;f0++)if(b0(_,f0)===b0(h,h0===-1?0:f0-h0)){if(h0===-1&&(h0=f0),f0-h0+1===i0)return h0*D}else h0!==-1&&(f0-=f0-h0),h0=-1}else for(p+i0>N&&(p=N-i0),f0=p;f0>=0;f0--){let h0=!0;for(let c0=0;c0<i0;c0++)if(b0(_,f0+c0)!==b0(h,c0)){h0=!1;break}if(h0)return f0}return-1}o.prototype.includes=function(h,p,T){return this.indexOf(h,p,T)!==-1},o.prototype.indexOf=function(h,p,T){return S(this,h,p,T,!0)},o.prototype.lastIndexOf=function(h,p,T){return S(this,h,p,T,!1)};function B(_,h,p,T){p=Number(p)||0;let P=_.length-p;T?(T=Number(T),T>P&&(T=P)):T=P;let D=h.length;T>D/2&&(T=D/2);let N;for(N=0;N<T;++N){let i0=parseInt(h.substr(N*2,2),16);if(_t(i0))return N;_[p+N]=i0}return N}function I(_,h,p,T){return J0(yt(h,_.length-p),_,p,T)}function G(_,h,p,T){return J0(W5(h),_,p,T)}function O(_,h,p,T){return J0(cr(h),_,p,T)}function j(_,h,p,T){return J0(V5(h,_.length-p),_,p,T)}o.prototype.write=function(h,p,T,P){if(p===void 0)P="utf8",T=this.length,p=0;else if(T===void 0&&typeof p=="string")P=p,T=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(T)?(T=T>>>0,P===void 0&&(P="utf8")):(P=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let D=this.length-p;if((T===void 0||T>D)&&(T=D),h.length>0&&(T<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let N=!1;for(;;)switch(P){case"hex":return B(this,h,p,T);case"utf8":case"utf-8":return I(this,h,p,T);case"ascii":case"latin1":case"binary":return G(this,h,p,T);case"base64":return O(this,h,p,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,h,p,T);default:if(N)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),N=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(_,h,p){return h===0&&p===_.length?n.fromByteArray(_):n.fromByteArray(_.slice(h,p))}function X(_,h,p){p=Math.min(_.length,p);let T=[],P=h;for(;P<p;){let D=_[P],N=null,i0=D>239?4:D>223?3:D>191?2:1;if(P+i0<=p){let b0,f0,h0,c0;switch(i0){case 1:D<128&&(N=D);break;case 2:b0=_[P+1],(b0&192)===128&&(c0=(D&31)<<6|b0&63,c0>127&&(N=c0));break;case 3:b0=_[P+1],f0=_[P+2],(b0&192)===128&&(f0&192)===128&&(c0=(D&15)<<12|(b0&63)<<6|f0&63,c0>2047&&(c0<55296||c0>57343)&&(N=c0));break;case 4:b0=_[P+1],f0=_[P+2],h0=_[P+3],(b0&192)===128&&(f0&192)===128&&(h0&192)===128&&(c0=(D&15)<<18|(b0&63)<<12|(f0&63)<<6|h0&63,c0>65535&&c0<1114112&&(N=c0))}}N===null?(N=65533,i0=1):N>65535&&(N-=65536,T.push(N>>>10&1023|55296),N=56320|N&1023),T.push(N),P+=i0}return d0(T)}let t0=4096;function d0(_){let h=_.length;if(h<=t0)return String.fromCharCode.apply(String,_);let p="",T=0;for(;T<h;)p+=String.fromCharCode.apply(String,_.slice(T,T+=t0));return p}function l0(_,h,p){let T="";p=Math.min(_.length,p);for(let P=h;P<p;++P)T+=String.fromCharCode(_[P]&127);return T}function m0(_,h,p){let T="";p=Math.min(_.length,p);for(let P=h;P<p;++P)T+=String.fromCharCode(_[P]);return T}function p0(_,h,p){let T=_.length;(!h||h<0)&&(h=0),(!p||p<0||p>T)&&(p=T);let P="";for(let D=h;D<p;++D)P+=e5[_[D]];return P}function E0(_,h,p){let T=_.slice(h,p),P="";for(let D=0;D<T.length-1;D+=2)P+=String.fromCharCode(T[D]+T[D+1]*256);return P}o.prototype.slice=function(h,p){let T=this.length;h=~~h,p=p===void 0?T:~~p,h<0?(h+=T,h<0&&(h=0)):h>T&&(h=T),p<0?(p+=T,p<0&&(p=0)):p>T&&(p=T),p<h&&(p=h);let P=this.subarray(h,p);return Object.setPrototypeOf(P,o.prototype),P};function n0(_,h,p){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+h>p)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=this[h],D=1,N=0;for(;++N<p&&(D*=256);)P+=this[h+N]*D;return P},o.prototype.readUintBE=o.prototype.readUIntBE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=this[h+--p],D=1;for(;p>0&&(D*=256);)P+=this[h+--p]*D;return P},o.prototype.readUint8=o.prototype.readUInt8=function(h,p){return h=h>>>0,p||n0(h,1,this.length),this[h]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(h,p){return h=h>>>0,p||n0(h,2,this.length),this[h]|this[h+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(h,p){return h=h>>>0,p||n0(h,2,this.length),this[h]<<8|this[h+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},o.prototype.readBigUInt64LE=se(function(h){h=h>>>0,Me(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&We(h,this.length-8);let P=p+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,D=this[++h]+this[++h]*2**8+this[++h]*2**16+T*2**24;return BigInt(P)+(BigInt(D)<<BigInt(32))}),o.prototype.readBigUInt64BE=se(function(h){h=h>>>0,Me(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&We(h,this.length-8);let P=p*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],D=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+T;return(BigInt(P)<<BigInt(32))+BigInt(D)}),o.prototype.readIntLE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=this[h],D=1,N=0;for(;++N<p&&(D*=256);)P+=this[h+N]*D;return D*=128,P>=D&&(P-=Math.pow(2,8*p)),P},o.prototype.readIntBE=function(h,p,T){h=h>>>0,p=p>>>0,T||n0(h,p,this.length);let P=p,D=1,N=this[h+--P];for(;P>0&&(D*=256);)N+=this[h+--P]*D;return D*=128,N>=D&&(N-=Math.pow(2,8*p)),N},o.prototype.readInt8=function(h,p){return h=h>>>0,p||n0(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},o.prototype.readInt16LE=function(h,p){h=h>>>0,p||n0(h,2,this.length);let T=this[h]|this[h+1]<<8;return T&32768?T|4294901760:T},o.prototype.readInt16BE=function(h,p){h=h>>>0,p||n0(h,2,this.length);let T=this[h+1]|this[h]<<8;return T&32768?T|4294901760:T},o.prototype.readInt32LE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},o.prototype.readInt32BE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},o.prototype.readBigInt64LE=se(function(h){h=h>>>0,Me(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&We(h,this.length-8);let P=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(T<<24);return(BigInt(P)<<BigInt(32))+BigInt(p+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),o.prototype.readBigInt64BE=se(function(h){h=h>>>0,Me(h,"offset");let p=this[h],T=this[h+7];(p===void 0||T===void 0)&&We(h,this.length-8);let P=(p<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(P)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+T)}),o.prototype.readFloatLE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),e.read(this,h,!0,23,4)},o.prototype.readFloatBE=function(h,p){return h=h>>>0,p||n0(h,4,this.length),e.read(this,h,!1,23,4)},o.prototype.readDoubleLE=function(h,p){return h=h>>>0,p||n0(h,8,this.length),e.read(this,h,!0,52,8)},o.prototype.readDoubleBE=function(h,p){return h=h>>>0,p||n0(h,8,this.length),e.read(this,h,!1,52,8)};function Y(_,h,p,T,P,D){if(!o.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>P||h<D)throw new RangeError('"value" argument is out of bounds');if(p+T>_.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(h,p,T,P){if(h=+h,p=p>>>0,T=T>>>0,!P){let i0=Math.pow(2,8*T)-1;Y(this,h,p,T,i0,0)}let D=1,N=0;for(this[p]=h&255;++N<T&&(D*=256);)this[p+N]=h/D&255;return p+T},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(h,p,T,P){if(h=+h,p=p>>>0,T=T>>>0,!P){let i0=Math.pow(2,8*T)-1;Y(this,h,p,T,i0,0)}let D=T-1,N=1;for(this[p+D]=h&255;--D>=0&&(N*=256);)this[p+D]=h/N&255;return p+T},o.prototype.writeUint8=o.prototype.writeUInt8=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,1,255,0),this[p]=h&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,65535,0),this[p]=h&255,this[p+1]=h>>>8,p+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,65535,0),this[p]=h>>>8,this[p+1]=h&255,p+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,4294967295,0),this[p+3]=h>>>24,this[p+2]=h>>>16,this[p+1]=h>>>8,this[p]=h&255,p+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,4294967295,0),this[p]=h>>>24,this[p+1]=h>>>16,this[p+2]=h>>>8,this[p+3]=h&255,p+4};function o0(_,h,p,T,P){Ne(h,T,P,_,p,7);let D=Number(h&BigInt(4294967295));_[p++]=D,D=D>>8,_[p++]=D,D=D>>8,_[p++]=D,D=D>>8,_[p++]=D;let N=Number(h>>BigInt(32)&BigInt(4294967295));return _[p++]=N,N=N>>8,_[p++]=N,N=N>>8,_[p++]=N,N=N>>8,_[p++]=N,p}function g0(_,h,p,T,P){Ne(h,T,P,_,p,7);let D=Number(h&BigInt(4294967295));_[p+7]=D,D=D>>8,_[p+6]=D,D=D>>8,_[p+5]=D,D=D>>8,_[p+4]=D;let N=Number(h>>BigInt(32)&BigInt(4294967295));return _[p+3]=N,N=N>>8,_[p+2]=N,N=N>>8,_[p+1]=N,N=N>>8,_[p]=N,p+8}o.prototype.writeBigUInt64LE=se(function(h,p=0){return o0(this,h,p,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=se(function(h,p=0){return g0(this,h,p,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(h,p,T,P){if(h=+h,p=p>>>0,!P){let b0=Math.pow(2,8*T-1);Y(this,h,p,T,b0-1,-b0)}let D=0,N=1,i0=0;for(this[p]=h&255;++D<T&&(N*=256);)h<0&&i0===0&&this[p+D-1]!==0&&(i0=1),this[p+D]=(h/N>>0)-i0&255;return p+T},o.prototype.writeIntBE=function(h,p,T,P){if(h=+h,p=p>>>0,!P){let b0=Math.pow(2,8*T-1);Y(this,h,p,T,b0-1,-b0)}let D=T-1,N=1,i0=0;for(this[p+D]=h&255;--D>=0&&(N*=256);)h<0&&i0===0&&this[p+D+1]!==0&&(i0=1),this[p+D]=(h/N>>0)-i0&255;return p+T},o.prototype.writeInt8=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,1,127,-128),h<0&&(h=255+h+1),this[p]=h&255,p+1},o.prototype.writeInt16LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,32767,-32768),this[p]=h&255,this[p+1]=h>>>8,p+2},o.prototype.writeInt16BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,2,32767,-32768),this[p]=h>>>8,this[p+1]=h&255,p+2},o.prototype.writeInt32LE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,2147483647,-2147483648),this[p]=h&255,this[p+1]=h>>>8,this[p+2]=h>>>16,this[p+3]=h>>>24,p+4},o.prototype.writeInt32BE=function(h,p,T){return h=+h,p=p>>>0,T||Y(this,h,p,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[p]=h>>>24,this[p+1]=h>>>16,this[p+2]=h>>>8,this[p+3]=h&255,p+4},o.prototype.writeBigInt64LE=se(function(h,p=0){return o0(this,h,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=se(function(h,p=0){return g0(this,h,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G0(_,h,p,T,P,D){if(p+T>_.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function O0(_,h,p,T,P){return h=+h,p=p>>>0,P||G0(_,h,p,4),e.write(_,h,p,T,23,4),p+4}o.prototype.writeFloatLE=function(h,p,T){return O0(this,h,p,!0,T)},o.prototype.writeFloatBE=function(h,p,T){return O0(this,h,p,!1,T)};function Z0(_,h,p,T,P){return h=+h,p=p>>>0,P||G0(_,h,p,8),e.write(_,h,p,T,52,8),p+8}o.prototype.writeDoubleLE=function(h,p,T){return Z0(this,h,p,!0,T)},o.prototype.writeDoubleBE=function(h,p,T){return Z0(this,h,p,!1,T)},o.prototype.copy=function(h,p,T,P){if(!o.isBuffer(h))throw new TypeError("argument should be a Buffer");if(T||(T=0),!P&&P!==0&&(P=this.length),p>=h.length&&(p=h.length),p||(p=0),P>0&&P<T&&(P=T),P===T||h.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),h.length-p<P-T&&(P=h.length-p+T);let D=P-T;return this===h&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,T,P):Uint8Array.prototype.set.call(h,this.subarray(T,P),p),D},o.prototype.fill=function(h,p,T,P){if(typeof h=="string"){if(typeof p=="string"?(P=p,p=0,T=this.length):typeof T=="string"&&(P=T,T=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!o.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(h.length===1){let N=h.charCodeAt(0);(P==="utf8"&&N<128||P==="latin1")&&(h=N)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(p<0||this.length<p||this.length<T)throw new RangeError("Out of range index");if(T<=p)return this;p=p>>>0,T=T===void 0?this.length:T>>>0,h||(h=0);let D;if(typeof h=="number")for(D=p;D<T;++D)this[D]=h;else{let N=o.isBuffer(h)?h:o.from(h,P),i0=N.length;if(i0===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(D=0;D<T-p;++D)this[D+p]=N[D%i0]}return this};let u0={};function ue(_,h,p){u0[_]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}ue("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ue("ERR_INVALID_ARG_TYPE",function(_,h){return`The "${_}" argument must be of type number. Received type ${typeof h}`},TypeError),ue("ERR_OUT_OF_RANGE",function(_,h,p){let T=`The value of "${_}" is out of range.`,P=p;return Number.isInteger(p)&&Math.abs(p)>2**32?P=Xt(String(p)):typeof p=="bigint"&&(P=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(P=Xt(P)),P+="n"),T+=` It must be ${h}. Received ${P}`,T},RangeError);function Xt(_){let h="",p=_.length,T=_[0]==="-"?1:0;for(;p>=T+4;p-=3)h=`_${_.slice(p-3,p)}${h}`;return`${_.slice(0,p)}${h}`}function $t(_,h,p){Me(h,"offset"),(_[h]===void 0||_[h+p]===void 0)&&We(h,_.length-(p+1))}function Ne(_,h,p,T,P,D){if(_>p||_<h){let N=typeof h=="bigint"?"n":"",i0;throw h===0||h===BigInt(0)?i0=`>= 0${N} and < 2${N} ** ${(D+1)*8}${N}`:i0=`>= -(2${N} ** ${(D+1)*8-1}${N}) and < 2 ** ${(D+1)*8-1}${N}`,new u0.ERR_OUT_OF_RANGE("value",i0,_)}$t(T,P,D)}function Me(_,h){if(typeof _!="number")throw new u0.ERR_INVALID_ARG_TYPE(h,"number",_)}function We(_,h,p){throw Math.floor(_)!==_?(Me(_,p),new u0.ERR_OUT_OF_RANGE("offset","an integer",_)):h<0?new u0.ERR_BUFFER_OUT_OF_BOUNDS:new u0.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,_)}let N5=/[^+/0-9A-Za-z-_]/g;function Ve(_){if(_=_.split("=")[0],_=_.trim().replace(N5,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function yt(_,h){h=h||1/0;let p,T=_.length,P=null,D=[];for(let N=0;N<T;++N){if(p=_.charCodeAt(N),p>55295&&p<57344){if(!P){if(p>56319){(h-=3)>-1&&D.push(239,191,189);continue}else if(N+1===T){(h-=3)>-1&&D.push(239,191,189);continue}P=p;continue}if(p<56320){(h-=3)>-1&&D.push(239,191,189),P=p;continue}p=(P-55296<<10|p-56320)+65536}else P&&(h-=3)>-1&&D.push(239,191,189);if(P=null,p<128){if((h-=1)<0)break;D.push(p)}else if(p<2048){if((h-=2)<0)break;D.push(p>>6|192,p&63|128)}else if(p<65536){if((h-=3)<0)break;D.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((h-=4)<0)break;D.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return D}function W5(_){let h=[];for(let p=0;p<_.length;++p)h.push(_.charCodeAt(p)&255);return h}function V5(_,h){let p,T,P,D=[];for(let N=0;N<_.length&&!((h-=2)<0);++N)p=_.charCodeAt(N),T=p>>8,P=p%256,D.push(P),D.push(T);return D}function cr(_){return n.toByteArray(Ve(_))}function J0(_,h,p,T){let P;for(P=0;P<T&&!(P+p>=h.length||P>=_.length);++P)h[P+p]=_[P];return P}function S0(_,h){return _ instanceof h||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===h.name}function _t(_){return _!==_}let e5=function(){let _="0123456789abcdef",h=new Array(256);for(let p=0;p<16;++p){let T=p*16;for(let P=0;P<16;++P)h[T+P]=_[p]+_[P]}return h}();function se(_){return typeof BigInt>"u"?wt:_}function wt(){throw new Error("BigInt not supported")}return Ye}var i5,b2,J5,y2,Ye,_2,A2=X0(()=>{E();x();k();R();i5={},b2=!1;J5={},y2=!1;Ye={},_2=!1});var Qe,z,d9,u9,E2=X0(()=>{E();x();k();R();A2();Qe=w2();Qe.Buffer;Qe.SlowBuffer;Qe.INSPECT_MAX_BYTES;Qe.kMaxLength;z=Qe.Buffer,d9=Qe.INSPECT_MAX_BYTES,u9=Qe.kMaxLength});var k=X0(()=>{E2()});var C2=te((yr,_r)=>{E();x();k();R();(function(n,e){typeof yr=="object"&&typeof _r<"u"?_r.exports=e():typeof define=="function"&&define.amd?define(e):n.Stats=e()})(yr,function(){var n=function(){function e(u){return i.appendChild(u.dom),u}function t(u){for(var f=0;f<i.children.length;f++)i.children[f].style.display=f===u?"block":"none";r=u}var r=0,i=document.createElement("div");i.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",i.addEventListener("click",function(u){u.preventDefault(),t(++r%i.children.length)},!1);var s=(performance||Date).now(),o=s,v=0,a=e(new n.Panel("FPS","#0ff","#002")),l=e(new n.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new n.Panel("MB","#f08","#201"));return t(0),{REVISION:16,dom:i,addPanel:e,showPanel:t,begin:function(){s=(performance||Date).now()},end:function(){v++;var u=(performance||Date).now();if(l.update(u-s,200),u>o+1e3&&(a.update(1e3*v/(u-o),100),o=u,v=0,c)){var f=performance.memory;c.update(f.usedJSHeapSize/1048576,f.jsHeapSizeLimit/1048576)}return u},update:function(){s=this.end()},domElement:i,setMode:t}};return n.Panel=function(e,t,r){var i=1/0,s=0,o=Math.round,v=o(window.devicePixelRatio||1),a=80*v,l=48*v,c=3*v,u=2*v,f=3*v,m=15*v,g=74*v,y=30*v,w=document.createElement("canvas");w.width=a,w.height=l,w.style.cssText="width:80px;height:48px";var b=w.getContext("2d");return b.font="bold "+9*v+"px Helvetica,Arial,sans-serif",b.textBaseline="top",b.fillStyle=r,b.fillRect(0,0,a,l),b.fillStyle=t,b.fillText(e,c,u),b.fillRect(f,m,g,y),b.fillStyle=r,b.globalAlpha=.9,b.fillRect(f,m,g,y),{dom:w,update:function(A,C){i=Math.min(i,A),s=Math.max(s,A),b.fillStyle=r,b.globalAlpha=1,b.fillRect(0,0,a,m),b.fillStyle=t,b.fillText(o(A)+" "+e+" ("+o(i)+"-"+o(s)+")",c,u),b.drawImage(w,f+v,m,g-v,y,f,m,g-v,y),b.fillRect(f+g-v,m,v,y),b.fillStyle=r,b.globalAlpha=.9,b.fillRect(f+g-v,m,v,o((1-A/C)*y))}}},n})});var Es=te((As,b1)=>{E();x();k();R();(function(n,e){typeof b1=="object"&&b1.exports?b1.exports=e():n.nearley=e()})(As,function(){function n(a,l,c){return this.id=++n.highestId,this.name=a,this.symbols=l,this.postprocess=c,this}n.highestId=0,n.prototype.toString=function(a){var l=typeof a>"u"?this.symbols.map(v).join(" "):this.symbols.slice(0,a).map(v).join(" ")+" \u25CF "+this.symbols.slice(a).map(v).join(" ");return this.name+" \u2192 "+l};function e(a,l,c,u){this.rule=a,this.dot=l,this.reference=c,this.data=[],this.wantedBy=u,this.isComplete=this.dot===a.symbols.length}e.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},e.prototype.nextState=function(a){var l=new e(this.rule,this.dot+1,this.reference,this.wantedBy);return l.left=this,l.right=a,l.isComplete&&(l.data=l.build(),l.right=void 0),l},e.prototype.build=function(){var a=[],l=this;do a.push(l.right.data),l=l.left;while(l.left);return a.reverse(),a},e.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function t(a,l){this.grammar=a,this.index=l,this.states=[],this.wants={},this.scannable=[],this.completed={}}t.prototype.process=function(a){for(var l=this.states,c=this.wants,u=this.completed,f=0;f<l.length;f++){var m=l[f];if(m.isComplete){if(m.finish(),m.data!==s.fail){for(var g=m.wantedBy,y=g.length;y--;){var w=g[y];this.complete(w,m)}if(m.reference===this.index){var b=m.rule.name;(this.completed[b]=this.completed[b]||[]).push(m)}}}else{var b=m.rule.symbols[m.dot];if(typeof b!="string"){this.scannable.push(m);continue}if(c[b]){if(c[b].push(m),u.hasOwnProperty(b))for(var A=u[b],y=0;y<A.length;y++){var C=A[y];this.complete(m,C)}}else c[b]=[m],this.predict(b)}}},t.prototype.predict=function(a){for(var l=this.grammar.byName[a]||[],c=0;c<l.length;c++){var u=l[c],f=this.wants[a],m=new e(u,0,this.index,f);this.states.push(m)}},t.prototype.complete=function(a,l){var c=a.nextState(l);this.states.push(c)};function r(a,l){this.rules=a,this.start=l||this.rules[0].name;var c=this.byName={};this.rules.forEach(function(u){c.hasOwnProperty(u.name)||(c[u.name]=[]),c[u.name].push(u)})}r.fromCompiled=function(u,l){var c=u.Lexer;u.ParserStart&&(l=u.ParserStart,u=u.ParserRules);var u=u.map(function(m){return new n(m.name,m.symbols,m.postprocess)}),f=new r(u,l);return f.lexer=c,f};function i(){this.reset("")}i.prototype.reset=function(a,l){this.buffer=a,this.index=0,this.line=l?l.line:1,this.lastLineBreak=l?-l.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var a=this.buffer[this.index++];return a===`
2
+ `&&(this.line+=1,this.lastLineBreak=this.index),{value:a}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(a,l){var c=this.buffer;if(typeof c=="string"){var u=c.split(`
3
3
  `).slice(Math.max(0,this.line-5),this.line),f=c.indexOf(`
4
4
  `,this.index);f===-1&&(f=c.length);var m=this.index-this.lastLineBreak,g=String(this.line).length;return l+=" at line "+this.line+" col "+m+`:
5
5
 
6
- `,l+=d.map(function(w,y){return b(this.line-d.length+y+1,g)+" "+w},this).join(`
6
+ `,l+=u.map(function(w,b){return y(this.line-u.length+b+1,g)+" "+w},this).join(`
7
7
  `),l+=`
8
- `+b("",g+m)+`^
9
- `,l}else return l+" at index "+(this.index-1);function b(w,y){var A=String(w);return Array(y-A.length+1).join(" ")+A}};function s(v,l,c){if(v instanceof r)var d=v,c=l;else var d=r.fromCompiled(v,l);this.grammar=d,this.options={keepHistory:!1,lexer:d.lexer||new i};for(var f in c||{})this.options[f]=c[f];this.lexer=this.options.lexer,this.lexerState=void 0;var m=new t(d,0),g=this.table=[m];m.wants[d.start]=[],m.predict(d.start),m.process(),this.current=0}s.fail={},s.prototype.feed=function(v){var l=this.lexer;l.reset(v,this.lexerState);for(var c;;){try{if(c=l.next(),!c)break}catch(H){var g=new t(this.grammar,this.current+1);this.table.push(g);var d=new Error(this.reportLexerError(H));throw d.offset=this.current,d.token=H.token,d}var f=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var m=this.current+1,g=new t(this.grammar,m);this.table.push(g);for(var b=c.text!==void 0?c.text:c.value,w=l.constructor===i?c.value:c,y=f.scannable,A=y.length;A--;){var C=y[A],M=C.rule.symbols[C.dot];if(M.test?M.test(w):M.type?M.type===c.type:M.literal===b){var S=C.nextState({data:w,token:c,isToken:!0,reference:m-1});g.states.push(S)}}if(g.process(),g.states.length===0){var d=new Error(this.reportError(c));throw d.offset=this.current,d.token=c,d}this.options.keepHistory&&(f.lexerState=l.save()),this.current++}return f&&(this.lexerState=l.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(v){var l,c,d=v.token;return d?(l="input "+JSON.stringify(d.text[0])+" (lexer error)",c=this.lexer.formatError(d,"Syntax error")):(l="input (lexer error)",c=v.message),this.reportErrorCommon(c,l)},s.prototype.reportError=function(v){var l=(v.type?v.type+" token: ":"")+JSON.stringify(v.value!==void 0?v.value:v),c=this.lexer.formatError(v,"Syntax error");return this.reportErrorCommon(c,l)},s.prototype.reportErrorCommon=function(v,l){var c=[];c.push(v);var d=this.table.length-2,f=this.table[d],m=f.states.filter(function(b){var w=b.rule.symbols[b.dot];return w&&typeof w!="string"});if(m.length===0)c.push("Unexpected "+l+`. I did not expect any more input. Here is the state of my parse table:
8
+ `+y("",g+m)+`^
9
+ `,l}else return l+" at index "+(this.index-1);function y(w,b){var A=String(w);return Array(b-A.length+1).join(" ")+A}};function s(a,l,c){if(a instanceof r)var u=a,c=l;else var u=r.fromCompiled(a,l);this.grammar=u,this.options={keepHistory:!1,lexer:u.lexer||new i};for(var f in c||{})this.options[f]=c[f];this.lexer=this.options.lexer,this.lexerState=void 0;var m=new t(u,0),g=this.table=[m];m.wants[u.start]=[],m.predict(u.start),m.process(),this.current=0}s.fail={},s.prototype.feed=function(a){var l=this.lexer;l.reset(a,this.lexerState);for(var c;;){try{if(c=l.next(),!c)break}catch(H){var g=new t(this.grammar,this.current+1);this.table.push(g);var u=new Error(this.reportLexerError(H));throw u.offset=this.current,u.token=H.token,u}var f=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var m=this.current+1,g=new t(this.grammar,m);this.table.push(g);for(var y=c.text!==void 0?c.text:c.value,w=l.constructor===i?c.value:c,b=f.scannable,A=b.length;A--;){var C=b[A],M=C.rule.symbols[C.dot];if(M.test?M.test(w):M.type?M.type===c.type:M.literal===y){var S=C.nextState({data:w,token:c,isToken:!0,reference:m-1});g.states.push(S)}}if(g.process(),g.states.length===0){var u=new Error(this.reportError(c));throw u.offset=this.current,u.token=c,u}this.options.keepHistory&&(f.lexerState=l.save()),this.current++}return f&&(this.lexerState=l.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(a){var l,c,u=a.token;return u?(l="input "+JSON.stringify(u.text[0])+" (lexer error)",c=this.lexer.formatError(u,"Syntax error")):(l="input (lexer error)",c=a.message),this.reportErrorCommon(c,l)},s.prototype.reportError=function(a){var l=(a.type?a.type+" token: ":"")+JSON.stringify(a.value!==void 0?a.value:a),c=this.lexer.formatError(a,"Syntax error");return this.reportErrorCommon(c,l)},s.prototype.reportErrorCommon=function(a,l){var c=[];c.push(a);var u=this.table.length-2,f=this.table[u],m=f.states.filter(function(y){var w=y.rule.symbols[y.dot];return w&&typeof w!="string"});if(m.length===0)c.push("Unexpected "+l+`. I did not expect any more input. Here is the state of my parse table:
10
10
  `),this.displayStateStack(f.states,c);else{c.push("Unexpected "+l+`. Instead, I was expecting to see one of the following:
11
- `);var g=m.map(function(b){return this.buildFirstStateStack(b,[])||[b]},this);g.forEach(function(b){var w=b[0],y=w.rule.symbols[w.dot],A=this.getSymbolDisplay(y);c.push("A "+A+" based on:"),this.displayStateStack(b,c)},this)}return c.push(""),c.join(`
12
- `)},s.prototype.displayStateStack=function(v,l){for(var c,d=0,f=0;f<v.length;f++){var m=v[f],g=m.rule.toString(m.dot);g===c?d++:(d>0&&l.push(" ^ "+d+" more lines identical to this"),d=0,l.push(" "+g)),c=g}},s.prototype.getSymbolDisplay=function(v){return o(v)},s.prototype.buildFirstStateStack=function(v,l){if(l.indexOf(v)!==-1)return null;if(v.wantedBy.length===0)return[v];var c=v.wantedBy[0],d=[v].concat(l),f=this.buildFirstStateStack(c,d);return f===null?null:[v].concat(f)},s.prototype.save=function(){var v=this.table[this.current];return v.lexerState=this.lexerState,v},s.prototype.restore=function(v){var l=v.index;this.current=l,this.table[l]=v,this.table.splice(l+1),this.lexerState=v.lexerState,this.results=this.finish()},s.prototype.rewind=function(v){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[v])},s.prototype.finish=function(){var v=[],l=this.grammar.start,c=this.table[this.table.length-1];return c.states.forEach(function(d){d.rule.name===l&&d.dot===d.rule.symbols.length&&d.reference===0&&d.data!==s.fail&&v.push(d)}),v.map(function(d){return d.data})};function o(v){var l=typeof v;if(l==="string")return v;if(l==="object"){if(v.literal)return JSON.stringify(v.literal);if(v instanceof RegExp)return"character matching "+v;if(v.type)return v.type+" token";if(v.test)return"token matching "+String(v.test);throw new Error("Unknown symbol type: "+v)}}function a(v){var l=typeof v;if(l==="string")return v;if(l==="object"){if(v.literal)return JSON.stringify(v.literal);if(v instanceof RegExp)return v.toString();if(v.type)return"%"+v.type;if(v.test)return"<"+String(v.test)+">";throw new Error("Unknown symbol type: "+v)}}return{Parser:s,Grammar:r,Rule:n}})});var Cs=ie((qg,x1)=>{E();x();k();R();(function(){function n(v){return v[0]}function e(v){if(v==="true")return{type:"boolean",value:!0};if(v==="false")return{type:"boolean",value:!1};let l="bslfdi",c={b:"byte",s:"short",l:"long",f:"float",d:"double",i:"int"},d=v.charAt(v.length-1).toLowerCase();if(l.indexOf(d)!==-1){let b=parseFloat(v.substring(0,v.length-1));return isNaN(b)?{value:v,type:"string"}:{value:b,type:c[d]}}let f=parseFloat(v),m=v.includes("."),g=f>>0===f;return!isNaN(v)&&(m||g)?{value:f,type:m?"double":"int"}:{value:v,type:"string"}}function t(v,l){v[0]!==void 0&&(l[v[0]]=v[1])}function r(v){let l={};t(v[2],l);for(let c in v[3])t(v[3][c][3],l);return{type:"compound",value:l}}function i(v){let l=[v[6]];for(let d in v[7])l.push(v[7][d][3]);return{type:{B:"byteArray",I:"intArray",L:"longArray"}[v[2]],value:{type:l[0].type,value:l.map(d=>d.value)}}}function s(v){let l=[v[2]];for(let c in v[3])l.push(v[3][c][3]);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}function o(v){let l=[];t(v[2],l);for(let c in v[3])t(v[3][c][3],l);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}var a={Lexer:void 0,ParserRules:[{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(v){return null}},{name:"__$ebnf$1",symbols:["wschar"]},{name:"__$ebnf$1",symbols:["__$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"__",symbols:["__$ebnf$1"],postprocess:function(v){return null}},{name:"wschar",symbols:[/[ \t\n\v\f]/],postprocess:n},{name:"MAIN",symbols:["_","JVALUE","_"],postprocess:v=>v[1]},{name:"JVALUE",symbols:["JOBJECT"],postprocess:v=>v[0]},{name:"JVALUE",symbols:[{literal:"'"},"_","JOBJECT","_",{literal:"'"}],postprocess:v=>v[2]},{name:"JVALUE",symbols:["JARRAY"],postprocess:v=>v[0]},{name:"JVALUE",symbols:["STRING"],postprocess:v=>v[0]},{name:"JVALUE$string$1",symbols:[{literal:"n"},{literal:"u"},{literal:"l"},{literal:"l"}],postprocess:function(l){return l.join("")}},{name:"JVALUE",symbols:["JVALUE$string$1"],postprocess:v=>null},{name:"JOBJECT",symbols:[{literal:"{"},"_",{literal:"}"}],postprocess:v=>({type:"compound",value:{}})},{name:"JOBJECT$ebnf$1",symbols:[]},{name:"JOBJECT$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JOBJECT$ebnf$1",symbols:["JOBJECT$ebnf$1","JOBJECT$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JOBJECT$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JOBJECT$ebnf$2",symbols:["JOBJECT$ebnf$2$subexpression$1"],postprocess:n},{name:"JOBJECT$ebnf$2",symbols:[],postprocess:function(v){return null}},{name:"JOBJECT",symbols:[{literal:"{"},"_","PAIR","JOBJECT$ebnf$1","JOBJECT$ebnf$2",{literal:"}"}],postprocess:r},{name:"JARRAY",symbols:[{literal:"["},"_",{literal:"]"}],postprocess:v=>({type:"list",value:{}})},{name:"JARRAY$ebnf$1",symbols:[]},{name:"JARRAY$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$1",symbols:["JARRAY$ebnf$1","JARRAY$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$2",symbols:["JARRAY$ebnf$2$subexpression$1"],postprocess:n},{name:"JARRAY$ebnf$2",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_",/[BIL]/,"_",{literal:";"},"_","JVALUE","JARRAY$ebnf$1","JARRAY$ebnf$2","_",{literal:"]"}],postprocess:i},{name:"JARRAY$ebnf$3",symbols:[]},{name:"JARRAY$ebnf$3$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$3",symbols:["JARRAY$ebnf$3","JARRAY$ebnf$3$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$4$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$4",symbols:["JARRAY$ebnf$4$subexpression$1"],postprocess:n},{name:"JARRAY$ebnf$4",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","JVALUE","JARRAY$ebnf$3","JARRAY$ebnf$4","_",{literal:"]"}],postprocess:s},{name:"JARRAY$ebnf$5",symbols:[]},{name:"JARRAY$ebnf$5$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JARRAY$ebnf$5",symbols:["JARRAY$ebnf$5","JARRAY$ebnf$5$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$6$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$6",symbols:["JARRAY$ebnf$6$subexpression$1"],postprocess:n},{name:"JARRAY$ebnf$6",symbols:[],postprocess:function(v){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","PAIR","JARRAY$ebnf$5","JARRAY$ebnf$6","_",{literal:"]"}],postprocess:o},{name:"PAIR",symbols:["STRING","_",{literal:":"},"_","JVALUE"],postprocess:v=>[v[0].value,v[4]]},{name:"STRING$ebnf$1",symbols:[]},{name:"STRING$ebnf$1$subexpression$1",symbols:[/[^\\"]/]},{name:"STRING$ebnf$1$subexpression$1",symbols:[{literal:"\\"},/["bfnrt\/\\]/]},{name:"STRING$ebnf$1$subexpression$1$string$1",symbols:[{literal:"\\"},{literal:"u"}],postprocess:function(l){return l.join("")}},{name:"STRING$ebnf$1$subexpression$1",symbols:["STRING$ebnf$1$subexpression$1$string$1",/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/]},{name:"STRING$ebnf$1",symbols:["STRING$ebnf$1","STRING$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:[{literal:'"'},"STRING$ebnf$1",{literal:'"'}],postprocess:v=>e(JSON.parse(v.flat(3).map(l=>l.replace(`
13
- `,"\\n")).join("")))},{name:"STRING$ebnf$2",symbols:[/[^\"\'}\]:;,\s]/]},{name:"STRING$ebnf$2",symbols:["STRING$ebnf$2",/[^\"\'}\]:;,\s]/],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:["STRING$ebnf$2"],postprocess:v=>e(v[0].join(""))}],ParserStart:"MAIN"};typeof x1<"u"&&typeof x1.exports<"u"?x1.exports=a:window.grammar=a})()});var vi=ie((tb,Fs)=>{E();x();k();R();var Bs=Ss(),l7=Cs();function Hs(n){function e(t,r){return r==="compound"?Object.keys(t).reduce(function(i,s){return i[s]=Hs(t[s]),i},{}):r==="list"?Array.isArray(t.value)?t.value.map(function(i){return e(i,t.type)}):[]:t}return e(n.value,n.type)}function R1({value:n,type:e}){if(e==="compound"){let r=[],i=Object.entries(n);for(let s=0;s<i.length;s++){let o=i[s][0],a=R1(i[s][1]);o==="string"&&(a=Ps(a)),r.push(`${o}:${a}`)}return`{${r.join(",")}}`}else{if(e==="list")return Array.isArray(n.value)?`[${Is(n)}]`:"[]";if(e==="byteArray"||e==="intArray"||e==="longArray"){let r=d7(e),i=Is(n);return`[${r}${i}]`}}let t=n+u7(n,e);return e==="string"&&(t=Ps(t)),t}function Ps(n){return n=n.replace(/"/g,'\\"'),(/'|{|}|\[|\]|:|;|,|\(|\)|§|=/g.test(n)||n==="")&&(n=`"${n}"`),n}function Is({value:n,type:e}){let t=c7(n),r=[];for(let i=0;i<n.length;i++){let s=n[i];s!==void 0&&(s=R1({value:s,type:e}),t?r.push(`${i}:${s}`):r.push(s))}return r.join(",")}function c7(n){for(let e=0;e<n.length;e++)if(n[e]===void 0)return!0;return!1}var d7=n=>n.charAt(0).toUpperCase()+";";function u7(n,e){return e==="double"?n>>0===n?"d":"":{int:"",byte:"b",short:"s",float:"f",long:"l",string:""}[e]}function f7(n){return R1(Os(n))}function Os(n){try{let e=new Bs.Parser(Bs.Grammar.fromCompiled(l7));return e.feed(n),e.results[0]}catch(e){throw e.message=`Error parsing text '${n}'`,e}}Fs.exports={parse:Os,simplify:Hs,stringify:R1,normalize:f7}});var Gs={};Z5(Gs,{camelCase:()=>b7,capitalCase:()=>ci,constantCase:()=>w7,dotCase:()=>A7,kebabCase:()=>E7,noCase:()=>k5,pascalCase:()=>y7,pascalSnakeCase:()=>_7,pathCase:()=>x7,sentenceCase:()=>R7,snakeCase:()=>di,split:()=>li,splitSeparateNumbers:()=>Ls,trainCase:()=>k7});function li(n){let e=n.trim();e=e.replace(h7,Ds).replace(m7,Ds),e=e.replace(g7,"\0");let t=0,r=e.length;for(;e.charAt(t)==="\0";)t++;if(t===r)return[];for(;e.charAt(r-1)==="\0";)r--;return e.slice(t,r).split(/\0/g)}function Ls(n){let e=li(n);for(let t=0;t<e.length;t++){let r=e[t],i=p7.exec(r);if(i){let s=i.index+(i[1]??i[2]).length;e.splice(t,1,r.slice(0,s),r.slice(s))}}return e}function k5(n,e){let[t,r,i]=It(n,e);return t+r.map(T5(e?.locale)).join(e?.delimiter??" ")+i}function b7(n,e){let[t,r,i]=It(n,e),s=T5(e?.locale),o=M5(e?.locale),a=e?.mergeAmbiguousCharacters?k1(s,o):Us(s,o);return t+r.map((v,l)=>l===0?s(v):a(v,l)).join(e?.delimiter??"")+i}function y7(n,e){let[t,r,i]=It(n,e),s=T5(e?.locale),o=M5(e?.locale),a=e?.mergeAmbiguousCharacters?k1(s,o):Us(s,o);return t+r.map(a).join(e?.delimiter??"")+i}function _7(n,e){return ci(n,{delimiter:"_",...e})}function ci(n,e){let[t,r,i]=It(n,e),s=T5(e?.locale),o=M5(e?.locale);return t+r.map(k1(s,o)).join(e?.delimiter??" ")+i}function w7(n,e){let[t,r,i]=It(n,e);return t+r.map(M5(e?.locale)).join(e?.delimiter??"_")+i}function A7(n,e){return k5(n,{delimiter:".",...e})}function E7(n,e){return k5(n,{delimiter:"-",...e})}function x7(n,e){return k5(n,{delimiter:"/",...e})}function R7(n,e){let[t,r,i]=It(n,e),s=T5(e?.locale),o=M5(e?.locale),a=k1(s,o);return t+r.map((v,l)=>l===0?a(v):s(v)).join(e?.delimiter??" ")+i}function di(n,e){return k5(n,{delimiter:"_",...e})}function k7(n,e){return ci(n,{delimiter:"-",...e})}function T5(n){return n===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(n)}function M5(n){return n===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(n)}function k1(n,e){return t=>`${e(t[0])}${n(t.slice(1))}`}function Us(n,e){return(t,r)=>{let i=t[0];return(r>0&&i>="0"&&i<="9"?"_"+i:e(i))+n(t.slice(1))}}function It(n,e={}){let t=e.split??(e.separateNumbers?Ls:li),r=e.prefixCharacters??zs,i=e.suffixCharacters??zs,s=0,o=n.length;for(;s<n.length;){let a=n.charAt(s);if(!r.includes(a))break;s++}for(;o>s;){let a=o-1,v=n.charAt(a);if(!i.includes(v))break;o=a}return[n.slice(0,s),t(n.slice(s,o)),n.slice(o)]}var h7,m7,p7,g7,Ds,zs,ui=ee(()=>{E();x();k();R();h7=/([\p{Ll}\d])(\p{Lu})/gu,m7=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,p7=/(\d)\p{Ll}|(\p{L})\d/u,g7=/[^\p{L}\d]+/giu,Ds="$1\0$2",zs=""});var Ns=ie((cb,T7)=>{T7.exports={version:"1.21.4",attackable:["acacia_boat","acacia_chest_boat","allay","armadillo","armor_stand","axolotl","bamboo_chest_raft","bamboo_raft","bat","bee","birch_boat","birch_chest_boat","blaze","bogged","breeze","camel","cat","cave_spider","cherry_boat","cherry_chest_boat","chest_minecart","chicken","cod","command_block_minecart","cow","creaking","creeper","dark_oak_boat","dark_oak_chest_boat","dolphin","donkey","drowned","elder_guardian","end_crystal","ender_dragon","enderman","endermite","evoker","falling_block","fox","frog","furnace_minecart","ghast","giant","glow_item_frame","glow_squid","goat","guardian","hoglin","hopper_minecart","horse","husk","illusioner","iron_golem","item_frame","jungle_boat","jungle_chest_boat","leash_knot","llama","magma_cube","mangrove_boat","mangrove_chest_boat","minecart","mooshroom","mule","oak_boat","oak_chest_boat","ocelot","painting","pale_oak_boat","pale_oak_chest_boat","panda","parrot","phantom","pig","piglin","piglin_brute","pillager","player","polar_bear","pufferfish","rabbit","ravager","salmon","sheep","shulker","shulker_bullet","silverfish","skeleton","skeleton_horse","slime","sniffer","snow_golem","spawner_minecart","spider","spruce_boat","spruce_chest_boat","squid","stray","strider","tadpole","tnt","tnt_minecart","trader_llama","tropical_fish","turtle","vex","villager","vindicator","wandering_trader","warden","wind_charge","witch","wither","wither_skeleton","wolf","zoglin","zombie","zombie_horse","zombie_villager","zombified_piglin"],notAttackable:["area_effect_cloud","arrow","block_display","breeze_wind_charge","dragon_fireball","egg","ender_pearl","evoker_fangs","experience_bottle","experience_orb","eye_of_ender","fireball","firework_rocket","fishing_bobber","interaction","item","item_display","lightning_bolt","llama_spit","marker","ominous_item_spawner","potion","small_fireball","snowball","spectral_arrow","text_display","trident","wither_skull"],entityRenames:{Boat:"oak_boat",EnderCrystal:"end_crystal",EntityHorse:"horse",EyeOfEnderSignal:"eye_of_ender",FallingSand:"falling_block",FireworksRocketEntity:"firework_rocket","Fishing Float":"fishing_bobber","Fishing Hook":"fishing_bobber",LavaSlime:"magma_cube",MinecartRideable:"minecart",Mob:!1,Monster:!1,MushroomCow:"mooshroom",Ozelot:"ocelot",PigZombie:"zombified_piglin",PrimedTnt:"tnt",SnowMan:"snow_golem",ThrownEgg:"egg",ThrownEnderpearl:"ender_pearl",ThrownExpBottle:"experience_bottle",ThrownPotion:"potion",VillagerGolem:"iron_golem",WitherBoss:"wither",XPOrb:"experience_orb",activated_tnt:"tnt",armorstand:"armor_stand",boat:"oak_boat",chest_boat:"oak_chest_boat",commandblock_minecart:"command_block_minecart",creaking_transient:"creaking",ender_crystal:"end_crystal",endercrystal:"end_crystal",evocation_fangs:"evoker_fangs",evocation_illager:"evoker",eye_of_ender_signal:"eye_of_ender",falling_objects:"falling_block",firecharge:"fireball",fireworks_rocket:"firework_rocket",fishing_hook:"fishing_bobber",illusion_illager:"illusioner",item_frames:"item_frame",item_stack:"item",snowman:"snow_golem",thrown_enderpearl:"ender_pearl","thrown_exp bottle":"experience_bottle",thrown_exp_bottle:"experience_bottle",thrown_potion:"potion",tipped_arrow:"arrow",villager_golem:"iron_golem",vindication_illager:"vindicator",xp_bottle:"experience_bottle",xp_orb:"experience_orb",zombie_pigman:"zombified_piglin"}}});var Vs=ie((db,Ws)=>{E();x();k();R();var Ht=1e3,Ot=Ht*60,Ft=Ot*60,at=Ft*24,M7=at*7,S7=at*365.25;Ws.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return C7(n);if(t==="number"&&isFinite(n))return e.long?P7(n):B7(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function C7(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*S7;case"weeks":case"week":case"w":return t*M7;case"days":case"day":case"d":return t*at;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ft;case"minutes":case"minute":case"mins":case"min":case"m":return t*Ot;case"seconds":case"second":case"secs":case"sec":case"s":return t*Ht;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function B7(n){var e=Math.abs(n);return e>=at?Math.round(n/at)+"d":e>=Ft?Math.round(n/Ft)+"h":e>=Ot?Math.round(n/Ot)+"m":e>=Ht?Math.round(n/Ht)+"s":n+"ms"}function P7(n){var e=Math.abs(n);return e>=at?T1(n,e,at,"day"):e>=Ft?T1(n,e,Ft,"hour"):e>=Ot?T1(n,e,Ot,"minute"):e>=Ht?T1(n,e,Ht,"second"):n+" ms"}function T1(n,e,t,r){var i=e>=t*1.5;return Math.round(n/t)+" "+r+(i?"s":"")}});var Ys=ie((pb,js)=>{E();x();k();R();function I7(n){t.debug=t,t.default=t,t.coerce=v,t.disable=o,t.enable=i,t.enabled=a,t.humanize=Vs(),t.destroy=l,Object.keys(n).forEach(c=>{t[c]=n[c]}),t.names=[],t.skips=[],t.formatters={};function e(c){let d=0;for(let f=0;f<c.length;f++)d=(d<<5)-d+c.charCodeAt(f),d|=0;return t.colors[Math.abs(d)%t.colors.length]}t.selectColor=e;function t(c){let d,f=null,m,g;function b(...w){if(!b.enabled)return;let y=b,A=Number(new Date),C=A-(d||A);y.diff=C,y.prev=d,y.curr=A,d=A,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let M=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(H,B)=>{if(H==="%%")return"%";M++;let I=t.formatters[B];if(typeof I=="function"){let G=w[M];H=I.call(y,G),w.splice(M,1),M--}return H}),t.formatArgs.call(y,w),(y.log||t.log).apply(y,w)}return b.namespace=c,b.useColors=t.useColors(),b.color=t.selectColor(c),b.extend=r,b.destroy=t.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==t.namespaces&&(m=t.namespaces,g=t.enabled(c)),g),set:w=>{f=w}}),typeof t.init=="function"&&t.init(b),b}function r(c,d){let f=t(this.namespace+(typeof d>"u"?":":d)+c);return f.log=this.log,f}function i(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let d=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?t.skips.push(f.slice(1)):t.names.push(f)}function s(c,d){let f=0,m=0,g=-1,b=0;for(;f<c.length;)if(m<d.length&&(d[m]===c[f]||d[m]==="*"))d[m]==="*"?(g=m,b=f,m++):(f++,m++);else if(g!==-1)m=g+1,b++,f=b;else return!1;for(;m<d.length&&d[m]==="*";)m++;return m===d.length}function o(){let c=[...t.names,...t.skips.map(d=>"-"+d)].join(",");return t.enable(""),c}function a(c){for(let d of t.skips)if(s(c,d))return!1;for(let d of t.names)if(s(c,d))return!0;return!1}function v(c){return c instanceof Error?c.stack||c.message:c}function l(){}return t.enable(t.load()),t}js.exports=I7});var Qs=ie((te,M1)=>{E();x();k();R();te.formatArgs=O7;te.save=F7;te.load=D7;te.useColors=H7;te.storage=z7();te.destroy=(()=>{let n=!1;return()=>{n||(n=!0)}})();te.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function H7(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function O7(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+M1.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,r=0;n[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(r=t))}),n.splice(r,0,e)}te.log=console.debug||console.log||(()=>{});function F7(n){try{n?te.storage.setItem("debug",n):te.storage.removeItem("debug")}catch{}}function D7(){let n;try{n=te.storage.getItem("debug")||te.storage.getItem("DEBUG")}catch{}return!n&&typeof F<"u"&&"env"in F&&(n=F.env.DEBUG),n}function z7(){try{return localStorage}catch{}}M1.exports=Ys()(te);var{formatters:L7}=M1.exports;L7.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Ks=ie(Dt=>{"use strict";E();x();k();R();var U7=Dt&&Dt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.debug=void 0;var G7=U7(Qs());Dt.debug=(0,G7.default)("mineflayer-mouse")});var Xs=ie(vt=>{"use strict";E();x();k();R();var N7=vt&&vt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vt,"__esModule",{value:!0});vt.isEntityAttackable=void 0;vt.isArmorStandAttackable=Zs;var Js=(ui(),Ja(Gs)),S5=N7(Ns()),W7=Ks(),qs=Object.fromEntries([...S5.default.attackable,...S5.default.notAttackable].map(n=>[n,!0])),V7=S5.default.attackable,j7=(n,e)=>{if(!e.name)throw new Error("Entity has no name");let t=n.entitiesByName[e.name],i=S5.default.entityRenames[e.name]||S5.default.entityRenames[(0,Js.snakeCase)(e.name)]||e.name;if(!qs[i]&&(i=(0,Js.snakeCase)(i),!qs[i]))return(0,W7.debug)(`Cannot find entity ${i} in entityData.json`),!1;let s=Y7[i];return s?s(e,t):V7.includes(i)};vt.isEntityAttackable=j7;var Y7={armor_stand:Zs};function Zs(n,e){let t=Number(n.metadata?.[e.metadataKeys?.indexOf("client_flags")??14]??0),r=(t&16)!==0,i=(t&8)!==0,s=(t&4)!==0,o=(t&1)!==0;return!r}});var F3=ie((Kx,dv)=>{dv.exports={version:"1.20.4","1.8":{blocks:[["wood_planks","planks"],["large_flowers","double_plant"]]},"1.12":{items:[["totem","totem_of_undying"]]},"1.13":{blocks:[["grass","grass_block"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["log","oak_wood"],["log","spruce_wood"],["log","birch_wood"],["log","jungle_wood"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["bed","red_bed"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","dead_bush"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["piston_extension","moving_piston"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["double_stone_slab","stone_slab"],["double_stone_slab","sandstone_slab"],["double_stone_slab","petrified_oak_slab"],["double_stone_slab","cobblestone_slab"],["double_stone_slab","brick_slab"],["double_stone_slab","stone_brick_slab"],["double_stone_slab","nether_brick_slab"],["double_stone_slab","quartz_slab"],["double_stone_slab","smooth_stone"],["double_stone_slab","smooth_sandstone"],["double_stone_slab","smooth_quartz"],["stone_slab","sandstone_slab"],["stone_slab","petrified_oak_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["lit_furnace","furnace"],["standing_sign","sign"],["wooden_door","oak_door"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["lit_redstone_ore","redstone_ore"],["unlit_redstone_torch","redstone_wall_torch"],["unlit_redstone_torch","redstone_torch"],["redstone_torch","redstone_wall_torch"],["snow_layer","snow"],["snow","snow_block"],["reeds","sugar_cane"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["portal","nether_portal"],["lit_pumpkin","jack_o_lantern"],["unpowered_repeater","repeater"],["powered_repeater","repeater"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["brown_mushroom_block","mushroom_stem"],["red_mushroom_block","mushroom_stem"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["lit_redstone_lamp","redstone_lamp"],["double_wooden_slab","oak_slab"],["double_wooden_slab","spruce_slab"],["double_wooden_slab","birch_slab"],["double_wooden_slab","jungle_slab"],["double_wooden_slab","acacia_slab"],["double_wooden_slab","dark_oak_slab"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["flower_pot","potted_poppy"],["flower_pot","potted_dandelion"],["flower_pot","potted_oak_sapling"],["flower_pot","potted_spruce_sapling"],["flower_pot","potted_birch_sapling"],["flower_pot","potted_jungle_sapling"],["flower_pot","potted_red_mushroom"],["flower_pot","potted_brown_mushroom"],["flower_pot","potted_cactus"],["flower_pot","potted_dead_bush"],["flower_pot","potted_fern"],["flower_pot","potted_acacia_sapling"],["flower_pot","potted_dark_oak_sapling"],["flower_pot","potted_blue_orchid"],["flower_pot","potted_allium"],["wooden_button","oak_button"],["skull","skeleton_skull"],["skull","skeleton_wall_skull"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["unpowered_comparator","comparator"],["powered_comparator","comparator"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["log2","acacia_wood"],["log2","dark_oak_wood"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["standing_banner","white_banner"],["wall_banner","white_wall_banner"],["daylight_detector_inverted","daylight_detector"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["double_stone_slab2","red_sandstone_slab"],["double_stone_slab2","smooth_red_sandstone"],["stone_slab2","red_sandstone_slab"],["purpur_double_slab","purpur_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"]],items:[["stone","granite"],["stone","polished_granite"],["stone","diorite"],["stone","polished_diorite"],["stone","andesite"],["stone","polished_andesite"],["grass","grass_block"],["dirt","coarse_dirt"],["dirt","podzol"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["stone_slab","sandstone_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["snow_layer","snow"],["snow","snow_block"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["lit_pumpkin","jack_o_lantern"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["wooden_button","oak_button"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["stone_slab2","red_sandstone_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["silver_shulker_box","light_gray_shulker_box"],["silver_glazed_terracotta","light_gray_glazed_terracotta"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"],["coal","charcoal"],["golden_apple","enchanted_golden_apple"],["wooden_door","oak_door"],["boat","oak_boat"],["reeds","sugar_cane"],["fish","cod"],["fish","salmon"],["fish","tropical_fish"],["fish","pufferfish"],["cooked_fish","cooked_cod"],["cooked_fish","cooked_salmon"],["dye","ink_sac"],["dye","rose_red"],["dye","cactus_green"],["dye","cocoa_beans"],["dye","lapis_lazuli"],["dye","purple_dye"],["dye","cyan_dye"],["dye","light_gray_dye"],["dye","gray_dye"],["dye","pink_dye"],["dye","lime_dye"],["dye","dandelion_yellow"],["dye","light_blue_dye"],["dye","magenta_dye"],["dye","orange_dye"],["dye","bone_meal"],["bed","white_bed"],["bed","orange_bed"],["bed","magenta_bed"],["bed","light_blue_bed"],["bed","yellow_bed"],["bed","lime_bed"],["bed","pink_bed"],["bed","gray_bed"],["bed","light_gray_bed"],["bed","cyan_bed"],["bed","purple_bed"],["bed","blue_bed"],["bed","brown_bed"],["bed","green_bed"],["bed","red_bed"],["bed","black_bed"],["melon","melon_slice"],["speckled_melon","glistering_melon_slice"],["spawn_egg","pig_spawn_egg"],["skull","skeleton_skull"],["skull","wither_skeleton_skull"],["skull","zombie_head"],["skull","player_head"],["skull","creeper_head"],["skull","dragon_head"],["fireworks","firework_rocket"],["firework_charge","firework_star"],["netherbrick","nether_brick"],["banner","black_banner"],["banner","red_banner"],["banner","green_banner"],["banner","brown_banner"],["banner","blue_banner"],["banner","purple_banner"],["banner","cyan_banner"],["banner","light_gray_banner"],["banner","gray_banner"],["banner","pink_banner"],["banner","lime_banner"],["banner","yellow_banner"],["banner","light_blue_banner"],["banner","magenta_banner"],["banner","orange_banner"],["banner","white_banner"],["chorus_fruit_popped","popped_chorus_fruit"],["record_13","music_disc_13"],["record_cat","music_disc_cat"],["record_blocks","music_disc_blocks"],["record_chirp","music_disc_chirp"],["record_far","music_disc_far"],["record_mall","music_disc_mall"],["record_mellohi","music_disc_mellohi"],["record_stal","music_disc_stal"],["record_strad","music_disc_strad"],["record_ward","music_disc_ward"],["record_11","music_disc_11"],["record_wait","music_disc_wait"]]},"1.14":{blocks:[["sign","oak_sign"],["wall_sign","oak_wall_sign"]],items:[["sign","oak_sign"],["rose_red","red_dye"],["cactus_green","green_dye"],["dandelion_yellow","yellow_dye"]]},"1.15.2":{blocks:[],items:[]},"1.16.1":{blocks:[],items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.16.2":{blocks:[],items:[]},"1.17":{blocks:[["grass_path","dirt_path"]],items:[["grass_path","dirt_path"]]},"1.18":{blocks:[],items:[]},"1.19":{blocks:[],items:[]},"1.19.3":{blocks:[],items:[]},"1.19.4":{blocks:[],items:[]},"1.20":{blocks:[],items:[["pottery_shard_archer","archer_pottery_sherd"],["pottery_shard_prize","prize_pottery_sherd"],["pottery_shard_arms_up","arms_up_pottery_sherd"],["pottery_shard_skull","skull_pottery_sherd"]]},"1.16":{items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.20.3":{blocks:[["grass","short_grass"]],items:[["grass","short_grass"]]}}});var D3=ie(W1=>{"use strict";E();x();k();R();Object.defineProperty(W1,"__esModule",{value:!0});W1.versionToNumber=void 0;var uv=n=>{let[e,t="0",r="0"]=n.split(".");return+`${e.padStart(2,"0")}${parseInt(t).toString().padStart(2,"0")}${parseInt(r).toString().padStart(2,"0")}`};W1.versionToNumber=uv});var L3=ie(Vt=>{"use strict";E();x();k();R();var fv=Vt&&Vt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.getRenamedData=void 0;var z3=fv(F3()),Le=D3(),hv=(n,e,t,r)=>{let i=(0,Le.versionToNumber)(t),s=(0,Le.versionToNumber)(r),o=i<s?1:-1,a=o>0?1:0,v=e,l=Object.keys(z3.default).sort((f,m)=>o*((0,Le.versionToNumber)(f)-(0,Le.versionToNumber)(m))),c=o>0?s:i,d=o>0?i:s;for(let f of l.filter(m=>(0,Le.versionToNumber)(m)<=c&&(0,Le.versionToNumber)(m)>=d)){if(o>0&&(0,Le.versionToNumber)(f)>=c||o<0&&(0,Le.versionToNumber)(f)<=d)break;let m=z3.default[f][n];if(m)for(let g of m){let b=g[a],w=g[1-a];if(Array.isArray(v))v.includes(w)&&(v=v.map(y=>y===w?b:y));else if(v===w){v=b;break}}}return v};Vt.getRenamedData=hv});import*as se from"three";function er(){return new se.ShaderMaterial({vertexShader:Av,fragmentShader:Ev,uniforms:se.UniformsUtils.merge([se.UniformsLib.fog,{u_atlas:{value:null},u_tintPalette:{value:null},u_debugMode:{value:0},u_cameraOrigin:{value:new se.Vector3},u_cameraOriginFrac:{value:new se.Vector3}}]),transparent:!1,depthWrite:!0,depthTest:!0,blending:se.NoBlending,glslVersion:se.GLSL3,fog:!0})}var Av,Ev,tr,ht,J3,mt=ee(()=>{"use strict";E();x();k();R();Av=`
11
+ `);var g=m.map(function(y){return this.buildFirstStateStack(y,[])||[y]},this);g.forEach(function(y){var w=y[0],b=w.rule.symbols[w.dot],A=this.getSymbolDisplay(b);c.push("A "+A+" based on:"),this.displayStateStack(y,c)},this)}return c.push(""),c.join(`
12
+ `)},s.prototype.displayStateStack=function(a,l){for(var c,u=0,f=0;f<a.length;f++){var m=a[f],g=m.rule.toString(m.dot);g===c?u++:(u>0&&l.push(" ^ "+u+" more lines identical to this"),u=0,l.push(" "+g)),c=g}},s.prototype.getSymbolDisplay=function(a){return o(a)},s.prototype.buildFirstStateStack=function(a,l){if(l.indexOf(a)!==-1)return null;if(a.wantedBy.length===0)return[a];var c=a.wantedBy[0],u=[a].concat(l),f=this.buildFirstStateStack(c,u);return f===null?null:[a].concat(f)},s.prototype.save=function(){var a=this.table[this.current];return a.lexerState=this.lexerState,a},s.prototype.restore=function(a){var l=a.index;this.current=l,this.table[l]=a,this.table.splice(l+1),this.lexerState=a.lexerState,this.results=this.finish()},s.prototype.rewind=function(a){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[a])},s.prototype.finish=function(){var a=[],l=this.grammar.start,c=this.table[this.table.length-1];return c.states.forEach(function(u){u.rule.name===l&&u.dot===u.rule.symbols.length&&u.reference===0&&u.data!==s.fail&&a.push(u)}),a.map(function(u){return u.data})};function o(a){var l=typeof a;if(l==="string")return a;if(l==="object"){if(a.literal)return JSON.stringify(a.literal);if(a instanceof RegExp)return"character matching "+a;if(a.type)return a.type+" token";if(a.test)return"token matching "+String(a.test);throw new Error("Unknown symbol type: "+a)}}function v(a){var l=typeof a;if(l==="string")return a;if(l==="object"){if(a.literal)return JSON.stringify(a.literal);if(a instanceof RegExp)return a.toString();if(a.type)return"%"+a.type;if(a.test)return"<"+String(a.test)+">";throw new Error("Unknown symbol type: "+a)}}return{Parser:s,Grammar:r,Rule:n}})});var xs=te((Hg,y1)=>{E();x();k();R();(function(){function n(a){return a[0]}function e(a){if(a==="true")return{type:"boolean",value:!0};if(a==="false")return{type:"boolean",value:!1};let l="bslfdi",c={b:"byte",s:"short",l:"long",f:"float",d:"double",i:"int"},u=a.charAt(a.length-1).toLowerCase();if(l.indexOf(u)!==-1){let y=parseFloat(a.substring(0,a.length-1));return isNaN(y)?{value:a,type:"string"}:{value:y,type:c[u]}}let f=parseFloat(a),m=a.includes("."),g=f>>0===f;return!isNaN(a)&&(m||g)?{value:f,type:m?"double":"int"}:{value:a,type:"string"}}function t(a,l){a[0]!==void 0&&(l[a[0]]=a[1])}function r(a){let l={};t(a[2],l);for(let c in a[3])t(a[3][c][3],l);return{type:"compound",value:l}}function i(a){let l=[a[6]];for(let u in a[7])l.push(a[7][u][3]);return{type:{B:"byteArray",I:"intArray",L:"longArray"}[a[2]],value:{type:l[0].type,value:l.map(u=>u.value)}}}function s(a){let l=[a[2]];for(let c in a[3])l.push(a[3][c][3]);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}function o(a){let l=[];t(a[2],l);for(let c in a[3])t(a[3][c][3],l);return{type:"list",value:{type:l[0].type,value:l.map(c=>c.value)}}}var v={Lexer:void 0,ParserRules:[{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(a){return null}},{name:"__$ebnf$1",symbols:["wschar"]},{name:"__$ebnf$1",symbols:["__$ebnf$1","wschar"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"__",symbols:["__$ebnf$1"],postprocess:function(a){return null}},{name:"wschar",symbols:[/[ \t\n\v\f]/],postprocess:n},{name:"MAIN",symbols:["_","JVALUE","_"],postprocess:a=>a[1]},{name:"JVALUE",symbols:["JOBJECT"],postprocess:a=>a[0]},{name:"JVALUE",symbols:[{literal:"'"},"_","JOBJECT","_",{literal:"'"}],postprocess:a=>a[2]},{name:"JVALUE",symbols:["JARRAY"],postprocess:a=>a[0]},{name:"JVALUE",symbols:["STRING"],postprocess:a=>a[0]},{name:"JVALUE$string$1",symbols:[{literal:"n"},{literal:"u"},{literal:"l"},{literal:"l"}],postprocess:function(l){return l.join("")}},{name:"JVALUE",symbols:["JVALUE$string$1"],postprocess:a=>null},{name:"JOBJECT",symbols:[{literal:"{"},"_",{literal:"}"}],postprocess:a=>({type:"compound",value:{}})},{name:"JOBJECT$ebnf$1",symbols:[]},{name:"JOBJECT$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JOBJECT$ebnf$1",symbols:["JOBJECT$ebnf$1","JOBJECT$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JOBJECT$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JOBJECT$ebnf$2",symbols:["JOBJECT$ebnf$2$subexpression$1"],postprocess:n},{name:"JOBJECT$ebnf$2",symbols:[],postprocess:function(a){return null}},{name:"JOBJECT",symbols:[{literal:"{"},"_","PAIR","JOBJECT$ebnf$1","JOBJECT$ebnf$2",{literal:"}"}],postprocess:r},{name:"JARRAY",symbols:[{literal:"["},"_",{literal:"]"}],postprocess:a=>({type:"list",value:{}})},{name:"JARRAY$ebnf$1",symbols:[]},{name:"JARRAY$ebnf$1$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$1",symbols:["JARRAY$ebnf$1","JARRAY$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$2$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$2",symbols:["JARRAY$ebnf$2$subexpression$1"],postprocess:n},{name:"JARRAY$ebnf$2",symbols:[],postprocess:function(a){return null}},{name:"JARRAY",symbols:[{literal:"["},"_",/[BIL]/,"_",{literal:";"},"_","JVALUE","JARRAY$ebnf$1","JARRAY$ebnf$2","_",{literal:"]"}],postprocess:i},{name:"JARRAY$ebnf$3",symbols:[]},{name:"JARRAY$ebnf$3$subexpression$1",symbols:["_",{literal:","},"_","JVALUE"]},{name:"JARRAY$ebnf$3",symbols:["JARRAY$ebnf$3","JARRAY$ebnf$3$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$4$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$4",symbols:["JARRAY$ebnf$4$subexpression$1"],postprocess:n},{name:"JARRAY$ebnf$4",symbols:[],postprocess:function(a){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","JVALUE","JARRAY$ebnf$3","JARRAY$ebnf$4","_",{literal:"]"}],postprocess:s},{name:"JARRAY$ebnf$5",symbols:[]},{name:"JARRAY$ebnf$5$subexpression$1",symbols:["_",{literal:","},"_","PAIR"]},{name:"JARRAY$ebnf$5",symbols:["JARRAY$ebnf$5","JARRAY$ebnf$5$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"JARRAY$ebnf$6$subexpression$1",symbols:["_",{literal:","}]},{name:"JARRAY$ebnf$6",symbols:["JARRAY$ebnf$6$subexpression$1"],postprocess:n},{name:"JARRAY$ebnf$6",symbols:[],postprocess:function(a){return null}},{name:"JARRAY",symbols:[{literal:"["},"_","PAIR","JARRAY$ebnf$5","JARRAY$ebnf$6","_",{literal:"]"}],postprocess:o},{name:"PAIR",symbols:["STRING","_",{literal:":"},"_","JVALUE"],postprocess:a=>[a[0].value,a[4]]},{name:"STRING$ebnf$1",symbols:[]},{name:"STRING$ebnf$1$subexpression$1",symbols:[/[^\\"]/]},{name:"STRING$ebnf$1$subexpression$1",symbols:[{literal:"\\"},/["bfnrt\/\\]/]},{name:"STRING$ebnf$1$subexpression$1$string$1",symbols:[{literal:"\\"},{literal:"u"}],postprocess:function(l){return l.join("")}},{name:"STRING$ebnf$1$subexpression$1",symbols:["STRING$ebnf$1$subexpression$1$string$1",/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/]},{name:"STRING$ebnf$1",symbols:["STRING$ebnf$1","STRING$ebnf$1$subexpression$1"],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:[{literal:'"'},"STRING$ebnf$1",{literal:'"'}],postprocess:a=>e(JSON.parse(a.flat(3).map(l=>l.replace(`
13
+ `,"\\n")).join("")))},{name:"STRING$ebnf$2",symbols:[/[^\"\'}\]:;,\s]/]},{name:"STRING$ebnf$2",symbols:["STRING$ebnf$2",/[^\"\'}\]:;,\s]/],postprocess:function(l){return l[0].concat([l[1]])}},{name:"STRING",symbols:["STRING$ebnf$2"],postprocess:a=>e(a[0].join(""))}],ParserStart:"MAIN"};typeof y1<"u"&&typeof y1.exports<"u"?y1.exports=v:window.grammar=v})()});var ai=te((Lg,Cs)=>{E();x();k();R();var Rs=Es(),d7=xs();function Ms(n){function e(t,r){return r==="compound"?Object.keys(t).reduce(function(i,s){return i[s]=Ms(t[s]),i},{}):r==="list"?Array.isArray(t.value)?t.value.map(function(i){return e(i,t.type)}):[]:t}return e(n.value,n.type)}function _1({value:n,type:e}){if(e==="compound"){let r=[],i=Object.entries(n);for(let s=0;s<i.length;s++){let o=i[s][0],v=_1(i[s][1]);o==="string"&&(v=ks(v)),r.push(`${o}:${v}`)}return`{${r.join(",")}}`}else{if(e==="list")return Array.isArray(n.value)?`[${Ts(n)}]`:"[]";if(e==="byteArray"||e==="intArray"||e==="longArray"){let r=f7(e),i=Ts(n);return`[${r}${i}]`}}let t=n+h7(n,e);return e==="string"&&(t=ks(t)),t}function ks(n){return n=n.replace(/"/g,'\\"'),(/'|{|}|\[|\]|:|;|,|\(|\)|§|=/g.test(n)||n==="")&&(n=`"${n}"`),n}function Ts({value:n,type:e}){let t=u7(n),r=[];for(let i=0;i<n.length;i++){let s=n[i];s!==void 0&&(s=_1({value:s,type:e}),t?r.push(`${i}:${s}`):r.push(s))}return r.join(",")}function u7(n){for(let e=0;e<n.length;e++)if(n[e]===void 0)return!0;return!1}var f7=n=>n.charAt(0).toUpperCase()+";";function h7(n,e){return e==="double"?n>>0===n?"d":"":{int:"",byte:"b",short:"s",float:"f",long:"l",string:""}[e]}function m7(n){return _1(Ss(n))}function Ss(n){try{let e=new Rs.Parser(Rs.Grammar.fromCompiled(d7));return e.feed(n),e.results[0]}catch(e){throw e.message=`Error parsing text '${n}'`,e}}Cs.exports={parse:Ss,simplify:Ms,stringify:_1,normalize:m7}});var Os={};j5(Os,{camelCase:()=>_7,capitalCase:()=>li,constantCase:()=>E7,dotCase:()=>x7,kebabCase:()=>R7,noCase:()=>R5,pascalCase:()=>w7,pascalSnakeCase:()=>A7,pathCase:()=>k7,sentenceCase:()=>T7,snakeCase:()=>ci,split:()=>vi,splitSeparateNumbers:()=>Is,trainCase:()=>M7});function vi(n){let e=n.trim();e=e.replace(p7,Bs).replace(g7,Bs),e=e.replace(y7,"\0");let t=0,r=e.length;for(;e.charAt(t)==="\0";)t++;if(t===r)return[];for(;e.charAt(r-1)==="\0";)r--;return e.slice(t,r).split(/\0/g)}function Is(n){let e=vi(n);for(let t=0;t<e.length;t++){let r=e[t],i=b7.exec(r);if(i){let s=i.index+(i[1]??i[2]).length;e.splice(t,1,r.slice(0,s),r.slice(s))}}return e}function R5(n,e){let[t,r,i]=It(n,e);return t+r.map(k5(e?.locale)).join(e?.delimiter??" ")+i}function _7(n,e){let[t,r,i]=It(n,e),s=k5(e?.locale),o=T5(e?.locale),v=e?.mergeAmbiguousCharacters?w1(s,o):Hs(s,o);return t+r.map((a,l)=>l===0?s(a):v(a,l)).join(e?.delimiter??"")+i}function w7(n,e){let[t,r,i]=It(n,e),s=k5(e?.locale),o=T5(e?.locale),v=e?.mergeAmbiguousCharacters?w1(s,o):Hs(s,o);return t+r.map(v).join(e?.delimiter??"")+i}function A7(n,e){return li(n,{delimiter:"_",...e})}function li(n,e){let[t,r,i]=It(n,e),s=k5(e?.locale),o=T5(e?.locale);return t+r.map(w1(s,o)).join(e?.delimiter??" ")+i}function E7(n,e){let[t,r,i]=It(n,e);return t+r.map(T5(e?.locale)).join(e?.delimiter??"_")+i}function x7(n,e){return R5(n,{delimiter:".",...e})}function R7(n,e){return R5(n,{delimiter:"-",...e})}function k7(n,e){return R5(n,{delimiter:"/",...e})}function T7(n,e){let[t,r,i]=It(n,e),s=k5(e?.locale),o=T5(e?.locale),v=w1(s,o);return t+r.map((a,l)=>l===0?v(a):s(a)).join(e?.delimiter??" ")+i}function ci(n,e){return R5(n,{delimiter:"_",...e})}function M7(n,e){return li(n,{delimiter:"-",...e})}function k5(n){return n===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(n)}function T5(n){return n===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(n)}function w1(n,e){return t=>`${e(t[0])}${n(t.slice(1))}`}function Hs(n,e){return(t,r)=>{let i=t[0];return(r>0&&i>="0"&&i<="9"?"_"+i:e(i))+n(t.slice(1))}}function It(n,e={}){let t=e.split??(e.separateNumbers?Is:vi),r=e.prefixCharacters??Ps,i=e.suffixCharacters??Ps,s=0,o=n.length;for(;s<n.length;){let v=n.charAt(s);if(!r.includes(v))break;s++}for(;o>s;){let v=o-1,a=n.charAt(v);if(!i.includes(a))break;o=v}return[n.slice(0,s),t(n.slice(s,o)),n.slice(o)]}var p7,g7,b7,y7,Bs,Ps,di=X0(()=>{E();x();k();R();p7=/([\p{Ll}\d])(\p{Lu})/gu,g7=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,b7=/(\d)\p{Ll}|(\p{L})\d/u,y7=/[^\p{L}\d]+/giu,Bs="$1\0$2",Ps=""});var Fs=te((Kg,S7)=>{S7.exports={version:"1.21.4",attackable:["acacia_boat","acacia_chest_boat","allay","armadillo","armor_stand","axolotl","bamboo_chest_raft","bamboo_raft","bat","bee","birch_boat","birch_chest_boat","blaze","bogged","breeze","camel","cat","cave_spider","cherry_boat","cherry_chest_boat","chest_minecart","chicken","cod","command_block_minecart","cow","creaking","creeper","dark_oak_boat","dark_oak_chest_boat","dolphin","donkey","drowned","elder_guardian","end_crystal","ender_dragon","enderman","endermite","evoker","falling_block","fox","frog","furnace_minecart","ghast","giant","glow_item_frame","glow_squid","goat","guardian","hoglin","hopper_minecart","horse","husk","illusioner","iron_golem","item_frame","jungle_boat","jungle_chest_boat","leash_knot","llama","magma_cube","mangrove_boat","mangrove_chest_boat","minecart","mooshroom","mule","oak_boat","oak_chest_boat","ocelot","painting","pale_oak_boat","pale_oak_chest_boat","panda","parrot","phantom","pig","piglin","piglin_brute","pillager","player","polar_bear","pufferfish","rabbit","ravager","salmon","sheep","shulker","shulker_bullet","silverfish","skeleton","skeleton_horse","slime","sniffer","snow_golem","spawner_minecart","spider","spruce_boat","spruce_chest_boat","squid","stray","strider","tadpole","tnt","tnt_minecart","trader_llama","tropical_fish","turtle","vex","villager","vindicator","wandering_trader","warden","wind_charge","witch","wither","wither_skeleton","wolf","zoglin","zombie","zombie_horse","zombie_villager","zombified_piglin"],notAttackable:["area_effect_cloud","arrow","block_display","breeze_wind_charge","dragon_fireball","egg","ender_pearl","evoker_fangs","experience_bottle","experience_orb","eye_of_ender","fireball","firework_rocket","fishing_bobber","interaction","item","item_display","lightning_bolt","llama_spit","marker","ominous_item_spawner","potion","small_fireball","snowball","spectral_arrow","text_display","trident","wither_skull"],entityRenames:{Boat:"oak_boat",EnderCrystal:"end_crystal",EntityHorse:"horse",EyeOfEnderSignal:"eye_of_ender",FallingSand:"falling_block",FireworksRocketEntity:"firework_rocket","Fishing Float":"fishing_bobber","Fishing Hook":"fishing_bobber",LavaSlime:"magma_cube",MinecartRideable:"minecart",Mob:!1,Monster:!1,MushroomCow:"mooshroom",Ozelot:"ocelot",PigZombie:"zombified_piglin",PrimedTnt:"tnt",SnowMan:"snow_golem",ThrownEgg:"egg",ThrownEnderpearl:"ender_pearl",ThrownExpBottle:"experience_bottle",ThrownPotion:"potion",VillagerGolem:"iron_golem",WitherBoss:"wither",XPOrb:"experience_orb",activated_tnt:"tnt",armorstand:"armor_stand",boat:"oak_boat",chest_boat:"oak_chest_boat",commandblock_minecart:"command_block_minecart",creaking_transient:"creaking",ender_crystal:"end_crystal",endercrystal:"end_crystal",evocation_fangs:"evoker_fangs",evocation_illager:"evoker",eye_of_ender_signal:"eye_of_ender",falling_objects:"falling_block",firecharge:"fireball",fireworks_rocket:"firework_rocket",fishing_hook:"fishing_bobber",illusion_illager:"illusioner",item_frames:"item_frame",item_stack:"item",snowman:"snow_golem",thrown_enderpearl:"ender_pearl","thrown_exp bottle":"experience_bottle",thrown_exp_bottle:"experience_bottle",thrown_potion:"potion",tipped_arrow:"arrow",villager_golem:"iron_golem",vindication_illager:"vindicator",xp_bottle:"experience_bottle",xp_orb:"experience_orb",zombie_pigman:"zombified_piglin"}}});var zs=te((Jg,Ds)=>{E();x();k();R();var Ht=1e3,Ot=Ht*60,Ft=Ot*60,ot=Ft*24,C7=ot*7,B7=ot*365.25;Ds.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return P7(n);if(t==="number"&&isFinite(n))return e.long?H7(n):I7(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function P7(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*B7;case"weeks":case"week":case"w":return t*C7;case"days":case"day":case"d":return t*ot;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ft;case"minutes":case"minute":case"mins":case"min":case"m":return t*Ot;case"seconds":case"second":case"secs":case"sec":case"s":return t*Ht;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function I7(n){var e=Math.abs(n);return e>=ot?Math.round(n/ot)+"d":e>=Ft?Math.round(n/Ft)+"h":e>=Ot?Math.round(n/Ot)+"m":e>=Ht?Math.round(n/Ht)+"s":n+"ms"}function H7(n){var e=Math.abs(n);return e>=ot?A1(n,e,ot,"day"):e>=Ft?A1(n,e,Ft,"hour"):e>=Ot?A1(n,e,Ot,"minute"):e>=Ht?A1(n,e,Ht,"second"):n+" ms"}function A1(n,e,t,r){var i=e>=t*1.5;return Math.round(n/t)+" "+r+(i?"s":"")}});var Us=te((eb,Ls)=>{E();x();k();R();function O7(n){t.debug=t,t.default=t,t.coerce=a,t.disable=o,t.enable=i,t.enabled=v,t.humanize=zs(),t.destroy=l,Object.keys(n).forEach(c=>{t[c]=n[c]}),t.names=[],t.skips=[],t.formatters={};function e(c){let u=0;for(let f=0;f<c.length;f++)u=(u<<5)-u+c.charCodeAt(f),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(c){let u,f=null,m,g;function y(...w){if(!y.enabled)return;let b=y,A=Number(new Date),C=A-(u||A);b.diff=C,b.prev=u,b.curr=A,u=A,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let M=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(H,B)=>{if(H==="%%")return"%";M++;let I=t.formatters[B];if(typeof I=="function"){let G=w[M];H=I.call(b,G),w.splice(M,1),M--}return H}),t.formatArgs.call(b,w),(b.log||t.log).apply(b,w)}return y.namespace=c,y.useColors=t.useColors(),y.color=t.selectColor(c),y.extend=r,y.destroy=t.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==t.namespaces&&(m=t.namespaces,g=t.enabled(c)),g),set:w=>{f=w}}),typeof t.init=="function"&&t.init(y),y}function r(c,u){let f=t(this.namespace+(typeof u>"u"?":":u)+c);return f.log=this.log,f}function i(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let u=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of u)f[0]==="-"?t.skips.push(f.slice(1)):t.names.push(f)}function s(c,u){let f=0,m=0,g=-1,y=0;for(;f<c.length;)if(m<u.length&&(u[m]===c[f]||u[m]==="*"))u[m]==="*"?(g=m,y=f,m++):(f++,m++);else if(g!==-1)m=g+1,y++,f=y;else return!1;for(;m<u.length&&u[m]==="*";)m++;return m===u.length}function o(){let c=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),c}function v(c){for(let u of t.skips)if(s(c,u))return!1;for(let u of t.names)if(s(c,u))return!0;return!1}function a(c){return c instanceof Error?c.stack||c.message:c}function l(){}return t.enable(t.load()),t}Ls.exports=O7});var Gs=te(($0,E1)=>{E();x();k();R();$0.formatArgs=D7;$0.save=z7;$0.load=L7;$0.useColors=F7;$0.storage=U7();$0.destroy=(()=>{let n=!1;return()=>{n||(n=!0)}})();$0.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function F7(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function D7(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+E1.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,r=0;n[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(r=t))}),n.splice(r,0,e)}$0.log=console.debug||console.log||(()=>{});function z7(n){try{n?$0.storage.setItem("debug",n):$0.storage.removeItem("debug")}catch{}}function L7(){let n;try{n=$0.storage.getItem("debug")||$0.storage.getItem("DEBUG")}catch{}return!n&&typeof F<"u"&&"env"in F&&(n=F.env.DEBUG),n}function U7(){try{return localStorage}catch{}}E1.exports=Us()($0);var{formatters:G7}=E1.exports;G7.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Ns=te(Dt=>{"use strict";E();x();k();R();var N7=Dt&&Dt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.debug=void 0;var W7=N7(Gs());Dt.debug=(0,W7.default)("mineflayer-mouse")});var Ys=te(at=>{"use strict";E();x();k();R();var V7=at&&at.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(at,"__esModule",{value:!0});at.isEntityAttackable=void 0;at.isArmorStandAttackable=js;var Ws=(di(),Da(Os)),M5=V7(Fs()),j7=Ns(),Vs=Object.fromEntries([...M5.default.attackable,...M5.default.notAttackable].map(n=>[n,!0])),Y7=M5.default.attackable,Q7=(n,e)=>{if(!e.name)throw new Error("Entity has no name");let t=n.entitiesByName[e.name],i=M5.default.entityRenames[e.name]||M5.default.entityRenames[(0,Ws.snakeCase)(e.name)]||e.name;if(!Vs[i]&&(i=(0,Ws.snakeCase)(i),!Vs[i]))return(0,j7.debug)(`Cannot find entity ${i} in entityData.json`),!1;let s=K7[i];return s?s(e,t):Y7.includes(i)};at.isEntityAttackable=Q7;var K7={armor_stand:js};function js(n,e){let t=Number(n.metadata?.[e.metadataKeys?.indexOf("client_flags")??14]??0),r=(t&16)!==0,i=(t&8)!==0,s=(t&4)!==0,o=(t&1)!==0;return!r}});var T3=te((EE,ev)=>{ev.exports={version:"1.20.4","1.8":{blocks:[["wood_planks","planks"],["large_flowers","double_plant"]]},"1.12":{items:[["totem","totem_of_undying"]]},"1.13":{blocks:[["grass","grass_block"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["log","oak_wood"],["log","spruce_wood"],["log","birch_wood"],["log","jungle_wood"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["bed","red_bed"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","dead_bush"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["piston_extension","moving_piston"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["double_stone_slab","stone_slab"],["double_stone_slab","sandstone_slab"],["double_stone_slab","petrified_oak_slab"],["double_stone_slab","cobblestone_slab"],["double_stone_slab","brick_slab"],["double_stone_slab","stone_brick_slab"],["double_stone_slab","nether_brick_slab"],["double_stone_slab","quartz_slab"],["double_stone_slab","smooth_stone"],["double_stone_slab","smooth_sandstone"],["double_stone_slab","smooth_quartz"],["stone_slab","sandstone_slab"],["stone_slab","petrified_oak_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["lit_furnace","furnace"],["standing_sign","sign"],["wooden_door","oak_door"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["lit_redstone_ore","redstone_ore"],["unlit_redstone_torch","redstone_wall_torch"],["unlit_redstone_torch","redstone_torch"],["redstone_torch","redstone_wall_torch"],["snow_layer","snow"],["snow","snow_block"],["reeds","sugar_cane"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["portal","nether_portal"],["lit_pumpkin","jack_o_lantern"],["unpowered_repeater","repeater"],["powered_repeater","repeater"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["brown_mushroom_block","mushroom_stem"],["red_mushroom_block","mushroom_stem"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["lit_redstone_lamp","redstone_lamp"],["double_wooden_slab","oak_slab"],["double_wooden_slab","spruce_slab"],["double_wooden_slab","birch_slab"],["double_wooden_slab","jungle_slab"],["double_wooden_slab","acacia_slab"],["double_wooden_slab","dark_oak_slab"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["flower_pot","potted_poppy"],["flower_pot","potted_dandelion"],["flower_pot","potted_oak_sapling"],["flower_pot","potted_spruce_sapling"],["flower_pot","potted_birch_sapling"],["flower_pot","potted_jungle_sapling"],["flower_pot","potted_red_mushroom"],["flower_pot","potted_brown_mushroom"],["flower_pot","potted_cactus"],["flower_pot","potted_dead_bush"],["flower_pot","potted_fern"],["flower_pot","potted_acacia_sapling"],["flower_pot","potted_dark_oak_sapling"],["flower_pot","potted_blue_orchid"],["flower_pot","potted_allium"],["wooden_button","oak_button"],["skull","skeleton_skull"],["skull","skeleton_wall_skull"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["unpowered_comparator","comparator"],["powered_comparator","comparator"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["log2","acacia_wood"],["log2","dark_oak_wood"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["standing_banner","white_banner"],["wall_banner","white_wall_banner"],["daylight_detector_inverted","daylight_detector"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["double_stone_slab2","red_sandstone_slab"],["double_stone_slab2","smooth_red_sandstone"],["stone_slab2","red_sandstone_slab"],["purpur_double_slab","purpur_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"]],items:[["stone","granite"],["stone","polished_granite"],["stone","diorite"],["stone","polished_diorite"],["stone","andesite"],["stone","polished_andesite"],["grass","grass_block"],["dirt","coarse_dirt"],["dirt","podzol"],["planks","oak_planks"],["planks","spruce_planks"],["planks","birch_planks"],["planks","jungle_planks"],["planks","acacia_planks"],["planks","dark_oak_planks"],["sapling","oak_sapling"],["sapling","spruce_sapling"],["sapling","birch_sapling"],["sapling","jungle_sapling"],["sapling","acacia_sapling"],["sapling","dark_oak_sapling"],["sand","red_sand"],["log","oak_log"],["log","spruce_log"],["log","birch_log"],["log","jungle_log"],["leaves","oak_leaves"],["leaves","spruce_leaves"],["leaves","birch_leaves"],["leaves","jungle_leaves"],["sponge","wet_sponge"],["sandstone","chiseled_sandstone"],["sandstone","cut_sandstone"],["noteblock","note_block"],["golden_rail","powered_rail"],["web","cobweb"],["tallgrass","grass"],["tallgrass","fern"],["deadbush","dead_bush"],["wool","white_wool"],["wool","orange_wool"],["wool","magenta_wool"],["wool","light_blue_wool"],["wool","yellow_wool"],["wool","lime_wool"],["wool","pink_wool"],["wool","gray_wool"],["wool","light_gray_wool"],["wool","cyan_wool"],["wool","purple_wool"],["wool","blue_wool"],["wool","brown_wool"],["wool","green_wool"],["wool","red_wool"],["wool","black_wool"],["yellow_flower","dandelion"],["red_flower","poppy"],["red_flower","blue_orchid"],["red_flower","allium"],["red_flower","azure_bluet"],["red_flower","red_tulip"],["red_flower","orange_tulip"],["red_flower","white_tulip"],["red_flower","pink_tulip"],["red_flower","oxeye_daisy"],["stone_slab","sandstone_slab"],["stone_slab","cobblestone_slab"],["stone_slab","brick_slab"],["stone_slab","stone_brick_slab"],["stone_slab","nether_brick_slab"],["stone_slab","quartz_slab"],["brick_block","bricks"],["mob_spawner","spawner"],["stone_stairs","cobblestone_stairs"],["wooden_pressure_plate","oak_pressure_plate"],["snow_layer","snow"],["snow","snow_block"],["fence","oak_fence"],["pumpkin","carved_pumpkin"],["lit_pumpkin","jack_o_lantern"],["stained_glass","white_stained_glass"],["stained_glass","orange_stained_glass"],["stained_glass","magenta_stained_glass"],["stained_glass","light_blue_stained_glass"],["stained_glass","yellow_stained_glass"],["stained_glass","lime_stained_glass"],["stained_glass","pink_stained_glass"],["stained_glass","gray_stained_glass"],["stained_glass","light_gray_stained_glass"],["stained_glass","cyan_stained_glass"],["stained_glass","purple_stained_glass"],["stained_glass","blue_stained_glass"],["stained_glass","brown_stained_glass"],["stained_glass","green_stained_glass"],["stained_glass","red_stained_glass"],["stained_glass","black_stained_glass"],["trapdoor","oak_trapdoor"],["monster_egg","infested_stone"],["monster_egg","infested_cobblestone"],["monster_egg","infested_stone_bricks"],["monster_egg","infested_mossy_stone_bricks"],["monster_egg","infested_cracked_stone_bricks"],["monster_egg","infested_chiseled_stone_bricks"],["stonebrick","stone_bricks"],["stonebrick","mossy_stone_bricks"],["stonebrick","cracked_stone_bricks"],["stonebrick","chiseled_stone_bricks"],["melon_block","melon"],["fence_gate","oak_fence_gate"],["waterlily","lily_pad"],["nether_brick","nether_bricks"],["wooden_slab","oak_slab"],["wooden_slab","spruce_slab"],["wooden_slab","birch_slab"],["wooden_slab","jungle_slab"],["wooden_slab","acacia_slab"],["wooden_slab","dark_oak_slab"],["cobblestone_wall","mossy_cobblestone_wall"],["wooden_button","oak_button"],["anvil","chipped_anvil"],["anvil","damaged_anvil"],["quartz_ore","nether_quartz_ore"],["quartz_block","chiseled_quartz_block"],["quartz_block","quartz_pillar"],["stained_hardened_clay","white_terracotta"],["stained_hardened_clay","orange_terracotta"],["stained_hardened_clay","magenta_terracotta"],["stained_hardened_clay","light_blue_terracotta"],["stained_hardened_clay","yellow_terracotta"],["stained_hardened_clay","lime_terracotta"],["stained_hardened_clay","pink_terracotta"],["stained_hardened_clay","gray_terracotta"],["stained_hardened_clay","light_gray_terracotta"],["stained_hardened_clay","cyan_terracotta"],["stained_hardened_clay","purple_terracotta"],["stained_hardened_clay","blue_terracotta"],["stained_hardened_clay","brown_terracotta"],["stained_hardened_clay","green_terracotta"],["stained_hardened_clay","red_terracotta"],["stained_hardened_clay","black_terracotta"],["stained_glass_pane","white_stained_glass_pane"],["stained_glass_pane","orange_stained_glass_pane"],["stained_glass_pane","magenta_stained_glass_pane"],["stained_glass_pane","light_blue_stained_glass_pane"],["stained_glass_pane","yellow_stained_glass_pane"],["stained_glass_pane","lime_stained_glass_pane"],["stained_glass_pane","pink_stained_glass_pane"],["stained_glass_pane","gray_stained_glass_pane"],["stained_glass_pane","light_gray_stained_glass_pane"],["stained_glass_pane","cyan_stained_glass_pane"],["stained_glass_pane","purple_stained_glass_pane"],["stained_glass_pane","blue_stained_glass_pane"],["stained_glass_pane","brown_stained_glass_pane"],["stained_glass_pane","green_stained_glass_pane"],["stained_glass_pane","red_stained_glass_pane"],["stained_glass_pane","black_stained_glass_pane"],["leaves2","acacia_leaves"],["leaves2","dark_oak_leaves"],["log2","acacia_log"],["log2","dark_oak_log"],["slime","slime_block"],["prismarine","prismarine_bricks"],["prismarine","dark_prismarine"],["carpet","white_carpet"],["carpet","orange_carpet"],["carpet","magenta_carpet"],["carpet","light_blue_carpet"],["carpet","yellow_carpet"],["carpet","lime_carpet"],["carpet","pink_carpet"],["carpet","gray_carpet"],["carpet","light_gray_carpet"],["carpet","cyan_carpet"],["carpet","purple_carpet"],["carpet","blue_carpet"],["carpet","brown_carpet"],["carpet","green_carpet"],["carpet","red_carpet"],["carpet","black_carpet"],["hardened_clay","terracotta"],["double_plant","sunflower"],["double_plant","lilac"],["double_plant","tall_grass"],["double_plant","large_fern"],["double_plant","rose_bush"],["double_plant","peony"],["red_sandstone","chiseled_red_sandstone"],["red_sandstone","cut_red_sandstone"],["stone_slab2","red_sandstone_slab"],["end_bricks","end_stone_bricks"],["magma","magma_block"],["red_nether_brick","red_nether_bricks"],["silver_shulker_box","light_gray_shulker_box"],["silver_glazed_terracotta","light_gray_glazed_terracotta"],["concrete","white_concrete"],["concrete","orange_concrete"],["concrete","magenta_concrete"],["concrete","light_blue_concrete"],["concrete","yellow_concrete"],["concrete","lime_concrete"],["concrete","pink_concrete"],["concrete","gray_concrete"],["concrete","light_gray_concrete"],["concrete","cyan_concrete"],["concrete","purple_concrete"],["concrete","blue_concrete"],["concrete","brown_concrete"],["concrete","green_concrete"],["concrete","red_concrete"],["concrete","black_concrete"],["concrete_powder","white_concrete_powder"],["concrete_powder","orange_concrete_powder"],["concrete_powder","magenta_concrete_powder"],["concrete_powder","light_blue_concrete_powder"],["concrete_powder","yellow_concrete_powder"],["concrete_powder","lime_concrete_powder"],["concrete_powder","pink_concrete_powder"],["concrete_powder","gray_concrete_powder"],["concrete_powder","light_gray_concrete_powder"],["concrete_powder","cyan_concrete_powder"],["concrete_powder","purple_concrete_powder"],["concrete_powder","blue_concrete_powder"],["concrete_powder","brown_concrete_powder"],["concrete_powder","green_concrete_powder"],["concrete_powder","red_concrete_powder"],["concrete_powder","black_concrete_powder"],["coal","charcoal"],["golden_apple","enchanted_golden_apple"],["wooden_door","oak_door"],["boat","oak_boat"],["reeds","sugar_cane"],["fish","cod"],["fish","salmon"],["fish","tropical_fish"],["fish","pufferfish"],["cooked_fish","cooked_cod"],["cooked_fish","cooked_salmon"],["dye","ink_sac"],["dye","rose_red"],["dye","cactus_green"],["dye","cocoa_beans"],["dye","lapis_lazuli"],["dye","purple_dye"],["dye","cyan_dye"],["dye","light_gray_dye"],["dye","gray_dye"],["dye","pink_dye"],["dye","lime_dye"],["dye","dandelion_yellow"],["dye","light_blue_dye"],["dye","magenta_dye"],["dye","orange_dye"],["dye","bone_meal"],["bed","white_bed"],["bed","orange_bed"],["bed","magenta_bed"],["bed","light_blue_bed"],["bed","yellow_bed"],["bed","lime_bed"],["bed","pink_bed"],["bed","gray_bed"],["bed","light_gray_bed"],["bed","cyan_bed"],["bed","purple_bed"],["bed","blue_bed"],["bed","brown_bed"],["bed","green_bed"],["bed","red_bed"],["bed","black_bed"],["melon","melon_slice"],["speckled_melon","glistering_melon_slice"],["spawn_egg","pig_spawn_egg"],["skull","skeleton_skull"],["skull","wither_skeleton_skull"],["skull","zombie_head"],["skull","player_head"],["skull","creeper_head"],["skull","dragon_head"],["fireworks","firework_rocket"],["firework_charge","firework_star"],["netherbrick","nether_brick"],["banner","black_banner"],["banner","red_banner"],["banner","green_banner"],["banner","brown_banner"],["banner","blue_banner"],["banner","purple_banner"],["banner","cyan_banner"],["banner","light_gray_banner"],["banner","gray_banner"],["banner","pink_banner"],["banner","lime_banner"],["banner","yellow_banner"],["banner","light_blue_banner"],["banner","magenta_banner"],["banner","orange_banner"],["banner","white_banner"],["chorus_fruit_popped","popped_chorus_fruit"],["record_13","music_disc_13"],["record_cat","music_disc_cat"],["record_blocks","music_disc_blocks"],["record_chirp","music_disc_chirp"],["record_far","music_disc_far"],["record_mall","music_disc_mall"],["record_mellohi","music_disc_mellohi"],["record_stal","music_disc_stal"],["record_strad","music_disc_strad"],["record_ward","music_disc_ward"],["record_11","music_disc_11"],["record_wait","music_disc_wait"]]},"1.14":{blocks:[["sign","oak_sign"],["wall_sign","oak_wall_sign"]],items:[["sign","oak_sign"],["rose_red","red_dye"],["cactus_green","green_dye"],["dandelion_yellow","yellow_dye"]]},"1.15.2":{blocks:[],items:[]},"1.16.1":{blocks:[],items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.16.2":{blocks:[],items:[]},"1.17":{blocks:[["grass_path","dirt_path"]],items:[["grass_path","dirt_path"]]},"1.18":{blocks:[],items:[]},"1.19":{blocks:[],items:[]},"1.19.3":{blocks:[],items:[]},"1.19.4":{blocks:[],items:[]},"1.20":{blocks:[],items:[["pottery_shard_archer","archer_pottery_sherd"],["pottery_shard_prize","prize_pottery_sherd"],["pottery_shard_arms_up","arms_up_pottery_sherd"],["pottery_shard_skull","skull_pottery_sherd"]]},"1.16":{items:[["zombie_pigman_spawn_egg","zombified_piglin_spawn_egg"]]},"1.20.3":{blocks:[["grass","short_grass"]],items:[["grass","short_grass"]]}}});var M3=te(H1=>{"use strict";E();x();k();R();Object.defineProperty(H1,"__esModule",{value:!0});H1.versionToNumber=void 0;var tv=n=>{let[e,t="0",r="0"]=n.split(".");return+`${e.padStart(2,"0")}${parseInt(t).toString().padStart(2,"0")}${parseInt(r).toString().padStart(2,"0")}`};H1.versionToNumber=tv});var C3=te(Wt=>{"use strict";E();x();k();R();var rv=Wt&&Wt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.getRenamedData=void 0;var S3=rv(T3()),De=M3(),iv=(n,e,t,r)=>{let i=(0,De.versionToNumber)(t),s=(0,De.versionToNumber)(r),o=i<s?1:-1,v=o>0?1:0,a=e,l=Object.keys(S3.default).sort((f,m)=>o*((0,De.versionToNumber)(f)-(0,De.versionToNumber)(m))),c=o>0?s:i,u=o>0?i:s;for(let f of l.filter(m=>(0,De.versionToNumber)(m)<=c&&(0,De.versionToNumber)(m)>=u)){if(o>0&&(0,De.versionToNumber)(f)>=c||o<0&&(0,De.versionToNumber)(f)<=u)break;let m=S3.default[f][n];if(m)for(let g of m){let y=g[v],w=g[1-v];if(Array.isArray(a))a.includes(w)&&(a=a.map(b=>b===w?y:b));else if(a===w){a=y;break}}}return a};Wt.getRenamedData=iv});import*as ne from"three";function j1(){return new ne.ShaderMaterial({vertexShader:dv,fragmentShader:uv,uniforms:ne.UniformsUtils.merge([ne.UniformsLib.fog,{u_atlas:{value:null},u_tintPalette:{value:null},u_debugMode:{value:0},u_cameraOrigin:{value:new ne.Vector3},u_cameraOriginFrac:{value:new ne.Vector3}}]),transparent:!1,depthWrite:!0,depthTest:!0,blending:ne.NoBlending,glslVersion:ne.GLSL3,fog:!0})}var dv,uv,Y1,ut,U3,ft=X0(()=>{"use strict";E();x();k();R();dv=`
14
14
  precision highp float;
15
15
  precision highp int;
16
16
 
@@ -175,7 +175,7 @@ void main() {
175
175
  vFogDepth = -mvPosition.z;
176
176
  #endif
177
177
  }
178
- `,Ev=`
178
+ `,uv=`
179
179
  precision highp float;
180
180
  precision highp int;
181
181
 
@@ -282,10 +282,10 @@ void main() {
282
282
  applyFog();
283
283
  writeLogDepth();
284
284
  }
285
- `;tr=6,ht={LX_BITS:4,LY_BITS:4,LZ_BITS:4,FACE_BITS:3,TINT_BITS:8,AO_BITS_PER_CORNER:2,NUM_CORNERS:4,LX_SHIFT:0,LY_SHIFT:4,LZ_SHIFT:8,FACE_SHIFT:12,TINT_SHIFT:15,AO_SHIFT:23,TRANSPARENT_SHIFT:31},J3={TEX_INDEX_BITS:12,DIAGONAL_FLAG_SHIFT:12,SECTION_Y_SHIFT:13,SECTION_Y_BITS:5,EMPTY_SHIFT:18,SPARE_BITS:13}});var rr,q3=ee(()=>{"use strict";E();x();k();R();rr=class{constructor(e){u(this,"atlasWidth");u(this,"atlasHeight");u(this,"tileSize");u(this,"tilesPerRow");u(this,"maxTiles");u(this,"valid");this.atlasWidth=e.width,this.atlasHeight=e.height,this.tileSize=e.tileSize,this.tilesPerRow=Math.floor(this.atlasWidth/this.tileSize),this.maxTiles=this.tilesPerRow*Math.floor(this.atlasHeight/this.tileSize),this.valid=this.atlasWidth===1024&&this.atlasHeight===1024&&this.tileSize===16&&this.maxTiles<=4096}isValid(){return this.valid}getTilesPerRow(){return this.tilesPerRow}tileIndexFromPixelCoords(e,t){if(!this.valid)return-1;let r=Math.floor(e/this.tileSize),i=Math.floor(t/this.tileSize);if(r<0||r>=this.tilesPerRow||i<0)return-1;let s=i*this.tilesPerRow+r;return s>=this.maxTiles?-1:s}tileIndexFromTextureEntry(e){return!this.valid||e.su!==this.tileSize||e.sv!==this.tileSize?-1:this.tileIndexFromPixelCoords(e.u,e.v)}tileIndexFromTextureName(e,t){if(!this.valid)return-1;let r=t.textures[e];if(!r&&e.includes(":")&&(r=t.textures[e.split(":")[1]]),!r&&e.includes("/")&&(r=t.textures[e.split("/")[1]]),r||(r=t.textures[`block/${e}`]),!r){let i=e.replace(/^block\//,"");r=t.textures[i]}return r?this.tileIndexFromTextureEntry(r):-1}}});import*as de from"three";var ir,Z3=ee(()=>{"use strict";E();x();k();R();ir=class n{constructor(){u(this,"entries",[{r:1,g:1,b:1}]);u(this,"colorToIndex",new Map);u(this,"categoryBiomeToIndex",new Map);u(this,"texture",null);u(this,"ready",!1)}packColor(e,t,r){let i=Math.round(e*255),s=Math.round(t*255),o=Math.round(r*255);return i<<16|s<<8|o}add(e,t,r,i,s){let o=this.packColor(e,t,r),a=`${i}:${s}`,v=this.categoryBiomeToIndex.get(a);if(v!==void 0)return v;let l=this.colorToIndex.get(o);if(l!==void 0)return this.categoryBiomeToIndex.set(a,l),l;let c=this.entries.length;return this.entries.push({r:e,g:t,b:r}),this.colorToIndex.set(o,c),this.categoryBiomeToIndex.set(a,c),c}getTintIndex(e,t,r,i){return e===void 0?0:e===0?t==="redstone_wire"?this.categoryBiomeToIndex.get(`redstone:${r.power}`)??this.categoryBiomeToIndex.get("redstone:0")??0:t==="birch_leaves"||t==="spruce_leaves"||t==="lily_pad"?this.categoryBiomeToIndex.get(`constant:${t}`)??this.categoryBiomeToIndex.get("constant:default")??0:t.includes("leaves")||t==="vine"?this.categoryBiomeToIndex.get(`foliage:${i}`)??this.categoryBiomeToIndex.get("foliage:plains")??0:this.categoryBiomeToIndex.get(`grass:${i}`)??this.categoryBiomeToIndex.get("grass:plains")??0:0}getEntry(e){return this.entries[e]??this.entries[0]}get size(){return this.entries.length}buildTextureData(){let e=new Float32Array(1024);for(let t=0;t<this.entries.length&&t<256;t++){let r=this.entries[t];e[t*4]=r.r,e[t*4+1]=r.g,e[t*4+2]=r.b,e[t*4+3]=1}return e}createTexture(){this.texture&&(this.texture.dispose(),this.texture=null,this.ready=!1);let e=this.buildTextureData(),t=new de.DataTexture(e,256,1,de.RGBAFormat,de.FloatType);return t.minFilter=de.NearestFilter,t.magFilter=de.NearestFilter,t.wrapS=de.ClampToEdgeWrapping,t.wrapT=de.ClampToEdgeWrapping,t.needsUpdate=!0,this.texture=t,this.ready=!0,t}getTexture(){return this.texture}isReady(){return this.ready}static fromTintsData(e){let t=new n;function r(i){let s=(i>>16&255)/255,o=(i>>8&255)/255,a=(i&255)/255;return[s,o,a]}if(e.grass){let i=r(e.grass.default);for(let{keys:s,color:o}of e.grass.data??[]){let a=r(o);for(let v of s)t.add(a[0],a[1],a[2],"grass",v)}t.add(i[0],i[1],i[2],"grass","plains")}if(e.foliage){let i=r(e.foliage.default);for(let{keys:s,color:o}of e.foliage.data??[]){let a=r(o);for(let v of s)t.add(a[0],a[1],a[2],"foliage",v)}t.add(i[0],i[1],i[2],"foliage","plains")}if(e.redstone){let i=r(e.redstone.default);for(let{keys:s,color:o}of e.redstone.data??[]){let a=r(o);for(let v of s)t.add(a[0],a[1],a[2],"redstone",v)}t.add(i[0],i[1],i[2],"redstone","0")}if(e.constant){let i=r(e.constant.default);for(let{keys:s,color:o}of e.constant.data??[]){let a=r(o);for(let v of s)t.add(a[0],a[1],a[2],"constant",v)}t.add(i[0],i[1],i[2],"constant","default")}return t}}});import X3 from"mc-assets/dist/blocksAtlases.json";function xv(){let n=globalThis.loadedData?.tints;return n||($3||($3=!0),null)}function or(){let n=xv();if(!n)return null;if(nr||(nr=ir.fromTintsData(n),nr.createTexture()),!Gi){let e=X3.latest??X3;Gi=new rr({width:e.width,height:e.height,tileSize:e.tileSize??16,suSv:e.suSv??16,textures:e.textures??{}})}return{tintPalette:nr,textureIndexMapping:Gi}}function ea(){return 1<<J3.EMPTY_SHIFT>>>0}var sr,nr,Gi,$3,Qt=ee(()=>{"use strict";E();x();k();R();mt();q3();Z3();sr=4,nr=null,Gi=null,$3=!1});import*as B0 from"three";function Rv(n,e){let t=new B0.InstancedBufferGeometry,r=new Float32Array(tr*3);t.setAttribute("position",new B0.BufferAttribute(r,3));let i=new Uint32Array(e),s=new Uint32Array(e),o=new Uint32Array(e),a=new Uint32Array(e),v=sr;for(let l=0;l<e;l++)i[l]=n[l*v],s[l]=n[l*v+1],o[l]=n[l*v+2],a[l]=n[l*v+3];return t.setAttribute("a_w0",new B0.InstancedBufferAttribute(i,1)),t.setAttribute("a_w1",new B0.InstancedBufferAttribute(s,1)),t.setAttribute("a_w2",new B0.InstancedBufferAttribute(o,1)),t.setAttribute("a_w3",new B0.InstancedBufferAttribute(a,1)),t.instanceCount=e,t.boundingBox=new B0.Box3(new B0.Vector3(-8,-8,-8),new B0.Vector3(8,8,8)),t.boundingSphere=new B0.Sphere(new B0.Vector3(0,0,0),Math.sqrt(3*8**2)),t}function kv(n){n.raycast=(e,t)=>{let{geometry:r}=n;if(!r.boundingBox||(ta.copy(r.boundingBox).applyMatrix4(n.matrixWorld),!e.ray.intersectBox(ta,Ni)))return;let i=e.ray.origin.distanceTo(Ni);t.push({distance:i,point:Ni.clone(),object:n})}}function ar(n,e){let t=Rv(n.words,n.count),r=new B0.Mesh(t,e);return r.name="shaderMesh",r.matrixAutoUpdate=!1,r.frustumCulled=!1,kv(r),r}function Wi(n){n.geometry.dispose()}var ta,Ni,Vi=ee(()=>{"use strict";E();x();k();R();mt();Qt();ta=new B0.Box3,Ni=new B0.Vector3});var aa={};Z5(aa,{applyWorldGeometryExport:()=>Sv,createMeshesFromExport:()=>sa,downloadWorldGeometry:()=>ji,exportWorldGeometry:()=>ia,loadTextureFromDataUrl:()=>oa,loadWorldGeometryFromUrl:()=>Tv});import*as P0 from"three";function ia(n,e,t,r=!1){let i=[];for(let[o,a]of Object.entries(n.sectionObjects)){let v=a.children.find(w=>w.name==="mesh");if(!v?.geometry)continue;let{geometry:l}=v,c=l.getAttribute("position"),d=l.getAttribute("normal"),f=l.getAttribute("color"),m=l.getAttribute("uv"),g=l.index;if(!c||!g)continue;let b=n.sceneOrigin.getWorldPosition(v);i.push({key:o,position:{x:b?.x??n.sceneOrigin.toWorldX(v.position.x),y:b?.y??n.sceneOrigin.toWorldY(v.position.y),z:b?.z??n.sceneOrigin.toWorldZ(v.position.z)},geometry:{positions:[...c.array],normals:d?[...d.array]:[],colors:f?[...f.array]:[],uvs:m?[...m.array]:[],indices:[...g.array]}})}let s={version:n.version??"unknown",exportedAt:new Date().toISOString(),camera:{position:e,rotation:t},sections:i};if(r&&n.material.map){let o=document.createElement("canvas"),a=n.material.map,{image:v}=a;v&&(o.width=v.width,o.height=v.height,o.getContext("2d").drawImage(v,0,0),s.textureAtlasDataUrl=o.toDataURL("image/png"))}return s}function ji(n,e,t,r="world-geometry.json",i=!1){let s=ia(n,e,t,i),o=JSON.stringify(s),a=new Blob([o],{type:"application/json"}),v=URL.createObjectURL(a),l=document.createElement("a");l.href=v,l.download=r,l.click(),URL.revokeObjectURL(v)}async function Tv(n){let e=await fetch(n);if(!e.ok)throw new Error(`Failed to fetch world geometry: ${e.statusText}`);return e.json()}function na(n){let e=n.map??n.map;if(!e)return null;let t=er();t.uniforms.u_atlas.value=e;let r=or();if(!r)return null;let{tintPalette:i}=r;return i.isReady()||i.createTexture(),t.uniforms.u_tintPalette.value=i.getTexture(),t}function sa(n,e,t){let r=[],i=t??na(e);for(let s of n.sections){let o=new P0.Group;if(o.name="chunk",s.geometry.positions.length>0&&s.geometry.indices.length>0){let l=new P0.BufferGeometry;l.setAttribute("position",new P0.Float32BufferAttribute(s.geometry.positions,3)),s.geometry.normals.length&&l.setAttribute("normal",new P0.Float32BufferAttribute(s.geometry.normals,3)),s.geometry.colors.length&&l.setAttribute("color",new P0.Float32BufferAttribute(s.geometry.colors,3)),s.geometry.uvs.length&&l.setAttribute("uv",new P0.Float32BufferAttribute(s.geometry.uvs,2));let d=Math.max(...s.geometry.indices)>65535?Uint32Array:Uint16Array;l.setIndex(new P0.BufferAttribute(new d(s.geometry.indices),1));let f=new P0.Mesh(l,e);f.position.set(s.position.x,s.position.y,s.position.z),f.name="mesh",o.add(f)}let v=s.shaderCubes;if(v&&v.count>0&&i){let l=ar(v,i);l.position.set(s.position.x,s.position.y,s.position.z),o.add(l)}o.children.length>0&&r.push(o)}return r}async function oa(n){return new Promise((e,t)=>{let r=new Image;r.onload=()=>{let i=new P0.Texture(r);i.magFilter=P0.NearestFilter,i.minFilter=P0.NearestFilter,i.needsUpdate=!0,i.flipY=!1,e(i)},r.onerror=t,r.src=n})}async function Sv(n,e){let{scene:t,renderUpdateEmitter:r,material:i}=n,s=t.getObjectByName(ra);s&&(t.remove(s),Mv(s));let o=!!e.textureAtlasDataUrl,a;if(o&&e.textureAtlasDataUrl){let d=await oa(e.textureAtlasDataUrl);a=new P0.MeshLambertMaterial({map:d,vertexColors:!0,transparent:!0,alphaTest:.1}),a.name="geometry-export-material"}else a=i;let v=e.sections.some(d=>(d.shaderCubes?.count??0)>0)?na(a):null,l=sa(e,a,v),c=new P0.Group;c.name=ra,o&&(c.userData.geometryExportMaterial=a);for(let d of l)c.add(d);return t.add(c),r.emit("update"),l.length}var ra,Mv,Yi=ee(()=>{"use strict";E();x();k();R();Qt();mt();Vi();ra="geometry-export-root";Mv=n=>{n.traverse(t=>{t.isMesh&&t.geometry?.dispose()});let e=n.userData?.geometryExportMaterial;e&&(e.map?.dispose?.(),e.dispose?.())}});E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();import{proxy as G2}from"valtio";E();x();k();R();E();x();k();R();var xr=()=>({longRenderTime:!1,constantLongRenderTime:!1,tooManyEntities:!1,tooManyTextures:!1,unknownReason:!1});E();x();k();R();var r1=30;var Rr=45,kr=100;E();x();k();R();var a5=class{constructor(e){this.factors=e;u(this,"renderTimeHistory",[])}onFrame(e){this.pushRenderTime(e.totalMs),this.recompute(e)}pushRenderTime(e){this.renderTimeHistory.push(e),this.renderTimeHistory.length>24&&this.renderTimeHistory.shift()}recompute(e){let t=e.fps>0&&e.fps<=45,r=Math.max(0,e.totalMs-e.entitiesMs),i=e.totalMs>=30,s=this.renderTimeHistory.length,o=this.renderTimeHistory.filter(f=>f>=30).length,a=s>=8&&o/s>=.65,v=e.loadedTextureCount>=100,l=t&&e.entitiesMs>=8&&r<=20,d=t&&!(i||a||l||v);this.factors.longRenderTime=i,this.factors.constantLongRenderTime=a,this.factors.tooManyEntities=l,this.factors.tooManyTextures=v,this.factors.unknownReason=d}reset(){this.renderTimeHistory.length=0,this.factors.longRenderTime=!1,this.factors.constantLongRenderTime=!1,this.factors.tooManyEntities=!1,this.factors.tooManyTextures=!1,this.factors.unknownReason=!1}};E();x();k();R();var n6=[{key:"longRenderTime",code:"LR"},{key:"constantLongRenderTime",code:"CLR"},{key:"tooManyEntities",code:"ENT"},{key:"tooManyTextures",code:"TEX"},{key:"unknownReason",code:"UNK"}];function Tr(n){let e=n6.filter(({key:t})=>n[t]).map(({code:t})=>t);return e.length>0?e.join("+"):""}var v5={paused:!1,showChunkBorders:!1,enableDebugOverlay:!1,debugWasmPerf:!1,debugModelVariant:void 0,futuristicReveal:!1,wasmMesher:!0,shaderCubeBlocks:!1,shaderCubeDebugMode:0,mesherWorkers:1,addChunksBatchWaitTime:200,_experimentalSmoothChunkLoading:!0,_renderByChunks:!1,autoLowerRenderDistance:!1,disableMesherConversionCache:!1,dedicatedChangeWorker:!1,shadingTheme:"high-contrast",cardinalLight:"default",dayCycle:!0,smoothLighting:!0,enableLighting:!0,starfield:!0,defaultSkybox:!0,renderEntities:!0,extraBlockRenderers:!0,foreground:!0,fov:75,volume:1,showHand:!1,viewBobbing:!1,handRenderer:"vanilla",renderEars:!0,highlightBlockColor:"blue",fetchPlayerSkins:!0,skinTexturesProxy:void 0,vrSupport:!0,vrPageGameRendering:!0,clipWorldBelowY:void 0,isPlayground:!1,instantCameraUpdate:!1,isRaining:!1,moduleStates:{}},N2={fpsLimit:void 0,sceneBackground:"lightblue",timeoutRendering:!1},Mc=(n={})=>G2({...v5,...n}),Ze=()=>({reactive:G2({world:{chunksLoaded:new Set,heightmaps:new Map,allChunksLoaded:!1,mesherWork:!1,instabilityFactors:xr(),intersectMedia:null},renderer:"...",preventEscapeMenu:!1}),nonReactive:{fps:0,worstRenderTime:0,avgRenderTime:0,world:{chunksLoaded:new Set,chunksTotalNumber:0},renderer:{timeline:{live:[],frozen:[],lastSecond:[]}}}});E();x();k();R();import{proxy as s6}from"valtio";var Mr=()=>s6({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,fovMultiplier:1,cameraSpectatingEntity:void 0,team:void 0}),W2=n=>({isSpectator(){return n.gameMode==="spectator"},isSpectatingEntity(){return n.cameraSpectatingEntity!==void 0&&n.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:n.perspective==="third_person_back"||n.perspective==="third_person_front"}}),V2=()=>({reactive:Mr()});E();x();k();R();import{Vec3 as E6}from"vec3";import{proxy as J2}from"valtio";E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();var i1={},j2=!1;function o6(){if(j2)return i1;j2=!0;var n=typeof Reflect=="object"?Reflect:null,e=n&&typeof n.apply=="function"?n.apply:function(S,H,B){return Function.prototype.apply.call(S,H,B)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:t=function(S){return Object.getOwnPropertyNames(S)};function r(M){}var i=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}i1=s,i1.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(M){if(typeof M!="number"||M<0||i(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");o=M}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||i(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function v(M){return M._maxListeners===void 0?s.defaultMaxListeners:M._maxListeners}s.prototype.getMaxListeners=function(){return v(this)},s.prototype.emit=function(S){for(var H=[],B=1;B<arguments.length;B++)H.push(arguments[B]);var I=S==="error",G=this._events;if(G!==void 0)I=I&&G.error===void 0;else if(!I)return!1;if(I){var O;if(H.length>0&&(O=H[0]),O instanceof Error)throw O;var j=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw j.context=O,j}var J=G[S];if(J===void 0)return!1;if(typeof J=="function")e(J,this,H);else for(var X=J.length,t0=g(J,X),B=0;B<X;++B)e(t0[B],this,H);return!0};function l(M,S,H,B){var I,G,O;if(a(H),G=M._events,G===void 0?(G=M._events=Object.create(null),M._eventsCount=0):(G.newListener!==void 0&&(M.emit("newListener",S,H.listener?H.listener:H),G=M._events),O=G[S]),O===void 0)O=G[S]=H,++M._eventsCount;else if(typeof O=="function"?O=G[S]=B?[H,O]:[O,H]:B?O.unshift(H):O.push(H),I=v(M),I>0&&O.length>I&&!O.warned){O.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=M,j.type=S,j.count=O.length}return M}s.prototype.addListener=function(S,H){return l(this,S,H,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,H){return l(this,S,H,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(M,S,H){var B={fired:!1,wrapFn:void 0,target:M,type:S,listener:H},I=c.bind(B);return I.listener=H,B.wrapFn=I,I}s.prototype.once=function(S,H){return a(H),this.on(S,d(this,S,H)),this},s.prototype.prependOnceListener=function(S,H){return a(H),this.prependListener(S,d(this,S,H)),this},s.prototype.removeListener=function(S,H){var B,I,G,O,j;if(a(H),I=this._events,I===void 0)return this;if(B=I[S],B===void 0)return this;if(B===H||B.listener===H)--this._eventsCount===0?this._events=Object.create(null):(delete I[S],I.removeListener&&this.emit("removeListener",S,B.listener||H));else if(typeof B!="function"){for(G=-1,O=B.length-1;O>=0;O--)if(B[O]===H||B[O].listener===H){j=B[O].listener,G=O;break}if(G<0)return this;G===0?B.shift():b(B,G),B.length===1&&(I[S]=B[0]),I.removeListener!==void 0&&this.emit("removeListener",S,j||H)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var H,B,I;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[S]),this;if(arguments.length===0){var G=Object.keys(B),O;for(I=0;I<G.length;++I)O=G[I],O!=="removeListener"&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=B[S],typeof H=="function")this.removeListener(S,H);else if(H!==void 0)for(I=H.length-1;I>=0;I--)this.removeListener(S,H[I]);return this};function f(M,S,H){var B=M._events;if(B===void 0)return[];var I=B[S];return I===void 0?[]:typeof I=="function"?H?[I.listener||I]:[I]:H?w(I):g(I,I.length)}s.prototype.listeners=function(S){return f(this,S,!0)},s.prototype.rawListeners=function(S){return f(this,S,!1)},s.listenerCount=function(M,S){return typeof M.listenerCount=="function"?M.listenerCount(S):m.call(M,S)},s.prototype.listenerCount=m;function m(M){var S=this._events;if(S!==void 0){var H=S[M];if(typeof H=="function")return 1;if(H!==void 0)return H.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function g(M,S){for(var H=new Array(S),B=0;B<S;++B)H[B]=M[B];return H}function b(M,S){for(;S+1<M.length;S++)M[S]=M[S+1];M.pop()}function w(M){for(var S=new Array(M.length),H=0;H<S.length;++H)S[H]=M[H].listener||M[H];return S}function y(M,S){return new Promise(function(H,B){function I(O){M.removeListener(S,G),B(O)}function G(){typeof M.removeListener=="function"&&M.removeListener("error",I),H([].slice.call(arguments))}C(M,S,G,{once:!0}),S!=="error"&&A(M,I,{once:!0})})}function A(M,S,H){typeof M.on=="function"&&C(M,"error",S,H)}function C(M,S,H,B){if(typeof M.on=="function")B.once?M.once(S,H):M.on(S,H);else if(typeof M.addEventListener=="function")M.addEventListener(S,function I(G){B.once&&M.removeEventListener(S,I),H(G)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return i1}var n1=o6();n1.once;n1.once=function(n,e){return new Promise((t,r)=>{function i(...o){s!==void 0&&n.removeListener("error",s),t(o)}let s;e!=="error"&&(s=o=>{n.removeListener(name,i),r(o)},n.once("error",s)),n.once(e,i)})};n1.on=function(n,e){let t=[],r=[],i=null,s=!1,o={async next(){let l=t.shift();if(l)return createIterResult(l,!1);if(i){let c=Promise.reject(i);return i=null,c}return s?createIterResult(void 0,!0):new Promise((c,d)=>r.push({resolve:c,reject:d}))},async return(){n.removeListener(e,a),n.removeListener("error",v),s=!0;for(let l of r)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){i=l,n.removeListener(e,a),n.removeListener("error",v)},[Symbol.asyncIterator](){return this}};return n.on(e,a),n.on("error",v),o;function a(...l){let c=r.shift();c?c.resolve(createIterResult(l,!1)):t.push(l)}function v(l){s=!0;let c=r.shift();c?c.reject(l):i=l,o.return()}};var{EventEmitter:Xe,defaultMaxListeners:Vc,init:jc,listenerCount:Yc,on:Qc,once:Kc}=n1;import{Vec3 as $e}from"vec3";E();x();k();R();function l5(n){let e=n*2+1;if(e<=0)return[];let t=[],r=0,i=0,s=0,o=-1;for(let a=0;a<e*e;a++){if(Math.abs(r)<=e/2&&Math.abs(i)<=e/2&&t.push([r,i]),r===i||r<0&&r===-i||r>0&&r===1-i){let v=s;s=-o,o=v}r+=s,i+=o}return t}var kt=n=>[Math.floor(n.x/16),Math.floor(n.z/16)],a6=n=>[Math.floor(n.x/16),Math.floor(n.y/16),Math.floor(n.z/16)],Y2=async(n,e,t,r=1)=>{for(let i=0;i<n.length;i+=r)e&&await new Promise(s=>setTimeout(s,e)),await t(n[i],i)},c5=class c5 extends Xe{static restoreTransferred(e,t){let r=new c5;return t&&t.addEventListener("message",({data:i})=>{i.class===c5.restorerName&&i.type==="event"&&r.emit(i.eventName,...i.args)}),r}};u(c5,"restorerName","WorldViewWorker");var et=c5,tt=class extends Xe{constructor(t,r,i=new $e(0,0,0)){super();this.world=t;this.viewDistance=r;u(this,"spiralNumber",0);u(this,"gotPanicLastTime",!1);u(this,"panicChunksReload",()=>{});u(this,"loadedChunks",{});u(this,"inLoading",!1);u(this,"chunkReceiveTimes",[]);u(this,"lastChunkReceiveTime",0);u(this,"lastChunkReceiveTimeAvg",0);u(this,"panicTimeout");u(this,"lastPos");u(this,"eventListeners",{});u(this,"debugChunksInfo",{});u(this,"waitingSpiralChunksLoad",{});u(this,"addWaitTime",1);u(this,"keepChunksDistance",0);u(this,"isPlayground",!1);u(this,"allowPositionUpdate",!0);u(this,"lastBiomeId",null);u(this,"lastPosCheck",null);this.lastPos=new $e(0,0,0).update(i)}prepareForTransfer(t){if(t){let r=this.emit.bind(this);this.emit=(i,...s)=>{r(i,...s),t.postMessage({class:et.restorerName,type:"event",eventName:i,args:s})}}return{__restorer:et.restorerName}}setBlockStateId(t,r){let i=this.world.setBlockStateId(t,r);if(i&&typeof i.then=="function")throw new Error("setBlockStateId returned promise (not supported)");this.emit("blockUpdate",{pos:t,stateId:r})}updateViewDistance(t){this.viewDistance=t,this.emit("renderDistance",t)}async init(t,r){this.updateViewDistance(this.viewDistance),this.emit("chunkPosUpdate",{pos:t}),r?.time?.timeOfDay!==void 0&&this.emit("time",r.time.timeOfDay),r?.entity&&this.emit("playerEntity",r.entity),this.emitterGotConnected(r);let[i,s]=kt(t),o=l5(this.viewDistance).map(([a,v])=>new $e((i+a)*16,0,(s+v)*16));this.lastPos.update(t),await this._loadChunks(o,t)}chunkProgress(){if(this.panicTimeout&&clearTimeout(this.panicTimeout),this.chunkReceiveTimes.length>=5){let t=this.chunkReceiveTimes.reduce((i,s)=>i+s,0)/this.chunkReceiveTimes.length;this.lastChunkReceiveTimeAvg=t;let r=t*2+1e3;this.panicTimeout&&clearTimeout(this.panicTimeout),this.panicTimeout=setTimeout(()=>{!this.gotPanicLastTime&&this.inLoading&&(this.gotPanicLastTime=!0,this.panicChunksReload())},r)}}async _loadChunks(t,r){this.spiralNumber++;let{spiralNumber:i}=this;for(let o of Object.keys(this.waitingSpiralChunksLoad))this.waitingSpiralChunksLoad[o](!1),delete this.waitingSpiralChunksLoad[o];let s=!0;this.inLoading=!0,await Y2(t,this.addWaitTime,async o=>{!s||this.loadedChunks[`${o.x},${o.z}`]||(this.world.getColumnAt(o)||(s=await new Promise(a=>{this.waitingSpiralChunksLoad[`${o.x},${o.z}`]=a})),s&&(await this.loadChunk(o,void 0,`spiral ${i} from ${r.x},${r.z}`),this.chunkProgress()))}),this.panicTimeout&&clearTimeout(this.panicTimeout),this.inLoading=!1,this.gotPanicLastTime=!1,this.chunkReceiveTimes=[],this.lastChunkReceiveTime=0}async loadChunk(t,r=!1,i="spiral"){var l,c;let[s,o]=kt(this.lastPos),a=Math.abs(s-Math.floor(t.x/16)),v=Math.abs(o-Math.floor(t.z/16));if(a<=this.viewDistance&&v<=this.viewDistance){let d=await this.world.getColumnAt(t.y!==void 0?t:new $e(t.x,0,t.z));if(d){let f=d.toJson(),m={minY:d.minY??0,worldHeight:d.worldHeight??256};this.emit("loadChunk",{x:t.x,z:t.z,chunk:f,blockEntities:d.blockEntities,worldConfig:m,isLightUpdate:r}),this.loadedChunks[`${t.x},${t.z}`]=!0,(l=this.debugChunksInfo)[c=`${t.x},${t.z}`]??(l[c]={loads:[]}),this.debugChunksInfo[`${t.x},${t.z}`].loads.push({dataLength:f.length,reason:i,time:Date.now()})}else this.isPlayground&&this.emit("markAsLoaded",{x:t.x,z:t.z})}}unloadAllChunks(){for(let t of Object.keys(this.loadedChunks)){let[r,i]=t.split(",").map(Number);this.unloadChunk({x:r,z:i})}}unloadChunk(t){this.emit("unloadChunk",{x:t.x,z:t.z}),delete this.loadedChunks[`${t.x},${t.z}`],delete this.debugChunksInfo[`${t.x},${t.z}`]}emitterGotConnected(t){typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope||!t||this.emit("blockEntities",new Proxy({},{get(i,s,o){if(typeof s!="string")return;let[a,v,l]=s.split(",").map(Number);return t.world.getBlock(new $e(a,v,l))?.entity}}))}updateBiome(t){try{if(!this.world.getBiome)return;let r=this.world.getBiome(t);r!==this.lastBiomeId&&(this.lastBiomeId=r,this.emit("biomeReset"))}catch{}}async updatePosition(t,r=!1){if(!this.allowPositionUpdate)return;let i=t.floored();if(!r&&this.lastPosCheck&&this.lastPosCheck.equals(i))return;this.lastPosCheck=i,this.updateBiome(t);let[s,o]=kt(this.lastPos),[a,v]=kt(t);if(s!==a||o!==v||r){this.emit("chunkPosUpdate",{pos:t});let l=[],c=r?this.viewDistance:this.viewDistance+this.keepChunksDistance;for(let f of Object.keys(this.loadedChunks)){let[m,g]=f.split(",").map(Number),b=new $e(m,0,g),[w,y]=kt(b),A=Math.abs(a-w),C=Math.abs(v-y);(A>c||C>c)&&l.push(b)}for(let f of l)this.unloadChunk(f);let d=l5(this.viewDistance).map(([f,m])=>{let g=new $e((a+f)*16,0,(v+m)*16);if(!this.loadedChunks[`${g.x},${g.z}`])return g}).filter(f=>!!f);this.lastPos.update(t),this._loadChunks(d,t)}else this.emit("chunkPosUpdate",{pos:t}),this.lastPos.update(t)}};E();x();k();R();E();x();k();R();import Q2 from"minecraft-data";import v6 from"mc-assets/dist/blocksAtlases.json";import l6 from"mc-assets/dist/itemsAtlases.json";import c6 from"mc-assets/dist/itemDefinitions.json";import d6 from"mc-assets/dist/blocksAtlasLatest.png";import u6 from"mc-assets/dist/blocksAtlasLegacy.png";import f6 from"mc-assets/dist/itemsAtlasLatest.png";import h6 from"mc-assets/dist/itemsAtlasLegacy.png";import m6 from"mc-assets/dist/textureReplacements/christmas";import{AtlasParser as s1}from"mc-assets/dist/atlasParser";import p6 from"mc-assets/dist/worldBlockProvider";import{ItemsRenderer as g6}from"mc-assets/dist/itemsRenderer";import{getLoadedItemDefinitionsStore as b6}from"mc-assets";var Tt=class{constructor(e){u(this,"sourceItemDefinitionsJson",c6);u(this,"itemsDefinitionsStore",b6(this.sourceItemDefinitionsJson));u(this,"allReady",!1);u(this,"itemsAtlasImage");u(this,"blocksAtlasImage");u(this,"blocksAtlasJson");u(this,"customBlockStates");u(this,"customModels");u(this,"customItemModelNames",{});u(this,"customTextures",{});u(this,"guiAtlas",null);u(this,"guiAtlasVersion",0);u(this,"itemsRenderer");u(this,"worldBlockProvider");u(this,"blockstatesModels",null);u(this,"version");u(this,"texturesVersion");u(this,"mcData");e&&(Object.assign(this,e),this.mcData=Q2(this.version))}prepareForTransfer(){let e={};for(let t in this)Object.prototype.hasOwnProperty.call(this,t)&&typeof this[t]!="function"&&(t==="itemsRenderer"||t==="worldBlockProvider"||t==="mcData"||(e[t]=this[t]));return e.customTextures={},e}},y6="1.21.4",Pe=class Pe extends Xe{constructor(){super(...arguments);u(this,"sourceBlockStatesModels",null);u(this,"sourceBlocksAtlases",v6);u(this,"sourceItemsAtlases",l6);u(this,"currentResources");u(this,"itemsAtlasParser");u(this,"blocksAtlasParser");u(this,"currentConfig");u(this,"abortController",new AbortController);u(this,"_promiseAssetsReadyResolvers",Promise.withResolvers())}static restoreTransferred(t,r){let i=new Pe,s=o=>{i.currentResources=new Tt(o)};return s(t.currentResources),r&&r.addEventListener("message",({data:o})=>{o.class===Pe.restorerName&&(o.type==="newResources"&&s(o.currentResources),o.type==="event"&&i.emit(o.eventName,...o.args))}),i}prepareForTransfer(t){if(t){let r=this.emit.bind(this);this.emit=(i,...s)=>{r(i,...s),t.postMessage({class:Pe.restorerName,type:"event",eventName:i,args:s}),(i==="assetsTexturesUpdated"||i==="assetsInventoryReady")&&t.postMessage({class:Pe.restorerName,type:"newResources",currentResources:this.currentResources?.prepareForTransfer()})}}return{__restorer:Pe.restorerName,currentResources:this.currentResources?.prepareForTransfer()}}get promiseAssetsReady(){return this._promiseAssetsReadyResolvers.promise}async loadSourceData(t=this.currentConfig?.version){if(!t)throw new Error("No version loaded");this.sourceBlockStatesModels??(this.sourceBlockStatesModels=(await import("mc-assets/dist/blockStatesModels.json")).default)}resetResources(){this.currentResources=new Tt}async updateAssetsData(t,r=!1){if(!this.currentConfig)throw new Error("No config loaded");this._promiseAssetsReadyResolvers=Promise.withResolvers();let i=new AbortController;if(await this.loadSourceData(this.currentConfig.version),i.signal.aborted)return;let s=this.currentResources??new Tt;s.version=this.currentConfig.version,s.texturesVersion=this.currentConfig.texturesVersion??s.version,s.mcData=Q2(s.version),s.blockstatesModels={blockstates:{},models:{}},s.blockstatesModels.blockstates.latest={...this.sourceBlockStatesModels.blockstates.latest,...s.customBlockStates},s.blockstatesModels.models.latest={...this.sourceBlockStatesModels.models.latest,...s.customModels},await Promise.all([this.recreateBlockAtlas(s),this.recreateItemsAtlas(s)]),!i.signal.aborted&&(s.version&&s.blockstatesModels&&this.itemsAtlasParser&&this.blocksAtlasParser&&(s.itemsRenderer=new g6(s.version,s.blockstatesModels,this.itemsAtlasParser,this.blocksAtlasParser)),!i.signal.aborted&&(this.currentResources=s,s.allReady=!0,r||this.emit("assetsTexturesUpdated"),this.currentConfig.noInventoryGui?this._promiseAssetsReadyResolvers.resolve():(this.emit("assetsInventoryStarted"),this.generateGuiTextures().then(()=>{i.signal.aborted||(r||this.emit("assetsInventoryReady"),this._promiseAssetsReadyResolvers.resolve())}))))}async recreateBlockAtlas(t=this.currentResources){let r={},i=new Date;(i.getMonth()===11&&i.getDate()>=24||i.getMonth()===0&&i.getDate()<=6)&&Object.assign(r,m6);let s=new s1(this.sourceBlocksAtlases,d6,u6),o=Object.keys(t.customTextures.blocks?.textures??{}),{atlas:a,canvas:v}=await s.makeNewAtlas(t.texturesVersion,l=>{if(this.currentConfig.includeOnlyBlocks&&!this.currentConfig.includeOnlyBlocks.includes(l))return!1;let c=t.customTextures.blocks?.textures[l];return r[l]??c},void 0,void 0,o,{needHorizontalIndexes:!!this.currentConfig.includeOnlyBlocks});this.blocksAtlasParser=new s1({latest:a},v.toDataURL()),t.blocksAtlasImage=await createImageBitmap(v),t.blocksAtlasJson=this.blocksAtlasParser.atlas.latest,t.worldBlockProvider=p6(t.blockstatesModels,this.blocksAtlasParser.atlas,y6)}async recreateItemsAtlas(t=this.currentResources){let r=new s1(this.sourceItemsAtlases,f6,h6),i=Object.keys(t.customTextures.items?.textures??{}),{atlas:s,canvas:o}=await r.makeNewAtlas(t.texturesVersion,a=>{let v=t.customTextures.items?.textures[a];if(v)return v},t.customTextures.items?.tileSize,void 0,i);this.itemsAtlasParser=new s1({latest:s},o.toDataURL()),t.itemsAtlasImage=await createImageBitmap(o)}async generateGuiTextures(){}async downloadDebugAtlas(t=!1){if(!this.currentResources)throw new Error("No resources loaded");let s=await(t?this.itemsAtlasParser:this.blocksAtlasParser).createDebugImage(!0),o=document.createElement("a");o.href=s,o.download=`atlas-debug-${t?"items":"blocks"}.png`,o.click()}destroy(){this.abortController.abort(),this.currentResources=void 0,this.abortController=new AbortController}};u(Pe,"restorerName","ResourcesManager");var he=Pe;E();x();k();R();var ae=class extends Error{constructor(t,r){super(t);u(this,"failure");this.name="MesherWorkerPreloadError",this.failure=r}};function _6(n){return!n||typeof n!="object"?!1:n.type==="mc-web-pong"?!0:Array.isArray(n)?n.some(e=>e&&typeof e=="object"&&e.type==="mc-web-pong"):!1}var w6=45e3,A6=1e4;async function K2(n){if(F.env.SINGLE_FILE_BUILD)return;let e=n?.fetchTimeoutMs??w6,t=n?.pingTimeoutMs??A6,r=n?.script??"mesher.js",i=new URL(r,document.baseURI).href,s;try{let d=new AbortController,f=window.setTimeout(()=>d.abort(),e);try{s=await fetch(i,{credentials:"same-origin",cache:"force-cache",signal:d.signal})}finally{clearTimeout(f)}}catch(d){let f=d;throw f?.name==="AbortError"?new ae(`Mesher script fetch timed out after ${e}ms (${i}).`,{phase:"fetch",code:"timeout"}):new ae(`Mesher script fetch failed (network): ${f?.message??d}. URL: ${i}`,{phase:"fetch",code:"network",detail:String(f?.message??d)})}if(!s.ok)throw new ae(`Mesher script HTTP ${s.status} ${s.statusText}: ${i}`,{phase:"fetch",code:"bad-status",status:s.status});let o=s.headers.get("content-type")??"",a=await s.arrayBuffer();if(a.byteLength===0)throw new ae(`Mesher script response was empty: ${i}`,{phase:"fetch",code:"invalid-body",hint:"empty"});let v=Math.min(1024,a.byteLength),l=new TextDecoder().decode(a.slice(0,v)).trimStart();if(l.startsWith("<!DOCTYPE")||l.startsWith("<html")||l.startsWith("<HTML"))throw new ae(`Mesher URL returned HTML (wrong path, redirect, or SPA fallback), not JavaScript: ${i}`,{phase:"fetch",code:"invalid-body",hint:"html"});o.length>0&&/javascript|ecmascript/i.test(o);let c;try{c=new Worker(i)}catch(d){let f=d instanceof Error?d.message:String(d);throw new ae(`Could not construct Worker for mesher (${i}): ${f}`,{phase:"worker",code:"construct-failed",message:f})}await new Promise((d,f)=>{let m=!1,g=window.setTimeout(()=>{m||(m=!0,b(),f(new ae(`Mesher worker did not reply with mc-web-pong within ${t}ms (wrong script, SW stale cache, worker blocked, or COEP/CORP). URL: ${i}`,{phase:"ping",code:"timeout"})))},t),b=()=>{clearTimeout(g);let S=c;c=void 0,S&&(S.removeEventListener("message",A),S.removeEventListener("error",C),S.removeEventListener("messageerror",M),S.terminate())},w=()=>{m||(m=!0,b(),d())},y=S=>{m||(m=!0,b(),f(S))};function A(S){_6(S.data)&&w()}function C(S){y(new ae(`Mesher worker script failed to load or threw during startup: ${S.message||"unknown"} @ ${i}`,{phase:"worker",code:"script-error",message:S.message}))}function M(){y(new ae(`Mesher worker message channel error (structured clone / deserialization). URL: ${i}`,{phase:"ping",code:"messageerror"}))}c.addEventListener("message",A),c.addEventListener("error",C),c.addEventListener("messageerror",M);try{c.postMessage({type:"mc-web-ping",t:performance.now(),workerIndex:0})}catch(S){let H=S instanceof Error?S.message:String(S);y(new ae(`Failed to post mc-web-ping to mesher worker: ${H}`,{phase:"ping",code:"post-failed",detail:H}))}})}var q2=class{constructor(e={},t=new he){this.resourcesManager=t;u(this,"waitBackendLoadPromises",[]);u(this,"onWorldStart");u(this,"onBeforeWorldStart");u(this,"worldView");u(this,"config");u(this,"menuBackgroundOptions");u(this,"inWorldRenderingConfig");u(this,"backend");u(this,"backendLoader");u(this,"currentState");u(this,"currentDisplay",null);u(this,"playerState",{reactive:Mr()});u(this,"rendererState");u(this,"nonReactiveState");u(this,"worldReady");u(this,"resolveWorldReady");u(this,"lastCamUpdate",0);u(this,"getRendererOptions");this.config={...N2,...e.config},this.menuBackgroundOptions={...e.config?.menuBackground,...e.menuBackground},this.inWorldRenderingConfig=J2({...v5,...e.rendererConfig});let r=Ze();this.rendererState=r.reactive,this.nonReactiveState=r.nonReactive,this.initWorldReadyPromise()}initWorldReadyPromise(){let{promise:e,resolve:t}=Promise.withResolvers();this.worldReady=e,this.resolveWorldReady=t}preloadWorkers(){let e=this.inWorldRenderingConfig.wasmMesher?"mesherWasm.js":"mesher.js";return K2({script:e})}bindRendererOptions(e){this.getRendererOptions=e}async loadBackend(e){this.backend&&this.disconnectBackend(),await Promise.all(this.waitBackendLoadPromises),this.waitBackendLoadPromises=[],this.backendLoader=e;let t={config:this.config,getRendererOptions:this.getRendererOptions,callbacks:{displayCriticalError:i=>{},setRendererSpecificSettings:(i,s)=>{},fireCustomEvent:(i,...s)=>{}},rendererSpecificSettings:{}},r=e(t);if(this.backend=await Promise.resolve(r),this.currentState)if(this.currentState.method==="startMenuBackground")this.startMenuBackground(...this.currentState.args);else{let{method:i,args:s}=this.currentState;this.backend[i](...s)}}async startWorld(e,t,r=this.playerState.reactive,i){if(this.currentDisplay==="world")throw new Error("World already started");this.currentDisplay="world";let s=i??new E6(0,64,0);this.worldView=new tt(e,t,s),this.worldView.isPlayground=this.inWorldRenderingConfig.isPlayground;let o={version:this.resourcesManager?.currentConfig?.version??"1.20.4",worldView:this.worldView,inWorldRenderingConfig:this.inWorldRenderingConfig,playerStateReactive:r,rendererState:this.rendererState,nonReactiveState:this.nonReactiveState,resourcesManager:this.resourcesManager};this.onBeforeWorldStart?.();let a;if(this.backend){let v=this.backend.startWorld(o);v&&typeof v.then=="function"&&(a=v)}return this.currentState={method:"startWorld",args:[o]},await a,this.resolveWorldReady(),this.onWorldStart?.(),!!a}startMenuBackground(e){if(this.currentDisplay==="menu")return;let t={...this.menuBackgroundOptions,...e,resourcesManager:e?.resourcesManager??this.resourcesManager};this.backend&&(this.currentDisplay="menu",this.backend.startMenuBackground(t)),this.currentState={method:"startMenuBackground",args:[t]}}resetBackend(e=!1){this.disconnectBackend(e),this.backendLoader&&this.loadBackend(this.backendLoader)}disconnectBackend(e=!1){e&&(this.currentState=void 0,this.currentDisplay=null,this.worldView=void 0),this.backend&&(this.backend.disconnect(),this.backend=void 0),this.currentDisplay=null,this.initWorldReadyPromise(),this.rendererState=J2(Ze().reactive),this.nonReactiveState=Ze().nonReactive}updateCamera(e,t,r){this.backend?.updateCamera(e,t,r)}setRendering(e){this.backend?.setRendering(e)}async startWithBot(e,t){await this.startWorld(e.world,t),this.worldView&&typeof this.worldView.listenToBot=="function"&&this.worldView.listenToBot(e)}destroyAll(){this.disconnectBackend(!0),this.resourcesManager&&typeof this.resourcesManager.destroy=="function"&&this.resourcesManager.destroy()}get utils(){let e=this.backend;return{async waitingForChunks(){if(!e?.worldState?.allChunksLoaded)return new Promise(t=>{let r=setInterval(()=>{e?.worldState?.allChunksLoaded&&(clearInterval(r),t())},100)})}}}destroy(){this.disconnectBackend(!0)}};E();x();k();R();import{subscribe as H6}from"valtio/vanilla";E();x();k();R();E();x();k();R();var rt=["galaxy","nether","end","cyber","light"],it=["cruise","barrel","dive","orbit","snake"],d5={galaxy:"Galaxy",nether:"Nether",end:"The End",cyber:"Cyber",light:"Light Space"},u5={cruise:"Cruise",barrel:"Barrel",dive:"Dive",orbit:"Orbit",snake:"Snake"},nt=["mixed","stainedGlass","wool","construction","glow","world"],f5={mixed:"Mixed",stainedGlass:"Stained glass",wool:"Wool",construction:"Construction",glow:"Glow",world:"World (grass & ores)"};E();x();k();R();var pe={mode:"futuristic",minecraftTextures:!0,futuristicScene:"light",futuristicCamera:"dive",futuristicBlockGroup:"stainedGlass",futuristicCameraSpeedPercent:80,futuristicBlockSpeedPercent:40},Ae=n=>n/100,h5={camera:Ae(pe.futuristicCameraSpeedPercent),block:Ae(pe.futuristicBlockSpeedPercent)};var x6={off:0,holes:1,texIndex:2,faces:3,atlasAlpha:4};function Sr(n){return x6[n]}var st=pe,Z2={rendererWorldPerformance:"normal",rendererMeshersCountOverride:null,starfieldRendering:!0,defaultSkybox:!0,menuBackgroundMode:st.mode,menuBackgroundMinecraftTextures:st.minecraftTextures,menuBackgroundFuturisticScene:st.futuristicScene,menuBackgroundFuturisticCamera:st.futuristicCamera,menuBackgroundFuturisticBlockGroup:st.futuristicBlockGroup,menuBackgroundFuturisticCameraSpeed:st.futuristicCameraSpeedPercent,menuBackgroundFuturisticBlockSpeed:st.futuristicBlockSpeedPercent,rendererFuturisticReveal:!1,rendererPerfDebugOverlay:!1,disableBlockEntityTextures:!1,rendererMesher:"wasm",rendererShaderCubeBlocks:!1,rendererShaderCubeDebugMode:"off",showChunkBorders:!1,renderEntities:!0,renderDebug:"basic",frameLimit:!1,backgroundRendering:"20fps",vanillaLook:!1,smoothLighting:!0,newVersionsLighting:!1,vrSupport:!0,vrPageGameRendering:!1,clipWorldBelowY:void 0,highlightBlockColor:"auto",loadPlayerSkins:!0,renderEars:!0,showHand:!0,viewBobbing:!0,dayCycleAndLighting:!0,keepChunksDistance:1,gpuPreference:"default",fov:75};function R6(n){n.highPerformanceGpu&&(n.gpuPreference="high-performance",delete n.highPerformanceGpu),n.rendererMesher!=="wasm"&&n.rendererMesher!=="legacy-js"&&(typeof n.rendererWasmMesher=="boolean"?n.rendererMesher=n.rendererWasmMesher?"wasm":"legacy-js":typeof n.wasmExperimentalMesher=="boolean"&&(n.rendererMesher=n.wasmExperimentalMesher?"wasm":"legacy-js")),delete n.wasmExperimentalMesher,delete n.rendererWasmMesher}var X2={menuBackgroundMode:{possibleValues:[["classic","Classic"],["futuristic","Futuristic"]],requiresRestart:!0},menuBackgroundMinecraftTextures:{text:"Minecraft block textures",tooltip:"Use block atlas on futuristic menu cubes (loads assets on menu)"},menuBackgroundFuturisticScene:{possibleValues:rt.map(n=>[n,d5[n]])},menuBackgroundFuturisticCamera:{possibleValues:it.map(n=>[n,u5[n]])},menuBackgroundFuturisticBlockGroup:{possibleValues:nt.map(n=>[n,f5[n]]),text:"Block pool",tooltip:"Block set for textured menu cubes (requires Minecraft textures)"},menuBackgroundFuturisticCameraSpeed:{text:"Camera speed",tooltip:"Orbit / fly-through camera path speed. 0 freezes the path; mouse parallax still works.",min:0,max:200,unit:"%"},menuBackgroundFuturisticBlockSpeed:{text:"Block speed",tooltip:"Floating blocks and sky rotation. Independent of camera path speed.",min:0,max:200,unit:"%"},rendererWorldPerformance:{text:"World performance",tooltip:"Background workers for chunk geometry. Reload to apply.",requiresRestart:!0,possibleValues:[["low-energy","Low Energy"],["normal","Normal"],["maximum","Maximum"]]},starfieldRendering:{text:"Starfield"},defaultSkybox:{text:"Default skybox"},rendererFuturisticReveal:{text:"Futuristic world reveal"},rendererPerfDebugOverlay:{text:"Performance debug overlay"},disableBlockEntityTextures:{text:"Disable block entity textures",tooltip:"Skips signs, banners, heads, maps, etc."},rendererMesher:{possibleValues:[["wasm","WASM"],["legacy-js","Legacy JS"]],text:"Mesher pipeline",tooltip:"WASM is faster. Use JS if WASM is not working. Requires reload.",requiresRestart:!0},rendererShaderCubeBlocks:{text:"Instanced shader cubes",tooltip:"Render full blocks through the global GPU instanced path. Requires WASM mesher and WebGL2.",requiresChunksReload:!0},rendererShaderCubeDebugMode:{text:"Shader cube debug",tooltip:"Instanced cube path visualization (requires shader cubes enabled).",possibleValues:[["off","Off"],["holes","Hole test (red)"],["texIndex","Tile index colors"],["faces","Face id colors"],["atlasAlpha","Atlas alpha"]]},showChunkBorders:{text:"Chunk borders"},renderEntities:{text:"Render entities"},renderDebug:{possibleValues:["advanced","basic","none"]},frameLimit:{text:"Frame limit",tooltip:"false = VSync / unlimited when focused"},backgroundRendering:{text:"Background FPS limit",possibleValues:[["full","NO"],["5fps","5 FPS"],["20fps","20 FPS"]]},vanillaLook:{text:"Vanilla shading",tooltip:"On: Minecraft-style face shading. Off: higher-contrast client shading."},smoothLighting:{},newVersionsLighting:{text:"Lighting in newer versions"},vrSupport:{text:"VR support",tooltip:"Shows VR entry; does not force VR on."},vrPageGameRendering:{text:"VR page game rendering"},clipWorldBelowY:{text:"Clip world below Y"},highlightBlockColor:{possibleValues:[["auto","Auto"],["blue","Blue"],["classic","Classic"]]},loadPlayerSkins:{},renderEars:{tooltip:"Deadmau5 ears when the skin texture includes them"},showHand:{},viewBobbing:{},dayCycleAndLighting:{text:"Day cycle"},keepChunksDistance:{text:"Keep chunks distance",tooltip:"Extra distance before unloading chunks",max:5,unit:""},fov:{min:30,max:110,unit:"\xB0",text:"FOV (Field of View)"},gpuPreference:{text:"GPU preference",tooltip:"WebGL power preference. Requires reload / backend restart to apply.",requiresRestart:!0,possibleValues:[["default","Auto"],["high-performance","Dedicated"],["low-power","Low power"]]}},$2=[{title:"World rendering",keys:["rendererWorldPerformance","starfieldRendering","defaultSkybox","disableBlockEntityTextures","showChunkBorders","renderEntities","smoothLighting","vanillaLook","newVersionsLighting","dayCycleAndLighting","loadPlayerSkins","renderEars","showHand","viewBobbing","fov","keepChunksDistance","highlightBlockColor","clipWorldBelowY"]},{title:"Frame pacing",keys:["frameLimit","backgroundRendering","renderDebug","gpuPreference"]},{title:"VR",keys:["vrSupport","vrPageGameRendering"]},{title:"Menu background",keys:["menuBackgroundMode","menuBackgroundMinecraftTextures","menuBackgroundFuturisticScene","menuBackgroundFuturisticCamera","menuBackgroundFuturisticBlockGroup","menuBackgroundFuturisticCameraSpeed","menuBackgroundFuturisticBlockSpeed"]},{title:"Mesher",keys:["rendererMesher","rendererShaderCubeBlocks"]},{title:"Renderer debug",keys:["rendererFuturisticReveal","rendererPerfDebugOverlay","rendererShaderCubeDebugMode"]}];E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();function Cr(n,e,t,r,i){let s=n.getImageData(e,t,r,i);for(let o=0;o<r;o++)for(let a=0;a<i;a++){let v=(o+a*r)*4;if(s.data[v+3]!==255)return!0}return!1}function o1(n){return n/64}function es(n,e,t){if(t){if(Cr(n,0,0,e,e))return}else if(Cr(n,0,0,e,e/2))return;let r=o1(e),i=(s,o,a,v)=>n.clearRect(s*r,o*r,a*r,v*r);i(40,0,8,8),i(48,0,8,8),i(32,8,8,8),i(40,8,8,8),i(48,8,8,8),i(56,8,8,8),t&&(i(4,32,4,4),i(8,32,4,4),i(0,36,4,12),i(4,36,4,12),i(8,36,4,12),i(12,36,4,12),i(20,32,8,4),i(28,32,8,4),i(16,36,4,12),i(20,36,8,12),i(28,36,4,12),i(32,36,8,12),i(44,32,4,4),i(48,32,4,4),i(40,36,4,12),i(44,36,4,12),i(48,36,4,12),i(52,36,12,12),i(4,48,4,4),i(8,48,4,4),i(0,52,4,12),i(4,52,4,12),i(8,52,4,12),i(12,52,4,12),i(52,48,4,4),i(56,48,4,4),i(48,52,4,12),i(52,52,4,12),i(56,52,4,12),i(60,52,4,12))}function k6(n,e){n.save(),n.scale(-1,1);let t=o1(e),r=(i,s,o,a,v,l)=>n.drawImage(n.canvas,i*t,s*t,o*t,a*t,-v*t,l*t,-o*t,a*t);r(4,16,4,4,20,48),r(8,16,4,4,24,48),r(0,20,4,12,24,52),r(4,20,4,12,20,52),r(8,20,4,12,16,52),r(12,20,4,12,28,52),r(44,16,4,4,36,48),r(48,16,4,4,40,48),r(40,20,4,12,40,52),r(44,20,4,12,36,52),r(48,20,4,12,32,52),r(52,20,4,12,44,52),n.restore()}function Br(n,e){let t=!1;if(e.width!==e.height)if(e.width===2*e.height)t=!0;else throw new Error(`Bad skin size: ${e.width}x${e.height}`);let r=n.getContext("2d",{willReadFrequently:!0});if(t){let i=e.width;n.width=i,n.height=i,r.clearRect(0,0,i,i),r.drawImage(e,0,0,i,i/2),k6(r,i),es(r,n.width,!1)}else n.width=e.width,n.height=e.height,r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0,n.width,n.height),es(r,n.width,!0)}function T6(n){if(n.width===2*n.height)return n.width/64;if(n.width*17===n.height*22)return n.width/22;if(n.width*11===n.height*23)return n.width/46;throw new Error(`Bad cape size: ${n.width}x${n.height}`)}function Pr(n,e){let t=T6(e);n.width=64*t,n.height=32*t;let r=n.getContext("2d",{willReadFrequently:!0});r.clearRect(0,0,n.width,n.height),r.drawImage(e,0,0,e.width,e.height)}function M6(n,e,t,r,i){let s=n.getImageData(e,t,r,i);for(let o=0;o<r;o++)for(let a=0;a<i;a++){let v=(o+a*r)*4;if(!(s.data[v+0]===0&&s.data[v+1]===0&&s.data[v+2]===0&&s.data[v+3]===255))return!1}return!0}function S6(n,e,t,r,i){let s=n.getImageData(e,t,r,i);for(let o=0;o<r;o++)for(let a=0;a<i;a++){let v=(o+a*r)*4;if(!(s.data[v+0]===255&&s.data[v+1]===255&&s.data[v+2]===255&&s.data[v+3]===255))return!1}return!0}function Ir(n){let e=o1(n.width),t=n.getContext("2d",{willReadFrequently:!0}),r=(a,v,l,c)=>Cr(t,a*e,v*e,l*e,c*e),i=(a,v,l,c)=>M6(t,a*e,v*e,l*e,c*e),s=(a,v,l,c)=>S6(t,a*e,v*e,l*e,c*e);return r(50,16,2,4)||r(54,20,2,12)||r(42,48,2,4)||r(46,52,2,12)||i(50,16,2,4)&&i(54,20,2,12)&&i(42,48,2,4)&&i(46,52,2,12)||s(50,16,2,4)&&s(54,20,2,12)&&s(42,48,2,4)&&s(46,52,2,12)?"slim":"default"}function Hr(n,e){if(e.width!==e.height&&e.width!==2*e.height)throw new Error(`Bad skin size: ${e.width}x${e.height}`);let t=o1(e.width),r=14*t,i=7*t;n.width=r,n.height=i;let s=n.getContext("2d",{willReadFrequently:!0});s.clearRect(0,0,r,i),s.drawImage(e,24*t,0,r,i,0,0,r,i)}E();x();k();R();import P6 from"mc-assets/dist/other-textures/latest/entity/player/wide/steve.png";E();x();k();R();import*as Ee from"three";E();x();k();R();var C6=()=>{if(typeof OffscreenCanvas>"u")return!1;try{let n=new OffscreenCanvas(1,1);return(n.getContext("webgl2")||n.getContext("webgl"))!==null}catch{return!1}},B6=C6(),V0=(n,e)=>{if(B6)return new OffscreenCanvas(n,e);let t=document.createElement("canvas");return t.width=n,t.height=e,t};async function a1(n){let t=await(await fetch(n)).blob();return createImageBitmap(t)}var R0=(n,e=!1)=>{n instanceof Ee.Mesh&&(n.geometry?.dispose?.(),n.material?.dispose?.()),n.children&&n.children.forEach(t=>R0(t,e)),e&&n instanceof Ee.Mesh&&n.material?.map?.dispose?.()},Or={},ts={},v1=n=>{let e=new Ee.Texture,t=a1(n).then(r=>{let i=new OffscreenCanvas(r.width,r.height);return i.getContext("2d").drawImage(r,0,0),e.source.data=i,e.needsUpdate=!0,e});return{texture:e,promise:t}},Ie=async n=>v1(n).texture,m5=n=>{let e=V0(n.width,n.height);e.getContext("2d").drawImage(n,0,0);let r=new Ee.Texture(e);return r.magFilter=Ee.NearestFilter,r.minFilter=Ee.NearestFilter,r};async function l1(n,e,t){if(!Or[n]){let{promise:i,resolve:s}=Promise.withResolvers(),o=v1(n);Or[n]=o.texture,o.promise.then(s),ts[n]=i}e(Or[n]),ts[n].then(()=>{t?.()})}var ge=P6,wf=Ie(ge),rs={apiEnabled:!0},c1=n=>{Object.assign(rs,n)};async function He(n,e){if(!rs.apiEnabled||e==="cape")return;let t=`https://playerdb.co/api/player/minecraft/${n}`,r=await fetch(t);return r.ok?(await r.json()).data.player.skin_texture:void 0}async function ot(n){n.startsWith("data:")||(n=await I6(n.replace("http://","https://")));let e=await a1(n),t=V0(64,64);return Br(t,e),{canvas:t,image:e}}var I6=async n=>{let t=await(await fetch(n,{})).arrayBuffer();return`data:image/png;base64,${z.from(t).toString("base64")}`};function Bf(n){return{mode:n.menuBackgroundMode,useMinecraftTextures:n.menuBackgroundMinecraftTextures,futuristicScene:n.menuBackgroundFuturisticScene,futuristicCamera:n.menuBackgroundFuturisticCamera,futuristicBlockGroup:n.menuBackgroundFuturisticBlockGroup,futuristicCameraSpeed:Ae(n.menuBackgroundFuturisticCameraSpeed),futuristicBlockSpeed:Ae(n.menuBackgroundFuturisticBlockSpeed)}}function O6(n,e){let t=n.futuristic;t&&(t.setScene?.(e.menuBackgroundFuturisticScene),t.setCamera?.(e.menuBackgroundFuturisticCamera),t.setBlockGroup?.(e.menuBackgroundFuturisticBlockGroup),t.setCameraSpeed?.(Ae(e.menuBackgroundFuturisticCameraSpeed)),t.setBlockSpeed?.(Ae(e.menuBackgroundFuturisticBlockSpeed)))}function F6(n){return n.rendererMesher!=="legacy-js"}function D6(n,e,t){let r=n.inWorldRenderingConfig,i=e.rendererMeshersCountOverride,s=o=>{r.mesherWorkers=i??o};switch(e.rendererWorldPerformance){case"low-energy":s(1),r.dedicatedChangeWorker=!1;break;case"normal":s(2),r.dedicatedChangeWorker=!t;break;case"maximum":s(Math.max(3,Math.min(navigator.hardwareConcurrency??0,8))),r.dedicatedChangeWorker=!t;break}}function z6(n,e,t){let r=e.backgroundRendering,i=e.frameLimit;t?n.config.fpsLimit=i||void 0:r==="5fps"?n.config.fpsLimit=5:r==="20fps"?n.config.fpsLimit=20:n.config.fpsLimit=void 0}function L6(n,e,t){let{renderDebug:r}=e;r==="none"||t.isCypress?n.config.statsVisible=0:r==="basic"?n.config.statsVisible=1:r==="advanced"&&(n.config.statsVisible=2)}function U6(n,e,t={}){let r=n.inWorldRenderingConfig,i=F6(e);r.showChunkBorders=e.showChunkBorders,r.futuristicReveal=e.rendererFuturisticReveal,D6(n,e,i),r.renderEntities=e.renderEntities,L6(n,e,t),z6(n,e,t.windowFocused!==!1),r.vrSupport=e.vrSupport,r.vrPageGameRendering=e.vrPageGameRendering,r.enableDebugOverlay=e.rendererPerfDebugOverlay,r.clipWorldBelowY=e.clipWorldBelowY,r.extraBlockRenderers=!e.disableBlockEntityTextures,r.fetchPlayerSkins=e.loadPlayerSkins,r.highlightBlockColor=e.highlightBlockColor,r.wasmMesher=i,r.shaderCubeBlocks=e.rendererShaderCubeBlocks&&i,r.disableMesherConversionCache=!!t.isSafari,c1({apiEnabled:e.loadPlayerSkins}),r.smoothLighting=e.smoothLighting,r.shadingTheme=e.vanillaLook?"vanilla":"high-contrast",r.starfield=e.starfieldRendering,r.defaultSkybox=e.defaultSkybox,r.fov=e.fov,r.shaderCubeDebugMode=Sr(e.rendererShaderCubeDebugMode)}function Pf(n,e,t){e.keepChunksDistance=t.keepChunksDistance;let r=n.inWorldRenderingConfig;r.renderEars=t.renderEars,r.showHand=t.showHand,r.viewBobbing=t.viewBobbing,r.dayCycle=t.dayCycleAndLighting}function If(n,e,t={}){n.bindRendererOptions(()=>e);let r=t.getWindowFocused?.()??!0,i=()=>{let s=e;if(U6(n,s,{isSafari:t.isSafari,isCypress:t.isCypress,windowFocused:r}),n.currentDisplay==="menu"){let o=n.backend?.getMenuBackground?.();o&&O6(o,s)}};return i(),t.onRegisterFocusHandlers?.({onFocus:()=>{r=!0,i()},onBlur:()=>{r=!1,i()}}),H6(e,i)}function Hf(n,e,t){n.inWorldRenderingConfig.enableLighting=!t||e}E();x();k();R();import{proxy as G6}from"valtio";var is=()=>G6({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,fovMultiplier:1,cameraSpectatingEntity:void 0,team:void 0}),N6=n=>({isSpectator(){return n.gameMode==="spectator"},isSpectatingEntity(){return n.cameraSpectatingEntity!==void 0&&n.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:n.perspective==="third_person_back"||n.perspective==="third_person_front"}}),W6=()=>({reactive:is()}),ns=(n,e,t)=>({...e,"minecraft:date":new Date});E();x();k();R();E();x();k();R();import*as Q5 from"three";import{Vec3 as gl}from"vec3";E();x();k();R();import{proxy as V6,getVersion as os,subscribe as as}from"valtio";import{Vec3 as vs}from"vec3";function ls(n,e){let t=e??globalThis;return t.addEventListener("message",r=>{let{type:i,args:s,msgId:o}=r.data;if(n[i]){let a=n[i](...s);a instanceof Promise&&a.then(v=>{t.postMessage({type:"result",msgId:o,args:[v]})})}}),null}var cs=(n,e=!0)=>{let t=0;return new Proxy({},{get(r,i){return i==="transfer"?(...s)=>new Proxy({},{get(o,a){return(...v)=>{n.postMessage({type:a,args:v},s)}}}):(...s)=>{let o=t++,a=e?s.filter(v=>v instanceof ArrayBuffer||v instanceof MessagePort||typeof ImageBitmap<"u"&&v instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&v instanceof OffscreenCanvas||typeof ImageData<"u"&&v instanceof ImageData):[];return n.postMessage({type:i,msgId:o,args:s},a),{then(v){let l=({data:c})=>{c.type==="result"&&c.msgId===o&&(v(c.args[0]),n.removeEventListener("message",l))};n.addEventListener("message",l)}}}}})};var ds=(n,e,t,r)=>{try{t.postMessage({type:"sync",syncId:n,value:d1(e)}),p5.toWorker++,globalThis.debugSyncMessagesOutgoing??(globalThis.debugSyncMessagesOutgoing=0),globalThis.debugSyncMessagesOutgoing++}catch{g5(e)}},p5={toWorker:0,fromWorker:0};typeof window<"u"&&setInterval(()=>{globalThis.debugWorkerSyncStats={...p5},p5.toWorker=0,p5.fromWorker=0},1e3);var j6=()=>Math.random().toString(36).slice(2,15)+Math.random().toString(36).slice(2,15),ss=(n,e,t,r,i)=>{if(!n.__syncToWorker&&!n.__syncFromWorker&&!r)return;let s=j6();if(n.__syncId=s,n.__syncToWorker||r){let o=()=>{ds(s,e,t,`toWorker:${i}`)};r&&as(e,o);let a=n.__syncToWorkerInterval??0;a>0&&setInterval(o,a)}e.__syncFromWorker&&t.addEventListener("message",o=>{o.data.type==="sync"&&o.data.syncId===s&&(p5.fromWorker++,Object.assign(e,o.data.value))})},d1=n=>{if(os(n)===void 0)return n;if(Array.isArray(n))return n.map(d1);if(typeof n=="object"&&n!==null){let e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=d1(n[t]));return e}return n},u1=(n,e,t=!0,r=!0,i=!1)=>{var a,v;let s=n,o={};for(let l in n)if(Object.prototype.hasOwnProperty.call(n,l)){if(t&&typeof n[l]=="function")continue;if(n[l]instanceof Date||n[l]instanceof RegExp||n[l]instanceof Map||n[l]instanceof WeakMap||n[l]instanceof WeakSet,n[l]instanceof Set){o[l]=[...n[l]],o[l].__restorer="Set";continue}if(n[l]instanceof vs){o[l]={x:n[l].x,y:n[l].y,z:n[l].z},o[l].__restorer="Vec3";continue}if(o[l]=n[l],typeof n[l]=="object"&&n[l]!==null){if(n[l].prepareForTransfer){o[l]=n[l].prepareForTransfer(e);continue}let c=os(n[l])!==void 0;o[l]=c?d1(n[l]):n[l];let d=n[l].__syncToWorker!==!1&&!i&&c&&!n[l].__syncFromWorker;if((a=o[l]).__syncToWorker??(a.__syncToWorker=d),c&&((v=o[l]).__valtio??(v.__valtio=!0)),o[l].__syncToWorker&&c){ss(o[l],s[l],e,!0,l);continue}ss(o[l],s[l],e,!1,l),o[l]=u1(o[l],e,t,!1,c)}}return o},g5=(n,e=[])=>{for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t)){if(!n[t])continue;typeof n[t]=="object"&&n[t]!==null&&g5(n[t],[...e,t]);try{structuredClone(n[t])}catch{}}},Y6=(n,e,t)=>{if(!n.__syncId)return;let r=n.__syncId;if(n.__syncToWorker&&e.addEventListener("message",i=>{i.data.type==="sync"&&i.data.syncId===r&&Object.assign(n,i.data.value)}),n.__syncFromWorker){let i=()=>{ds(r,n,e,`fromWorker:${t}`)};n.__valtio&&as(n,i);let s=n.__syncFromWorkerInterval??0;s>0&&setInterval(i,s)}},Q6=[{restorerName:"Set",restoreTransferred(n,e){return new Set(n)}},{restorerName:"Vec3",restoreTransferred(n,e){return new vs(n.x,n.y,n.z)}}];var f1=(n,e,t,r=!0)=>{let i=[...Q6,...e];for(let s in n)if(Object.prototype.hasOwnProperty.call(n,s)){if(!n[s])continue;if(typeof n[s]=="object"&&n[s]!==null&&f1(n[s],i,t,r),n[s].__restorer){let o=i.find(a=>a.restorerName?a.restorerName===n[s].__restorer:a.name===n[s].__restorer);if(o)n[s]=o.restoreTransferred(n[s],t);else{let a=new Error(`Restorer ${n[s].__restorer} not found`);if(typeof r=="function")r(a);else if(r)throw a}}n[s].__valtio&&(n[s]=V6(n[s])),Y6(n[s],t,s)}return n};E();x();k();R();var h1=class{constructor(e){this.nonReactiveState=e;u(this,"events",[]);u(this,"frozenEvents",[]);u(this,"lastSecondEvents",[]);u(this,"currentFrameStartTime",null);u(this,"lastInteractionTime",0);u(this,"lastSecondUpdateTime",0);u(this,"timeWindowMs",5e3);u(this,"lastSecondWindowMs",1e3);u(this,"maxEvents",500);u(this,"lastSecondUpdateInterval",1e3);this.nonReactiveState.renderer||(this.nonReactiveState.renderer={timeline:{live:[],frozen:[],lastSecond:[]}}),this.nonReactiveState.renderer.timeline||(this.nonReactiveState.renderer.timeline={live:[],frozen:[],lastSecond:[]}),setInterval(()=>{this.updateLastSecondTimeline()},this.lastSecondUpdateInterval)}markFrameStart(){this.currentFrameStartTime=performance.now(),this.addEvent({type:"frameStart",timestamp:this.currentFrameStartTime})}markFrameEnd(){if(!this.currentFrameStartTime)return;let e=performance.now(),t=e-this.currentFrameStartTime;this.addEvent({type:"frameEnd",timestamp:e,duration:t}),this.currentFrameStartTime=null}markCameraUpdate(e){if(!e)return;let t=performance.now();this.lastInteractionTime=t,this.addEvent({type:"cameraUpdate",timestamp:t}),this.frozenEvents=[...this.events],this.trimEvents(this.frozenEvents),this.syncFrozenEvents()}markFrameDisplay(){this.addEvent({type:"frameDisplay",timestamp:performance.now()})}addEvent(e){this.events.push(e),this.lastSecondEvents.push(e),this.trimEvents(this.events),this.trimLastSecondEvents(),this.syncLiveEvents()}trimEvents(e){let r=performance.now()-this.timeWindowMs;for(;e.length>0&&e[0].timestamp<r;)e.shift();e.length>this.maxEvents&&e.splice(0,e.length-this.maxEvents)}trimLastSecondEvents(){let t=performance.now()-this.lastSecondWindowMs;for(;this.lastSecondEvents.length>0&&this.lastSecondEvents[0].timestamp<t;)this.lastSecondEvents.shift()}updateLastSecondTimeline(){let e=performance.now();e-this.lastSecondUpdateTime<this.lastSecondUpdateInterval||(this.lastSecondUpdateTime=e,this.trimLastSecondEvents(),this.syncLastSecondEvents())}syncLiveEvents(){this.nonReactiveState.renderer.timeline.live=[...this.events]}syncFrozenEvents(){this.nonReactiveState.renderer.timeline.frozen=[...this.frozenEvents]}syncLastSecondEvents(){this.nonReactiveState.renderer.timeline.lastSecond=[...this.lastSecondEvents]}clear(){this.events=[],this.frozenEvents=[],this.lastSecondEvents=[],this.syncLiveEvents(),this.syncFrozenEvents(),this.syncLastSecondEvents()}};E();x();k();R();import*as Q from"three";import{Vec3 as Ne}from"vec3";import Kv from"prismarine-chat";E();x();k();R();var H0=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return this.None(n)},Out:function(n){return this.None(n)},InOut:function(n){return this.None(n)}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var e=1.70158;return n===1?1:n*n*((e+1)*n-e)},Out:function(n){var e=1.70158;return n===0?0:--n*n*((e+1)*n+e)+1},InOut:function(n){var e=2.5949095;return(n*=2)<1?.5*(n*n*((e+1)*n-e)):.5*((n-=2)*n*((e+1)*n+e)+2)}}),Bounce:Object.freeze({In:function(n){return 1-H0.Bounce.Out(1-n)},Out:function(n){return n<.36363636363636365?7.5625*n*n:n<.7272727272727273?7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?7.5625*(n-=.8181818181818182)*n+.9375:7.5625*(n-=.9545454545454546)*n+.984375},InOut:function(n){return n<.5?H0.Bounce.In(n*2)*.5:H0.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(e){return Math.pow(e,n)},Out:function(e){return 1-Math.pow(1-e,n)},InOut:function(e){return e<.5?Math.pow(e*2,n)/2:(1-Math.pow(2-e*2,n))/2+.5}}}}),b5=function(){return performance.now()},St=function(){function n(){this._tweens={},this._tweensAddedDuringUpdate={}}return n.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(t){return e._tweens[t]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},n.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},n.prototype.update=function(e,t){e===void 0&&(e=b5()),t===void 0&&(t=!1);var r=Object.keys(this._tweens);if(r.length===0)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var s=this._tweens[r[i]],o=!t;s&&s.update(e,o)===!1&&!t&&delete this._tweens[r[i]]}r=Object.keys(this._tweensAddedDuringUpdate)}return!0},n}(),Mt={Linear:function(n,e){var t=n.length-1,r=t*e,i=Math.floor(r),s=Mt.Utils.Linear;return e<0?s(n[0],n[1],r):e>1?s(n[t],n[t-1],t-r):s(n[i],n[i+1>t?t:i+1],r-i)},Bezier:function(n,e){for(var t=0,r=n.length-1,i=Math.pow,s=Mt.Utils.Bernstein,o=0;o<=r;o++)t+=i(1-e,r-o)*i(e,o)*n[o]*s(r,o);return t},CatmullRom:function(n,e){var t=n.length-1,r=t*e,i=Math.floor(r),s=Mt.Utils.CatmullRom;return n[0]===n[t]?(e<0&&(i=Math.floor(r=t*(1+e))),s(n[(i-1+t)%t],n[i],n[(i+1)%t],n[(i+2)%t],r-i)):e<0?n[0]-(s(n[0],n[0],n[1],n[1],-r)-n[0]):e>1?n[t]-(s(n[t],n[t],n[t-1],n[t-1],r-t)-n[t]):s(n[i?i-1:0],n[i],n[t<i+1?t:i+1],n[t<i+2?t:i+2],r-i)},Utils:{Linear:function(n,e,t){return(e-n)*t+n},Bernstein:function(n,e){var t=Mt.Utils.Factorial;return t(n)/t(e)/t(n-e)},Factorial:function(){var n=[1];return function(e){var t=1;if(n[e])return n[e];for(var r=e;r>1;r--)t*=r;return n[e]=t,t}}(),CatmullRom:function(n,e,t,r,i){var s=(t-n)*.5,o=(r-e)*.5,a=i*i,v=i*a;return(2*e-2*t+s+o)*v+(-3*e+3*t-2*s-o)*a+s*i+e}}},us=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),Fr=new St,F0=function(){function n(e,t){t===void 0&&(t=Fr),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=H0.Linear.None,this._interpolationFunction=Mt.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=us.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.to=function(e,t){if(t===void 0&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t,this},n.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e,this},n.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},n.prototype.start=function(e,t){if(e===void 0&&(e=b5()),t===void 0&&(t=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var r in this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},n.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},n.prototype._setupProperties=function(e,t,r,i,s){for(var o in r){var a=e[o],v=Array.isArray(a),l=v?"array":typeof a,c=!v&&Array.isArray(r[o]);if(!(l==="undefined"||l==="function")){if(c){var d=r[o];if(d.length===0)continue;for(var f=[a],m=0,g=d.length;m<g;m+=1){var b=this._handleRelativeValue(a,d[m]);if(isNaN(b)){c=!1;break}f.push(b)}c&&(r[o]=f)}if((l==="object"||v)&&a&&!c){t[o]=v?[]:{};var w=a;for(var y in w)t[o][y]=w[y];i[o]=v?[]:{};var d=r[o];if(!this._isDynamic){var A={};for(var y in d)A[y]=d[y];r[o]=d=A}this._setupProperties(w,t[o],d,i[o],s)}else(typeof t[o]>"u"||s)&&(t[o]=a),v||(t[o]*=1),c?i[o]=r[o].slice().reverse():i[o]=t[o]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},n.prototype.pause=function(e){return e===void 0&&(e=b5()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},n.prototype.resume=function(e){return e===void 0&&(e=b5()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},n.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},n.prototype.group=function(e){return e===void 0&&(e=Fr),this._group=e,this},n.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},n.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},n.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},n.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},n.prototype.easing=function(e){return e===void 0&&(e=H0.Linear.None),this._easingFunction=e,this},n.prototype.interpolation=function(e){return e===void 0&&(e=Mt.Linear),this._interpolationFunction=e,this},n.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},n.prototype.onStart=function(e){return this._onStartCallback=e,this},n.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},n.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},n.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},n.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},n.prototype.onStop=function(e){return this._onStopCallback=e,this},n.prototype.update=function(e,t){if(e===void 0&&(e=b5()),t===void 0&&(t=!0),this._isPaused)return!0;var r,i,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>s)return!1;t&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=this._duration===0||i>1?1:i;var o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,v=this._chainedTweens.length;a<v;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(e,t,r,i){for(var s in r)if(t[s]!==void 0){var o=t[s]||0,a=r[s],v=Array.isArray(e[s]),l=Array.isArray(a),c=!v&&l;c?e[s]=this._interpolationFunction(a,i):typeof a=="object"&&a?this._updateProperties(e[s],o,a,i):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(e[s]=o+(a-o)*i))}},n.prototype._handleRelativeValue=function(e,t){return typeof t!="string"?t:t.charAt(0)==="+"||t.charAt(0)==="-"?e+parseFloat(t):parseFloat(t)},n.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=t},n}();var gh=us.nextId,be=Fr,bh=be.getAll.bind(be),yh=be.removeAll.bind(be),_h=be.add.bind(be),wh=be.remove.bind(be),fs=be.update.bind(be);E();x();k();R();var K6=(n,e)=>{try{return JSON.parse(n)}catch{return null}},J6={black:"#000000",dark_blue:"#0000AA",dark_green:"#00AA00",dark_aqua:"#00AAAA",dark_red:"#AA0000",dark_purple:"#AA00AA",gold:"#FFAA00",gray:"#AAAAAA",dark_gray:"#555555",blue:"#5555FF",green:"#55FF55",aqua:"#55FFFF",red:"#FF5555",light_purple:"#FF55FF",yellow:"#FFFF55",white:"#FFFFFF"},m1=(n,e,t,r=s=>{},i=(s,o)=>V0(s,o))=>{let a=[16,9],v=a[0]-a[1],l=v/16,c="front_text"in n?n.front_text.messages:[n.Text1,n.Text2,n.Text3,n.Text4];if(!c.some(g=>g!=="null"))return;let d=i(16*40,v*40),f=d.getContext("2d");r(f);let m=("front_text"in n?n.front_text.color:n.Color)||"black";for(let[g,b]of c.slice(0,4).entries())b!=="null"&&Dr(b,t,d,64,m,64*(g+1)+(e?0:-8));return d},Dr=(n,e,t,r,i,s=0)=>{let o=!1,a=typeof n=="string"&&(n?.startsWith("{")||n?.startsWith('"'))?K6(n??'""',"sign text"):n;if(!a||typeof a!="object"&&typeof a!="string")return;let v=t.getContext("2d");if(!v)throw new Error("Could not get 2d context");v.imageSmoothingEnabled=!1,v.font=`${r}px mojangles`;let l=new e(a),c=[],d=!1,f="",m=s,g=[],b=(C,M)=>{C.text!==null&&C.text!==void 0&&C.text;let S=C.text===null||C.text===void 0?void 0:String(C.text),H={color:C.color??M?.color,underlined:C.underlined??M?.underlined,strikethrough:C.strikethrough??M?.strikethrough,bold:C.bold??M?.bold,italic:C.italic??M?.italic};if(d=d||H.underlined||H.strikethrough||!1,S?.includes(`
285
+ `;Y1=6,ut={LX_BITS:4,LY_BITS:4,LZ_BITS:4,FACE_BITS:3,TINT_BITS:8,AO_BITS_PER_CORNER:2,NUM_CORNERS:4,LX_SHIFT:0,LY_SHIFT:4,LZ_SHIFT:8,FACE_SHIFT:12,TINT_SHIFT:15,AO_SHIFT:23,TRANSPARENT_SHIFT:31},U3={TEX_INDEX_BITS:12,DIAGONAL_FLAG_SHIFT:12,SECTION_Y_SHIFT:13,SECTION_Y_BITS:5,EMPTY_SHIFT:18,SPARE_BITS:13}});var Q1,G3=X0(()=>{"use strict";E();x();k();R();Q1=class{constructor(e){d(this,"atlasWidth");d(this,"atlasHeight");d(this,"tileSize");d(this,"tilesPerRow");d(this,"maxTiles");d(this,"valid");this.atlasWidth=e.width,this.atlasHeight=e.height,this.tileSize=e.tileSize,this.tilesPerRow=Math.floor(this.atlasWidth/this.tileSize),this.maxTiles=this.tilesPerRow*Math.floor(this.atlasHeight/this.tileSize),this.valid=this.atlasWidth===1024&&this.atlasHeight===1024&&this.tileSize===16&&this.maxTiles<=4096}isValid(){return this.valid}getTilesPerRow(){return this.tilesPerRow}tileIndexFromPixelCoords(e,t){if(!this.valid)return-1;let r=Math.floor(e/this.tileSize),i=Math.floor(t/this.tileSize);if(r<0||r>=this.tilesPerRow||i<0)return-1;let s=i*this.tilesPerRow+r;return s>=this.maxTiles?-1:s}tileIndexFromTextureEntry(e){return!this.valid||e.su!==this.tileSize||e.sv!==this.tileSize?-1:this.tileIndexFromPixelCoords(e.u,e.v)}tileIndexFromTextureName(e,t){if(!this.valid)return-1;let r=t.textures[e];if(!r&&e.includes(":")&&(r=t.textures[e.split(":")[1]]),!r&&e.includes("/")&&(r=t.textures[e.split("/")[1]]),r||(r=t.textures[`block/${e}`]),!r){let i=e.replace(/^block\//,"");r=t.textures[i]}return r?this.tileIndexFromTextureEntry(r):-1}}});import*as ce from"three";var K1,N3=X0(()=>{"use strict";E();x();k();R();K1=class n{constructor(){d(this,"entries",[{r:1,g:1,b:1}]);d(this,"colorToIndex",new Map);d(this,"categoryBiomeToIndex",new Map);d(this,"texture",null);d(this,"ready",!1)}packColor(e,t,r){let i=Math.round(e*255),s=Math.round(t*255),o=Math.round(r*255);return i<<16|s<<8|o}add(e,t,r,i,s){let o=this.packColor(e,t,r),v=`${i}:${s}`,a=this.categoryBiomeToIndex.get(v);if(a!==void 0)return a;let l=this.colorToIndex.get(o);if(l!==void 0)return this.categoryBiomeToIndex.set(v,l),l;let c=this.entries.length;return this.entries.push({r:e,g:t,b:r}),this.colorToIndex.set(o,c),this.categoryBiomeToIndex.set(v,c),c}getTintIndex(e,t,r,i){return e===void 0?0:e===0?t==="redstone_wire"?this.categoryBiomeToIndex.get(`redstone:${r.power}`)??this.categoryBiomeToIndex.get("redstone:0")??0:t==="birch_leaves"||t==="spruce_leaves"||t==="lily_pad"?this.categoryBiomeToIndex.get(`constant:${t}`)??this.categoryBiomeToIndex.get("constant:default")??0:t.includes("leaves")||t==="vine"?this.categoryBiomeToIndex.get(`foliage:${i}`)??this.categoryBiomeToIndex.get("foliage:plains")??0:this.categoryBiomeToIndex.get(`grass:${i}`)??this.categoryBiomeToIndex.get("grass:plains")??0:0}getEntry(e){return this.entries[e]??this.entries[0]}get size(){return this.entries.length}buildTextureData(){let e=new Float32Array(1024);for(let t=0;t<this.entries.length&&t<256;t++){let r=this.entries[t];e[t*4]=r.r,e[t*4+1]=r.g,e[t*4+2]=r.b,e[t*4+3]=1}return e}createTexture(){this.texture&&(this.texture.dispose(),this.texture=null,this.ready=!1);let e=this.buildTextureData(),t=new ce.DataTexture(e,256,1,ce.RGBAFormat,ce.FloatType);return t.minFilter=ce.NearestFilter,t.magFilter=ce.NearestFilter,t.wrapS=ce.ClampToEdgeWrapping,t.wrapT=ce.ClampToEdgeWrapping,t.needsUpdate=!0,this.texture=t,this.ready=!0,t}getTexture(){return this.texture}isReady(){return this.ready}static fromTintsData(e){let t=new n;function r(i){let s=(i>>16&255)/255,o=(i>>8&255)/255,v=(i&255)/255;return[s,o,v]}if(e.grass){let i=r(e.grass.default);for(let{keys:s,color:o}of e.grass.data??[]){let v=r(o);for(let a of s)t.add(v[0],v[1],v[2],"grass",a)}t.add(i[0],i[1],i[2],"grass","plains")}if(e.foliage){let i=r(e.foliage.default);for(let{keys:s,color:o}of e.foliage.data??[]){let v=r(o);for(let a of s)t.add(v[0],v[1],v[2],"foliage",a)}t.add(i[0],i[1],i[2],"foliage","plains")}if(e.redstone){let i=r(e.redstone.default);for(let{keys:s,color:o}of e.redstone.data??[]){let v=r(o);for(let a of s)t.add(v[0],v[1],v[2],"redstone",a)}t.add(i[0],i[1],i[2],"redstone","0")}if(e.constant){let i=r(e.constant.default);for(let{keys:s,color:o}of e.constant.data??[]){let v=r(o);for(let a of s)t.add(v[0],v[1],v[2],"constant",a)}t.add(i[0],i[1],i[2],"constant","default")}return t}}});import W3 from"mc-assets/dist/blocksAtlases.json";function fv(){let n=globalThis.loadedData?.tints;return n||(V3||(V3=!0),null)}function Z1(){let n=fv();if(!n)return null;if(J1||(J1=K1.fromTintsData(n),J1.createTexture()),!Bi){let e=W3.latest??W3;Bi=new Q1({width:e.width,height:e.height,tileSize:e.tileSize??16,suSv:e.suSv??16,textures:e.textures??{}})}return{tintPalette:J1,textureIndexMapping:Bi}}function j3(){return 1<<U3.EMPTY_SHIFT>>>0}var q1,J1,Bi,V3,Yt=X0(()=>{"use strict";E();x();k();R();ft();G3();N3();q1=4,J1=null,Bi=null,V3=!1});import*as B0 from"three";function hv(n,e){let t=new B0.InstancedBufferGeometry,r=new Float32Array(Y1*3);t.setAttribute("position",new B0.BufferAttribute(r,3));let i=new Uint32Array(e),s=new Uint32Array(e),o=new Uint32Array(e),v=new Uint32Array(e),a=q1;for(let l=0;l<e;l++)i[l]=n[l*a],s[l]=n[l*a+1],o[l]=n[l*a+2],v[l]=n[l*a+3];return t.setAttribute("a_w0",new B0.InstancedBufferAttribute(i,1)),t.setAttribute("a_w1",new B0.InstancedBufferAttribute(s,1)),t.setAttribute("a_w2",new B0.InstancedBufferAttribute(o,1)),t.setAttribute("a_w3",new B0.InstancedBufferAttribute(v,1)),t.instanceCount=e,t.boundingBox=new B0.Box3(new B0.Vector3(-8,-8,-8),new B0.Vector3(8,8,8)),t.boundingSphere=new B0.Sphere(new B0.Vector3(0,0,0),Math.sqrt(3*8**2)),t}function mv(n){n.raycast=(e,t)=>{let{geometry:r}=n;if(!r.boundingBox||(Y3.copy(r.boundingBox).applyMatrix4(n.matrixWorld),!e.ray.intersectBox(Y3,Pi)))return;let i=e.ray.origin.distanceTo(Pi);t.push({distance:i,point:Pi.clone(),object:n})}}function X1(n,e){let t=hv(n.words,n.count),r=new B0.Mesh(t,e);return r.name="shaderMesh",r.matrixAutoUpdate=!1,r.frustumCulled=!1,mv(r),r}function Ii(n){n.geometry.dispose()}var Y3,Pi,Hi=X0(()=>{"use strict";E();x();k();R();ft();Yt();Y3=new B0.Box3,Pi=new B0.Vector3});var X3={};j5(X3,{applyWorldGeometryExport:()=>bv,createMeshesFromExport:()=>q3,downloadWorldGeometry:()=>Oi,exportWorldGeometry:()=>K3,loadTextureFromDataUrl:()=>Z3,loadWorldGeometryFromUrl:()=>pv});import*as P0 from"three";function K3(n,e,t,r=!1){let i=[];for(let[o,v]of Object.entries(n.sectionObjects)){let a=v.children.find(w=>w.name==="mesh");if(!a?.geometry)continue;let{geometry:l}=a,c=l.getAttribute("position"),u=l.getAttribute("normal"),f=l.getAttribute("color"),m=l.getAttribute("uv"),g=l.index;if(!c||!g)continue;let y=n.sceneOrigin.getWorldPosition(a);i.push({key:o,position:{x:y?.x??n.sceneOrigin.toWorldX(a.position.x),y:y?.y??n.sceneOrigin.toWorldY(a.position.y),z:y?.z??n.sceneOrigin.toWorldZ(a.position.z)},geometry:{positions:[...c.array],normals:u?[...u.array]:[],colors:f?[...f.array]:[],uvs:m?[...m.array]:[],indices:[...g.array]}})}let s={version:n.version??"unknown",exportedAt:new Date().toISOString(),camera:{position:e,rotation:t},sections:i};if(r&&n.material.map){let o=document.createElement("canvas"),v=n.material.map,{image:a}=v;a&&(o.width=a.width,o.height=a.height,o.getContext("2d").drawImage(a,0,0),s.textureAtlasDataUrl=o.toDataURL("image/png"))}return s}function Oi(n,e,t,r="world-geometry.json",i=!1){let s=K3(n,e,t,i),o=JSON.stringify(s),v=new Blob([o],{type:"application/json"}),a=URL.createObjectURL(v),l=document.createElement("a");l.href=a,l.download=r,l.click(),URL.revokeObjectURL(a)}async function pv(n){let e=await fetch(n);if(!e.ok)throw new Error(`Failed to fetch world geometry: ${e.statusText}`);return e.json()}function J3(n){let e=n.map??n.map;if(!e)return null;let t=j1();t.uniforms.u_atlas.value=e;let r=Z1();if(!r)return null;let{tintPalette:i}=r;return i.isReady()||i.createTexture(),t.uniforms.u_tintPalette.value=i.getTexture(),t}function q3(n,e,t){let r=[],i=t??J3(e);for(let s of n.sections){let o=new P0.Group;if(o.name="chunk",s.geometry.positions.length>0&&s.geometry.indices.length>0){let l=new P0.BufferGeometry;l.setAttribute("position",new P0.Float32BufferAttribute(s.geometry.positions,3)),s.geometry.normals.length&&l.setAttribute("normal",new P0.Float32BufferAttribute(s.geometry.normals,3)),s.geometry.colors.length&&l.setAttribute("color",new P0.Float32BufferAttribute(s.geometry.colors,3)),s.geometry.uvs.length&&l.setAttribute("uv",new P0.Float32BufferAttribute(s.geometry.uvs,2));let u=Math.max(...s.geometry.indices)>65535?Uint32Array:Uint16Array;l.setIndex(new P0.BufferAttribute(new u(s.geometry.indices),1));let f=new P0.Mesh(l,e);f.position.set(s.position.x,s.position.y,s.position.z),f.name="mesh",o.add(f)}let a=s.shaderCubes;if(a&&a.count>0&&i){let l=X1(a,i);l.position.set(s.position.x,s.position.y,s.position.z),o.add(l)}o.children.length>0&&r.push(o)}return r}async function Z3(n){return new Promise((e,t)=>{let r=new Image;r.onload=()=>{let i=new P0.Texture(r);i.magFilter=P0.NearestFilter,i.minFilter=P0.NearestFilter,i.needsUpdate=!0,i.flipY=!1,e(i)},r.onerror=t,r.src=n})}async function bv(n,e){let{scene:t,renderUpdateEmitter:r,material:i}=n,s=t.getObjectByName(Q3);s&&(t.remove(s),gv(s));let o=!!e.textureAtlasDataUrl,v;if(o&&e.textureAtlasDataUrl){let u=await Z3(e.textureAtlasDataUrl);v=new P0.MeshLambertMaterial({map:u,vertexColors:!0,transparent:!0,alphaTest:.1}),v.name="geometry-export-material"}else v=i;let a=e.sections.some(u=>(u.shaderCubes?.count??0)>0)?J3(v):null,l=q3(e,v,a),c=new P0.Group;c.name=Q3,o&&(c.userData.geometryExportMaterial=v);for(let u of l)c.add(u);return t.add(c),r.emit("update"),l.length}var Q3,gv,Fi=X0(()=>{"use strict";E();x();k();R();Yt();ft();Hi();Q3="geometry-export-root";gv=n=>{n.traverse(t=>{t.isMesh&&t.geometry?.dispose()});let e=n.userData?.geometryExportMaterial;e&&(e.map?.dispose?.(),e.dispose?.())}});E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();import{proxy as x2}from"valtio";E();x();k();R();E();x();k();R();var hr=()=>({longRenderTime:!1,constantLongRenderTime:!1,tooManyEntities:!1,tooManyTextures:!1,unknownReason:!1});E();x();k();R();var q5=30;var mr=45,pr=100;E();x();k();R();var n5=class{constructor(e){this.factors=e;d(this,"renderTimeHistory",[])}onFrame(e){this.pushRenderTime(e.totalMs),this.recompute(e)}pushRenderTime(e){this.renderTimeHistory.push(e),this.renderTimeHistory.length>24&&this.renderTimeHistory.shift()}recompute(e){let t=e.fps>0&&e.fps<=45,r=Math.max(0,e.totalMs-e.entitiesMs),i=e.totalMs>=30,s=this.renderTimeHistory.length,o=this.renderTimeHistory.filter(f=>f>=30).length,v=s>=8&&o/s>=.65,a=e.loadedTextureCount>=100,l=t&&e.entitiesMs>=8&&r<=20,u=t&&!(i||v||l||a);this.factors.longRenderTime=i,this.factors.constantLongRenderTime=v,this.factors.tooManyEntities=l,this.factors.tooManyTextures=a,this.factors.unknownReason=u}reset(){this.renderTimeHistory.length=0,this.factors.longRenderTime=!1,this.factors.constantLongRenderTime=!1,this.factors.tooManyEntities=!1,this.factors.tooManyTextures=!1,this.factors.unknownReason=!1}};E();x();k();R();var Ya=[{key:"longRenderTime",code:"LR"},{key:"constantLongRenderTime",code:"CLR"},{key:"tooManyEntities",code:"ENT"},{key:"tooManyTextures",code:"TEX"},{key:"unknownReason",code:"UNK"}];function gr(n){let e=Ya.filter(({key:t})=>n[t]).map(({code:t})=>t);return e.length>0?e.join("+"):""}var s5={paused:!1,showChunkBorders:!1,enableDebugOverlay:!1,debugWasmPerf:!1,debugModelVariant:void 0,futuristicReveal:!1,wasmMesher:!0,shaderCubeBlocks:!1,shaderCubeDebugMode:0,mesherWorkers:1,addChunksBatchWaitTime:200,_experimentalSmoothChunkLoading:!0,_renderByChunks:!1,autoLowerRenderDistance:!1,disableMesherConversionCache:!1,dedicatedChangeWorker:!1,shadingTheme:"high-contrast",cardinalLight:"default",dayCycle:!0,smoothLighting:!0,enableLighting:!0,starfield:!0,defaultSkybox:!0,renderEntities:!0,extraBlockRenderers:!0,foreground:!0,fov:75,volume:1,showHand:!1,viewBobbing:!1,handRenderer:"vanilla",renderEars:!0,highlightBlockColor:"blue",fetchPlayerSkins:!0,skinTexturesProxy:void 0,vrSupport:!0,vrPageGameRendering:!0,clipWorldBelowY:void 0,isPlayground:!1,instantCameraUpdate:!1,isRaining:!1,moduleStates:{}},R2={fpsLimit:void 0,sceneBackground:"lightblue",timeoutRendering:!1},il=(n={})=>x2({...s5,...n}),Ke=()=>({reactive:x2({world:{chunksLoaded:new Set,heightmaps:new Map,allChunksLoaded:!1,mesherWork:!1,instabilityFactors:hr(),intersectMedia:null},renderer:"...",preventEscapeMenu:!1}),nonReactive:{fps:0,worstRenderTime:0,avgRenderTime:0,world:{chunksLoaded:new Set,chunksTotalNumber:0},renderer:{timeline:{live:[],frozen:[],lastSecond:[]}}}});E();x();k();R();import{proxy as Qa}from"valtio";var br=()=>Qa({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,fovMultiplier:1,cameraSpectatingEntity:void 0,team:void 0}),k2=n=>({isSpectator(){return n.gameMode==="spectator"},isSpectatingEntity(){return n.cameraSpectatingEntity!==void 0&&n.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:n.perspective==="third_person_back"||n.perspective==="third_person_front"}}),T2=()=>({reactive:br()});E();x();k();R();import{Vec3 as d6}from"vec3";import{proxy as z2}from"valtio";E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();var Z5={},M2=!1;function Ka(){if(M2)return Z5;M2=!0;var n=typeof Reflect=="object"?Reflect:null,e=n&&typeof n.apply=="function"?n.apply:function(S,H,B){return Function.prototype.apply.call(S,H,B)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:t=function(S){return Object.getOwnPropertyNames(S)};function r(M){}var i=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}Z5=s,Z5.once=b,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function v(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(M){if(typeof M!="number"||M<0||i(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");o=M}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||i(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function a(M){return M._maxListeners===void 0?s.defaultMaxListeners:M._maxListeners}s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(S){for(var H=[],B=1;B<arguments.length;B++)H.push(arguments[B]);var I=S==="error",G=this._events;if(G!==void 0)I=I&&G.error===void 0;else if(!I)return!1;if(I){var O;if(H.length>0&&(O=H[0]),O instanceof Error)throw O;var j=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw j.context=O,j}var J=G[S];if(J===void 0)return!1;if(typeof J=="function")e(J,this,H);else for(var X=J.length,t0=g(J,X),B=0;B<X;++B)e(t0[B],this,H);return!0};function l(M,S,H,B){var I,G,O;if(v(H),G=M._events,G===void 0?(G=M._events=Object.create(null),M._eventsCount=0):(G.newListener!==void 0&&(M.emit("newListener",S,H.listener?H.listener:H),G=M._events),O=G[S]),O===void 0)O=G[S]=H,++M._eventsCount;else if(typeof O=="function"?O=G[S]=B?[H,O]:[O,H]:B?O.unshift(H):O.push(H),I=a(M),I>0&&O.length>I&&!O.warned){O.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=M,j.type=S,j.count=O.length}return M}s.prototype.addListener=function(S,H){return l(this,S,H,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,H){return l(this,S,H,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(M,S,H){var B={fired:!1,wrapFn:void 0,target:M,type:S,listener:H},I=c.bind(B);return I.listener=H,B.wrapFn=I,I}s.prototype.once=function(S,H){return v(H),this.on(S,u(this,S,H)),this},s.prototype.prependOnceListener=function(S,H){return v(H),this.prependListener(S,u(this,S,H)),this},s.prototype.removeListener=function(S,H){var B,I,G,O,j;if(v(H),I=this._events,I===void 0)return this;if(B=I[S],B===void 0)return this;if(B===H||B.listener===H)--this._eventsCount===0?this._events=Object.create(null):(delete I[S],I.removeListener&&this.emit("removeListener",S,B.listener||H));else if(typeof B!="function"){for(G=-1,O=B.length-1;O>=0;O--)if(B[O]===H||B[O].listener===H){j=B[O].listener,G=O;break}if(G<0)return this;G===0?B.shift():y(B,G),B.length===1&&(I[S]=B[0]),I.removeListener!==void 0&&this.emit("removeListener",S,j||H)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var H,B,I;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[S]),this;if(arguments.length===0){var G=Object.keys(B),O;for(I=0;I<G.length;++I)O=G[I],O!=="removeListener"&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=B[S],typeof H=="function")this.removeListener(S,H);else if(H!==void 0)for(I=H.length-1;I>=0;I--)this.removeListener(S,H[I]);return this};function f(M,S,H){var B=M._events;if(B===void 0)return[];var I=B[S];return I===void 0?[]:typeof I=="function"?H?[I.listener||I]:[I]:H?w(I):g(I,I.length)}s.prototype.listeners=function(S){return f(this,S,!0)},s.prototype.rawListeners=function(S){return f(this,S,!1)},s.listenerCount=function(M,S){return typeof M.listenerCount=="function"?M.listenerCount(S):m.call(M,S)},s.prototype.listenerCount=m;function m(M){var S=this._events;if(S!==void 0){var H=S[M];if(typeof H=="function")return 1;if(H!==void 0)return H.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function g(M,S){for(var H=new Array(S),B=0;B<S;++B)H[B]=M[B];return H}function y(M,S){for(;S+1<M.length;S++)M[S]=M[S+1];M.pop()}function w(M){for(var S=new Array(M.length),H=0;H<S.length;++H)S[H]=M[H].listener||M[H];return S}function b(M,S){return new Promise(function(H,B){function I(O){M.removeListener(S,G),B(O)}function G(){typeof M.removeListener=="function"&&M.removeListener("error",I),H([].slice.call(arguments))}C(M,S,G,{once:!0}),S!=="error"&&A(M,I,{once:!0})})}function A(M,S,H){typeof M.on=="function"&&C(M,"error",S,H)}function C(M,S,H,B){if(typeof M.on=="function")B.once?M.once(S,H):M.on(S,H);else if(typeof M.addEventListener=="function")M.addEventListener(S,function I(G){B.once&&M.removeEventListener(S,I),H(G)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return Z5}var X5=Ka();X5.once;X5.once=function(n,e){return new Promise((t,r)=>{function i(...o){s!==void 0&&n.removeListener("error",s),t(o)}let s;e!=="error"&&(s=o=>{n.removeListener(name,i),r(o)},n.once("error",s)),n.once(e,i)})};X5.on=function(n,e){let t=[],r=[],i=null,s=!1,o={async next(){let l=t.shift();if(l)return createIterResult(l,!1);if(i){let c=Promise.reject(i);return i=null,c}return s?createIterResult(void 0,!0):new Promise((c,u)=>r.push({resolve:c,reject:u}))},async return(){n.removeListener(e,v),n.removeListener("error",a),s=!0;for(let l of r)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){i=l,n.removeListener(e,v),n.removeListener("error",a)},[Symbol.asyncIterator](){return this}};return n.on(e,v),n.on("error",a),o;function v(...l){let c=r.shift();c?c.resolve(createIterResult(l,!1)):t.push(l)}function a(l){s=!0;let c=r.shift();c?c.reject(l):i=l,o.return()}};var{EventEmitter:Je,defaultMaxListeners:yl,init:_l,listenerCount:wl,on:Al,once:El}=X5;import{Vec3 as qe}from"vec3";E();x();k();R();function o5(n){let e=n*2+1;if(e<=0)return[];let t=[],r=0,i=0,s=0,o=-1;for(let v=0;v<e*e;v++){if(Math.abs(r)<=e/2&&Math.abs(i)<=e/2&&t.push([r,i]),r===i||r<0&&r===-i||r>0&&r===1-i){let a=s;s=-o,o=a}r+=s,i+=o}return t}var Et=n=>[Math.floor(n.x/16),Math.floor(n.z/16)],Ja=n=>[Math.floor(n.x/16),Math.floor(n.y/16),Math.floor(n.z/16)],S2=async(n,e,t,r=1)=>{for(let i=0;i<n.length;i+=r)e&&await new Promise(s=>setTimeout(s,e)),await t(n[i],i)},a5=class a5 extends Je{static restoreTransferred(e,t){let r=new a5;return t&&t.addEventListener("message",({data:i})=>{i.class===a5.restorerName&&i.type==="event"&&r.emit(i.eventName,...i.args)}),r}};d(a5,"restorerName","WorldViewWorker");var Ze=a5,Xe=class extends Je{constructor(t,r,i=new qe(0,0,0)){super();this.world=t;this.viewDistance=r;d(this,"spiralNumber",0);d(this,"gotPanicLastTime",!1);d(this,"panicChunksReload",()=>{});d(this,"loadedChunks",{});d(this,"inLoading",!1);d(this,"chunkReceiveTimes",[]);d(this,"lastChunkReceiveTime",0);d(this,"lastChunkReceiveTimeAvg",0);d(this,"panicTimeout");d(this,"lastPos");d(this,"eventListeners",{});d(this,"debugChunksInfo",{});d(this,"waitingSpiralChunksLoad",{});d(this,"addWaitTime",1);d(this,"keepChunksDistance",0);d(this,"isPlayground",!1);d(this,"allowPositionUpdate",!0);d(this,"lastBiomeId",null);d(this,"lastPosCheck",null);this.lastPos=new qe(0,0,0).update(i)}prepareForTransfer(t){if(t){let r=this.emit.bind(this);this.emit=(i,...s)=>{r(i,...s),t.postMessage({class:Ze.restorerName,type:"event",eventName:i,args:s})}}return{__restorer:Ze.restorerName}}setBlockStateId(t,r){let i=this.world.setBlockStateId(t,r);if(i&&typeof i.then=="function")throw new Error("setBlockStateId returned promise (not supported)");this.emit("blockUpdate",{pos:t,stateId:r})}updateViewDistance(t){this.viewDistance=t,this.emit("renderDistance",t)}async init(t,r){this.updateViewDistance(this.viewDistance),this.emit("chunkPosUpdate",{pos:t}),r?.time?.timeOfDay!==void 0&&this.emit("time",r.time.timeOfDay),r?.entity&&this.emit("playerEntity",r.entity),this.emitterGotConnected(r);let[i,s]=Et(t),o=o5(this.viewDistance).map(([v,a])=>new qe((i+v)*16,0,(s+a)*16));this.lastPos.update(t),await this._loadChunks(o,t)}chunkProgress(){if(this.panicTimeout&&clearTimeout(this.panicTimeout),this.chunkReceiveTimes.length>=5){let t=this.chunkReceiveTimes.reduce((i,s)=>i+s,0)/this.chunkReceiveTimes.length;this.lastChunkReceiveTimeAvg=t;let r=t*2+1e3;this.panicTimeout&&clearTimeout(this.panicTimeout),this.panicTimeout=setTimeout(()=>{!this.gotPanicLastTime&&this.inLoading&&(this.gotPanicLastTime=!0,this.panicChunksReload())},r)}}async _loadChunks(t,r){this.spiralNumber++;let{spiralNumber:i}=this;for(let o of Object.keys(this.waitingSpiralChunksLoad))this.waitingSpiralChunksLoad[o](!1),delete this.waitingSpiralChunksLoad[o];let s=!0;this.inLoading=!0,await S2(t,this.addWaitTime,async o=>{!s||this.loadedChunks[`${o.x},${o.z}`]||(this.world.getColumnAt(o)||(s=await new Promise(v=>{this.waitingSpiralChunksLoad[`${o.x},${o.z}`]=v})),s&&(await this.loadChunk(o,void 0,`spiral ${i} from ${r.x},${r.z}`),this.chunkProgress()))}),this.panicTimeout&&clearTimeout(this.panicTimeout),this.inLoading=!1,this.gotPanicLastTime=!1,this.chunkReceiveTimes=[],this.lastChunkReceiveTime=0}async loadChunk(t,r=!1,i="spiral"){var l,c;let[s,o]=Et(this.lastPos),v=Math.abs(s-Math.floor(t.x/16)),a=Math.abs(o-Math.floor(t.z/16));if(v<=this.viewDistance&&a<=this.viewDistance){let u=await this.world.getColumnAt(t.y!==void 0?t:new qe(t.x,0,t.z));if(u){let f=u.toJson(),m={minY:u.minY??0,worldHeight:u.worldHeight??256};this.emit("loadChunk",{x:t.x,z:t.z,chunk:f,blockEntities:u.blockEntities,worldConfig:m,isLightUpdate:r}),this.loadedChunks[`${t.x},${t.z}`]=!0,(l=this.debugChunksInfo)[c=`${t.x},${t.z}`]??(l[c]={loads:[]}),this.debugChunksInfo[`${t.x},${t.z}`].loads.push({dataLength:f.length,reason:i,time:Date.now()})}else this.isPlayground&&this.emit("markAsLoaded",{x:t.x,z:t.z})}}unloadAllChunks(){for(let t of Object.keys(this.loadedChunks)){let[r,i]=t.split(",").map(Number);this.unloadChunk({x:r,z:i})}}unloadChunk(t){this.emit("unloadChunk",{x:t.x,z:t.z}),delete this.loadedChunks[`${t.x},${t.z}`],delete this.debugChunksInfo[`${t.x},${t.z}`]}emitterGotConnected(t){typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope||!t||this.emit("blockEntities",new Proxy({},{get(i,s,o){if(typeof s!="string")return;let[v,a,l]=s.split(",").map(Number);return t.world.getBlock(new qe(v,a,l))?.entity}}))}updateBiome(t){try{if(!this.world.getBiome)return;let r=this.world.getBiome(t);r!==this.lastBiomeId&&(this.lastBiomeId=r,this.emit("biomeReset"))}catch{}}async updatePosition(t,r=!1){if(!this.allowPositionUpdate)return;let i=t.floored();if(!r&&this.lastPosCheck&&this.lastPosCheck.equals(i))return;this.lastPosCheck=i,this.updateBiome(t);let[s,o]=Et(this.lastPos),[v,a]=Et(t);if(s!==v||o!==a||r){this.emit("chunkPosUpdate",{pos:t});let l=[],c=r?this.viewDistance:this.viewDistance+this.keepChunksDistance;for(let f of Object.keys(this.loadedChunks)){let[m,g]=f.split(",").map(Number),y=new qe(m,0,g),[w,b]=Et(y),A=Math.abs(v-w),C=Math.abs(a-b);(A>c||C>c)&&l.push(y)}for(let f of l)this.unloadChunk(f);let u=o5(this.viewDistance).map(([f,m])=>{let g=new qe((v+f)*16,0,(a+m)*16);if(!this.loadedChunks[`${g.x},${g.z}`])return g}).filter(f=>!!f);this.lastPos.update(t),this._loadChunks(u,t)}else this.emit("chunkPosUpdate",{pos:t}),this.lastPos.update(t)}};E();x();k();R();E();x();k();R();import F2 from"minecraft-data";import qa from"mc-assets/dist/blocksAtlases.json";import Za from"mc-assets/dist/itemsAtlases.json";import Xa from"mc-assets/dist/itemDefinitions.json";import $a from"mc-assets/dist/blocksAtlasLatest.png";import e6 from"mc-assets/dist/blocksAtlasLegacy.png";import t6 from"mc-assets/dist/itemsAtlasLatest.png";import r6 from"mc-assets/dist/itemsAtlasLegacy.png";import i6 from"mc-assets/dist/textureReplacements/christmas";import{AtlasParser as r1}from"mc-assets/dist/atlasParser";import n6 from"mc-assets/dist/worldBlockProvider";E();x();k();R();var Er=r5(C2(),1);import*as t1 from"three";E();x();k();R();E();x();k();R();var $5=class{constructor(e,t,r){this.name=e,this.fg=t,this.bg=r,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement("canvas"),this.canvas.width=90*this.PR,this.canvas.height=48*this.PR,this.canvas.style.width="90px",this.canvas.style.position="absolute",this.canvas.style.height="48px",this.canvas.style.cssText="width:90px;height:48px",this.context=this.canvas.getContext("2d"),this.context&&(this.context.font="bold "+9*this.PR+"px Helvetica,Arial,sans-serif",this.context.textBaseline="top",this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,t,r,i,s=0){let o=1/0,v=0;this.context&&(o=Math.min(o,e),v=Math.max(r,e),i=Math.max(i,t),this.context.fillStyle=this.bg,this.context.globalAlpha=1,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(e.toFixed(s)+" "+this.name+" ("+o.toFixed(s)+"-"+parseFloat(v.toFixed(s))+")",this.TEXT_X,this.TEXT_Y),this.context.drawImage(this.canvas,this.GRAPH_X+this.PR,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT,this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT),this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,(1-t/i)*this.GRAPH_HEIGHT))}};var B2=class e1{constructor({logsPerSecond:e=20,samplesLog:t=100,samplesGraph:r=10,precision:i=2,minimal:s=!1,horizontal:o=!0,mode:v=0}={}){this.mode=v,this.horizontal=o,this.container=document.createElement("div"),this.container.style.cssText="position:fixed;top:0;left:0;opacity:0.9;z-index:10000;",s&&(this.container.style.cssText+="cursor:pointer"),this.gl=null,this.query=null,this.minimal=s,this.beginTime=(performance||Date).now(),this.prevTime=this.beginTime,this.prevCpuTime=this.beginTime,this.frames=0,this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.queryCreated=!1,this.fpsPanel=this.addPanel(new e1.Panel("FPS","#0ff","#002"),0),this.msPanel=this.addPanel(new e1.Panel("CPU","#0f0","#020"),1),this.gpuPanel=null,this.samplesLog=t,this.samplesGraph=r,this.precision=i,this.logsPerSecond=e,this.minimal?(this.container.addEventListener("click",a=>{a.preventDefault(),this.showPanel(++this.mode%this.container.children.length)},!1),this.mode=v,this.showPanel(this.mode)):window.addEventListener("resize",()=>{this.resizePanel(this.fpsPanel,0),this.resizePanel(this.msPanel,1),this.gpuPanel&&this.resizePanel(this.gpuPanel,2)})}resizePanel(e,t){e.canvas.style.position="absolute",this.minimal?e.canvas.style.display="none":(e.canvas.style.display="block",this.horizontal?(e.canvas.style.top="0px",e.canvas.style.left=t*e.WIDTH/e.PR+"px"):(e.canvas.style.left="0px",e.canvas.style.top=t*e.HEIGHT/e.PR+"px"))}addPanel(e,t){return e.canvas&&(this.container.appendChild(e.canvas),this.resizePanel(e,t)),e}showPanel(e){for(let t=0;t<this.container.children.length;t++){let r=this.container.children[t];r.style.display=t===e?"block":"none"}this.mode=e}init(e){if(e){if(e instanceof WebGL2RenderingContext)this.gl=e;else if(e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas){if(this.gl=e.getContext("webgl2"),!this.gl)return}else return;this.ext=this.gl.getExtension("EXT_disjoint_timer_query_webgl2"),this.ext&&(this.gpuPanel=this.addPanel(new e1.Panel("GPU","#ff0","#220"),2))}}begin(){if(this.beginProfiling("cpu-started"),!(!this.gl||!this.ext)){if(this.query){let e=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT_AVAILABLE);if(this.disjoint=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT),e&&!this.disjoint){this.ns=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT);let t=this.ns*1e-6;(e||this.disjoint)&&(this.gl.deleteQuery(this.query),this.query=null),e&&this.addToAverage(t,this.averageGpu)}}this.query||(this.queryCreated=!0,this.query=this.gl.createQuery(),this.query&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.query))}}end(){this.beginTime=this.endInternal(),this.endProfiling("cpu-started","cpu-finished","cpu-duration",this.averageCpu),!(!this.gl||!this.ext)&&this.queryCreated&&this.gl.getQuery(this.ext.TIME_ELAPSED_EXT,this.gl.CURRENT_QUERY)&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT)}endInternal(){this.frames++;let e=(performance||Date).now();if(e>=this.prevCpuTime+1e3/this.logsPerSecond&&(this.updatePanel(this.msPanel,this.averageCpu),this.updatePanel(this.gpuPanel,this.averageGpu),this.prevCpuTime=e),e>=this.prevTime+1e3){let t=this.frames*1e3/(e-this.prevTime);this.fpsPanel.update(t,t,100,100,0),this.prevTime=e,this.frames=0}return e}addToAverage(e,t){t.logs.push(e),t.logs.length>this.samplesLog&&t.logs.shift(),t.graph.push(e),t.graph.length>this.samplesGraph&&t.graph.shift()}beginProfiling(e){window.performance&&window.performance.mark(e)}endProfiling(e,t,r,i){if(window.performance&&t){window.performance.mark(t);let s=performance.measure(r,e,t);this.addToAverage(s.duration,i)}}updatePanel(e,t){if(t.logs.length>0){let r=0,i=.01;for(let v=0;v<t.logs.length;v++)r+=t.logs[v],t.logs[v]>i&&(i=t.logs[v]);let s=0,o=.01;for(let v=0;v<t.graph.length;v++)s+=t.graph[v],t.graph[v]>o&&(o=t.graph[v]);e&&e.update(r/Math.min(t.logs.length,this.samplesLog),s/Math.min(t.graph.length,this.samplesGraph),i,o,this.precision)}}};B2.Panel=$5;var P2=B2;E();x();k();R();var H0=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return this.None(n)},Out:function(n){return this.None(n)},InOut:function(n){return this.None(n)}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var e=1.70158;return n===1?1:n*n*((e+1)*n-e)},Out:function(n){var e=1.70158;return n===0?0:--n*n*((e+1)*n+e)+1},InOut:function(n){var e=2.5949095;return(n*=2)<1?.5*(n*n*((e+1)*n-e)):.5*((n-=2)*n*((e+1)*n+e)+2)}}),Bounce:Object.freeze({In:function(n){return 1-H0.Bounce.Out(1-n)},Out:function(n){return n<.36363636363636365?7.5625*n*n:n<.7272727272727273?7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?7.5625*(n-=.8181818181818182)*n+.9375:7.5625*(n-=.9545454545454546)*n+.984375},InOut:function(n){return n<.5?H0.Bounce.In(n*2)*.5:H0.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(e){return Math.pow(e,n)},Out:function(e){return 1-Math.pow(1-e,n)},InOut:function(e){return e<.5?Math.pow(e*2,n)/2:(1-Math.pow(2-e*2,n))/2+.5}}}}),v5=function(){return performance.now()},Rt=function(){function n(){this._tweens={},this._tweensAddedDuringUpdate={}}return n.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(t){return e._tweens[t]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},n.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},n.prototype.update=function(e,t){e===void 0&&(e=v5()),t===void 0&&(t=!1);var r=Object.keys(this._tweens);if(r.length===0)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var s=this._tweens[r[i]],o=!t;s&&s.update(e,o)===!1&&!t&&delete this._tweens[r[i]]}r=Object.keys(this._tweensAddedDuringUpdate)}return!0},n}(),xt={Linear:function(n,e){var t=n.length-1,r=t*e,i=Math.floor(r),s=xt.Utils.Linear;return e<0?s(n[0],n[1],r):e>1?s(n[t],n[t-1],t-r):s(n[i],n[i+1>t?t:i+1],r-i)},Bezier:function(n,e){for(var t=0,r=n.length-1,i=Math.pow,s=xt.Utils.Bernstein,o=0;o<=r;o++)t+=i(1-e,r-o)*i(e,o)*n[o]*s(r,o);return t},CatmullRom:function(n,e){var t=n.length-1,r=t*e,i=Math.floor(r),s=xt.Utils.CatmullRom;return n[0]===n[t]?(e<0&&(i=Math.floor(r=t*(1+e))),s(n[(i-1+t)%t],n[i],n[(i+1)%t],n[(i+2)%t],r-i)):e<0?n[0]-(s(n[0],n[0],n[1],n[1],-r)-n[0]):e>1?n[t]-(s(n[t],n[t],n[t-1],n[t-1],r-t)-n[t]):s(n[i?i-1:0],n[i],n[t<i+1?t:i+1],n[t<i+2?t:i+2],r-i)},Utils:{Linear:function(n,e,t){return(e-n)*t+n},Bernstein:function(n,e){var t=xt.Utils.Factorial;return t(n)/t(e)/t(n-e)},Factorial:function(){var n=[1];return function(e){var t=1;if(n[e])return n[e];for(var r=e;r>1;r--)t*=r;return n[e]=t,t}}(),CatmullRom:function(n,e,t,r,i){var s=(t-n)*.5,o=(r-e)*.5,v=i*i,a=i*v;return(2*e-2*t+s+o)*a+(-3*e+3*t-2*s-o)*v+s*i+e}}},I2=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),wr=new Rt,F0=function(){function n(e,t){t===void 0&&(t=wr),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=H0.Linear.None,this._interpolationFunction=xt.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=I2.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.to=function(e,t){if(t===void 0&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t,this},n.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e,this},n.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},n.prototype.start=function(e,t){if(e===void 0&&(e=v5()),t===void 0&&(t=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var r in this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},n.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},n.prototype._setupProperties=function(e,t,r,i,s){for(var o in r){var v=e[o],a=Array.isArray(v),l=a?"array":typeof v,c=!a&&Array.isArray(r[o]);if(!(l==="undefined"||l==="function")){if(c){var u=r[o];if(u.length===0)continue;for(var f=[v],m=0,g=u.length;m<g;m+=1){var y=this._handleRelativeValue(v,u[m]);if(isNaN(y)){c=!1;break}f.push(y)}c&&(r[o]=f)}if((l==="object"||a)&&v&&!c){t[o]=a?[]:{};var w=v;for(var b in w)t[o][b]=w[b];i[o]=a?[]:{};var u=r[o];if(!this._isDynamic){var A={};for(var b in u)A[b]=u[b];r[o]=u=A}this._setupProperties(w,t[o],u,i[o],s)}else(typeof t[o]>"u"||s)&&(t[o]=v),a||(t[o]*=1),c?i[o]=r[o].slice().reverse():i[o]=t[o]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},n.prototype.pause=function(e){return e===void 0&&(e=v5()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},n.prototype.resume=function(e){return e===void 0&&(e=v5()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},n.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},n.prototype.group=function(e){return e===void 0&&(e=wr),this._group=e,this},n.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},n.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},n.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},n.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},n.prototype.easing=function(e){return e===void 0&&(e=H0.Linear.None),this._easingFunction=e,this},n.prototype.interpolation=function(e){return e===void 0&&(e=xt.Linear),this._interpolationFunction=e,this},n.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},n.prototype.onStart=function(e){return this._onStartCallback=e,this},n.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},n.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},n.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},n.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},n.prototype.onStop=function(e){return this._onStopCallback=e,this},n.prototype.update=function(e,t){if(e===void 0&&(e=v5()),t===void 0&&(t=!0),this._isPaused)return!0;var r,i,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>s)return!1;t&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=this._duration===0||i>1?1:i;var o=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),i===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var v=0,a=this._chainedTweens.length;v<a;v++)this._chainedTweens[v].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(e,t,r,i){for(var s in r)if(t[s]!==void 0){var o=t[s]||0,v=r[s],a=Array.isArray(e[s]),l=Array.isArray(v),c=!a&&l;c?e[s]=this._interpolationFunction(v,i):typeof v=="object"&&v?this._updateProperties(e[s],o,v,i):(v=this._handleRelativeValue(o,v),typeof v=="number"&&(e[s]=o+(v-o)*i))}},n.prototype._handleRelativeValue=function(e,t){return typeof t!="string"?t:t.charAt(0)==="+"||t.charAt(0)==="-"?e+parseFloat(t):parseFloat(t)},n.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=t},n}();var dc=I2.nextId,me=wr,uc=me.getAll.bind(me),fc=me.removeAll.bind(me),hc=me.add.bind(me),mc=me.remove.bind(me),H2=me.update.bind(me);E();x();k();R();function Ar(n){if(n==="high-performance")return"high-performance";if(n==="low-power")return"low-power"}var y0=typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope,xr=class{constructor(e,t=0){this.canvas=e;d(this,"stats");d(this,"stats2");d(this,"statsGl");d(this,"total",0);d(this,"denseMode");this.stats=new Er.default,this.stats2=new Er.default,this.statsGl=new P2({minimal:!0}),this.stats2.showPanel(2),this.denseMode=typeof F<"u"&&!0||typeof window<"u"&&window.innerHeight<500,this.initStats(),this.setVisibility(t)}addStat(e,t=80){e.style.position="absolute",this.denseMode&&(e.style.height="12px"),e.style.overflow="hidden",e.style.left="",e.style.top="0",e.style.right=`${this.total}px`,e.style.width="80px",e.style.zIndex="1",e.style.opacity="0.8";let r=document.getElementById("corner-indicator-stats"),i=r??document.body;r&&(e.style.position="relative"),i.appendChild(e),this.total+=t}initStats(){let e=this.stats2.dom.children.length===3;this.addStat(this.stats.dom),e&&this.addStat(this.stats2.dom),this.statsGl.init(this.canvas),this.statsGl.container.style.display="flex",this.statsGl.container.style.justifyContent="flex-end";let t=0;for(let r of this.statsGl.container.children){let i=r;t++===0&&(i.style.display="none"),i.style.position=""}}setVisibility(e){e>0?(this.stats.dom.style.display="block",this.stats2.dom.style.display=e>=2?"block":"none",this.statsGl.container.style.display=e>=2?"block":"none"):(this.stats.dom.style.display="none",this.stats2.dom.style.display="none",this.statsGl.container.style.display="none")}markStart(){this.stats.begin(),this.stats2.begin(),this.statsGl.begin()}markEnd(){this.stats.end(),this.stats2.end(),this.statsGl.end()}dispose(){this.stats.dom.remove(),this.stats2.dom.remove(),this.statsGl.container.remove()}},l5=class{constructor(e,t,r){this.initOptions=e;this.externalCanvas=t;d(this,"canvas");d(this,"renderer");d(this,"animationFrameId");d(this,"timeoutId");d(this,"lastRenderTime",0);d(this,"previousCanvasWidth",0);d(this,"previousCanvasHeight",0);d(this,"currentWidth",0);d(this,"currentHeight",0);d(this,"pendingResize",!1);d(this,"renderedFps",0);d(this,"fpsInterval");d(this,"stats");d(this,"paused",!1);d(this,"disconnected",!1);d(this,"preRender",()=>{});d(this,"render",e=>{});d(this,"postRender",()=>{});d(this,"sizeChanged",()=>{});d(this,"droppedFpsPercentage",0);d(this,"config");d(this,"onRender",[]);d(this,"inWorldRenderingConfig");d(this,"nonReactiveState");this.config=e.config,t?this.canvas=t:this.addToPage();try{let s=e.getRendererOptions?.()?.gpuPreference??"default";this.renderer=new t1.WebGLRenderer({canvas:this.canvas,preserveDrawingBuffer:!0,logarithmicDepthBuffer:!0,powerPreference:Ar(s)})}catch(s){throw e.callbacks.displayCriticalError(new Error(`Failed to create WebGL context, not possible to render (restart browser): ${s.message}`)),s}this.renderer.useLegacyLights=!0,this.renderer.outputColorSpace=t1.LinearSRGBColorSpace,t||(this.updatePixelRatio(),this.setupResizeListener()),this.sizeUpdated(),this.previousCanvasWidth=this.canvas.width,this.previousCanvasHeight=this.canvas.height;let i="WebGL2RenderingContext"in globalThis;!t&&i&&!y0&&(this.stats=new xr(this.canvas,this.config.statsVisible)),this.setupFpsTracking(),this.startRenderLoop()}setupResizeListener(){if(typeof window>"u")return;let e,t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.pendingResize=!0},16)};window.addEventListener("resize",t,{passive:!0})}updatePixelRatio(){if(typeof window>"u")return;let e=window.devicePixelRatio||1;this.renderer.capabilities.isWebGL2||(e=1),this.renderer.setPixelRatio(e)}sizeUpdated(){this.renderer.setSize(this.currentWidth,this.currentHeight,!1)}addToPage(){this.canvas=O2(),this.updateCanvasSize()}updateSizeExternal(e,t,r){this.currentWidth=e,this.currentHeight=t,this.renderer.setPixelRatio(r),this.sizeUpdated()}updateCanvasSize(){if(this.externalCanvas||typeof document>"u")return;let e=document.body.offsetWidth,t=document.body.offsetHeight;this.currentWidth!==e&&(this.currentWidth=e),this.currentHeight!==t&&(this.currentHeight=t)}setupFpsTracking(){let e=0;this.fpsInterval=setInterval(()=>{e>0&&(this.droppedFpsPercentage=this.renderedFps/e),e=Math.max(this.renderedFps,e),this.nonReactiveState&&(this.nonReactiveState.fps=this.renderedFps),this.renderedFps=0},1e3)}startRenderLoop(){let e=()=>{if(this.disconnected)return;if(this.config.timeoutRendering){let i=1e3/(this.config.fpsLimit?Math.min(this.config.fpsLimit,60):60);this.timeoutId=setTimeout(e,i)}else this.animationFrameId=requestAnimationFrame(e);if(this.paused||this.renderer.xr.isPresenting&&!this.inWorldRenderingConfig?.vrPageGameRendering)return;if(!this.config.timeoutRendering&&this.config.fpsLimit){let r=performance.now(),i=r-this.lastRenderTime,s=1e3/this.config.fpsLimit;if(i<s)return;this.lastRenderTime=r-i%s}let t=!1;this.pendingResize&&(this.updateCanvasSize(),this.pendingResize=!1),(this.previousCanvasWidth!==this.currentWidth||this.previousCanvasHeight!==this.currentHeight)&&(this.previousCanvasWidth=this.currentWidth,this.previousCanvasHeight=this.currentHeight,this.sizeUpdated(),t=!0),this.frameRender(t),this.config.statsVisible!==void 0&&this.stats?.setVisibility(this.config.statsVisible)};e()}frameRender(e){this.preRender(),this.stats?.markStart(),H2(),globalThis.freezeRender||this.render(e);for(let t of this.onRender)t(e);this.renderedFps++,this.stats?.markEnd(),this.postRender()}setPaused(e){this.paused=e}dispose(){this.disconnected=!0,this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.timeoutId&&clearTimeout(this.timeoutId),this.canvas instanceof HTMLCanvasElement&&this.canvas.remove(),clearInterval(this.fpsInterval),this.stats?.dispose(),this.renderer.dispose()}};function O2(){let n=document.createElement("canvas");return n.id="viewer-canvas",document.body.appendChild(n),n}var Rr=()=>{let n=O2(),e=n.transferControlToOffscreen(),t=!1,r=(o,v)=>{},i={width:0,height:0},s=()=>{t||((i.width!==window.innerWidth||i.height!==window.innerHeight)&&(r(window.innerWidth,window.innerHeight),i={width:window.innerWidth,height:window.innerHeight}),requestAnimationFrame(s))};return requestAnimationFrame(s),{canvas:e,destroy(){t=!0,n.remove()},onSizeChanged(o){r=o},get size(){return{width:window.innerWidth,height:window.innerHeight}}}};import{ItemsRenderer as s6}from"mc-assets/dist/itemsRenderer";import{getLoadedItemDefinitionsStore as o6}from"mc-assets";var kt=class{constructor(e){d(this,"sourceItemDefinitionsJson",Xa);d(this,"itemsDefinitionsStore",o6(this.sourceItemDefinitionsJson));d(this,"allReady",!1);d(this,"itemsAtlasImage");d(this,"blocksAtlasImage");d(this,"blocksAtlasJson");d(this,"customBlockStates");d(this,"customModels");d(this,"customItemModelNames",{});d(this,"customTextures",{});d(this,"guiAtlas",null);d(this,"guiAtlasVersion",0);d(this,"itemsRenderer");d(this,"worldBlockProvider");d(this,"blockstatesModels",null);d(this,"version");d(this,"texturesVersion");d(this,"mcData");if(e&&Object.assign(this,e),this.version){let t=globalThis.loadedData??globalThis.mcData;y0&&t?.entitiesByName?this.mcData=t:this.mcData=F2(this.version)}}prepareForTransfer(){let e={};for(let t in this)Object.prototype.hasOwnProperty.call(this,t)&&typeof this[t]!="function"&&(t==="itemsRenderer"||t==="worldBlockProvider"||t==="mcData"||t==="itemsDefinitionsStore"||t==="sourceItemDefinitionsJson"||(e[t]=this[t]));return e.customTextures={},e}},a6="1.21.4",Be=class Be extends Je{constructor(){super(...arguments);d(this,"sourceBlockStatesModels",null);d(this,"sourceBlocksAtlases",qa);d(this,"sourceItemsAtlases",Za);d(this,"currentResources");d(this,"itemsAtlasParser");d(this,"blocksAtlasParser");d(this,"currentConfig");d(this,"abortController",new AbortController);d(this,"_promiseAssetsReadyResolvers",Promise.withResolvers())}static restoreTransferred(t,r){let i=new Be,s=o=>{i.currentResources=new kt(o)};return s(t.currentResources),r&&r.addEventListener("message",({data:o})=>{o.class===Be.restorerName&&(o.type==="newResources"&&s(o.currentResources),o.type==="event"&&i.emit(o.eventName,...o.args))}),i}prepareForTransfer(t){if(t){let r=this.emit.bind(this);this.emit=(i,...s)=>{r(i,...s),t.postMessage({class:Be.restorerName,type:"event",eventName:i,args:s}),(i==="assetsTexturesUpdated"||i==="assetsInventoryReady")&&t.postMessage({class:Be.restorerName,type:"newResources",currentResources:this.currentResources?.prepareForTransfer()})}}return{__restorer:Be.restorerName,currentResources:this.currentResources?.prepareForTransfer()}}get promiseAssetsReady(){return this._promiseAssetsReadyResolvers.promise}async loadSourceData(t=this.currentConfig?.version){if(!t)throw new Error("No version loaded");this.sourceBlockStatesModels??(this.sourceBlockStatesModels=(await import("mc-assets/dist/blockStatesModels.json")).default)}resetResources(){this.currentResources=new kt}async updateAssetsData(t,r=!1){if(!this.currentConfig)throw new Error("No config loaded");this._promiseAssetsReadyResolvers=Promise.withResolvers();let i=new AbortController;if(await this.loadSourceData(this.currentConfig.version),i.signal.aborted)return;let s=this.currentResources??new kt;s.version=this.currentConfig.version,s.texturesVersion=this.currentConfig.texturesVersion??s.version,s.mcData=F2(s.version),s.blockstatesModels={blockstates:{},models:{}},s.blockstatesModels.blockstates.latest={...this.sourceBlockStatesModels.blockstates.latest,...s.customBlockStates},s.blockstatesModels.models.latest={...this.sourceBlockStatesModels.models.latest,...s.customModels},await Promise.all([this.recreateBlockAtlas(s),this.recreateItemsAtlas(s)]),!i.signal.aborted&&(s.version&&s.blockstatesModels&&this.itemsAtlasParser&&this.blocksAtlasParser&&(s.itemsRenderer=new s6(s.version,s.blockstatesModels,this.itemsAtlasParser,this.blocksAtlasParser)),!i.signal.aborted&&(this.currentResources=s,s.allReady=!0,r||this.emit("assetsTexturesUpdated"),this.currentConfig.noInventoryGui?this._promiseAssetsReadyResolvers.resolve():(this.emit("assetsInventoryStarted"),this.generateGuiTextures().then(()=>{i.signal.aborted||(r||this.emit("assetsInventoryReady"),this._promiseAssetsReadyResolvers.resolve())}))))}async recreateBlockAtlas(t=this.currentResources){let r={},i=new Date;(i.getMonth()===11&&i.getDate()>=24||i.getMonth()===0&&i.getDate()<=6)&&Object.assign(r,i6);let s=new r1(this.sourceBlocksAtlases,$a,e6),o=Object.keys(t.customTextures.blocks?.textures??{}),{atlas:v,canvas:a}=await s.makeNewAtlas(t.texturesVersion,l=>{if(this.currentConfig.includeOnlyBlocks&&!this.currentConfig.includeOnlyBlocks.includes(l))return!1;let c=t.customTextures.blocks?.textures[l];return r[l]??c},void 0,void 0,o,{needHorizontalIndexes:!!this.currentConfig.includeOnlyBlocks});this.blocksAtlasParser=new r1({latest:v},a.toDataURL()),t.blocksAtlasImage=await createImageBitmap(a),t.blocksAtlasJson=this.blocksAtlasParser.atlas.latest,t.worldBlockProvider=n6(t.blockstatesModels,this.blocksAtlasParser.atlas,a6)}async recreateItemsAtlas(t=this.currentResources){let r=new r1(this.sourceItemsAtlases,t6,r6),i=Object.keys(t.customTextures.items?.textures??{}),{atlas:s,canvas:o}=await r.makeNewAtlas(t.texturesVersion,v=>{let a=t.customTextures.items?.textures[v];if(a)return a},t.customTextures.items?.tileSize,void 0,i);this.itemsAtlasParser=new r1({latest:s},o.toDataURL()),t.itemsAtlasImage=await createImageBitmap(o)}async generateGuiTextures(){}async downloadDebugAtlas(t=!1){if(!this.currentResources)throw new Error("No resources loaded");let s=await(t?this.itemsAtlasParser:this.blocksAtlasParser).createDebugImage(!0),o=document.createElement("a");o.href=s,o.download=`atlas-debug-${t?"items":"blocks"}.png`,o.click()}destroy(){this.abortController.abort(),this.currentResources=void 0,this.abortController=new AbortController}};d(Be,"restorerName","ResourcesManager");var fe=Be;E();x();k();R();var oe=class extends Error{constructor(t,r){super(t);d(this,"failure");this.name="MesherWorkerPreloadError",this.failure=r}};function v6(n){return!n||typeof n!="object"?!1:n.type==="mc-web-pong"?!0:Array.isArray(n)?n.some(e=>e&&typeof e=="object"&&e.type==="mc-web-pong"):!1}var l6=45e3,c6=1e4;async function D2(n){if(F.env.SINGLE_FILE_BUILD)return;let e=n?.fetchTimeoutMs??l6,t=n?.pingTimeoutMs??c6,r=n?.script??"mesher.js",i=new URL(r,document.baseURI).href,s;try{let u=new AbortController,f=window.setTimeout(()=>u.abort(),e);try{s=await fetch(i,{credentials:"same-origin",cache:"force-cache",signal:u.signal})}finally{clearTimeout(f)}}catch(u){let f=u;throw f?.name==="AbortError"?new oe(`Mesher script fetch timed out after ${e}ms (${i}).`,{phase:"fetch",code:"timeout"}):new oe(`Mesher script fetch failed (network): ${f?.message??u}. URL: ${i}`,{phase:"fetch",code:"network",detail:String(f?.message??u)})}if(!s.ok)throw new oe(`Mesher script HTTP ${s.status} ${s.statusText}: ${i}`,{phase:"fetch",code:"bad-status",status:s.status});let o=s.headers.get("content-type")??"",v=await s.arrayBuffer();if(v.byteLength===0)throw new oe(`Mesher script response was empty: ${i}`,{phase:"fetch",code:"invalid-body",hint:"empty"});let a=Math.min(1024,v.byteLength),l=new TextDecoder().decode(v.slice(0,a)).trimStart();if(l.startsWith("<!DOCTYPE")||l.startsWith("<html")||l.startsWith("<HTML"))throw new oe(`Mesher URL returned HTML (wrong path, redirect, or SPA fallback), not JavaScript: ${i}`,{phase:"fetch",code:"invalid-body",hint:"html"});o.length>0&&/javascript|ecmascript/i.test(o);let c;try{c=new Worker(i)}catch(u){let f=u instanceof Error?u.message:String(u);throw new oe(`Could not construct Worker for mesher (${i}): ${f}`,{phase:"worker",code:"construct-failed",message:f})}await new Promise((u,f)=>{let m=!1,g=window.setTimeout(()=>{m||(m=!0,y(),f(new oe(`Mesher worker did not reply with mc-web-pong within ${t}ms (wrong script, SW stale cache, worker blocked, or COEP/CORP). URL: ${i}`,{phase:"ping",code:"timeout"})))},t),y=()=>{clearTimeout(g);let S=c;c=void 0,S&&(S.removeEventListener("message",A),S.removeEventListener("error",C),S.removeEventListener("messageerror",M),S.terminate())},w=()=>{m||(m=!0,y(),u())},b=S=>{m||(m=!0,y(),f(S))};function A(S){v6(S.data)&&w()}function C(S){b(new oe(`Mesher worker script failed to load or threw during startup: ${S.message||"unknown"} @ ${i}`,{phase:"worker",code:"script-error",message:S.message}))}function M(){b(new oe(`Mesher worker message channel error (structured clone / deserialization). URL: ${i}`,{phase:"ping",code:"messageerror"}))}c.addEventListener("message",A),c.addEventListener("error",C),c.addEventListener("messageerror",M);try{c.postMessage({type:"mc-web-ping",t:performance.now(),workerIndex:0})}catch(S){let H=S instanceof Error?S.message:String(S);b(new oe(`Failed to post mc-web-ping to mesher worker: ${H}`,{phase:"ping",code:"post-failed",detail:H}))}})}var L2=class{constructor(e={},t=new fe){this.resourcesManager=t;d(this,"waitBackendLoadPromises",[]);d(this,"onWorldStart");d(this,"onBeforeWorldStart");d(this,"worldView");d(this,"config");d(this,"menuBackgroundOptions");d(this,"inWorldRenderingConfig");d(this,"backend");d(this,"backendLoader");d(this,"currentState");d(this,"currentDisplay",null);d(this,"playerState",{reactive:br()});d(this,"rendererState");d(this,"nonReactiveState");d(this,"worldReady");d(this,"resolveWorldReady");d(this,"lastCamUpdate",0);d(this,"getRendererOptions");this.config={...R2,...e.config},this.menuBackgroundOptions={...e.config?.menuBackground,...e.menuBackground},this.inWorldRenderingConfig=z2({...s5,...e.rendererConfig});let r=Ke();this.rendererState=r.reactive,this.nonReactiveState=r.nonReactive,this.initWorldReadyPromise()}initWorldReadyPromise(){let{promise:e,resolve:t}=Promise.withResolvers();this.worldReady=e,this.resolveWorldReady=t}preloadWorkers(){let e=this.inWorldRenderingConfig.wasmMesher?"mesherWasm.js":"mesher.js";return D2({script:e})}bindRendererOptions(e){this.getRendererOptions=e}async loadBackend(e){this.backend&&this.disconnectBackend(),await Promise.all(this.waitBackendLoadPromises),this.waitBackendLoadPromises=[],this.backendLoader=e;let t={config:this.config,getRendererOptions:this.getRendererOptions,callbacks:{displayCriticalError:i=>{},setRendererSpecificSettings:(i,s)=>{},fireCustomEvent:(i,...s)=>{}},rendererSpecificSettings:{}},r=e(t);if(this.backend=await Promise.resolve(r),this.currentState)if(this.currentState.method==="startMenuBackground")this.startMenuBackground(...this.currentState.args);else{let{method:i,args:s}=this.currentState;this.backend[i](...s)}}async startWorld(e,t,r=this.playerState.reactive,i){if(this.currentDisplay==="world")throw new Error("World already started");this.currentDisplay="world";let s=i??new d6(0,64,0);this.worldView=new Xe(e,t,s),this.worldView.isPlayground=this.inWorldRenderingConfig.isPlayground;let o={version:this.resourcesManager?.currentConfig?.version??"1.20.4",worldView:this.worldView,inWorldRenderingConfig:this.inWorldRenderingConfig,playerStateReactive:r,rendererState:this.rendererState,nonReactiveState:this.nonReactiveState,resourcesManager:this.resourcesManager};this.onBeforeWorldStart?.();let v;if(this.backend){let a=this.backend.startWorld(o);a&&typeof a.then=="function"&&(v=a)}return this.currentState={method:"startWorld",args:[o]},await v,this.resolveWorldReady(),this.onWorldStart?.(),!!v}startMenuBackground(e){if(this.currentDisplay==="menu")return;let t={...this.menuBackgroundOptions,...e,resourcesManager:e?.resourcesManager??this.resourcesManager};this.backend&&(this.currentDisplay="menu",this.backend.startMenuBackground(t)),this.currentState={method:"startMenuBackground",args:[t]}}resetBackend(e=!1){this.disconnectBackend(e),this.backendLoader&&this.loadBackend(this.backendLoader)}disconnectBackend(e=!1){e&&(this.currentState=void 0,this.currentDisplay=null,this.worldView=void 0),this.backend&&(this.backend.disconnect(),this.backend=void 0),this.currentDisplay=null,this.initWorldReadyPromise(),this.rendererState=z2(Ke().reactive),this.nonReactiveState=Ke().nonReactive}updateCamera(e,t,r){this.backend?.updateCamera(e,t,r)}setRendering(e){this.backend?.setRendering(e)}async startWithBot(e,t){await this.startWorld(e.world,t),this.worldView&&typeof this.worldView.listenToBot=="function"&&this.worldView.listenToBot(e)}destroyAll(){this.disconnectBackend(!0),this.resourcesManager&&typeof this.resourcesManager.destroy=="function"&&this.resourcesManager.destroy()}get utils(){let e=this.backend;return{async waitingForChunks(){if(!e?.worldState?.allChunksLoaded)return new Promise(t=>{let r=setInterval(()=>{e?.worldState?.allChunksLoaded&&(clearInterval(r),t())},100)})}}}destroy(){this.disconnectBackend(!0)}};E();x();k();R();import{subscribe as A6}from"valtio/vanilla";E();x();k();R();E();x();k();R();var $e=["galaxy","nether","end","cyber","light"],et=["cruise","barrel","dive","orbit","snake"],c5={galaxy:"Galaxy",nether:"Nether",end:"The End",cyber:"Cyber",light:"Light Space"},d5={cruise:"Cruise",barrel:"Barrel",dive:"Dive",orbit:"Orbit",snake:"Snake"},tt=["mixed","stainedGlass","wool","construction","glow","world"],u5={mixed:"Mixed",stainedGlass:"Stained glass",wool:"Wool",construction:"Construction",glow:"Glow",world:"World (grass & ores)"};E();x();k();R();var pe={mode:"futuristic",minecraftTextures:!0,futuristicScene:"light",futuristicCamera:"dive",futuristicBlockGroup:"stainedGlass",futuristicCameraSpeedPercent:80,futuristicBlockSpeedPercent:40},_e=n=>n/100,f5={camera:_e(pe.futuristicCameraSpeedPercent),block:_e(pe.futuristicBlockSpeedPercent)};var u6={off:0,holes:1,texIndex:2,faces:3,atlasAlpha:4};function kr(n){return u6[n]}var rt=pe,U2={rendererWorldPerformance:"normal",rendererMeshersCountOverride:null,starfieldRendering:!0,defaultSkybox:!0,menuBackgroundMode:rt.mode,menuBackgroundMinecraftTextures:rt.minecraftTextures,menuBackgroundFuturisticScene:rt.futuristicScene,menuBackgroundFuturisticCamera:rt.futuristicCamera,menuBackgroundFuturisticBlockGroup:rt.futuristicBlockGroup,menuBackgroundFuturisticCameraSpeed:rt.futuristicCameraSpeedPercent,menuBackgroundFuturisticBlockSpeed:rt.futuristicBlockSpeedPercent,rendererFuturisticReveal:!1,rendererPerfDebugOverlay:!1,disableBlockEntityTextures:!1,rendererMesher:"wasm",rendererShaderCubeBlocks:!1,rendererShaderCubeDebugMode:"off",showChunkBorders:!1,renderEntities:!0,renderDebug:"basic",frameLimit:!1,backgroundRendering:"20fps",vanillaLook:!1,smoothLighting:!0,newVersionsLighting:!1,vrSupport:!0,vrPageGameRendering:!1,clipWorldBelowY:void 0,highlightBlockColor:"auto",loadPlayerSkins:!0,renderEars:!0,showHand:!0,viewBobbing:!0,dayCycleAndLighting:!0,keepChunksDistance:1,gpuPreference:"default",fov:75};function f6(n){n.highPerformanceGpu&&(n.gpuPreference="high-performance",delete n.highPerformanceGpu),n.rendererMesher!=="wasm"&&n.rendererMesher!=="legacy-js"&&(typeof n.rendererWasmMesher=="boolean"?n.rendererMesher=n.rendererWasmMesher?"wasm":"legacy-js":typeof n.wasmExperimentalMesher=="boolean"&&(n.rendererMesher=n.wasmExperimentalMesher?"wasm":"legacy-js")),delete n.wasmExperimentalMesher,delete n.rendererWasmMesher}var G2={menuBackgroundMode:{possibleValues:[["classic","Classic"],["futuristic","Futuristic"]],requiresRestart:!0},menuBackgroundMinecraftTextures:{text:"Minecraft block textures",tooltip:"Use block atlas on futuristic menu cubes (loads assets on menu)"},menuBackgroundFuturisticScene:{possibleValues:$e.map(n=>[n,c5[n]])},menuBackgroundFuturisticCamera:{possibleValues:et.map(n=>[n,d5[n]])},menuBackgroundFuturisticBlockGroup:{possibleValues:tt.map(n=>[n,u5[n]]),text:"Block pool",tooltip:"Block set for textured menu cubes (requires Minecraft textures)"},menuBackgroundFuturisticCameraSpeed:{text:"Camera speed",tooltip:"Orbit / fly-through camera path speed. 0 freezes the path; mouse parallax still works.",min:0,max:200,unit:"%"},menuBackgroundFuturisticBlockSpeed:{text:"Block speed",tooltip:"Floating blocks and sky rotation. Independent of camera path speed.",min:0,max:200,unit:"%"},rendererWorldPerformance:{text:"World performance",tooltip:"Background workers for chunk geometry. Reload to apply.",requiresRestart:!0,possibleValues:[["low-energy","Low Energy"],["normal","Normal"],["maximum","Maximum"]]},starfieldRendering:{text:"Starfield"},defaultSkybox:{text:"Default skybox"},rendererFuturisticReveal:{text:"Futuristic world reveal"},rendererPerfDebugOverlay:{text:"Performance debug overlay"},disableBlockEntityTextures:{text:"Disable block entity textures",tooltip:"Skips signs, banners, heads, maps, etc."},rendererMesher:{possibleValues:[["wasm","WASM"],["legacy-js","Legacy JS"]],text:"Mesher pipeline",tooltip:"WASM is faster. Use JS if WASM is not working. Requires reload.",requiresRestart:!0},rendererShaderCubeBlocks:{text:"Instanced shader cubes",tooltip:"Render full blocks through the global GPU instanced path. Requires WASM mesher and WebGL2.",requiresChunksReload:!0},rendererShaderCubeDebugMode:{text:"Shader cube debug",tooltip:"Instanced cube path visualization (requires shader cubes enabled).",possibleValues:[["off","Off"],["holes","Hole test (red)"],["texIndex","Tile index colors"],["faces","Face id colors"],["atlasAlpha","Atlas alpha"]]},showChunkBorders:{text:"Chunk borders"},renderEntities:{text:"Render entities"},renderDebug:{possibleValues:["advanced","basic","none"]},frameLimit:{text:"Frame limit",tooltip:"false = VSync / unlimited when focused"},backgroundRendering:{text:"Background FPS limit",possibleValues:[["full","NO"],["5fps","5 FPS"],["20fps","20 FPS"]]},vanillaLook:{text:"Vanilla shading",tooltip:"On: Minecraft-style face shading. Off: higher-contrast client shading."},smoothLighting:{},newVersionsLighting:{text:"Lighting in newer versions"},vrSupport:{text:"VR support",tooltip:"Shows VR entry; does not force VR on."},vrPageGameRendering:{text:"VR page game rendering"},clipWorldBelowY:{text:"Clip world below Y"},highlightBlockColor:{possibleValues:[["auto","Auto"],["blue","Blue"],["classic","Classic"]]},loadPlayerSkins:{},renderEars:{tooltip:"Deadmau5 ears when the skin texture includes them"},showHand:{},viewBobbing:{},dayCycleAndLighting:{text:"Day cycle"},keepChunksDistance:{text:"Keep chunks distance",tooltip:"Extra distance before unloading chunks",max:5,unit:""},fov:{min:30,max:110,unit:"\xB0",text:"FOV (Field of View)"},gpuPreference:{text:"GPU preference",tooltip:"WebGL power preference. Requires reload / backend restart to apply.",requiresRestart:!0,possibleValues:[["default","Auto"],["high-performance","Dedicated"],["low-power","Low power"]]}},N2=[{title:"World rendering",keys:["rendererWorldPerformance","starfieldRendering","defaultSkybox","disableBlockEntityTextures","showChunkBorders","renderEntities","smoothLighting","vanillaLook","newVersionsLighting","dayCycleAndLighting","loadPlayerSkins","renderEars","showHand","viewBobbing","fov","keepChunksDistance","highlightBlockColor","clipWorldBelowY"]},{title:"Frame pacing",keys:["frameLimit","backgroundRendering","renderDebug","gpuPreference"]},{title:"VR",keys:["vrSupport","vrPageGameRendering"]},{title:"Menu background",keys:["menuBackgroundMode","menuBackgroundMinecraftTextures","menuBackgroundFuturisticScene","menuBackgroundFuturisticCamera","menuBackgroundFuturisticBlockGroup","menuBackgroundFuturisticCameraSpeed","menuBackgroundFuturisticBlockSpeed"]},{title:"Mesher",keys:["rendererMesher","rendererShaderCubeBlocks"]},{title:"Renderer debug",keys:["rendererFuturisticReveal","rendererPerfDebugOverlay","rendererShaderCubeDebugMode"]}];E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();function Tr(n,e,t,r,i){let s=n.getImageData(e,t,r,i);for(let o=0;o<r;o++)for(let v=0;v<i;v++){let a=(o+v*r)*4;if(s.data[a+3]!==255)return!0}return!1}function i1(n){return n/64}function W2(n,e,t){if(t){if(Tr(n,0,0,e,e))return}else if(Tr(n,0,0,e,e/2))return;let r=i1(e),i=(s,o,v,a)=>n.clearRect(s*r,o*r,v*r,a*r);i(40,0,8,8),i(48,0,8,8),i(32,8,8,8),i(40,8,8,8),i(48,8,8,8),i(56,8,8,8),t&&(i(4,32,4,4),i(8,32,4,4),i(0,36,4,12),i(4,36,4,12),i(8,36,4,12),i(12,36,4,12),i(20,32,8,4),i(28,32,8,4),i(16,36,4,12),i(20,36,8,12),i(28,36,4,12),i(32,36,8,12),i(44,32,4,4),i(48,32,4,4),i(40,36,4,12),i(44,36,4,12),i(48,36,4,12),i(52,36,12,12),i(4,48,4,4),i(8,48,4,4),i(0,52,4,12),i(4,52,4,12),i(8,52,4,12),i(12,52,4,12),i(52,48,4,4),i(56,48,4,4),i(48,52,4,12),i(52,52,4,12),i(56,52,4,12),i(60,52,4,12))}function h6(n,e){n.save(),n.scale(-1,1);let t=i1(e),r=(i,s,o,v,a,l)=>n.drawImage(n.canvas,i*t,s*t,o*t,v*t,-a*t,l*t,-o*t,v*t);r(4,16,4,4,20,48),r(8,16,4,4,24,48),r(0,20,4,12,24,52),r(4,20,4,12,20,52),r(8,20,4,12,16,52),r(12,20,4,12,28,52),r(44,16,4,4,36,48),r(48,16,4,4,40,48),r(40,20,4,12,40,52),r(44,20,4,12,36,52),r(48,20,4,12,32,52),r(52,20,4,12,44,52),n.restore()}function Mr(n,e){let t=!1;if(e.width!==e.height)if(e.width===2*e.height)t=!0;else throw new Error(`Bad skin size: ${e.width}x${e.height}`);let r=n.getContext("2d",{willReadFrequently:!0});if(t){let i=e.width;n.width=i,n.height=i,r.clearRect(0,0,i,i),r.drawImage(e,0,0,i,i/2),h6(r,i),W2(r,n.width,!1)}else n.width=e.width,n.height=e.height,r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0,n.width,n.height),W2(r,n.width,!0)}function m6(n){if(n.width===2*n.height)return n.width/64;if(n.width*17===n.height*22)return n.width/22;if(n.width*11===n.height*23)return n.width/46;throw new Error(`Bad cape size: ${n.width}x${n.height}`)}function Sr(n,e){let t=m6(e);n.width=64*t,n.height=32*t;let r=n.getContext("2d",{willReadFrequently:!0});r.clearRect(0,0,n.width,n.height),r.drawImage(e,0,0,e.width,e.height)}function p6(n,e,t,r,i){let s=n.getImageData(e,t,r,i);for(let o=0;o<r;o++)for(let v=0;v<i;v++){let a=(o+v*r)*4;if(!(s.data[a+0]===0&&s.data[a+1]===0&&s.data[a+2]===0&&s.data[a+3]===255))return!1}return!0}function g6(n,e,t,r,i){let s=n.getImageData(e,t,r,i);for(let o=0;o<r;o++)for(let v=0;v<i;v++){let a=(o+v*r)*4;if(!(s.data[a+0]===255&&s.data[a+1]===255&&s.data[a+2]===255&&s.data[a+3]===255))return!1}return!0}function Cr(n){let e=i1(n.width),t=n.getContext("2d",{willReadFrequently:!0}),r=(v,a,l,c)=>Tr(t,v*e,a*e,l*e,c*e),i=(v,a,l,c)=>p6(t,v*e,a*e,l*e,c*e),s=(v,a,l,c)=>g6(t,v*e,a*e,l*e,c*e);return r(50,16,2,4)||r(54,20,2,12)||r(42,48,2,4)||r(46,52,2,12)||i(50,16,2,4)&&i(54,20,2,12)&&i(42,48,2,4)&&i(46,52,2,12)||s(50,16,2,4)&&s(54,20,2,12)&&s(42,48,2,4)&&s(46,52,2,12)?"slim":"default"}function Br(n,e){if(e.width!==e.height&&e.width!==2*e.height)throw new Error(`Bad skin size: ${e.width}x${e.height}`);let t=i1(e.width),r=14*t,i=7*t;n.width=r,n.height=i;let s=n.getContext("2d",{willReadFrequently:!0});s.clearRect(0,0,r,i),s.drawImage(e,24*t,0,r,i,0,0,r,i)}E();x();k();R();import _6 from"mc-assets/dist/other-textures/latest/entity/player/wide/steve.png";E();x();k();R();import*as we from"three";E();x();k();R();var b6=()=>{if(typeof OffscreenCanvas>"u")return!1;try{let n=new OffscreenCanvas(1,1);return(n.getContext("webgl2")||n.getContext("webgl"))!==null}catch{return!1}},y6=b6(),V0=(n,e)=>{if(y6)return new OffscreenCanvas(n,e);let t=document.createElement("canvas");return t.width=n,t.height=e,t};async function it(n){let t=await(await fetch(n)).blob();return createImageBitmap(t)}var k0=(n,e=!1)=>{n instanceof we.Mesh&&(n.geometry?.dispose?.(),n.material?.dispose?.()),n.children&&n.children.forEach(t=>k0(t,e)),e&&n instanceof we.Mesh&&n.material?.map?.dispose?.()},Pr={},V2={},j2=n=>{let e=new we.Texture,t=it(n).then(r=>{let i=new OffscreenCanvas(r.width,r.height);return i.getContext("2d").drawImage(r,0,0),e.source.data=i,e.needsUpdate=!0,e});return{texture:e,promise:t}},Tt=async n=>j2(n).texture,Pe=n=>{let e=V0(n.width,n.height);e.getContext("2d").drawImage(n,0,0);let r=new we.Texture(e);return r.magFilter=we.NearestFilter,r.minFilter=we.NearestFilter,r};async function n1(n,e,t){if(!Pr[n]){let{promise:i,resolve:s}=Promise.withResolvers(),o=j2(n);Pr[n]=o.texture,o.promise.then(s),V2[n]=i}e(Pr[n]),V2[n].then(()=>{t?.()})}var re=_6,Iu=Tt(re),Y2={apiEnabled:!0},s1=n=>{Object.assign(Y2,n)};async function Ie(n,e){if(!Y2.apiEnabled||e==="cape")return;let t=`https://playerdb.co/api/player/minecraft/${n}`,r=await fetch(t);return r.ok?(await r.json()).data.player.skin_texture:void 0}async function Ae(n){n.startsWith("data:")||(n=await w6(n.replace("http://","https://")));let e=await it(n),t=V0(64,64);return Mr(t,e),{canvas:t,image:e}}var w6=async n=>{let t=await(await fetch(n,{})).arrayBuffer();return`data:image/png;base64,${z.from(t).toString("base64")}`};function Wu(n){return{mode:n.menuBackgroundMode,useMinecraftTextures:n.menuBackgroundMinecraftTextures,futuristicScene:n.menuBackgroundFuturisticScene,futuristicCamera:n.menuBackgroundFuturisticCamera,futuristicBlockGroup:n.menuBackgroundFuturisticBlockGroup,futuristicCameraSpeed:_e(n.menuBackgroundFuturisticCameraSpeed),futuristicBlockSpeed:_e(n.menuBackgroundFuturisticBlockSpeed)}}function E6(n,e){let t=n.futuristic;t&&(t.setScene?.(e.menuBackgroundFuturisticScene),t.setCamera?.(e.menuBackgroundFuturisticCamera),t.setBlockGroup?.(e.menuBackgroundFuturisticBlockGroup),t.setCameraSpeed?.(_e(e.menuBackgroundFuturisticCameraSpeed)),t.setBlockSpeed?.(_e(e.menuBackgroundFuturisticBlockSpeed)))}function x6(n){return n.rendererMesher!=="legacy-js"}function R6(n,e,t){let r=n.inWorldRenderingConfig,i=e.rendererMeshersCountOverride,s=o=>{r.mesherWorkers=i??o};switch(e.rendererWorldPerformance){case"low-energy":s(1),r.dedicatedChangeWorker=!1;break;case"normal":s(2),r.dedicatedChangeWorker=!t;break;case"maximum":s(Math.max(3,Math.min(navigator.hardwareConcurrency??0,8))),r.dedicatedChangeWorker=!t;break}}function k6(n,e,t){let r=e.backgroundRendering,i=e.frameLimit;t?n.config.fpsLimit=i||void 0:r==="5fps"?n.config.fpsLimit=5:r==="20fps"?n.config.fpsLimit=20:n.config.fpsLimit=void 0}function T6(n,e,t){let{renderDebug:r}=e;r==="none"||t.isCypress?n.config.statsVisible=0:r==="basic"?n.config.statsVisible=1:r==="advanced"&&(n.config.statsVisible=2)}function M6(n,e,t={}){let r=n.inWorldRenderingConfig,i=x6(e);r.showChunkBorders=e.showChunkBorders,r.futuristicReveal=e.rendererFuturisticReveal,R6(n,e,i),r.renderEntities=e.renderEntities,T6(n,e,t),k6(n,e,t.windowFocused!==!1),r.vrSupport=e.vrSupport,r.vrPageGameRendering=e.vrPageGameRendering,r.enableDebugOverlay=e.rendererPerfDebugOverlay,r.clipWorldBelowY=e.clipWorldBelowY,r.extraBlockRenderers=!e.disableBlockEntityTextures,r.fetchPlayerSkins=e.loadPlayerSkins,r.highlightBlockColor=e.highlightBlockColor,r.wasmMesher=i,r.shaderCubeBlocks=e.rendererShaderCubeBlocks&&i,r.disableMesherConversionCache=!!t.isSafari,s1({apiEnabled:e.loadPlayerSkins}),r.smoothLighting=e.smoothLighting,r.shadingTheme=e.vanillaLook?"vanilla":"high-contrast",r.starfield=e.starfieldRendering,r.defaultSkybox=e.defaultSkybox,r.fov=e.fov,r.shaderCubeDebugMode=kr(e.rendererShaderCubeDebugMode)}function Vu(n,e,t){e.keepChunksDistance=t.keepChunksDistance;let r=n.inWorldRenderingConfig;r.renderEars=t.renderEars,r.showHand=t.showHand,r.viewBobbing=t.viewBobbing,r.dayCycle=t.dayCycleAndLighting}function ju(n,e,t={}){n.bindRendererOptions(()=>e);let r=t.getWindowFocused?.()??!0,i=()=>{let s=e;if(M6(n,s,{isSafari:t.isSafari,isCypress:t.isCypress,windowFocused:r}),n.currentDisplay==="menu"){let o=n.backend?.getMenuBackground?.();o&&E6(o,s)}};return i(),t.onRegisterFocusHandlers?.({onFocus:()=>{r=!0,i()},onBlur:()=>{r=!1,i()}}),A6(e,i)}function Yu(n,e,t){n.inWorldRenderingConfig.enableLighting=!t||e}E();x();k();R();import{proxy as S6}from"valtio";var Q2=()=>S6({playerSkin:void 0,inWater:!1,waterBreathing:!1,backgroundColor:[0,0,0],ambientLight:0,directionalLight:0,eyeHeight:0,gameMode:void 0,lookingAtBlock:void 0,diggingBlock:void 0,movementState:"NOT_MOVING",onGround:!0,sneaking:!1,flying:!1,sprinting:!1,walkDist:0,prevWalkDist:0,bob:0,prevBob:0,itemUsageTicks:0,username:"",onlineMode:!1,cardinalLight:"default",lightingDisabled:!1,shouldHideHand:!1,heldItemMain:void 0,heldItemOff:void 0,perspective:"first_person",onFire:!1,fovMultiplier:1,cameraSpectatingEntity:void 0,team:void 0}),C6=n=>({isSpectator(){return n.gameMode==="spectator"},isSpectatingEntity(){return n.cameraSpectatingEntity!==void 0&&n.gameMode==="spectator"},isThirdPerson(){return this.isSpectatingEntity()?!1:n.perspective==="third_person_back"||n.perspective==="third_person_front"}}),B6=()=>({reactive:Q2()}),K2=(n,e,t)=>({...e,"minecraft:date":new Date});E();x();k();R();E();x();k();R();import*as G5 from"three";import{Vec3 as Yv}from"vec3";E();x();k();R();import{proxy as P6,getVersion as q2,subscribe as Z2}from"valtio";import{Vec3 as X2}from"vec3";function $2(n,e){let t=e??globalThis;return t.addEventListener("message",r=>{let{type:i,args:s,msgId:o}=r.data;if(n[i]){let v=n[i](...s);v instanceof Promise&&v.then(a=>{t.postMessage({type:"result",msgId:o,args:[a]})})}}),null}var es=(n,e=!0)=>{let t=0;return new Proxy({},{get(r,i){return i==="transfer"?(...s)=>new Proxy({},{get(o,v){return(...a)=>{n.postMessage({type:v,args:a},s)}}}):(...s)=>{let o=t++,v=e?s.filter(a=>a instanceof ArrayBuffer||a instanceof MessagePort||typeof ImageBitmap<"u"&&a instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&a instanceof OffscreenCanvas||typeof ImageData<"u"&&a instanceof ImageData):[];return n.postMessage({type:i,msgId:o,args:s},v),{then(a){let l=({data:c})=>{c.type==="result"&&c.msgId===o&&(a(c.args[0]),n.removeEventListener("message",l))};n.addEventListener("message",l)}}}}})};var ts=(n,e,t,r)=>{try{t.postMessage({type:"sync",syncId:n,value:o1(e)}),h5.toWorker++,globalThis.debugSyncMessagesOutgoing??(globalThis.debugSyncMessagesOutgoing=0),globalThis.debugSyncMessagesOutgoing++}catch{Mt(e)}},h5={toWorker:0,fromWorker:0};typeof window<"u"&&setInterval(()=>{globalThis.debugWorkerSyncStats={...h5},h5.toWorker=0,h5.fromWorker=0},1e3);var I6=()=>Math.random().toString(36).slice(2,15)+Math.random().toString(36).slice(2,15),rs=(n,e,t)=>{Object.assign(n,a1(e,[],t,!1))},J2=(n,e,t,r,i)=>{if(!n.__syncToWorker&&!n.__syncFromWorker&&!r)return;let s=I6();if(n.__syncId=s,n.__syncToWorker||r){let o=()=>{ts(s,e,t,`toWorker:${i}`)};r&&Z2(e,o);let v=n.__syncToWorkerInterval??0;v>0&&setInterval(o,v)}e.__syncFromWorker&&t.addEventListener("message",o=>{o.data.type==="sync"&&o.data.syncId===s&&(h5.fromWorker++,rs(e,o.data.value,t))})},is=n=>({__restorer:"Map",__mapEntries:Array.from(n.entries())}),ns=n=>({__restorer:"Set",__setValues:[...n]}),ss=n=>n instanceof Set||Object.prototype.toString.call(n)==="[object Set]",os=n=>n instanceof Map||Object.prototype.toString.call(n)==="[object Map]",H6=n=>Object.keys(n).filter(e=>!e.startsWith("__")).sort((e,t)=>Number(e)-Number(t)).map(e=>n[e]),o1=n=>{if(os(n))return is(n);if(ss(n))return ns(n);if(q2(n)===void 0)return n;if(Array.isArray(n))return n.map(o1);if(typeof n=="object"&&n!==null){let e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=o1(n[t]));return e}return n},m5=(n,e,t=!0,r=!0,i=!1)=>{var v,a;let s=n,o={};for(let l in n)if(Object.prototype.hasOwnProperty.call(n,l)){if(t&&typeof n[l]=="function")continue;if(n[l]instanceof Date||n[l]instanceof RegExp||n[l]instanceof WeakMap||n[l]instanceof WeakSet,os(n[l])){o[l]=is(n[l]);continue}if(ss(n[l])){o[l]=ns(n[l]);continue}if(n[l]instanceof X2){o[l]={x:n[l].x,y:n[l].y,z:n[l].z},o[l].__restorer="Vec3";continue}if(o[l]=n[l],typeof n[l]=="object"&&n[l]!==null){if(n[l].prepareForTransfer){o[l]=n[l].prepareForTransfer(e);continue}let c=q2(n[l])!==void 0;o[l]=c?o1(n[l]):n[l];let u=n[l].__syncToWorker!==!1&&!i&&c&&!n[l].__syncFromWorker;if((v=o[l]).__syncToWorker??(v.__syncToWorker=u),c&&((a=o[l]).__valtio??(a.__valtio=!0)),o[l].__syncToWorker&&c){J2(o[l],s[l],e,!0,l);continue}J2(o[l],s[l],e,!1,l),o[l]=m5(o[l],e,t,!1,c)}}return o},Mt=(n,e=[])=>{for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t)){if(!n[t])continue;typeof n[t]=="object"&&n[t]!==null&&Mt(n[t],[...e,t]);try{structuredClone(n[t])}catch{}}},O6=(n,e,t)=>{if(!n.__syncId)return;let r=n.__syncId;if(n.__syncToWorker&&e.addEventListener("message",i=>{i.data.type==="sync"&&i.data.syncId===r&&rs(n,i.data.value,e)}),n.__syncFromWorker){let i=()=>{ts(r,n,e,`fromWorker:${t}`)};n.__valtio&&Z2(n,i);let s=n.__syncFromWorkerInterval??0;s>0&&setInterval(i,s)}},F6=[{restorerName:"Map",restoreTransferred(n,e){if(Array.isArray(n))return new Map(n);let t=n.__mapEntries??n.entries;return Array.isArray(t)?new Map(t):t!=null&&typeof t=="object"&&typeof t!="function"?new Map(Object.entries(t)):new Map}},{restorerName:"Set",restoreTransferred(n,e){if(Array.isArray(n))return new Set(n);let t=n.__setValues??n.values;return Array.isArray(t)?new Set(t):t!=null&&typeof t=="object"&&typeof t!="function"?new Set(H6(t)):new Set}},{restorerName:"Vec3",restoreTransferred(n,e){return new X2(n.x,n.y,n.z)}}];var a1=(n,e,t,r=!0)=>{let i=[...F6,...e],s=(o,v)=>{if(o==null||typeof o!="object")return o;if(o.__restorer){let a=i.find(c=>c.restorerName?c.restorerName===o.__restorer:c.name===o.__restorer);if(a)return a.restoreTransferred(o,t);let l=new Error(`Restorer ${o.__restorer} not found`);if(typeof r=="function")r(l);else if(r)throw l;return o}if(Array.isArray(o))return o.map((a,l)=>s(a,`${v}[${l}]`));for(let a in o){if(!Object.prototype.hasOwnProperty.call(o,a))continue;let l=o[a];l!=null&&typeof l=="object"&&(o[a]=s(l,`${v}.${a}`))}return o.__valtio&&(o=P6(o)),O6(o,t,v),o};return s(n,"root")};E();x();k();R();var v1=class{constructor(e){this.nonReactiveState=e;d(this,"events",[]);d(this,"frozenEvents",[]);d(this,"lastSecondEvents",[]);d(this,"currentFrameStartTime",null);d(this,"lastInteractionTime",0);d(this,"lastSecondUpdateTime",0);d(this,"timeWindowMs",5e3);d(this,"lastSecondWindowMs",1e3);d(this,"maxEvents",500);d(this,"lastSecondUpdateInterval",1e3);this.nonReactiveState.renderer||(this.nonReactiveState.renderer={timeline:{live:[],frozen:[],lastSecond:[]}}),this.nonReactiveState.renderer.timeline||(this.nonReactiveState.renderer.timeline={live:[],frozen:[],lastSecond:[]}),setInterval(()=>{this.updateLastSecondTimeline()},this.lastSecondUpdateInterval)}markFrameStart(){this.currentFrameStartTime=performance.now(),this.addEvent({type:"frameStart",timestamp:this.currentFrameStartTime})}markFrameEnd(){if(!this.currentFrameStartTime)return;let e=performance.now(),t=e-this.currentFrameStartTime;this.addEvent({type:"frameEnd",timestamp:e,duration:t}),this.currentFrameStartTime=null}markCameraUpdate(e){if(!e)return;let t=performance.now();this.lastInteractionTime=t,this.addEvent({type:"cameraUpdate",timestamp:t}),this.frozenEvents=[...this.events],this.trimEvents(this.frozenEvents),this.syncFrozenEvents()}markFrameDisplay(){this.addEvent({type:"frameDisplay",timestamp:performance.now()})}addEvent(e){this.events.push(e),this.lastSecondEvents.push(e),this.trimEvents(this.events),this.trimLastSecondEvents(),this.syncLiveEvents()}trimEvents(e){let r=performance.now()-this.timeWindowMs;for(;e.length>0&&e[0].timestamp<r;)e.shift();e.length>this.maxEvents&&e.splice(0,e.length-this.maxEvents)}trimLastSecondEvents(){let t=performance.now()-this.lastSecondWindowMs;for(;this.lastSecondEvents.length>0&&this.lastSecondEvents[0].timestamp<t;)this.lastSecondEvents.shift()}updateLastSecondTimeline(){let e=performance.now();e-this.lastSecondUpdateTime<this.lastSecondUpdateInterval||(this.lastSecondUpdateTime=e,this.trimLastSecondEvents(),this.syncLastSecondEvents())}syncLiveEvents(){this.nonReactiveState.renderer.timeline.live=[...this.events]}syncFrozenEvents(){this.nonReactiveState.renderer.timeline.frozen=[...this.frozenEvents]}syncLastSecondEvents(){this.nonReactiveState.renderer.timeline.lastSecond=[...this.lastSecondEvents]}clear(){this.events=[],this.frozenEvents=[],this.lastSecondEvents=[],this.syncLiveEvents(),this.syncFrozenEvents(),this.syncLastSecondEvents()}};E();x();k();R();import*as Q from"three";import{Vec3 as Ue}from"vec3";import Dv from"prismarine-chat";E();x();k();R();var D6=(n,e)=>{try{return JSON.parse(n)}catch{return null}},z6={black:"#000000",dark_blue:"#0000AA",dark_green:"#00AA00",dark_aqua:"#00AAAA",dark_red:"#AA0000",dark_purple:"#AA00AA",gold:"#FFAA00",gray:"#AAAAAA",dark_gray:"#555555",blue:"#5555FF",green:"#55FF55",aqua:"#55FFFF",red:"#FF5555",light_purple:"#FF55FF",yellow:"#FFFF55",white:"#FFFFFF"},l1=(n,e,t,r=s=>{},i=(s,o)=>V0(s,o))=>{let v=[16,9],a=v[0]-v[1],l=a/16,c="front_text"in n?n.front_text.messages:[n.Text1,n.Text2,n.Text3,n.Text4];if(!c.some(g=>g!=="null"))return;let u=i(16*40,a*40),f=u.getContext("2d");r(f);let m=("front_text"in n?n.front_text.color:n.Color)||"black";for(let[g,y]of c.slice(0,4).entries())y!=="null"&&Ir(y,t,u,64,m,64*(g+1)+(e?0:-8));return u},Ir=(n,e,t,r,i,s=0)=>{let o=!1,v=typeof n=="string"&&(n?.startsWith("{")||n?.startsWith('"'))?D6(n??'""',"sign text"):n;if(!v||typeof v!="object"&&typeof v!="string")return;let a=t.getContext("2d");if(!a)throw new Error("Could not get 2d context");a.imageSmoothingEnabled=!1,a.font=`${r}px mojangles`;let l=new e(v),c=[],u=!1,f="",m=s,g=[],y=(C,M)=>{C.text!==null&&C.text!==void 0&&C.text;let S=C.text===null||C.text===void 0?void 0:String(C.text),H={color:C.color??M?.color,underlined:C.underlined??M?.underlined,strikethrough:C.strikethrough??M?.strikethrough,bold:C.bold??M?.bold,italic:C.italic??M?.italic};if(u=u||H.underlined||H.strikethrough||!1,S?.includes(`
286
286
  `))for(let B of S.split(`
287
- `))w(B,H),m+=r,f="";else S&&w(S,H);if(C.extra)for(let B of C.extra)b(B,H)},w=(C,M)=>{o||(o=C.trim()!==""),f+=C,g[m]=v.measureText(f).width;let S=M.color??i;S.startsWith("#")||(S=J6[S.toLowerCase()]||S),c.push({fontStyle:`${M.bold?"bold":""} ${M.italic?"italic":""}`,fillStyle:S,underlineStyle:M.underlined??!1,strikeStyle:M.strikethrough??!1,offset:m,text:C})};if(b(l),!d&&!l.toString().trim())return;let y=0,A=0;for(let{fillStyle:C,fontStyle:M,underlineStyle:S,strikeStyle:H,offset:B,text:I}of c){A!==B&&(y=0),A=B,v.fillStyle=C,v.textRendering="optimizeLegibility",v.font=`${M} ${r}px mojangles`;let G=g[B]??v.measureText(I).width,O=(t.width-G)/2+y;v.fillText(I,O,B),H&&(v.lineWidth=r/8,v.strokeStyle=C,v.beginPath(),v.moveTo(O,B-v.lineWidth*2.5),v.lineTo(O+v.measureText(I).width,B-v.lineWidth*2.5),v.stroke()),S&&(v.lineWidth=r/8,v.strokeStyle=C,v.beginPath(),v.moveTo(O,B+v.lineWidth),v.lineTo(O+v.measureText(I).width,B+v.lineWidth),v.stroke()),y+=v.measureText(I).width}return o};E();x();k();R();function Ct(n){let e=Math.floor(n.x/16),t=Math.floor(n.z/16);return[e,t]}function zr(n){let e=Math.floor(n.x/16),t=Math.floor(n.y/16),r=Math.floor(n.z/16);return[e,t,r]}E();x();k();R();import{Vec3 as A5}from"vec3";import{subscribeKey as Kr}from"valtio/utils";import{proxy as e7,subscribe as t7}from"valtio";E();x();k();R();var y5={blocks:"blocksArray",blockCollisionShapes:"blockCollisionShapes",biomes:"biomesArray",tints:"tints"};E();x();k();R();var hs=16;var ms=(n,e)=>e?`${n}:${e}`:String(n);E();x();k();R();E();x();k();R();var Nr=s5(ps(),1);import*as b1 from"three";E();x();k();R();E();x();k();R();var p1=class{constructor(e,t,r){this.name=e,this.fg=t,this.bg=r,this.PR=Math.round(window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=document.createElement("canvas"),this.canvas.width=90*this.PR,this.canvas.height=48*this.PR,this.canvas.style.width="90px",this.canvas.style.position="absolute",this.canvas.style.height="48px",this.canvas.style.cssText="width:90px;height:48px",this.context=this.canvas.getContext("2d"),this.context&&(this.context.font="bold "+9*this.PR+"px Helvetica,Arial,sans-serif",this.context.textBaseline="top",this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,t,r,i,s=0){let o=1/0,a=0;this.context&&(o=Math.min(o,e),a=Math.max(r,e),i=Math.max(i,t),this.context.fillStyle=this.bg,this.context.globalAlpha=1,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(e.toFixed(s)+" "+this.name+" ("+o.toFixed(s)+"-"+parseFloat(a.toFixed(s))+")",this.TEXT_X,this.TEXT_Y),this.context.drawImage(this.canvas,this.GRAPH_X+this.PR,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT,this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH-this.PR,this.GRAPH_HEIGHT),this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,this.GRAPH_HEIGHT),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X+this.GRAPH_WIDTH-this.PR,this.GRAPH_Y,this.PR,(1-t/i)*this.GRAPH_HEIGHT))}};var gs=class g1{constructor({logsPerSecond:e=20,samplesLog:t=100,samplesGraph:r=10,precision:i=2,minimal:s=!1,horizontal:o=!0,mode:a=0}={}){this.mode=a,this.horizontal=o,this.container=document.createElement("div"),this.container.style.cssText="position:fixed;top:0;left:0;opacity:0.9;z-index:10000;",s&&(this.container.style.cssText+="cursor:pointer"),this.gl=null,this.query=null,this.minimal=s,this.beginTime=(performance||Date).now(),this.prevTime=this.beginTime,this.prevCpuTime=this.beginTime,this.frames=0,this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.queryCreated=!1,this.fpsPanel=this.addPanel(new g1.Panel("FPS","#0ff","#002"),0),this.msPanel=this.addPanel(new g1.Panel("CPU","#0f0","#020"),1),this.gpuPanel=null,this.samplesLog=t,this.samplesGraph=r,this.precision=i,this.logsPerSecond=e,this.minimal?(this.container.addEventListener("click",v=>{v.preventDefault(),this.showPanel(++this.mode%this.container.children.length)},!1),this.mode=a,this.showPanel(this.mode)):window.addEventListener("resize",()=>{this.resizePanel(this.fpsPanel,0),this.resizePanel(this.msPanel,1),this.gpuPanel&&this.resizePanel(this.gpuPanel,2)})}resizePanel(e,t){e.canvas.style.position="absolute",this.minimal?e.canvas.style.display="none":(e.canvas.style.display="block",this.horizontal?(e.canvas.style.top="0px",e.canvas.style.left=t*e.WIDTH/e.PR+"px"):(e.canvas.style.left="0px",e.canvas.style.top=t*e.HEIGHT/e.PR+"px"))}addPanel(e,t){return e.canvas&&(this.container.appendChild(e.canvas),this.resizePanel(e,t)),e}showPanel(e){for(let t=0;t<this.container.children.length;t++){let r=this.container.children[t];r.style.display=t===e?"block":"none"}this.mode=e}init(e){if(e){if(e instanceof WebGL2RenderingContext)this.gl=e;else if(e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas){if(this.gl=e.getContext("webgl2"),!this.gl)return}else return;this.ext=this.gl.getExtension("EXT_disjoint_timer_query_webgl2"),this.ext&&(this.gpuPanel=this.addPanel(new g1.Panel("GPU","#ff0","#220"),2))}}begin(){if(this.beginProfiling("cpu-started"),!(!this.gl||!this.ext)){if(this.query){let e=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT_AVAILABLE);if(this.disjoint=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT),e&&!this.disjoint){this.ns=this.gl.getQueryParameter(this.query,this.gl.QUERY_RESULT);let t=this.ns*1e-6;(e||this.disjoint)&&(this.gl.deleteQuery(this.query),this.query=null),e&&this.addToAverage(t,this.averageGpu)}}this.query||(this.queryCreated=!0,this.query=this.gl.createQuery(),this.query&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.query))}}end(){this.beginTime=this.endInternal(),this.endProfiling("cpu-started","cpu-finished","cpu-duration",this.averageCpu),!(!this.gl||!this.ext)&&this.queryCreated&&this.gl.getQuery(this.ext.TIME_ELAPSED_EXT,this.gl.CURRENT_QUERY)&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT)}endInternal(){this.frames++;let e=(performance||Date).now();if(e>=this.prevCpuTime+1e3/this.logsPerSecond&&(this.updatePanel(this.msPanel,this.averageCpu),this.updatePanel(this.gpuPanel,this.averageGpu),this.prevCpuTime=e),e>=this.prevTime+1e3){let t=this.frames*1e3/(e-this.prevTime);this.fpsPanel.update(t,t,100,100,0),this.prevTime=e,this.frames=0}return e}addToAverage(e,t){t.logs.push(e),t.logs.length>this.samplesLog&&t.logs.shift(),t.graph.push(e),t.graph.length>this.samplesGraph&&t.graph.shift()}beginProfiling(e){window.performance&&window.performance.mark(e)}endProfiling(e,t,r,i){if(window.performance&&t){window.performance.mark(t);let s=performance.measure(r,e,t);this.addToAverage(s.duration,i)}}updatePanel(e,t){if(t.logs.length>0){let r=0,i=.01;for(let a=0;a<t.logs.length;a++)r+=t.logs[a],t.logs[a]>i&&(i=t.logs[a]);let s=0,o=.01;for(let a=0;a<t.graph.length;a++)s+=t.graph[a],t.graph[a]>o&&(o=t.graph[a]);e&&e.update(r/Math.min(t.logs.length,this.samplesLog),s/Math.min(t.graph.length,this.samplesGraph),i,o,this.precision)}}};gs.Panel=p1;var bs=gs;E();x();k();R();function Gr(n){if(n==="high-performance")return"high-performance";if(n==="low-power")return"low-power"}var k0=typeof globalThis.WorkerGlobalScope<"u"&&globalThis instanceof globalThis.WorkerGlobalScope,Wr=class{constructor(e,t=0){this.canvas=e;u(this,"stats");u(this,"stats2");u(this,"statsGl");u(this,"total",0);u(this,"denseMode");this.stats=new Nr.default,this.stats2=new Nr.default,this.statsGl=new bs({minimal:!0}),this.stats2.showPanel(2),this.denseMode=typeof F<"u"&&!0||typeof window<"u"&&window.innerHeight<500,this.initStats(),this.setVisibility(t)}addStat(e,t=80){e.style.position="absolute",this.denseMode&&(e.style.height="12px"),e.style.overflow="hidden",e.style.left="",e.style.top="0",e.style.right=`${this.total}px`,e.style.width="80px",e.style.zIndex="1",e.style.opacity="0.8";let r=document.getElementById("corner-indicator-stats"),i=r??document.body;r&&(e.style.position="relative"),i.appendChild(e),this.total+=t}initStats(){let e=this.stats2.dom.children.length===3;this.addStat(this.stats.dom),e&&this.addStat(this.stats2.dom),this.statsGl.init(this.canvas),this.statsGl.container.style.display="flex",this.statsGl.container.style.justifyContent="flex-end";let t=0;for(let r of this.statsGl.container.children){let i=r;t++===0&&(i.style.display="none"),i.style.position=""}}setVisibility(e){e>0?(this.stats.dom.style.display="block",this.stats2.dom.style.display=e>=2?"block":"none",this.statsGl.container.style.display=e>=2?"block":"none"):(this.stats.dom.style.display="none",this.stats2.dom.style.display="none",this.statsGl.container.style.display="none")}markStart(){this.stats.begin(),this.stats2.begin(),this.statsGl.begin()}markEnd(){this.stats.end(),this.stats2.end(),this.statsGl.end()}dispose(){this.stats.dom.remove(),this.stats2.dom.remove(),this.statsGl.container.remove()}},_5=class{constructor(e,t,r){this.initOptions=e;this.externalCanvas=t;u(this,"canvas");u(this,"renderer");u(this,"animationFrameId");u(this,"timeoutId");u(this,"lastRenderTime",0);u(this,"previousCanvasWidth",0);u(this,"previousCanvasHeight",0);u(this,"currentWidth",0);u(this,"currentHeight",0);u(this,"pendingResize",!1);u(this,"renderedFps",0);u(this,"fpsInterval");u(this,"stats");u(this,"paused",!1);u(this,"disconnected",!1);u(this,"preRender",()=>{});u(this,"render",e=>{});u(this,"postRender",()=>{});u(this,"sizeChanged",()=>{});u(this,"droppedFpsPercentage",0);u(this,"config");u(this,"onRender",[]);u(this,"inWorldRenderingConfig");u(this,"nonReactiveState");this.config=e.config,t?this.canvas=t:this.addToPage();try{let s=e.getRendererOptions?.()?.gpuPreference??"default";this.renderer=new b1.WebGLRenderer({canvas:this.canvas,preserveDrawingBuffer:!0,logarithmicDepthBuffer:!0,powerPreference:Gr(s)})}catch(s){throw e.callbacks.displayCriticalError(new Error(`Failed to create WebGL context, not possible to render (restart browser): ${s.message}`)),s}this.renderer.useLegacyLights=!0,this.renderer.outputColorSpace=b1.LinearSRGBColorSpace,t||(this.updatePixelRatio(),this.setupResizeListener()),this.sizeUpdated(),this.previousCanvasWidth=this.canvas.width,this.previousCanvasHeight=this.canvas.height;let i="WebGL2RenderingContext"in globalThis;!t&&i&&!k0&&(this.stats=new Wr(this.canvas,this.config.statsVisible)),this.setupFpsTracking(),this.startRenderLoop()}setupResizeListener(){if(typeof window>"u")return;let e,t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.pendingResize=!0},16)};window.addEventListener("resize",t,{passive:!0})}updatePixelRatio(){if(typeof window>"u")return;let e=window.devicePixelRatio||1;this.renderer.capabilities.isWebGL2||(e=1),this.renderer.setPixelRatio(e)}sizeUpdated(){this.renderer.setSize(this.currentWidth,this.currentHeight,!1)}addToPage(){this.canvas=ys(),this.updateCanvasSize()}updateSizeExternal(e,t,r){this.currentWidth=e,this.currentHeight=t,this.renderer.setPixelRatio(r),this.sizeUpdated()}updateCanvasSize(){if(this.externalCanvas||typeof document>"u")return;let e=document.body.offsetWidth,t=document.body.offsetHeight;this.currentWidth!==e&&(this.currentWidth=e),this.currentHeight!==t&&(this.currentHeight=t)}setupFpsTracking(){let e=0;this.fpsInterval=setInterval(()=>{e>0&&(this.droppedFpsPercentage=this.renderedFps/e),e=Math.max(this.renderedFps,e),this.nonReactiveState&&(this.nonReactiveState.fps=this.renderedFps),this.renderedFps=0},1e3)}startRenderLoop(){let e=()=>{if(this.disconnected)return;if(this.config.timeoutRendering){let i=1e3/(this.config.fpsLimit?Math.min(this.config.fpsLimit,60):60);this.timeoutId=setTimeout(e,i)}else this.animationFrameId=requestAnimationFrame(e);if(this.paused||this.renderer.xr.isPresenting&&!this.inWorldRenderingConfig?.vrPageGameRendering)return;if(!this.config.timeoutRendering&&this.config.fpsLimit){let r=performance.now(),i=r-this.lastRenderTime,s=1e3/this.config.fpsLimit;if(i<s)return;this.lastRenderTime=r-i%s}let t=!1;this.pendingResize&&(this.updateCanvasSize(),this.pendingResize=!1),(this.previousCanvasWidth!==this.currentWidth||this.previousCanvasHeight!==this.currentHeight)&&(this.previousCanvasWidth=this.currentWidth,this.previousCanvasHeight=this.currentHeight,this.sizeUpdated(),t=!0),this.frameRender(t),this.config.statsVisible!==void 0&&this.stats?.setVisibility(this.config.statsVisible)};e()}frameRender(e){this.preRender(),this.stats?.markStart(),fs(),globalThis.freezeRender||this.render(e);for(let t of this.onRender)t(e);this.renderedFps++,this.stats?.markEnd(),this.postRender()}setPaused(e){this.paused=e}dispose(){this.disconnected=!0,this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.timeoutId&&clearTimeout(this.timeoutId),this.canvas instanceof HTMLCanvasElement&&this.canvas.remove(),clearInterval(this.fpsInterval),this.stats?.dispose(),this.renderer.dispose()}};function ys(){let n=document.createElement("canvas");return n.id="viewer-canvas",document.body.appendChild(n),n}var Vr=()=>{let n=ys(),e=n.transferControlToOffscreen(),t=!1,r=(o,a)=>{},i={width:0,height:0},s=()=>{t||((i.width!==window.innerWidth||i.height!==window.innerHeight)&&(r(window.innerWidth,window.innerHeight),i={width:window.innerWidth,height:window.innerHeight}),requestAnimationFrame(s))};return requestAnimationFrame(s),{canvas:e,destroy(){t=!0,n.remove()},onSizeChanged(o){r=o},get size(){return{width:window.innerWidth,height:window.innerHeight}}}};var _s=0,xe={},jr=40,w5="mc-renderer-debug-overlay",Bt=(n,e=80,t=_s,r=jr,i)=>{if(k0)return{updateText(){},setVisibility(){}};let s=document.createElement("div");return s.style.position="fixed",s.style.top=`${r??jr}px`,s.style.right=`${t}px`,s.style.backgroundColor="rgba(0, 0, 0, 0.7)",s.style.color="white",s.style.padding="2px",s.style.fontFamily="monospace",s.style.fontSize="12px",i?.className?s.className=i.className:s.style.zIndex="100",s.style.pointerEvents="none",document.body.appendChild(s),xe[n]=s,r===void 0&&t===_s&&(jr+=20),{updateText(o){s.innerText!==o&&(s.innerText=o)},setVisibility(o){s.style.display=o?"block":"none"}}};var Yr=(n,e)=>{k0||!xe[n]||(xe[n].innerText=e)},ws=n=>{if(!k0)for(let e in xe)xe[e].style.display=n?"block":"none"},As=()=>{if(!k0)for(let n in xe)q6(n)},q6=n=>{k0||!xe[n]||(xe[n].remove(),delete xe[n])};E();x();k();R();var Z6=n=>{let e=n%24e3/24e3-.25;return e<0&&(e+=1),e>1&&(e-=1),e+(1-Math.cos(e*Math.PI))/2},X6=n=>{let e=(n%24e3+24e3)%24e3,t=Z6(e),i=Math.cos(t*Math.PI*2)*.5+.5,s=Math.round(4+i*11);return Math.max(4,Math.min(15,s))},Qr=n=>{let e=(n%24e3+24e3)%24e3;if(e>=0&&e<12e3)return 15;if(e>=12e3&&e<13e3){let t=(e-12e3)/1e3;return Math.round(15-t*11)}else{if(e>=13e3&&e<23e3)return 4;{let t=(e-23e3)/1e3;return Math.round(4+t*11)}}},$6=()=>{let n=[{ticks:0,label:"6:00 AM (sunrise)"},{ticks:6e3,label:"12:00 PM (noon)"},{ticks:12e3,label:"6:00 PM (sunset starts)"},{ticks:12500,label:"6:30 PM (sunset mid)"},{ticks:13e3,label:"7:00 PM (night begins)"},{ticks:18e3,label:"12:00 AM (midnight)"},{ticks:19e3,label:"1:00 AM"},{ticks:23e3,label:"5:00 AM (dawn begins)"},{ticks:23500,label:"5:30 AM (dawn mid)"}];for(let{ticks:e,label:t}of n){let r=X6(e),i=Qr(e)}};typeof window<"u"&&(window.debugSkyLight=$6);function E5(n,e){return(n%e+e)%e}var Re=class Re{constructor(e,t,r){this.resourcesManager=e;this.displayOptions=t;this.initOptions=r;u(this,"worldReadyResolvers",Promise.withResolvers());u(this,"worldReadyPromise",this.worldReadyResolvers.promise);u(this,"timeOfTheDay",0);u(this,"worldSizeParams",{minY:0,worldHeight:256});u(this,"reactiveDebugParams",e7({stopRendering:!1,chunksRenderAboveOverride:void 0,chunksRenderAboveEnabled:!1,chunksRenderBelowOverride:void 0,chunksRenderBelowEnabled:!1,chunksRenderDistanceOverride:void 0,chunksRenderDistanceEnabled:!1,disableEntities:!1}));u(this,"active",!1);u(this,"loadedChunks",{});u(this,"finishedChunks",{});u(this,"finishedSections",{});u(this,"sectionsWaiting",new Map);u(this,"queuedChunks",new Set);u(this,"queuedFunctions",[]);u(this,"renderUpdateEmitter",new Xe);u(this,"customTexturesDataUrl");u(this,"workers",[]);u(this,"viewerChunkPosition");u(this,"lastViewerChunkGridX");u(this,"lastViewerChunkGridZ");u(this,"lastCamUpdate",0);u(this,"droppedFpsPercentage",0);u(this,"initialChunkLoadWasStartedIn");u(this,"initialChunksLoad",!0);u(this,"enableChunksLoadDelay",!1);u(this,"texturesVersion");u(this,"viewDistance",-1);u(this,"onRenderDistanceChanged");u(this,"chunksLength",0);u(this,"allChunksFinished",!1);u(this,"messageQueue",[]);u(this,"isProcessingQueue",!1);u(this,"ONMESSAGE_TIME_LIMIT",30);u(this,"handleResize",()=>{});u(this,"highestBlocksByChunks",new Map);u(this,"blockEntities",{});u(this,"workersProcessAverageTime",0);u(this,"workersProcessAverageTimeCount",0);u(this,"maxWorkersProcessTime",0);u(this,"workersPreAverageTime",0);u(this,"workersWasmAverageTime",0);u(this,"workersPostAverageTime",0);u(this,"workersPhaseSampleCount",0);u(this,"workersPreTargetConvertAverageTime",0);u(this,"workersPreNeighborConvertAverageTime",0);u(this,"workersPreNeighborCountAverage",0);u(this,"workersPreTypedArrayBuildAverageTime",0);u(this,"workersPreOtherAverageTime",0);u(this,"workersPreCacheHitsTotal",0);u(this,"workersPreCacheMissesTotal",0);u(this,"geometryReceiveCount",{});u(this,"allLoadedIn");u(this,"onWorldSwitched",[]);u(this,"renderTimeMax",0);u(this,"renderTimeAvg",0);u(this,"renderTimeAvgCount",0);u(this,"edgeChunks",{});u(this,"lastAddChunk",null);u(this,"neighborChunkUpdates",!0);u(this,"lastChunkDistance",0);u(this,"debugStopGeometryUpdate",!1);u(this,"protocolCustomBlocks",new Map);u(this,"heightmapDebounceTimers",new Map);u(this,"sectionDirtyCount",new Map);u(this,"sectionDirtyTimers",new Map);u(this,"sectionDirtyPendingArgs",new Map);u(this,"blockStateModelInfo",new Map);u(this,"worldBlockProvider");u(this,"soundSystem");u(this,"worldRendererConfig");u(this,"playerStateReactive");u(this,"playerStateUtils");u(this,"reactiveState");u(this,"mesherLogReader");u(this,"forceCallFromMesherReplayer",!1);u(this,"stopMesherMessagesProcessing",!1);u(this,"abortController",new AbortController);u(this,"lastRendered",0);u(this,"renderingActive",!0);u(this,"geometryReceiveCountPerSec",0);u(this,"mesherLogger",{contents:[],active:new URL(location.href).searchParams.get("mesherlog")==="true"});u(this,"currentRenderedFrames",0);u(this,"fpsAverage",0);u(this,"lastFps",0);u(this,"fpsWorst");u(this,"fpsSamples",0);u(this,"backendInfoReport","-");u(this,"chunksFullInfo","-");u(this,"workerCustomHandleTime",0);u(this,"queueAwaited",!1);u(this,"toWorkerMessagesQueue",{});this.snapshotInitialValues(),this.worldRendererConfig=t.inWorldRenderingConfig,this.playerStateReactive=t.playerStateReactive,this.playerStateUtils=W2(this.playerStateReactive),this.reactiveState=t.rendererState,this.renderUpdateEmitter.on("update",()=>{let o=Object.keys(this.finishedChunks).length;Yr("loaded-chunks",`${o}/${this.chunksLength} chunks (${this.lastChunkDistance}/${this.viewDistance})`)}),Bt("downloaded-chunks",100,140,20,{className:w5}),this.connect(this.displayOptions.worldView);let i=setInterval(()=>{this.geometryReceiveCountPerSec=Object.values(this.geometryReceiveCount).reduce((o,a)=>o+a,0),this.geometryReceiveCount={},ws(this.displayAdvancedStats),this.updateChunksStats()},500),s=setInterval(()=>{this.fpsUpdate()},1e3);this.abortController.signal.addEventListener("abort",()=>{clearInterval(i),clearInterval(s)})}anyModuleRequiresHeightmap(){return!1}isShaderCubeBlocksEnabled(){return this.worldRendererConfig.shaderCubeBlocks===!0}shaderCubeBlocksEnabled(){return this.isShaderCubeBlocksEnabled()}get version(){return this.displayOptions.version}get displayAdvancedStats(){return(this.initOptions.config.statsVisible??0)>1}fpsUpdate(){this.fpsSamples++,this.fpsAverage=(this.fpsAverage*(this.fpsSamples-1)+this.currentRenderedFrames)/this.fpsSamples,this.fpsWorst===void 0?this.fpsWorst=this.currentRenderedFrames:this.fpsWorst=Math.min(this.fpsWorst,this.currentRenderedFrames),this.lastFps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.fps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.worstRenderTime=this.renderTimeMax,this.displayOptions.nonReactiveState.avgRenderTime=this.renderTimeAvg,this.currentRenderedFrames=0}logWorkerWork(e){this.mesherLogger.active&&this.mesherLogger.contents.push(typeof e=="function"?e():e)}async init(){if(this.active)throw new Error("WorldRendererCommon is already initialized");await Promise.all([this.resetWorkers(),(async()=>{this.resourcesManager.currentResources?.allReady&&await this.updateAssetsData()})()]),this.resourcesManager.on("assetsTexturesUpdated",async()=>{this.active&&await this.updateAssetsData()}),this.watchReactivePlayerState(),this.watchReactiveConfig(),this.worldReadyResolvers.resolve()}snapshotInitialValues(){}wasChunkSentToWorker(e){return this.loadedChunks[e]}async getHighestBlocks(e){return this.highestBlocksByChunks.get(e)}updateCustomBlock(e,t,r){if(this.protocolCustomBlocks.set(e,{...this.protocolCustomBlocks.get(e),[t]:r}),this.logWorkerWork(()=>`-> updateCustomBlock ${e} ${t} ${r} ${this.wasChunkSentToWorker(e)}`),this.wasChunkSentToWorker(e)){let[i,s,o]=t.split(",").map(Number);this.setBlockStateId(new A5(i,s,o),void 0)}}async getBlockInfo(e,t){let i=`${Math.floor(e.x/16)*16},${Math.floor(e.z/16)*16}`,s=this.protocolCustomBlocks.get(i)?.[`${e.x},${e.y},${e.z}`],o=ms(t,s),a=this.blockStateModelInfo.get(o);return{customBlockName:s,modelInfo:a}}initWorkers(e=this.worldRendererConfig.mesherWorkers){for(let t=0;t<e+0;t++){let r=r7(i=>{Array.isArray(i)?this.messageQueue.push(...i):this.messageQueue.push(i),this.processMessageQueue("worker")},this.worldRendererConfig.wasmMesher?"mesherWasm.js":"mesher.js");this.workers.push(r)}}onReactivePlayerStateUpdated(e,t,r=!0){return r&&t(this.playerStateReactive[e]),Kr(this.playerStateReactive,e,t)}onReactiveConfigUpdated(e,t){t(this.worldRendererConfig[e]),e==="*"?t7(this.worldRendererConfig,t):Kr(this.worldRendererConfig,e,t)}onReactiveDebugUpdated(e,t){t(this.reactiveDebugParams[e]),Kr(this.reactiveDebugParams,e,t)}watchReactivePlayerState(){this.onReactivePlayerStateUpdated("backgroundColor",e=>{this.changeBackgroundColor(e)}),this.onReactivePlayerStateUpdated("cardinalLight",e=>{this.changeCardinalLight(e)})}watchReactiveConfig(){this.onReactiveConfigUpdated("fetchPlayerSkins",e=>{c1({apiEnabled:e})})}async processMessageQueue(e){if(this.isProcessingQueue||this.messageQueue.length===0)return;if(this.logWorkerWork(`# ${e} processing queue`),this.lastRendered&&performance.now()-this.lastRendered>this.ONMESSAGE_TIME_LIMIT&&this.worldRendererConfig._experimentalSmoothChunkLoading&&this.renderingActive){let i=performance.now();await new Promise(s=>{requestAnimationFrame(s)}),this.logWorkerWork(`# processing got delayed by ${performance.now()-i}ms`)}this.isProcessingQueue=!0;let t=performance.now(),r=0;for(;this.messageQueue.length>0;){let i=this.stopMesherMessagesProcessing;if(!i){let s=this.messageQueue.shift();this.handleMessage(s),r++}if(i||performance.now()-t>this.ONMESSAGE_TIME_LIMIT&&this.renderingActive&&this.worldRendererConfig._experimentalSmoothChunkLoading){if(this.messageQueue.length>0){requestAnimationFrame(async()=>{this.isProcessingQueue=!1,this.processMessageQueue("queue-delay")});return}break}}this.isProcessingQueue=!1}handleMessage(e){var r,i;let t=e;if(this.active){if(this.mesherLogReader?.workerMessageReceived(t.type,t),t.type!=="geometry"||!this.debugStopGeometryUpdate){let s=performance.now();this.handleWorkerMessage(t),this.workerCustomHandleTime+=performance.now()-s}if(t.type==="geometry"){this.logWorkerWork(()=>`-> ${t.workerIndex} geometry ${t.key} ${JSON.stringify({dataSize:JSON.stringify(t).length})}`),(r=this.geometryReceiveCount)[i=t.workerIndex]??(r[i]=0),this.geometryReceiveCount[t.workerIndex]++;let s=t.key.split(",").map(Number);this.lastChunkDistance=Math.max(...this.getDistance(new A5(s[0],0,s[2])))}if(t.type==="sectionFinished"){if(this.logWorkerWork(`<- ${t.workerIndex} sectionFinished ${t.key} ${JSON.stringify({processTime:t.processTime})}`),!this.sectionsWaiting.has(t.key))throw new Error(`sectionFinished event for non-outstanding section ${t.key}`);this.sectionsWaiting.set(t.key,this.sectionsWaiting.get(t.key)-1),this.sectionsWaiting.get(t.key)===0&&(this.sectionsWaiting.delete(t.key),this.finishedSections[t.key]=!0);let s=t.key.split(",").map(Number),o=`${s[0]},${s[2]}`;if(this.loadedChunks[o]){let a=!0,v=this.getSectionHeight();for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=v)if(!this.finishedSections[`${s[0]},${l},${s[2]}`]){a=!1;break}if(a){this.finishedChunks[o]=!0;let l=16;this.reactiveState.world.chunksLoaded.add(`${Math.floor(s[0]/l)},${Math.floor(s[2]/l)}`),this.renderUpdateEmitter.emit("chunkFinished",`${s[0]},${s[2]}`),this.checkAllFinished()}}if(this.renderUpdateEmitter.emit("update"),t.processTime&&(this.workersProcessAverageTimeCount++,this.workersProcessAverageTime=(this.workersProcessAverageTime*(this.workersProcessAverageTimeCount-1)+t.processTime)/this.workersProcessAverageTimeCount,this.maxWorkersProcessTime=Math.max(this.maxWorkersProcessTime,t.processTime)),typeof t.pre=="number"&&typeof t.wasm=="number"&&typeof t.post=="number"&&(t.pre>0||t.wasm>0||t.post>0)){let a=++this.workersPhaseSampleCount;this.workersPreAverageTime=(this.workersPreAverageTime*(a-1)+t.pre)/a,this.workersWasmAverageTime=(this.workersWasmAverageTime*(a-1)+t.wasm)/a,this.workersPostAverageTime=(this.workersPostAverageTime*(a-1)+t.post)/a;let v=typeof t.preTargetConvert=="number"?t.preTargetConvert:0,l=typeof t.preNeighborConvert=="number"?t.preNeighborConvert:0,c=typeof t.preNeighborCount=="number"?t.preNeighborCount:0,d=typeof t.preTypedArrayBuild=="number"?t.preTypedArrayBuild:0,f=typeof t.preOther=="number"?t.preOther:0,m=typeof t.preCacheHits=="number"?t.preCacheHits:0,g=typeof t.preCacheMisses=="number"?t.preCacheMisses:0;if(this.workersPreTargetConvertAverageTime=(this.workersPreTargetConvertAverageTime*(a-1)+v)/a,this.workersPreNeighborConvertAverageTime=(this.workersPreNeighborConvertAverageTime*(a-1)+l)/a,this.workersPreNeighborCountAverage=(this.workersPreNeighborCountAverage*(a-1)+c)/a,this.workersPreTypedArrayBuildAverageTime=(this.workersPreTypedArrayBuildAverageTime*(a-1)+d)/a,this.workersPreOtherAverageTime=(this.workersPreOtherAverageTime*(a-1)+f)/a,this.workersPreCacheHitsTotal+=m,this.workersPreCacheMissesTotal+=g,this.worldRendererConfig.debugWasmPerf&&a%Re.PHASE_PERF_LOG_INTERVAL===0){let b=this.workersPreAverageTime+this.workersWasmAverageTime+this.workersPostAverageTime,w=b>0?this.workersPreAverageTime/b*100:0,y=b>0?this.workersWasmAverageTime/b*100:0,A=b>0?this.workersPostAverageTime/b*100:0,C=this.workersPreAverageTime,M=C>0?this.workersPreTargetConvertAverageTime/C*100:0,S=C>0?this.workersPreNeighborConvertAverageTime/C*100:0,H=C>0?this.workersPreTypedArrayBuildAverageTime/C*100:0,B=C>0?this.workersPreOtherAverageTime/C*100:0,I=this.workersPreNeighborCountAverage,G=I>0?this.workersPreNeighborConvertAverageTime/I:0,O=this.workersPreCacheHitsTotal+this.workersPreCacheMissesTotal,j=O>0?this.workersPreCacheHitsTotal/O*100:0}}}if(t.type==="blockStateModelInfo")for(let[s,o]of Object.entries(t.info))this.blockStateModelInfo.set(s,o);t.type==="heightmap"&&this.reactiveState.world.heightmaps.set(t.key,new Int16Array(t.heightmap))}}downloadMesherLog(){let e=document.createElement("a");e.href="data:text/plain;charset=utf-8,"+encodeURIComponent(this.mesherLogger.contents.join(`
288
- `)),e.download="mesher.log",e.click()}checkAllFinished(){this.sectionsWaiting.size===0&&(this.reactiveState.world.mesherWork=!1),Object.keys(this.finishedChunks).length>=this.chunksLength&&(this.allChunksLoaded?.(),this.allChunksFinished=!0,this.allLoadedIn??(this.allLoadedIn=Date.now()-this.initialChunkLoadWasStartedIn)),this.updateChunksStats()}changeHandSwingingState(e,t){}updateViewerPosition(e){this.viewerChunkPosition=e;for(let[i,s]of Object.entries(this.loadedChunks))s&&this.updatePosDataChunk?.(i);let t=Math.floor(e.x/16),r=Math.floor(e.z/16);(t!==this.lastViewerChunkGridX||r!==this.lastViewerChunkGridZ)&&(this.lastViewerChunkGridX=t,this.lastViewerChunkGridZ=r,this.onViewerChunkPositionChanged())}onViewerChunkPositionChanged(){}sendWorkers(e){for(let t of this.workers)t.postMessage(e)}getDistance(e){let[t,r]=Ct(this.viewerChunkPosition),i=16,s=Math.abs(t-Math.floor(e.x/i)),o=Math.abs(r-Math.floor(e.z/i));return[s,o]}resetWorld(){for(let e of this.workers)e.terminate();this.workers=[]}async resetWorkers(){this.resetWorld(),typeof document<"u"&&document?.readyState==="loading"&&await new Promise(e=>{document.addEventListener("DOMContentLoaded",e)}),this.initWorkers(),this.active=!0,this.sendMesherMcData()}getMesherConfig(){let e=this.timeOfTheDay,t=e<0||e>24e3?15:Qr(e);return{version:this.version,enableLighting:this.worldRendererConfig.enableLighting,skyLight:t,smoothLighting:this.worldRendererConfig.smoothLighting,shadingTheme:this.worldRendererConfig.shadingTheme,cardinalLight:this.worldRendererConfig.cardinalLight,outputFormat:this.outputFormat,debugModelVariant:this.worldRendererConfig.debugModelVariant,clipWorldBelowY:this.worldRendererConfig.clipWorldBelowY,disableBlockEntityTextures:!this.worldRendererConfig.extraBlockRenderers,worldMinY:this.worldMinYRender,worldMaxY:this.worldMinYRender+this.worldSizeParams.worldHeight,disableConversionCache:this.worldRendererConfig.disableMesherConversionCache,computeWireframeEdges:this.worldRendererConfig.futuristicReveal===!0,shaderCubeBlocks:this.isShaderCubeBlocksEnabled()}}sendMesherMcData(){let e=this.resourcesManager.currentResources.mcData;Jr(this.workers,this.version,y5,e),this.logWorkerWork("# mcData sent")}async updateAssetsData(){let e=this.resourcesManager.currentResources;if(this.workers.length===0)throw new Error("workers not initialized yet");for(let[t,r]of this.workers.entries()){let{blockstatesModels:i}=e;r.postMessage({type:"mesherData",workerIndex:t,blocksAtlas:{latest:e.blocksAtlasJson},blockstatesModels:i,config:this.getMesherConfig()})}this.logWorkerWork("# mesherData sent")}getSectionHeight(){return hs}get worldMinYRender(){let e=this.getSectionHeight();return Math.floor(Math.max(this.worldSizeParams.minY,this.worldRendererConfig.clipWorldBelowY??-1/0)/e)*e}updateChunksStats(){let e=Object.keys(this.finishedChunks);this.displayOptions.nonReactiveState.world.chunksLoaded=new Set(e),this.displayOptions.nonReactiveState.world.chunksTotalNumber=this.chunksLength,this.reactiveState.world.allChunksLoaded=this.allChunksFinished;let t=`Q: ${this.messageQueue.length} ${Object.keys(this.loadedChunks).length}/${Object.keys(this.finishedChunks).length}/${this.chunksLength} chunks (${this.workers.length}:${this.workersProcessAverageTime.toFixed(0)}ms/${this.geometryReceiveCountPerSec}ss/${this.allLoadedIn?.toFixed(1)??"-"}s)`;this.chunksFullInfo=t,Yr("downloaded-chunks",t)}addColumn(e,t,r,i){if(!this.active)return;if(this.workers.length===0)throw new Error("workers not initialized yet");this.initialChunksLoad=!1,this.initialChunkLoadWasStartedIn??(this.initialChunkLoadWasStartedIn=Date.now()),this.loadedChunks[`${e},${t}`]=!0,this.updateChunksStats();let s=`${e},${t}`,o=this.protocolCustomBlocks.get(s);for(let l of this.workers)l.postMessage({type:"chunk",x:e,z:t,chunk:r,customBlockModels:o||void 0});this.worldRendererConfig.wasmMesher||this.workers[0].postMessage({type:"getHeightmap",x:e,z:t}),this.logWorkerWork(()=>`-> chunk ${JSON.stringify({x:e,z:t,chunkLength:r.length,customBlockModelsLength:o?Object.keys(o).length:0})}`),this.mesherLogReader?.chunkReceived(e,t,r.length);let a=this.getSectionHeight(),v=16;for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=a){let c=new A5(e,l,t);this.setSectionDirty(c),this.neighborChunkUpdates&&(!i||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(c.offset(-v,0,0)),this.setSectionDirty(c.offset(v,0,0)),this.setSectionDirty(c.offset(0,0,-v)),this.setSectionDirty(c.offset(0,0,v)))}}markAsLoaded(e,t){this.loadedChunks[`${e},${t}`]=!0,this.finishedChunks[`${e},${t}`]=!0,this.logWorkerWork(`-> markAsLoaded ${JSON.stringify({x:e,z:t})}`),this.renderUpdateEmitter.emit("chunkFinished",`${e},${t}`),this.checkAllFinished()}removeColumn(e,t){delete this.loadedChunks[`${e},${t}`];let r=`${e},${t}`,i=this.heightmapDebounceTimers.get(r);i&&(clearTimeout(i),this.heightmapDebounceTimers.delete(r));for(let[o,a]of this.sectionDirtyTimers)o.startsWith(`${e},`)&&o.endsWith(`,${t}`)&&(clearTimeout(a),this.sectionDirtyTimers.delete(o),this.sectionDirtyCount.delete(o),this.sectionDirtyPendingArgs.delete(o));for(let o of this.workers)o.postMessage({type:"unloadChunk",x:e,z:t});this.logWorkerWork(`-> unloadChunk ${JSON.stringify({x:e,z:t})}`),delete this.finishedChunks[`${e},${t}`],this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,Object.keys(this.finishedChunks).length===0&&(this.allLoadedIn=void 0,this.initialChunkLoadWasStartedIn=void 0);let s=this.getSectionHeight();for(let o=this.worldSizeParams.minY;o<this.worldSizeParams.worldHeight;o+=s)this.setSectionDirty(new A5(e,o,t),!1),delete this.finishedSections[`${e},${o},${t}`];this.highestBlocksByChunks.delete(`${e},${t}`),this.reactiveState.world.heightmaps.delete(`${Math.floor(e/16)},${Math.floor(t/16)}`),this.updateChunksStats(),Object.keys(this.loadedChunks).length===0&&(this.mesherLogger.contents=[],this.logWorkerWork("# all chunks unloaded. New log started"),this.mesherLogReader?.maybeStartReplay())}setBlockStateId(e,t,r=!0){(async()=>{let o=Math.floor(e.x/16)*16,a=Math.floor(e.z/16)*16;this.queuedChunks.has(`${o},${a}`)&&await new Promise(v=>{this.queuedFunctions.push(()=>{v()})}),this.loadedChunks[`${o},${a}`],this.setBlockStateIdInner(e,t,r)})()}updateEntity(e,t=!1){}lightUpdate(e,t){}connect(e){let t=e;t.on("entity",i=>{this.updateEntity(i,!1)}),t.on("entityMoved",i=>{this.updateEntity(i,!0)}),t.on("playerEntity",i=>{this.updatePlayerEntity?.(i)});let r=null;t.on("loadChunk",({x:i,z:s,chunk:o,worldConfig:a,isLightUpdate:v})=>{this.worldSizeParams=a,this.queuedChunks.add(`${i},${s}`);let l=[i,s,o,v];r||(r={data:[],timeout:setTimeout(()=>{for(let c of r.data)this.queuedChunks.delete(`${c[0]},${c[1]}`),this.addColumn(...c);for(let c of this.queuedFunctions)c();this.queuedFunctions=[],r=null},this.worldRendererConfig.addChunksBatchWaitTime)}),r.data.push(l)}),t.on("blockEntities",i=>{this.blockEntities=i}),t.on("unloadChunk",({x:i,z:s})=>{this.removeColumn(i,s)}),t.on("blockUpdate",({pos:i,stateId:s})=>{this.setBlockStateId(new A5(i.x,i.y,i.z),s)}),t.on("chunkPosUpdate",({pos:i})=>{this.updateViewerPosition(i)}),t.on("end",()=>{this.worldStop?.()}),t.on("renderDistance",i=>{this.viewDistance=i,this.chunksLength=i===0?1:l5(i).length,this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,this.onRenderDistanceChanged?.(i)}),t.on("markAsLoaded",({x:i,z:s})=>{this.markAsLoaded(i,s)}),t.on("updateLight",({pos:i})=>{this.lightUpdate(i.x,i.z)}),t.on("onWorldSwitch",()=>{for(let i of this.onWorldSwitched)try{i()}catch(s){setTimeout(()=>{throw s},0)}}),t.on("time",i=>{this.worldRendererConfig.dayCycle&&(this.timeUpdated?.(i),this.timeOfTheDay=i)}),t.on("biomeUpdate",({biome:i})=>{this.biomeUpdated?.(i)}),t.on("biomeReset",()=>{this.biomeReset?.()})}setBlockStateIdInner(e,t,r=!0){let s=`${Math.floor(e.x/16)*16},${Math.floor(e.z/16)*16}`,o=`${e.x},${e.y},${e.z}`,a=this.protocolCustomBlocks.get(s)||{};for(let v of this.workers)v.postMessage({type:"blockUpdate",pos:e,stateId:t,customBlockModels:a});if(this.anyModuleRequiresHeightmap()){let v=Math.floor(e.x/16)*16,l=Math.floor(e.z/16)*16,c=`${v},${l}`;if(!this.worldRendererConfig.wasmMesher){let d=this.heightmapDebounceTimers.get(c);d&&clearTimeout(d),this.heightmapDebounceTimers.set(c,setTimeout(()=>{this.heightmapDebounceTimers.delete(c),this.workers[0]?.postMessage({type:"getHeightmap",x:v,z:l})},100))}}if(this.logWorkerWork(`-> blockUpdate ${JSON.stringify({pos:e,stateId:t,customBlockModels:a})}`),this.setSectionDirty(e,!0,!0),this.neighborChunkUpdates){let l=this.getSectionHeight();e.x&15||this.setSectionDirty(e.offset(-16,0,0),!0,!0),(e.x&15)===15&&this.setSectionDirty(e.offset(16,0,0),!0,!0),e.y&l-1||this.setSectionDirty(e.offset(0,-l,0),!0,!0),(e.y&l-1)===l-1&&this.setSectionDirty(e.offset(0,l,0),!0,!0),e.z&15||this.setSectionDirty(e.offset(0,0,-16),!0,!0),(e.z&15)===15&&this.setSectionDirty(e.offset(0,0,16),!0,!0),r&&(!(e.x&15)&&!(e.z&15)&&this.setSectionDirty(e.offset(-16,0,-16),!0,!0),(e.x&15)===15&&!(e.z&15)&&this.setSectionDirty(e.offset(16,0,-16),!0,!0),!(e.x&15)&&(e.z&15)===15&&this.setSectionDirty(e.offset(-16,0,16),!0,!0),(e.x&15)===15&&(e.z&15)===15&&this.setSectionDirty(e.offset(16,0,16),!0,!0),!(e.x&15)&&!(e.y&l-1)&&this.setSectionDirty(e.offset(-16,-l,0),!0,!0),(e.x&15)===15&&!(e.y&l-1)&&this.setSectionDirty(e.offset(16,-l,0),!0,!0),!(e.z&15)&&!(e.y&l-1)&&this.setSectionDirty(e.offset(0,-l,-16),!0,!0),(e.z&15)===15&&!(e.y&l-1)&&this.setSectionDirty(e.offset(0,-l,16),!0,!0),!(e.y&l-1)&&!(e.x&15)&&!(e.z&15)&&this.setSectionDirty(e.offset(-16,-l,-16),!0,!0),!(e.y&l-1)&&(e.x&15)===15&&!(e.z&15)&&this.setSectionDirty(e.offset(16,-l,-16),!0,!0),!(e.y&l-1)&&!(e.x&15)&&(e.z&15)===15&&this.setSectionDirty(e.offset(-16,-l,16),!0,!0),!(e.y&l-1)&&(e.x&15)===15&&(e.z&15)===15&&this.setSectionDirty(e.offset(16,-l,16),!0,!0))}}getWorkerNumber(e,t=!1){let i=this.getSectionHeight();if(this.worldRendererConfig.dedicatedChangeWorker&&this.workers.length>1){if(this.worldRendererConfig.wasmMesher)return E5(Math.floor(e.x/16)+Math.floor(e.z/16),this.workers.length);if(t){let a=`${Math.floor(e.x/16)*16},${Math.floor(e.y/i)*i},${Math.floor(e.z/16)*16}`;if(this.sectionsWaiting.get(a)&&!this.finishedSections[a]){let l=this.workers.length-1;return E5(Math.floor(e.x/16)+Math.floor(e.y/i)+Math.floor(e.z/16),l)}return this.workers.length-1}let o=this.workers.length-1;return E5(Math.floor(e.x/16)+Math.floor(e.y/i)+Math.floor(e.z/16),o)}if(this.worldRendererConfig.wasmMesher)return E5(Math.floor(e.x/16)+Math.floor(e.z/16),this.workers.length);if(t){let o=`${Math.floor(e.x/16)*16},${Math.floor(e.y/i)*i},${Math.floor(e.z/16)*16}`;if(!(this.sectionsWaiting.get(o)&&!this.finishedSections[o]))return 0}return E5(Math.floor(e.x/16)+Math.floor(e.y/i)+Math.floor(e.z/16),this.workers.length)}async debugGetWorkerCustomBlockModel(e){let t=[];for(let r of this.workers)t.push(new Promise(i=>{r.addEventListener("message",s=>{s.data.type==="customBlockModel"&&i(s.data.customBlockModel)})})),r.postMessage({type:"getCustomBlockModel",pos:e});return Promise.all(t)}setSectionDirty(e,t=!0,r=!1){if(!this.forceCallFromMesherReplayer&&this.mesherLogReader)return;if(this.viewDistance===-1)throw new Error("viewDistance not set");let i=this.getDistance(e);if(!this.workers.length||i[0]>this.viewDistance||i[1]>this.viewDistance)return;if(!t){this._dispatchDirtyImmediate(e,t,r);return}let s=16,o=this.getSectionHeight(),a=`${Math.floor(e.x/s)*s},${Math.floor(e.y/o)*o},${Math.floor(e.z/s)*s}`,v=(this.sectionDirtyCount.get(a)??0)+1;this.sectionDirtyCount.set(a,v),v<=Re.GEOMETRY_THROTTLE_THRESHOLD?(this._dispatchDirtyImmediate(e,t,r),this.sectionDirtyTimers.has(a)||this.sectionDirtyTimers.set(a,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(a);this.sectionDirtyCount.delete(a),this.sectionDirtyTimers.delete(a),this.sectionDirtyPendingArgs.delete(a),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},Re.GEOMETRY_THROTTLE_DELAY))):(this.sectionDirtyPendingArgs.set(a,{pos:e,value:t,useChangeWorker:r}),this.sectionDirtyTimers.has(a)||this.sectionDirtyTimers.set(a,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(a);this.sectionDirtyCount.delete(a),this.sectionDirtyTimers.delete(a),this.sectionDirtyPendingArgs.delete(a),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},Re.GEOMETRY_THROTTLE_DELAY)))}_dispatchDirtyImmediate(e,t,r){var v;this.reactiveState.world.mesherWork=!0;let i=16,s=this.getSectionHeight(),o=`${Math.floor(e.x/i)*i},${Math.floor(e.y/s)*s},${Math.floor(e.z/i)*i}`;this.renderUpdateEmitter.emit("dirty",e,t);let a=this.getWorkerNumber(e,r&&(this.mesherLogger.active||this.worldRendererConfig.dedicatedChangeWorker));this.sectionsWaiting.set(o,(this.sectionsWaiting.get(o)??0)+1),this.forceCallFromMesherReplayer?this.workers[a].postMessage({type:"dirty",x:e.x,y:e.y,z:e.z,value:t,config:this.getMesherConfig()}):((v=this.toWorkerMessagesQueue)[a]??(v[a]=[]),this.toWorkerMessagesQueue[a].push({type:"dirty",x:e.x,y:e.y,z:e.z,value:t,config:this.getMesherConfig()}),this.dispatchMessages())}dispatchMessages(){this.queueAwaited||(this.queueAwaited=!0,setTimeout(()=>{for(let e in this.toWorkerMessagesQueue){let t=this.workers[Number(e)],r=this.toWorkerMessagesQueue[e];t.postMessage(r);for(let i of r)this.logWorkerWork(`-> ${e} dispatchMessages ${i.type} ${JSON.stringify({x:i.x,y:i.y,z:i.z,value:i.value})}`)}this.toWorkerMessagesQueue={},this.queueAwaited=!1}))}async waitForChunksToRender(){return new Promise((e,t)=>{if([...this.sectionsWaiting].length===0){e();return}let r=()=>{this.sectionsWaiting.size===0&&(this.renderUpdateEmitter.removeListener("update",r),e())};this.renderUpdateEmitter.on("update",r)})}async waitForChunkToLoad(e){return new Promise((t,r)=>{let s=`${Math.floor(e.x/16)*16},${Math.floor(e.z/16)*16}`;if(this.loadedChunks[s]){t();return}let o=()=>{this.loadedChunks[s]&&(this.renderUpdateEmitter.removeListener("update",o),t())};this.renderUpdateEmitter.on("update",o)})}destroy(){for(let e of this.heightmapDebounceTimers.values())clearTimeout(e);this.heightmapDebounceTimers.clear();for(let e of this.sectionDirtyTimers.values())clearTimeout(e);this.sectionDirtyTimers.clear(),this.sectionDirtyCount.clear(),this.sectionDirtyPendingArgs.clear();for(let e of this.workers)e.terminate();this.workers=[],this.soundSystem&&(this.soundSystem.destroy(),this.soundSystem=void 0),this.active=!1,this.loadedChunks={},this.finishedChunks={},this.finishedSections={},this.sectionsWaiting.clear(),this.queuedChunks.clear(),this.blockStateModelInfo.clear(),this.renderUpdateEmitter.removeAllListeners(),this.abortController.abort(),As()}};u(Re,"PHASE_PERF_LOG_INTERVAL",64),u(Re,"GEOMETRY_THROTTLE_THRESHOLD",1),u(Re,"GEOMETRY_THROTTLE_DELAY",100);var y1=Re,r7=(n,e="mesher.js")=>{let t;if(F.env.SINGLE_FILE_BUILD){let r=document.getElementById("mesher-worker-code").textContent,i=new Blob([r],{type:"text/javascript"});t=new Worker(window.URL.createObjectURL(i))}else t=new Worker(e);return t.onmessage=({data:r})=>{n(r)},t.on&&t.on("message",r=>{t.onmessage({data:r})}),t},Es=!1,Jr=(n,e,t=y5,r)=>{let i={version:JSON.parse(JSON.stringify(r.version))};for(let[s,o]of Object.entries(t))i[s]=r[o];"tints"in t&&!i.tints&&!Es&&(Es=!0);for(let s of n)s.postMessage({type:"mcData",mcData:i})};E();x();k();R();import{Vec3 as i7}from"vec3";import*as ne from"three";E();x();k();R();function _1(n,e){let t=e/180*Math.PI,r=Math.cos(t),i=Math.sin(t),s={x:0,y:1,z:2}[n],o=(s+1)%3,a=(s+2)%3,v=[[0,0,0],[0,0,0],[0,0,0]];return v[s][s]=1,v[o][o]=r,v[o][a]=-i,v[a][o]=+i,v[a][a]=r,v}function qr(n,e){return e?[n[0]+e[0],n[1]+e[1],n[2]+e[2]]:n}function Zr(n,e){return e?[n[0]-e[0],n[1]-e[1],n[2]-e[2]]:n}function Pt(n,e){return n?[n[0][0]*e[0]+n[0][1]*e[1]+n[0][2]*e[2],n[1][0]*e[0]+n[1][1]*e[1]+n[1][2]*e[2],n[2][0]*e[0]+n[2][1]*e[1]+n[2][2]*e[2]]:e}function xs(n,e){let t=[[0,0,0],[0,0,0],[0,0,0]],r=n[0][0],i=n[1][0],s=n[2][0],o=n[0][1],a=n[1][1],v=n[2][1],l=n[0][2],c=n[1][2],d=n[2][2],f=e[0][0],m=e[1][0],g=e[2][0],b=e[0][1],w=e[1][1],y=e[2][1],A=e[0][2],C=e[1][2],M=e[2][2];return t[0][0]=r*f+i*b+s*A,t[1][0]=r*m+i*w+s*C,t[2][0]=r*g+i*y+s*M,t[0][1]=o*f+a*b+v*A,t[1][1]=o*m+a*w+v*C,t[2][1]=o*g+a*y+v*M,t[0][2]=l*f+c*b+d*A,t[1][2]=l*m+c*w+d*C,t[2][2]=l*g+c*y+d*M,t}var Xr={up:{dir:[0,1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[0,1,1,0,1],[1,1,1,1,1],[0,1,0,0,0],[1,1,0,1,0]]},down:{dir:[0,-1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[1,0,1,0,1],[0,0,1,1,1],[1,0,0,0,0],[0,0,0,1,0]]},east:{dir:[1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],mask1:[1,0,1],mask2:[0,1,1],corners:[[1,0,0,1,1],[0,0,0,0,1],[1,1,0,1,0],[0,1,0,0,0]]},south:{dir:[0,0,1],mask1:[1,0,1],mask2:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function n7(n,e,t,r,i,s,o,a){let v=new i7(0,0,0);for(let l in n.faces){let c=n.faces[l],{corners:d,mask1:f,mask2:m}=Xr[l],g=Pt(r,Xr[l].dir);if(c.cullface&&a[l])continue;let b=n.from[0],w=n.from[1],y=n.from[2],A=n.to[0],C=n.to[1],M=n.to[2],S=c.texture,{u:H}=S,{v:B}=S,{su:I}=S,{sv:G}=S,O=Math.floor(t.positions.length/3),j=[1,1,1];c.tintindex!==void 0&&c.tintindex===0&&(j=[.5686274509803921,.7411764705882353,.34901960784313724]);let J=c.rotation||0,X=Math.cos(J*Math.PI/180),t0=-Math.sin(J*Math.PI/180),d0=null,l0=null;n.rotation&&(d0=_1(n.rotation.axis,n.rotation.angle),l0=Zr(n.rotation.origin,Pt(d0,n.rotation.origin)));let m0=[],p0=1;for(let A0 of d){let n0=[A0[0]?A:b,A0[1]?C:w,A0[2]?M:y];n0=qr(Pt(d0,n0),l0),n0=qr(Pt(r,n0),i),n0=n0.map(U0=>U0/16),t.positions.push(n0[0],n0[1],n0[2]),t.normals.push(...g);let Y=(A0[3]-.5)*X-(A0[4]-.5)*t0+.5,o0=(A0[3]-.5)*t0+(A0[4]-.5)*X+.5;t.uvs.push(Y*I+H,o0*G+B);let g0=1;e&&(g0=4/4*(15/15),m0.push(3)),t.colors.push(p0*j[0]*g0,p0*j[1]*g0,p0*j[2]*g0)}e&&m0[0]+m0[3]>=m0[1]+m0[2]?t.indices.push(O,O+3,O+2,O,O+1,O+3):t.indices.push(O,O+1,O+2,O+2,O+1,O+3)}}var s7=(n,e,t,r,i=[],s={})=>{let l={sx:.5,sy:.5,sz:.5,positions:[],normals:[],colors:[],uvs:[],t_positions:[],t_normals:[],t_colors:[],t_uvs:[],indices:[],tiles:{}};for(let[d,f]of n.entries()){let m=f[i[d]]??f[0];if(!m)continue;let g=null,b=null;for(let y of["x","y","z"])y in m&&(g?g=xs(g,_1(y,-(m[y]??0))):g=_1(y,-(m[y]??0)));g&&(b=[8,8,8],b=Zr(b,Pt(g,b)));let w=m.ao??!0;for(let y of m.elements??[])n7(y,w,l,g,b,e,t,s)}let c=l.positions.length/3;for(let d=0;d<l.t_positions.length/12;d++)l.indices.push(c,c+1,c+2,c+2,c+1,c+3,c,c+2,c+1,c+2,c+3,c+1),c+=4;return l.positions.push(...l.t_positions),l.normals.push(...l.t_normals),l.colors.push(...l.t_colors),l.uvs.push(...l.t_uvs),delete l.t_positions,delete l.t_normals,delete l.t_colors,delete l.t_uvs,l.positions=new Float32Array(l.positions),l.normals=new Float32Array(l.normals),l.colors=new Float32Array(l.colors),l.uvs=new Float32Array(l.uvs),l},o7=(...n)=>{let t={geometry:s7(...n)},r=new ne.BufferGeometry;return r.setAttribute("position",new ne.BufferAttribute(t.geometry.positions,3)),r.setAttribute("normal",new ne.BufferAttribute(t.geometry.normals,3)),r.setAttribute("color",new ne.BufferAttribute(t.geometry.colors,3)),r.setAttribute("uv",new ne.BufferAttribute(t.geometry.uvs,2)),r.setIndex(t.geometry.indices),r.name="block-geometry",r},$r=(n,...e)=>{let t=o7(...e),r=new ne.Mesh(t,n);r.position.set(-.5,-.5,-.5);let i=new ne.Group;return i.add(r),i.rotation.set(0,-ne.MathUtils.degToRad(90),0,"ZYX"),globalThis.mesh=i,i},Rs=(n,e)=>{n.position.set(e.x+.5,e.y+.5,e.z+.5)};E();x();k();R();import*as N0 from"three";E();x();k();R();import Pi from"prismarine-nbt";import*as W from"three";E();x();k();R();E();x();k();R();import{BoxGeometry as j0,DoubleSide as si,FrontSide as Ts,Group as le,Mesh as G0,MeshStandardMaterial as x5,Vector2 as w1}from"three";function oi(n,e,t,r,i,s,o,a){let v=(B,I,G,O)=>[new w1(B/o,1-O/a),new w1(G/o,1-O/a),new w1(G/o,1-I/a),new w1(B/o,1-I/a)],l=v(e+s,t,e+r+s,t+s),c=v(e+r+s,t,e+r*2+s,t+s),d=v(e,t+s,e+s,t+s+i),f=v(e+s,t+s,e+r+s,t+s+i),m=v(e+r+s,t+s,e+r+s*2,t+i+s),g=v(e+r+s*2,t+s,e+r*2+s*2,t+i+s),b=n.attributes.uv,w=[m[3],m[2],m[0],m[1]],y=[d[3],d[2],d[0],d[1]],A=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],M=[f[3],f[2],f[0],f[1]],S=[g[3],g[2],g[0],g[1]],H=[];for(let B of[w,y,A,C,M,S])for(let I of B)H.push(I.x,I.y);b.set(new Float32Array(H)),b.needsUpdate=!0}function ve(n,e,t,r,i,s){oi(n,e,t,r,i,s,64,64)}function ei(n,e,t,r,i,s){oi(n,e,t,r,i,s,64,32)}var ke=class extends le{constructor(e,t){super(),Object.defineProperty(this,"innerLayer",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"outerLayer",{enumerable:!0,configurable:!0,writable:!0,value:t}),e.name="inner",t.name="outer"}},ti=class extends le{constructor(){super(),Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"modelListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"slim",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_map",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"layer1Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer1MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.layer1Material=new x5({side:Ts}),this.layer2Material=new x5({side:si,transparent:!0,alphaTest:1e-5}),this.layer1MaterialBiased=this.layer1Material.clone(),this.layer1MaterialBiased.polygonOffset=!0,this.layer1MaterialBiased.polygonOffsetFactor=1,this.layer1MaterialBiased.polygonOffsetUnits=1,this.layer2MaterialBiased=this.layer2Material.clone(),this.layer2MaterialBiased.polygonOffset=!0,this.layer2MaterialBiased.polygonOffsetFactor=1,this.layer2MaterialBiased.polygonOffsetUnits=1;let e=new j0(8,8,8);ve(e,0,0,8,8,8);let t=new G0(e,this.layer1Material),r=new j0(9,9,9);ve(r,32,0,8,8,8);let i=new G0(r,this.layer2Material);this.head=new ke(t,i),this.head.name="head",this.head.add(t,i),t.position.y=4,i.position.y=4,this.add(this.head);let s=new j0(8,12,4);ve(s,16,16,8,12,4);let o=new G0(s,this.layer1Material),a=new j0(8.5,12.5,4.5);ve(a,16,32,8,12,4);let v=new G0(a,this.layer2Material);this.body=new ke(o,v),this.body.name="body",this.body.add(o,v),this.body.position.y=-6,this.add(this.body);let l=new j0,c=new G0(l,this.layer1MaterialBiased);this.modelListeners.push(()=>{c.scale.x=this.slim?3:4,c.scale.y=12,c.scale.z=4,ve(l,40,16,this.slim?3:4,12,4)});let d=new j0,f=new G0(d,this.layer2MaterialBiased);this.modelListeners.push(()=>{f.scale.x=this.slim?3.5:4.5,f.scale.y=12.5,f.scale.z=4.5,ve(d,40,32,this.slim?3:4,12,4)});let m=new le;m.add(c,f),this.modelListeners.push(()=>{m.position.x=this.slim?-.5:-1}),m.position.y=-4,this.rightArm=new ke(c,f),this.rightArm.name="rightArm",this.rightArm.add(m),this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.add(this.rightArm);let g=new j0,b=new G0(g,this.layer1MaterialBiased);this.modelListeners.push(()=>{b.scale.x=this.slim?3:4,b.scale.y=12,b.scale.z=4,ve(g,32,48,this.slim?3:4,12,4)});let w=new j0,y=new G0(w,this.layer2MaterialBiased);this.modelListeners.push(()=>{y.scale.x=this.slim?3.5:4.5,y.scale.y=12.5,y.scale.z=4.5,ve(w,48,48,this.slim?3:4,12,4)});let A=new le;A.add(b,y),this.modelListeners.push(()=>{A.position.x=this.slim?.5:1}),A.position.y=-4,this.leftArm=new ke(b,y),this.leftArm.name="leftArm",this.leftArm.add(A),this.leftArm.position.x=5,this.leftArm.position.y=-2,this.add(this.leftArm);let C=new j0(4,12,4);ve(C,0,16,4,12,4);let M=new G0(C,this.layer1MaterialBiased),S=new j0(4.5,12.5,4.5);ve(S,0,32,4,12,4);let H=new G0(S,this.layer2MaterialBiased),B=new le;B.add(M,H),B.position.y=-6,this.rightLeg=new ke(M,H),this.rightLeg.name="rightLeg",this.rightLeg.add(B),this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.add(this.rightLeg);let I=new j0(4,12,4);ve(I,16,48,4,12,4);let G=new G0(I,this.layer1MaterialBiased),O=new j0(4.5,12.5,4.5);ve(O,0,48,4,12,4);let j=new G0(O,this.layer2MaterialBiased),J=new le;J.add(G,j),J.position.y=-6,this.leftLeg=new ke(G,j),this.leftLeg.name="leftLeg",this.leftLeg.add(J),this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1,this.add(this.leftLeg),this.modelType="default"}get map(){return this._map}set map(e){this._map=e,this.layer1Material.map=e,this.layer1Material.needsUpdate=!0,this.layer1MaterialBiased.map=e,this.layer1MaterialBiased.needsUpdate=!0,this.layer2Material.map=e,this.layer2Material.needsUpdate=!0,this.layer2MaterialBiased.map=e,this.layer2MaterialBiased.needsUpdate=!0}get modelType(){return this.slim?"slim":"default"}set modelType(e){this.slim=e==="slim",this.modelListeners.forEach(t=>t())}getBodyParts(){return this.children.filter(e=>e instanceof ke)}setInnerLayerVisible(e){this.getBodyParts().forEach(t=>t.innerLayer.visible=e)}setOuterLayerVisible(e){this.getBodyParts().forEach(t=>t.outerLayer.visible=e)}resetJoints(){this.head.rotation.set(0,0,0),this.leftArm.rotation.set(0,0,0),this.rightArm.rotation.set(0,0,0),this.leftLeg.rotation.set(0,0,0),this.rightLeg.rotation.set(0,0,0),this.body.rotation.set(0,0,0),this.head.position.y=0,this.body.position.y=-6,this.body.position.z=0,this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.rightArm.position.z=0,this.leftArm.position.x=5,this.leftArm.position.y=-2,this.leftArm.position.z=0,this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1}},ri=class extends le{constructor(){super(),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new x5({side:si,transparent:!0,alphaTest:1e-5});let e=new j0(10,16,1);ei(e,0,0,10,16,1),this.cape=new G0(e,this.material),this.cape.position.y=-8,this.cape.position.z=.5,this.add(this.cape)}get map(){return this.material.map}set map(e){this.material.map=e,this.material.needsUpdate=!0}},ii=class extends le{constructor(){super(),Object.defineProperty(this,"leftWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new x5({side:si,transparent:!0,alphaTest:1e-5});let e=new j0(12,22,4);ei(e,22,0,10,20,2);let t=new G0(e,this.material);t.position.x=-5,t.position.y=-10,t.position.z=-1,this.leftWing=new le,this.leftWing.add(t),this.add(this.leftWing);let r=new j0(12,22,4);ei(r,22,0,10,20,2);let i=new G0(r,this.material);i.scale.x=-1,i.position.x=5,i.position.y=-10,i.position.z=-1,this.rightWing=new le,this.rightWing.add(i),this.add(this.rightWing),this.leftWing.position.x=5,this.leftWing.rotation.x=.2617994,this.resetJoints()}resetJoints(){this.leftWing.rotation.y=.01,this.leftWing.rotation.z=.2617994,this.updateRightWing()}updateRightWing(){this.rightWing.position.x=-this.leftWing.position.x,this.rightWing.position.y=this.leftWing.position.y,this.rightWing.rotation.x=this.leftWing.rotation.x,this.rightWing.rotation.y=-this.leftWing.rotation.y,this.rightWing.rotation.z=-this.leftWing.rotation.z}get map(){return this.material.map}set map(e){this.material.map=e,this.material.needsUpdate=!0}},ni=class extends le{constructor(){super(),Object.defineProperty(this,"rightEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new x5({side:Ts});let e=new j0(8,8,4/3);oi(e,0,0,6,6,1,14,7),this.rightEar=new G0(e,this.material),this.rightEar.name="rightEar",this.rightEar.position.x=-6,this.add(this.rightEar),this.leftEar=new G0(e,this.material),this.leftEar.name="leftEar",this.leftEar.position.x=6,this.add(this.leftEar)}get map(){return this.material.map}set map(e){this.material.map=e,this.material.needsUpdate=!0}},ks=10.8*Math.PI/180,R5=class extends le{constructor(){super(),Object.defineProperty(this,"skin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"elytra",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ears",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.skin=new ti,this.skin.name="skin",this.skin.position.y=8,this.add(this.skin),this.cape=new ri,this.cape.name="cape",this.cape.position.y=8,this.cape.position.z=-2,this.cape.rotation.x=ks,this.cape.rotation.y=Math.PI,this.add(this.cape),this.elytra=new ii,this.elytra.name="elytra",this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.visible=!1,this.add(this.elytra),this.ears=new ni,this.ears.name="ears",this.ears.position.y=10,this.ears.position.z=2/3,this.ears.visible=!1,this.skin.head.add(this.ears)}get backEquipment(){return this.cape.visible?"cape":this.elytra.visible?"elytra":null}set backEquipment(e){this.cape.visible=e==="cape",this.elytra.visible=e==="elytra"}resetJoints(){this.skin.resetJoints(),this.cape.rotation.x=ks,this.cape.position.y=8,this.cape.position.z=-2,this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.rotation.x=0,this.elytra.resetJoints()}};E();x();k();R();import{Color as Yp,PointLight as Qp,EquirectangularReflectionMapping as Kp,Group as Jp,NearestFilter as qp,PerspectiveCamera as Zp,Scene as Xp,Texture as $p,Vector2 as eg,WebGLRenderer as tg,AmbientLight as rg,CanvasTexture as ig,WebGLRenderTarget as ng,FloatType as sg,DepthTexture as og,Clock as ag,Object3D as vg,ColorManagement as lg}from"three";import{OrbitControls as dg}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as fg}from"three/examples/jsm/postprocessing/EffectComposer.js";import"three/examples/jsm/postprocessing/Pass.js";import{RenderPass as gg}from"three/examples/jsm/postprocessing/RenderPass.js";import{ShaderPass as yg}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as wg}from"three/examples/jsm/shaders/FXAAShader.js";E();x();k();R();var A1=class{constructor(){Object.defineProperty(this,"speed",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"paused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"progress",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"currentId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"progress0",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"animationObjects",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}update(e,t){if(this.paused)return;let r=t*this.speed;this.animate(e,r),this.animationObjects.forEach((i,s)=>{let o=this.progress0.get(s);i(e,this.progress-o,s)}),this.progress+=r}addAnimation(e){let t=this.currentId++;return this.progress0.set(t,this.progress),this.animationObjects.set(t,e),t}removeAnimation(e){e!=null&&(this.animationObjects.delete(e),this.progress0.delete(e))}};E();x();k();R();import{CanvasTexture as Bp,NearestFilter as Pp,Sprite as Ip,SpriteMaterial as Hp}from"three";E();x();k();R();var a7=Object.defineProperty,v7=(n,e,t)=>e in n?a7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,y0=(n,e,t)=>(v7(n,typeof e!="symbol"?e+"":e,t),t);function ai(n){let e=[n];if(n.extra&&n.extra.length!==0)for(let t of n.extra)e.push(...ai(t));return e}var Z=class{constructor(n,e,t,r,i,s){this.key=n,this.value=e,this.name=t,this.code=r,this.cssForeground=i,this.cssBackground=s}applyToStyle(n){n[this.key]=this.value}matchStyle(n){return n[this.key]===this.value}static fromCode(n){let t="0123456789abcdefklmnor".indexOf(n);if(t)return this.list[t]}toString(){return`${Z.CONTROL_STRING}${this.code}`}},_0=Z;y0(_0,"CONTROL_STRING","\xA7");y0(_0,"BLACK",new Z("color","black","BLACK","0",{color:"#000000"},{color:"#000000"}));y0(_0,"DARK_BLUE",new Z("color","dark_blue","DARK_BLUE","1",{color:"#0000AA"},{color:"#00002A"}));y0(_0,"DARK_GREEN",new Z("color","dark_green","DARK_GREEN","2",{color:"#00AA00"},{color:"#002A00"}));y0(_0,"DARK_AQUA",new Z("color","dark_aqua","DARK_AQUA","3",{color:"#00AAAA"},{color:"#002A2A"}));y0(_0,"DARK_RED",new Z("color","dark_red","DARK_RED","4",{color:"#AA0000"},{color:"#2A0000"}));y0(_0,"DARK_PURPLE",new Z("color","dark_purple","DARK_PURPLE","5",{color:"#AA00AA"},{color:"#2A002A"}));y0(_0,"GOLD",new Z("color","gold","GOLD","6",{color:"#FFAA00"},{color:"#2A2A00"}));y0(_0,"GRAY",new Z("color","gray","GRAY","7",{color:"#AAAAAA"},{color:"#2A2A2A"}));y0(_0,"DARK_GRAY",new Z("color","dark_gray","DARK_GRAY","8",{color:"#555555"},{color:"#151515"}));y0(_0,"BLUE",new Z("color","blue","BLUE","9",{color:"#5555FF"},{color:"#15153F"}));y0(_0,"GREEN",new Z("color","green","GREEN","a",{color:"#55FF55"},{color:"#153F15"}));y0(_0,"AQUA",new Z("color","aqua","AQUA","b",{color:"#55FFFF"},{color:"#153F3F"}));y0(_0,"RED",new Z("color","red","RED","c",{color:"#FF5555"},{color:"#3F1515"}));y0(_0,"LIGHT_PURPLE",new Z("color","light_purple","LIGHT_PURPLE","d",{color:"#FF55FF"},{color:"#3F153F"}));y0(_0,"YELLOW",new Z("color","yellow","YELLOW","e",{color:"#FFFF55"},{color:"#3F3F15"}));y0(_0,"WHITE",new Z("color","white","WHITE","f",{color:"#FFFFFF"},{color:"#3F3F3F"}));y0(_0,"OBFUSCATED",new Z("obfuscated",!0,"OBFUSCATED","k",{}));y0(_0,"BOLD",new Z("bold",!0,"BOLD","l",{"font-weight":"bold"}));y0(_0,"STRIKETHROUGH",new Z("strikethrough",!0,"STRIKETHROUGH","m",{"text-decoration":"line-through"}));y0(_0,"UNDERLINE",new Z("underlined",!0,"UNDERLINE","n",{"text-decoration":"underline"}));y0(_0,"ITALIC",new Z("italic",!0,"ITALIC","o",{"font-style":"italic"}));y0(_0,"RESET",{name:"RESET",code:"r",applyToStyle(n){n.bold=!1,n.strikethrough=!1,n.underlined=!1,n.italic=!1,n.obfuscated=!1,n.color=void 0},matchStyle(n){return!1},cssBackground:{},cssForeground:{},toString(){return`${Z.CONTROL_STRING}r`}});y0(_0,"list",[Z.BLACK,Z.DARK_BLUE,Z.DARK_GREEN,Z.DARK_AQUA,Z.DARK_RED,Z.DARK_PURPLE,Z.GOLD,Z.GRAY,Z.DARK_GRAY,Z.BLUE,Z.GREEN,Z.AQUA,Z.RED,Z.LIGHT_PURPLE,Z.YELLOW,Z.WHITE,Z.OBFUSCATED,Z.BOLD,Z.STRIKETHROUGH,Z.UNDERLINE,Z.ITALIC,Z.RESET]);var F5=s5(vi(),1);ui();var b3=s5(Xs(),1);import y3 from"prismarine-chat";E();x();k();R();import*as C0 from"three";E();x();k();R();E();x();k();R();var Fe=class n{constructor(e,t,r,i,s="div"){this.parent=e,this.object=t,this.property=r,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(i),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.nextNameID}`,this.$widget=document.createElement(s),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",o=>o.stopPropagation()),this.domElement.addEventListener("keyup",o=>o.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(r)}name(e){return this._name=e,this.$name.innerHTML=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.object[this.property]=e,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},fi=class extends Fe{constructor(e,t,r){super(e,t,r,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function hi(n){let e,t;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),t?"#"+t:!1}var Q7={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:hi,toHexString:hi},B5={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},K7={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,t=1){let r=B5.fromHexString(n);e[0]=(r>>16&255)/255*t,e[1]=(r>>8&255)/255*t,e[2]=(r&255)/255*t},toHexString([n,e,t],r=1){r=255/r;let i=n*r<<16^e*r<<8^t*r<<0;return B5.toHexString(i)}},J7={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,t=1){let r=B5.fromHexString(n);e.r=(r>>16&255)/255*t,e.g=(r>>8&255)/255*t,e.b=(r&255)/255*t},toHexString({r:n,g:e,b:t},r=1){r=255/r;let i=n*r<<16^e*r<<8^t*r<<0;return B5.toHexString(i)}},q7=[Q7,B5,K7,J7];function Z7(n){return q7.find(e=>e.match(n))}var mi=class extends Fe{constructor(e,t,r,i){super(e,t,r,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Z7(this.initialValue),this._rgbScale=i,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let s=hi(this.$text.value);s&&this._setValueFromHexString(s)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},C5=class extends Fe{constructor(e,t,r){super(e,t,r,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",i=>{i.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},pi=class extends Fe{constructor(e,t,r,i,s,o){super(e,t,r,"number"),this._initInput(),this.min(i),this.max(s);let a=o!==void 0;this.step(a?o:this._getImplicitStep(),a),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=t*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let t=()=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._stepExplicit&&(A=this._snap(A)),this.setValue(this._clamp(A)))},r=A=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+A),this.$input.value=this.getValue())},i=A=>{A.key==="Enter"&&this.$input.blur(),A.code==="ArrowUp"&&(A.preventDefault(),r(this._step*this._arrowKeyMultiplier(A))),A.code==="ArrowDown"&&(A.preventDefault(),r(this._step*this._arrowKeyMultiplier(A)*-1))},s=A=>{this._inputFocused&&(A.preventDefault(),r(this._step*this._normalizeMouseWheel(A)))},o=!1,a,v,l,c,d,f=5,m=A=>{a=A.clientX,v=l=A.clientY,o=!0,c=this.getValue(),d=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",b)},g=A=>{if(o){let C=A.clientX-a,M=A.clientY-v;Math.abs(M)>f?(A.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>f&&b()}if(!o){let C=A.clientY-l;d-=C*this._step*this._arrowKeyMultiplier(A),c+d>this._max?d=this._max-c:c+d<this._min&&(d=this._min-c),this._snapClampSetValue(c+d)}l=A.clientY},b=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",b)},w=()=>{this._inputFocused=!0},y=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",t),this.$input.addEventListener("keydown",i),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",m),this.$input.addEventListener("focus",w),this.$input.addEventListener("blur",y)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=(y,A,C,M,S)=>(y-A)/(C-A)*(S-M)+M,t=y=>{let A=this.$slider.getBoundingClientRect(),C=e(y,A.left,A.right,this._min,this._max);this._snapClampSetValue(C)},r=y=>{this._setDraggingStyle(!0),t(y.clientX),window.addEventListener("mousemove",i),window.addEventListener("mouseup",s)},i=y=>{t(y.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",s)},o=!1,a,v,l=y=>{y.preventDefault(),this._setDraggingStyle(!0),t(y.touches[0].clientX),o=!1},c=y=>{y.touches.length>1||(this._hasScrollBar?(a=y.touches[0].clientX,v=y.touches[0].clientY,o=!0):l(y),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("touchend",f))},d=y=>{if(o){let A=y.touches[0].clientX-a,C=y.touches[0].clientY-v;Math.abs(A)>Math.abs(C)?l(y):(window.removeEventListener("touchmove",d),window.removeEventListener("touchend",f))}else y.preventDefault(),t(y.touches[0].clientX)},f=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",d),window.removeEventListener("touchend",f)},m=this._callOnFinishChange.bind(this),g=400,b,w=y=>{if(Math.abs(y.deltaX)<Math.abs(y.deltaY)&&this._hasScrollBar)return;y.preventDefault();let C=this._normalizeMouseWheel(y)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(m,g)};this.$slider.addEventListener("mousedown",r),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",w,{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:r}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,r=-e.wheelDelta/120,r*=this._stepExplicit?1:10),t+-r}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){let t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},gi=class extends Fe{constructor(e,t,r,i){super(e,t,r,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(i)?i:Object.values(i),this._names=Array.isArray(i)?i:Object.keys(i),this._names.forEach(s=>{let o=document.createElement("option");o.innerHTML=s,this.$select.appendChild(o)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){let e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.innerHTML=t===-1?e:this._names[t],this}},bi=class extends Fe{constructor(e,t,r){super(e,t,r,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",i=>{i.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},X7=`.lil-gui {
287
+ `))w(B,H),m+=r,f="";else S&&w(S,H);if(C.extra)for(let B of C.extra)y(B,H)},w=(C,M)=>{o||(o=C.trim()!==""),f+=C,g[m]=a.measureText(f).width;let S=M.color??i;S.startsWith("#")||(S=z6[S.toLowerCase()]||S),c.push({fontStyle:`${M.bold?"bold":""} ${M.italic?"italic":""}`,fillStyle:S,underlineStyle:M.underlined??!1,strikeStyle:M.strikethrough??!1,offset:m,text:C})};if(y(l),!u&&!l.toString().trim())return;let b=0,A=0;for(let{fillStyle:C,fontStyle:M,underlineStyle:S,strikeStyle:H,offset:B,text:I}of c){A!==B&&(b=0),A=B,a.fillStyle=C,a.textRendering="optimizeLegibility",a.font=`${M} ${r}px mojangles`;let G=g[B]??a.measureText(I).width,O=(t.width-G)/2+b;a.fillText(I,O,B),H&&(a.lineWidth=r/8,a.strokeStyle=C,a.beginPath(),a.moveTo(O,B-a.lineWidth*2.5),a.lineTo(O+a.measureText(I).width,B-a.lineWidth*2.5),a.stroke()),S&&(a.lineWidth=r/8,a.strokeStyle=C,a.beginPath(),a.moveTo(O,B+a.lineWidth),a.lineTo(O+a.measureText(I).width,B+a.lineWidth),a.stroke()),b+=a.measureText(I).width}return o};E();x();k();R();function St(n){let e=Math.floor(n.x/16),t=Math.floor(n.z/16);return[e,t]}function Hr(n){let e=Math.floor(n.x/16),t=Math.floor(n.y/16),r=Math.floor(n.z/16);return[e,t,r]}E();x();k();R();import{Vec3 as g5}from"vec3";import{subscribeKey as zr}from"valtio/utils";import{proxy as W6,subscribe as V6}from"valtio";E();x();k();R();var nt={blocks:"blocksArray",blockCollisionShapes:"blockCollisionShapes",biomes:"biomesArray",tints:"tints"};E();x();k();R();var as=16;var vs=(n,e)=>e?`${n}:${e}`:String(n);E();x();k();R();var ls=0,Ee={},Or=40,p5="mc-renderer-debug-overlay",Ct=(n,e=80,t=ls,r=Or,i)=>{if(y0)return{updateText(){},setVisibility(){}};let s=document.createElement("div");return s.style.position="fixed",s.style.top=`${r??Or}px`,s.style.right=`${t}px`,s.style.backgroundColor="rgba(0, 0, 0, 0.7)",s.style.color="white",s.style.padding="2px",s.style.fontFamily="monospace",s.style.fontSize="12px",i?.className?s.className=i.className:s.style.zIndex="100",s.style.pointerEvents="none",document.body.appendChild(s),Ee[n]=s,r===void 0&&t===ls&&(Or+=20),{updateText(o){s.innerText!==o&&(s.innerText=o)},setVisibility(o){s.style.display=o?"block":"none"}}};var Fr=(n,e)=>{y0||!Ee[n]||(Ee[n].innerText=e)},cs=n=>{if(!y0)for(let e in Ee)Ee[e].style.display=n?"block":"none"},ds=()=>{if(!y0)for(let n in Ee)L6(n)},L6=n=>{y0||!Ee[n]||(Ee[n].remove(),delete Ee[n])};E();x();k();R();var U6=n=>{let e=n%24e3/24e3-.25;return e<0&&(e+=1),e>1&&(e-=1),e+(1-Math.cos(e*Math.PI))/2},G6=n=>{let e=(n%24e3+24e3)%24e3,t=U6(e),i=Math.cos(t*Math.PI*2)*.5+.5,s=Math.round(4+i*11);return Math.max(4,Math.min(15,s))},Dr=n=>{let e=(n%24e3+24e3)%24e3;if(e>=0&&e<12e3)return 15;if(e>=12e3&&e<13e3){let t=(e-12e3)/1e3;return Math.round(15-t*11)}else{if(e>=13e3&&e<23e3)return 4;{let t=(e-23e3)/1e3;return Math.round(4+t*11)}}},N6=()=>{let n=[{ticks:0,label:"6:00 AM (sunrise)"},{ticks:6e3,label:"12:00 PM (noon)"},{ticks:12e3,label:"6:00 PM (sunset starts)"},{ticks:12500,label:"6:30 PM (sunset mid)"},{ticks:13e3,label:"7:00 PM (night begins)"},{ticks:18e3,label:"12:00 AM (midnight)"},{ticks:19e3,label:"1:00 AM"},{ticks:23e3,label:"5:00 AM (dawn begins)"},{ticks:23500,label:"5:30 AM (dawn mid)"}];for(let{ticks:e,label:t}of n){let r=G6(e),i=Dr(e)}};typeof window<"u"&&(window.debugSkyLight=N6);function b5(n,e){return(n%e+e)%e}var xe=class xe{constructor(e,t,r){this.resourcesManager=e;this.displayOptions=t;this.initOptions=r;d(this,"worldReadyResolvers",Promise.withResolvers());d(this,"worldReadyPromise",this.worldReadyResolvers.promise);d(this,"timeOfTheDay",0);d(this,"worldSizeParams",{minY:0,worldHeight:256});d(this,"reactiveDebugParams",W6({stopRendering:!1,chunksRenderAboveOverride:void 0,chunksRenderAboveEnabled:!1,chunksRenderBelowOverride:void 0,chunksRenderBelowEnabled:!1,chunksRenderDistanceOverride:void 0,chunksRenderDistanceEnabled:!1,disableEntities:!1}));d(this,"active",!1);d(this,"loadedChunks",{});d(this,"finishedChunks",{});d(this,"finishedSections",{});d(this,"sectionsWaiting",new Map);d(this,"queuedChunks",new Set);d(this,"queuedFunctions",[]);d(this,"renderUpdateEmitter",new Je);d(this,"customTexturesDataUrl");d(this,"workers",[]);d(this,"viewerChunkPosition");d(this,"lastViewerChunkGridX");d(this,"lastViewerChunkGridZ");d(this,"lastCamUpdate",0);d(this,"droppedFpsPercentage",0);d(this,"initialChunkLoadWasStartedIn");d(this,"initialChunksLoad",!0);d(this,"enableChunksLoadDelay",!1);d(this,"texturesVersion");d(this,"viewDistance",-1);d(this,"onRenderDistanceChanged");d(this,"chunksLength",0);d(this,"allChunksFinished",!1);d(this,"messageQueue",[]);d(this,"isProcessingQueue",!1);d(this,"ONMESSAGE_TIME_LIMIT",30);d(this,"handleResize",()=>{});d(this,"highestBlocksByChunks",new Map);d(this,"blockEntities",{});d(this,"workersProcessAverageTime",0);d(this,"workersProcessAverageTimeCount",0);d(this,"maxWorkersProcessTime",0);d(this,"workersPreAverageTime",0);d(this,"workersWasmAverageTime",0);d(this,"workersPostAverageTime",0);d(this,"workersPhaseSampleCount",0);d(this,"workersPreTargetConvertAverageTime",0);d(this,"workersPreNeighborConvertAverageTime",0);d(this,"workersPreNeighborCountAverage",0);d(this,"workersPreTypedArrayBuildAverageTime",0);d(this,"workersPreOtherAverageTime",0);d(this,"workersPreCacheHitsTotal",0);d(this,"workersPreCacheMissesTotal",0);d(this,"geometryReceiveCount",{});d(this,"allLoadedIn");d(this,"onWorldSwitched",[]);d(this,"renderTimeMax",0);d(this,"renderTimeAvg",0);d(this,"renderTimeAvgCount",0);d(this,"edgeChunks",{});d(this,"lastAddChunk",null);d(this,"neighborChunkUpdates",!0);d(this,"lastChunkDistance",0);d(this,"debugStopGeometryUpdate",!1);d(this,"protocolCustomBlocks",new Map);d(this,"heightmapDebounceTimers",new Map);d(this,"sectionDirtyCount",new Map);d(this,"sectionDirtyTimers",new Map);d(this,"sectionDirtyPendingArgs",new Map);d(this,"blockStateModelInfo",new Map);d(this,"worldBlockProvider");d(this,"soundSystem");d(this,"worldRendererConfig");d(this,"playerStateReactive");d(this,"playerStateUtils");d(this,"reactiveState");d(this,"mesherLogReader");d(this,"forceCallFromMesherReplayer",!1);d(this,"stopMesherMessagesProcessing",!1);d(this,"abortController",new AbortController);d(this,"lastRendered",0);d(this,"renderingActive",!0);d(this,"geometryReceiveCountPerSec",0);d(this,"mesherLogger",{contents:[],active:new URL(location.href).searchParams.get("mesherlog")==="true"});d(this,"currentRenderedFrames",0);d(this,"fpsAverage",0);d(this,"lastFps",0);d(this,"fpsWorst");d(this,"fpsSamples",0);d(this,"backendInfoReport","-");d(this,"chunksFullInfo","-");d(this,"workerCustomHandleTime",0);d(this,"queueAwaited",!1);d(this,"toWorkerMessagesQueue",{});this.snapshotInitialValues(),this.worldRendererConfig=t.inWorldRenderingConfig,this.playerStateReactive=t.playerStateReactive,this.playerStateUtils=k2(this.playerStateReactive),this.reactiveState=t.rendererState,this.renderUpdateEmitter.on("update",()=>{let o=Object.keys(this.finishedChunks).length;Fr("loaded-chunks",`${o}/${this.chunksLength} chunks (${this.lastChunkDistance}/${this.viewDistance})`)}),Ct("downloaded-chunks",100,140,20,{className:p5}),this.connect(this.displayOptions.worldView);let i=setInterval(()=>{this.geometryReceiveCountPerSec=Object.values(this.geometryReceiveCount).reduce((o,v)=>o+v,0),this.geometryReceiveCount={},cs(this.displayAdvancedStats),this.updateChunksStats()},500),s=setInterval(()=>{this.fpsUpdate()},1e3);this.abortController.signal.addEventListener("abort",()=>{clearInterval(i),clearInterval(s)})}anyModuleRequiresHeightmap(){return!1}isShaderCubeBlocksEnabled(){return this.worldRendererConfig.shaderCubeBlocks===!0}shaderCubeBlocksEnabled(){return this.isShaderCubeBlocksEnabled()}get version(){return this.displayOptions.version}get displayAdvancedStats(){return(this.initOptions.config.statsVisible??0)>1}fpsUpdate(){this.fpsSamples++,this.fpsAverage=(this.fpsAverage*(this.fpsSamples-1)+this.currentRenderedFrames)/this.fpsSamples,this.fpsWorst===void 0?this.fpsWorst=this.currentRenderedFrames:this.fpsWorst=Math.min(this.fpsWorst,this.currentRenderedFrames),this.lastFps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.fps=this.currentRenderedFrames,this.displayOptions.nonReactiveState.worstRenderTime=this.renderTimeMax,this.displayOptions.nonReactiveState.avgRenderTime=this.renderTimeAvg,this.currentRenderedFrames=0}logWorkerWork(e){this.mesherLogger.active&&this.mesherLogger.contents.push(typeof e=="function"?e():e)}async init(){if(this.active)throw new Error("WorldRendererCommon is already initialized");await Promise.all([this.resetWorkers(),(async()=>{this.resourcesManager.currentResources?.allReady&&await this.updateAssetsData()})()]),this.resourcesManager.on("assetsTexturesUpdated",async()=>{this.active&&await this.updateAssetsData()}),this.watchReactivePlayerState(),this.watchReactiveConfig(),this.worldReadyResolvers.resolve()}snapshotInitialValues(){}wasChunkSentToWorker(e){return this.loadedChunks[e]}async getHighestBlocks(e){return this.highestBlocksByChunks.get(e)}updateCustomBlock(e,t,r){if(this.protocolCustomBlocks.set(e,{...this.protocolCustomBlocks.get(e),[t]:r}),this.logWorkerWork(()=>`-> updateCustomBlock ${e} ${t} ${r} ${this.wasChunkSentToWorker(e)}`),this.wasChunkSentToWorker(e)){let[i,s,o]=t.split(",").map(Number);this.setBlockStateId(new g5(i,s,o),void 0)}}async getBlockInfo(e,t){let i=`${Math.floor(e.x/16)*16},${Math.floor(e.z/16)*16}`,s=this.protocolCustomBlocks.get(i)?.[`${e.x},${e.y},${e.z}`],o=vs(t,s),v=this.blockStateModelInfo.get(o);return{customBlockName:s,modelInfo:v}}initWorkers(e=this.worldRendererConfig.mesherWorkers){for(let t=0;t<e+0;t++){let r=j6(i=>{Array.isArray(i)?this.messageQueue.push(...i):this.messageQueue.push(i),this.processMessageQueue("worker")},this.worldRendererConfig.wasmMesher?"mesherWasm.js":"mesher.js");this.workers.push(r)}}onReactivePlayerStateUpdated(e,t,r=!0){return r&&t(this.playerStateReactive[e]),zr(this.playerStateReactive,e,t)}onReactiveConfigUpdated(e,t){t(this.worldRendererConfig[e]),e==="*"?V6(this.worldRendererConfig,t):zr(this.worldRendererConfig,e,t)}onReactiveDebugUpdated(e,t){t(this.reactiveDebugParams[e]),zr(this.reactiveDebugParams,e,t)}watchReactivePlayerState(){this.onReactivePlayerStateUpdated("backgroundColor",e=>{this.changeBackgroundColor(e)}),this.onReactivePlayerStateUpdated("cardinalLight",e=>{this.changeCardinalLight(e)})}watchReactiveConfig(){this.onReactiveConfigUpdated("fetchPlayerSkins",e=>{s1({apiEnabled:e})})}async processMessageQueue(e){if(this.isProcessingQueue||this.messageQueue.length===0)return;if(this.logWorkerWork(`# ${e} processing queue`),this.lastRendered&&performance.now()-this.lastRendered>this.ONMESSAGE_TIME_LIMIT&&this.worldRendererConfig._experimentalSmoothChunkLoading&&this.renderingActive){let i=performance.now();await new Promise(s=>{requestAnimationFrame(s)}),this.logWorkerWork(`# processing got delayed by ${performance.now()-i}ms`)}this.isProcessingQueue=!0;let t=performance.now(),r=0;for(;this.messageQueue.length>0;){let i=this.stopMesherMessagesProcessing;if(!i){let s=this.messageQueue.shift();this.handleMessage(s),r++}if(i||performance.now()-t>this.ONMESSAGE_TIME_LIMIT&&this.renderingActive&&this.worldRendererConfig._experimentalSmoothChunkLoading){if(this.messageQueue.length>0){requestAnimationFrame(async()=>{this.isProcessingQueue=!1,this.processMessageQueue("queue-delay")});return}break}}this.isProcessingQueue=!1}handleMessage(e){var r,i;let t=e;if(this.active){if(this.mesherLogReader?.workerMessageReceived(t.type,t),t.type!=="geometry"||!this.debugStopGeometryUpdate){let s=performance.now();this.handleWorkerMessage(t),this.workerCustomHandleTime+=performance.now()-s}if(t.type==="geometry"){this.logWorkerWork(()=>`-> ${t.workerIndex} geometry ${t.key} ${JSON.stringify({dataSize:JSON.stringify(t).length})}`),(r=this.geometryReceiveCount)[i=t.workerIndex]??(r[i]=0),this.geometryReceiveCount[t.workerIndex]++;let s=t.key.split(",").map(Number);this.lastChunkDistance=Math.max(...this.getDistance(new g5(s[0],0,s[2])))}if(t.type==="sectionFinished"){if(this.logWorkerWork(`<- ${t.workerIndex} sectionFinished ${t.key} ${JSON.stringify({processTime:t.processTime})}`),!this.sectionsWaiting.has(t.key))throw new Error(`sectionFinished event for non-outstanding section ${t.key}`);this.sectionsWaiting.set(t.key,this.sectionsWaiting.get(t.key)-1),this.sectionsWaiting.get(t.key)===0&&(this.sectionsWaiting.delete(t.key),this.finishedSections[t.key]=!0);let s=t.key.split(",").map(Number),o=`${s[0]},${s[2]}`;if(this.loadedChunks[o]){let v=!0,a=this.getSectionHeight();for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=a)if(!this.finishedSections[`${s[0]},${l},${s[2]}`]){v=!1;break}if(v){this.finishedChunks[o]=!0;let l=16;this.reactiveState.world.chunksLoaded.add(`${Math.floor(s[0]/l)},${Math.floor(s[2]/l)}`),this.renderUpdateEmitter.emit("chunkFinished",`${s[0]},${s[2]}`),this.checkAllFinished()}}if(this.renderUpdateEmitter.emit("update"),t.processTime&&(this.workersProcessAverageTimeCount++,this.workersProcessAverageTime=(this.workersProcessAverageTime*(this.workersProcessAverageTimeCount-1)+t.processTime)/this.workersProcessAverageTimeCount,this.maxWorkersProcessTime=Math.max(this.maxWorkersProcessTime,t.processTime)),typeof t.pre=="number"&&typeof t.wasm=="number"&&typeof t.post=="number"&&(t.pre>0||t.wasm>0||t.post>0)){let v=++this.workersPhaseSampleCount;this.workersPreAverageTime=(this.workersPreAverageTime*(v-1)+t.pre)/v,this.workersWasmAverageTime=(this.workersWasmAverageTime*(v-1)+t.wasm)/v,this.workersPostAverageTime=(this.workersPostAverageTime*(v-1)+t.post)/v;let a=typeof t.preTargetConvert=="number"?t.preTargetConvert:0,l=typeof t.preNeighborConvert=="number"?t.preNeighborConvert:0,c=typeof t.preNeighborCount=="number"?t.preNeighborCount:0,u=typeof t.preTypedArrayBuild=="number"?t.preTypedArrayBuild:0,f=typeof t.preOther=="number"?t.preOther:0,m=typeof t.preCacheHits=="number"?t.preCacheHits:0,g=typeof t.preCacheMisses=="number"?t.preCacheMisses:0;if(this.workersPreTargetConvertAverageTime=(this.workersPreTargetConvertAverageTime*(v-1)+a)/v,this.workersPreNeighborConvertAverageTime=(this.workersPreNeighborConvertAverageTime*(v-1)+l)/v,this.workersPreNeighborCountAverage=(this.workersPreNeighborCountAverage*(v-1)+c)/v,this.workersPreTypedArrayBuildAverageTime=(this.workersPreTypedArrayBuildAverageTime*(v-1)+u)/v,this.workersPreOtherAverageTime=(this.workersPreOtherAverageTime*(v-1)+f)/v,this.workersPreCacheHitsTotal+=m,this.workersPreCacheMissesTotal+=g,this.worldRendererConfig.debugWasmPerf&&v%xe.PHASE_PERF_LOG_INTERVAL===0){let y=this.workersPreAverageTime+this.workersWasmAverageTime+this.workersPostAverageTime,w=y>0?this.workersPreAverageTime/y*100:0,b=y>0?this.workersWasmAverageTime/y*100:0,A=y>0?this.workersPostAverageTime/y*100:0,C=this.workersPreAverageTime,M=C>0?this.workersPreTargetConvertAverageTime/C*100:0,S=C>0?this.workersPreNeighborConvertAverageTime/C*100:0,H=C>0?this.workersPreTypedArrayBuildAverageTime/C*100:0,B=C>0?this.workersPreOtherAverageTime/C*100:0,I=this.workersPreNeighborCountAverage,G=I>0?this.workersPreNeighborConvertAverageTime/I:0,O=this.workersPreCacheHitsTotal+this.workersPreCacheMissesTotal,j=O>0?this.workersPreCacheHitsTotal/O*100:0}}}if(t.type==="blockStateModelInfo")for(let[s,o]of Object.entries(t.info))this.blockStateModelInfo.set(s,o);t.type==="heightmap"&&this.reactiveState.world.heightmaps.set(t.key,new Int16Array(t.heightmap))}}downloadMesherLog(){let e=document.createElement("a");e.href="data:text/plain;charset=utf-8,"+encodeURIComponent(this.mesherLogger.contents.join(`
288
+ `)),e.download="mesher.log",e.click()}checkAllFinished(){this.sectionsWaiting.size===0&&(this.reactiveState.world.mesherWork=!1),Object.keys(this.finishedChunks).length>=this.chunksLength&&(this.allChunksLoaded?.(),this.allChunksFinished=!0,this.allLoadedIn??(this.allLoadedIn=Date.now()-this.initialChunkLoadWasStartedIn)),this.updateChunksStats()}changeHandSwingingState(e,t){}updateViewerPosition(e){this.viewerChunkPosition=e;for(let[i,s]of Object.entries(this.loadedChunks))s&&this.updatePosDataChunk?.(i);let t=Math.floor(e.x/16),r=Math.floor(e.z/16);(t!==this.lastViewerChunkGridX||r!==this.lastViewerChunkGridZ)&&(this.lastViewerChunkGridX=t,this.lastViewerChunkGridZ=r,this.onViewerChunkPositionChanged())}onViewerChunkPositionChanged(){}sendWorkers(e){for(let t of this.workers)t.postMessage(e)}getDistance(e){let[t,r]=St(this.viewerChunkPosition),i=16,s=Math.abs(t-Math.floor(e.x/i)),o=Math.abs(r-Math.floor(e.z/i));return[s,o]}resetWorld(){for(let e of this.workers)e.terminate();this.workers=[]}async resetWorkers(){this.resetWorld(),typeof document<"u"&&document?.readyState==="loading"&&await new Promise(e=>{document.addEventListener("DOMContentLoaded",e)}),this.initWorkers(),this.active=!0,this.sendMesherMcData()}getMesherConfig(){let e=this.timeOfTheDay,t=e<0||e>24e3?15:Dr(e);return{version:this.version,enableLighting:this.worldRendererConfig.enableLighting,skyLight:t,smoothLighting:this.worldRendererConfig.smoothLighting,shadingTheme:this.worldRendererConfig.shadingTheme,cardinalLight:this.worldRendererConfig.cardinalLight,outputFormat:this.outputFormat,debugModelVariant:this.worldRendererConfig.debugModelVariant,clipWorldBelowY:this.worldRendererConfig.clipWorldBelowY,disableBlockEntityTextures:!this.worldRendererConfig.extraBlockRenderers,worldMinY:this.worldMinYRender,worldMaxY:this.worldMinYRender+this.worldSizeParams.worldHeight,disableConversionCache:this.worldRendererConfig.disableMesherConversionCache,computeWireframeEdges:this.worldRendererConfig.futuristicReveal===!0,shaderCubeBlocks:this.isShaderCubeBlocksEnabled()}}sendMesherMcData(){let e=this.resourcesManager.currentResources.mcData;fs(this.workers,this.version,nt,e),this.logWorkerWork("# mcData sent")}async updateAssetsData(){let e=this.resourcesManager.currentResources;if(this.workers.length===0)throw new Error("workers not initialized yet");for(let[t,r]of this.workers.entries()){let{blockstatesModels:i}=e;r.postMessage({type:"mesherData",workerIndex:t,blocksAtlas:{latest:e.blocksAtlasJson},blockstatesModels:i,config:this.getMesherConfig()})}this.logWorkerWork("# mesherData sent")}getSectionHeight(){return as}get worldMinYRender(){let e=this.getSectionHeight();return Math.floor(Math.max(this.worldSizeParams.minY,this.worldRendererConfig.clipWorldBelowY??-1/0)/e)*e}updateChunksStats(){let e=Object.keys(this.finishedChunks);this.displayOptions.nonReactiveState.world.chunksLoaded=new Set(e),this.displayOptions.nonReactiveState.world.chunksTotalNumber=this.chunksLength,this.reactiveState.world.allChunksLoaded=this.allChunksFinished;let t=`Q: ${this.messageQueue.length} ${Object.keys(this.loadedChunks).length}/${Object.keys(this.finishedChunks).length}/${this.chunksLength} chunks (${this.workers.length}:${this.workersProcessAverageTime.toFixed(0)}ms/${this.geometryReceiveCountPerSec}ss/${this.allLoadedIn?.toFixed(1)??"-"}s)`;this.chunksFullInfo=t,Fr("downloaded-chunks",t)}addColumn(e,t,r,i){if(!this.active)return;if(this.workers.length===0)throw new Error("workers not initialized yet");this.initialChunksLoad=!1,this.initialChunkLoadWasStartedIn??(this.initialChunkLoadWasStartedIn=Date.now()),this.loadedChunks[`${e},${t}`]=!0,this.updateChunksStats();let s=`${e},${t}`,o=this.protocolCustomBlocks.get(s);for(let l of this.workers)l.postMessage({type:"chunk",x:e,z:t,chunk:r,customBlockModels:o||void 0});this.worldRendererConfig.wasmMesher||this.workers[0].postMessage({type:"getHeightmap",x:e,z:t}),this.logWorkerWork(()=>`-> chunk ${JSON.stringify({x:e,z:t,chunkLength:r.length,customBlockModelsLength:o?Object.keys(o).length:0})}`),this.mesherLogReader?.chunkReceived(e,t,r.length);let v=this.getSectionHeight(),a=16;for(let l=this.worldMinYRender;l<this.worldSizeParams.worldHeight;l+=v){let c=new g5(e,l,t);this.setSectionDirty(c),this.neighborChunkUpdates&&(!i||this.worldRendererConfig.smoothLighting)&&(this.setSectionDirty(c.offset(-a,0,0)),this.setSectionDirty(c.offset(a,0,0)),this.setSectionDirty(c.offset(0,0,-a)),this.setSectionDirty(c.offset(0,0,a)))}}markAsLoaded(e,t){this.loadedChunks[`${e},${t}`]=!0,this.finishedChunks[`${e},${t}`]=!0,this.logWorkerWork(`-> markAsLoaded ${JSON.stringify({x:e,z:t})}`),this.renderUpdateEmitter.emit("chunkFinished",`${e},${t}`),this.checkAllFinished()}removeColumn(e,t){delete this.loadedChunks[`${e},${t}`];let r=`${e},${t}`,i=this.heightmapDebounceTimers.get(r);i&&(clearTimeout(i),this.heightmapDebounceTimers.delete(r));for(let[o,v]of this.sectionDirtyTimers)o.startsWith(`${e},`)&&o.endsWith(`,${t}`)&&(clearTimeout(v),this.sectionDirtyTimers.delete(o),this.sectionDirtyCount.delete(o),this.sectionDirtyPendingArgs.delete(o));for(let o of this.workers)o.postMessage({type:"unloadChunk",x:e,z:t});this.logWorkerWork(`-> unloadChunk ${JSON.stringify({x:e,z:t})}`),delete this.finishedChunks[`${e},${t}`],this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,Object.keys(this.finishedChunks).length===0&&(this.allLoadedIn=void 0,this.initialChunkLoadWasStartedIn=void 0);let s=this.getSectionHeight();for(let o=this.worldSizeParams.minY;o<this.worldSizeParams.worldHeight;o+=s)this.setSectionDirty(new g5(e,o,t),!1),delete this.finishedSections[`${e},${o},${t}`];this.highestBlocksByChunks.delete(`${e},${t}`),this.reactiveState.world.heightmaps.delete(`${Math.floor(e/16)},${Math.floor(t/16)}`),this.updateChunksStats(),Object.keys(this.loadedChunks).length===0&&(this.mesherLogger.contents=[],this.logWorkerWork("# all chunks unloaded. New log started"),this.mesherLogReader?.maybeStartReplay())}setBlockStateId(e,t,r=!0){(async()=>{let o=Math.floor(e.x/16)*16,v=Math.floor(e.z/16)*16;this.queuedChunks.has(`${o},${v}`)&&await new Promise(a=>{this.queuedFunctions.push(()=>{a()})}),this.loadedChunks[`${o},${v}`],this.setBlockStateIdInner(e,t,r)})()}updateEntity(e,t=!1){}lightUpdate(e,t){}connect(e){let t=e;t.on("entity",i=>{this.updateEntity(i,!1)}),t.on("entityMoved",i=>{this.updateEntity(i,!0)}),t.on("playerEntity",i=>{this.updatePlayerEntity?.(i)});let r=null;t.on("loadChunk",({x:i,z:s,chunk:o,worldConfig:v,isLightUpdate:a})=>{this.worldSizeParams=v,this.queuedChunks.add(`${i},${s}`);let l=[i,s,o,a];r||(r={data:[],timeout:setTimeout(()=>{for(let c of r.data)this.queuedChunks.delete(`${c[0]},${c[1]}`),this.addColumn(...c);for(let c of this.queuedFunctions)c();this.queuedFunctions=[],r=null},this.worldRendererConfig.addChunksBatchWaitTime)}),r.data.push(l)}),t.on("blockEntities",i=>{this.blockEntities=i}),t.on("unloadChunk",({x:i,z:s})=>{this.removeColumn(i,s)}),t.on("blockUpdate",({pos:i,stateId:s})=>{this.setBlockStateId(new g5(i.x,i.y,i.z),s)}),t.on("chunkPosUpdate",({pos:i})=>{this.updateViewerPosition(i)}),t.on("end",()=>{this.worldStop?.()}),t.on("renderDistance",i=>{this.viewDistance=i,this.chunksLength=i===0?1:o5(i).length,this.allChunksFinished=Object.keys(this.finishedChunks).length===this.chunksLength,this.onRenderDistanceChanged?.(i)}),t.on("markAsLoaded",({x:i,z:s})=>{this.markAsLoaded(i,s)}),t.on("updateLight",({pos:i})=>{this.lightUpdate(i.x,i.z)}),t.on("onWorldSwitch",()=>{for(let i of this.onWorldSwitched)try{i()}catch(s){setTimeout(()=>{throw s},0)}}),t.on("time",i=>{this.worldRendererConfig.dayCycle&&(this.timeUpdated?.(i),this.timeOfTheDay=i)}),t.on("biomeUpdate",({biome:i})=>{this.biomeUpdated?.(i)}),t.on("biomeReset",()=>{this.biomeReset?.()})}setBlockStateIdInner(e,t,r=!0){let s=`${Math.floor(e.x/16)*16},${Math.floor(e.z/16)*16}`,o=`${e.x},${e.y},${e.z}`,v=this.protocolCustomBlocks.get(s)||{};for(let a of this.workers)a.postMessage({type:"blockUpdate",pos:e,stateId:t,customBlockModels:v});if(this.anyModuleRequiresHeightmap()){let a=Math.floor(e.x/16)*16,l=Math.floor(e.z/16)*16,c=`${a},${l}`;if(!this.worldRendererConfig.wasmMesher){let u=this.heightmapDebounceTimers.get(c);u&&clearTimeout(u),this.heightmapDebounceTimers.set(c,setTimeout(()=>{this.heightmapDebounceTimers.delete(c),this.workers[0]?.postMessage({type:"getHeightmap",x:a,z:l})},100))}}if(this.logWorkerWork(`-> blockUpdate ${JSON.stringify({pos:e,stateId:t,customBlockModels:v})}`),this.setSectionDirty(e,!0,!0),this.neighborChunkUpdates){let l=this.getSectionHeight();e.x&15||this.setSectionDirty(e.offset(-16,0,0),!0,!0),(e.x&15)===15&&this.setSectionDirty(e.offset(16,0,0),!0,!0),e.y&l-1||this.setSectionDirty(e.offset(0,-l,0),!0,!0),(e.y&l-1)===l-1&&this.setSectionDirty(e.offset(0,l,0),!0,!0),e.z&15||this.setSectionDirty(e.offset(0,0,-16),!0,!0),(e.z&15)===15&&this.setSectionDirty(e.offset(0,0,16),!0,!0),r&&(!(e.x&15)&&!(e.z&15)&&this.setSectionDirty(e.offset(-16,0,-16),!0,!0),(e.x&15)===15&&!(e.z&15)&&this.setSectionDirty(e.offset(16,0,-16),!0,!0),!(e.x&15)&&(e.z&15)===15&&this.setSectionDirty(e.offset(-16,0,16),!0,!0),(e.x&15)===15&&(e.z&15)===15&&this.setSectionDirty(e.offset(16,0,16),!0,!0),!(e.x&15)&&!(e.y&l-1)&&this.setSectionDirty(e.offset(-16,-l,0),!0,!0),(e.x&15)===15&&!(e.y&l-1)&&this.setSectionDirty(e.offset(16,-l,0),!0,!0),!(e.z&15)&&!(e.y&l-1)&&this.setSectionDirty(e.offset(0,-l,-16),!0,!0),(e.z&15)===15&&!(e.y&l-1)&&this.setSectionDirty(e.offset(0,-l,16),!0,!0),!(e.y&l-1)&&!(e.x&15)&&!(e.z&15)&&this.setSectionDirty(e.offset(-16,-l,-16),!0,!0),!(e.y&l-1)&&(e.x&15)===15&&!(e.z&15)&&this.setSectionDirty(e.offset(16,-l,-16),!0,!0),!(e.y&l-1)&&!(e.x&15)&&(e.z&15)===15&&this.setSectionDirty(e.offset(-16,-l,16),!0,!0),!(e.y&l-1)&&(e.x&15)===15&&(e.z&15)===15&&this.setSectionDirty(e.offset(16,-l,16),!0,!0))}}getWorkerNumber(e,t=!1){let i=this.getSectionHeight();if(this.worldRendererConfig.dedicatedChangeWorker&&this.workers.length>1){if(this.worldRendererConfig.wasmMesher)return b5(Math.floor(e.x/16)+Math.floor(e.z/16),this.workers.length);if(t){let v=`${Math.floor(e.x/16)*16},${Math.floor(e.y/i)*i},${Math.floor(e.z/16)*16}`;if(this.sectionsWaiting.get(v)&&!this.finishedSections[v]){let l=this.workers.length-1;return b5(Math.floor(e.x/16)+Math.floor(e.y/i)+Math.floor(e.z/16),l)}return this.workers.length-1}let o=this.workers.length-1;return b5(Math.floor(e.x/16)+Math.floor(e.y/i)+Math.floor(e.z/16),o)}if(this.worldRendererConfig.wasmMesher)return b5(Math.floor(e.x/16)+Math.floor(e.z/16),this.workers.length);if(t){let o=`${Math.floor(e.x/16)*16},${Math.floor(e.y/i)*i},${Math.floor(e.z/16)*16}`;if(!(this.sectionsWaiting.get(o)&&!this.finishedSections[o]))return 0}return b5(Math.floor(e.x/16)+Math.floor(e.y/i)+Math.floor(e.z/16),this.workers.length)}async debugGetWorkerCustomBlockModel(e){let t=[];for(let r of this.workers)t.push(new Promise(i=>{r.addEventListener("message",s=>{s.data.type==="customBlockModel"&&i(s.data.customBlockModel)})})),r.postMessage({type:"getCustomBlockModel",pos:e});return Promise.all(t)}setSectionDirty(e,t=!0,r=!1){if(!this.forceCallFromMesherReplayer&&this.mesherLogReader)return;if(this.viewDistance===-1)throw new Error("viewDistance not set");let i=this.getDistance(e);if(!this.workers.length||i[0]>this.viewDistance||i[1]>this.viewDistance)return;if(!t){this._dispatchDirtyImmediate(e,t,r);return}let s=16,o=this.getSectionHeight(),v=`${Math.floor(e.x/s)*s},${Math.floor(e.y/o)*o},${Math.floor(e.z/s)*s}`,a=(this.sectionDirtyCount.get(v)??0)+1;this.sectionDirtyCount.set(v,a),a<=xe.GEOMETRY_THROTTLE_THRESHOLD?(this._dispatchDirtyImmediate(e,t,r),this.sectionDirtyTimers.has(v)||this.sectionDirtyTimers.set(v,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(v);this.sectionDirtyCount.delete(v),this.sectionDirtyTimers.delete(v),this.sectionDirtyPendingArgs.delete(v),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},xe.GEOMETRY_THROTTLE_DELAY))):(this.sectionDirtyPendingArgs.set(v,{pos:e,value:t,useChangeWorker:r}),this.sectionDirtyTimers.has(v)||this.sectionDirtyTimers.set(v,setTimeout(()=>{let l=this.sectionDirtyPendingArgs.get(v);this.sectionDirtyCount.delete(v),this.sectionDirtyTimers.delete(v),this.sectionDirtyPendingArgs.delete(v),l&&this._dispatchDirtyImmediate(l.pos,l.value,l.useChangeWorker)},xe.GEOMETRY_THROTTLE_DELAY)))}_dispatchDirtyImmediate(e,t,r){var a;this.reactiveState.world.mesherWork=!0;let i=16,s=this.getSectionHeight(),o=`${Math.floor(e.x/i)*i},${Math.floor(e.y/s)*s},${Math.floor(e.z/i)*i}`;this.renderUpdateEmitter.emit("dirty",e,t);let v=this.getWorkerNumber(e,r&&(this.mesherLogger.active||this.worldRendererConfig.dedicatedChangeWorker));this.sectionsWaiting.set(o,(this.sectionsWaiting.get(o)??0)+1),this.forceCallFromMesherReplayer?this.workers[v].postMessage({type:"dirty",x:e.x,y:e.y,z:e.z,value:t,config:this.getMesherConfig()}):((a=this.toWorkerMessagesQueue)[v]??(a[v]=[]),this.toWorkerMessagesQueue[v].push({type:"dirty",x:e.x,y:e.y,z:e.z,value:t,config:this.getMesherConfig()}),this.dispatchMessages())}dispatchMessages(){this.queueAwaited||(this.queueAwaited=!0,setTimeout(()=>{for(let e in this.toWorkerMessagesQueue){let t=this.workers[Number(e)],r=this.toWorkerMessagesQueue[e];t.postMessage(r);for(let i of r)this.logWorkerWork(`-> ${e} dispatchMessages ${i.type} ${JSON.stringify({x:i.x,y:i.y,z:i.z,value:i.value})}`)}this.toWorkerMessagesQueue={},this.queueAwaited=!1}))}async waitForChunksToRender(){return new Promise((e,t)=>{if([...this.sectionsWaiting].length===0){e();return}let r=()=>{this.sectionsWaiting.size===0&&(this.renderUpdateEmitter.removeListener("update",r),e())};this.renderUpdateEmitter.on("update",r)})}async waitForChunkToLoad(e){return new Promise((t,r)=>{let s=`${Math.floor(e.x/16)*16},${Math.floor(e.z/16)*16}`;if(this.loadedChunks[s]){t();return}let o=()=>{this.loadedChunks[s]&&(this.renderUpdateEmitter.removeListener("update",o),t())};this.renderUpdateEmitter.on("update",o)})}destroy(){for(let e of this.heightmapDebounceTimers.values())clearTimeout(e);this.heightmapDebounceTimers.clear();for(let e of this.sectionDirtyTimers.values())clearTimeout(e);this.sectionDirtyTimers.clear(),this.sectionDirtyCount.clear(),this.sectionDirtyPendingArgs.clear();for(let e of this.workers)e.terminate();this.workers=[],this.soundSystem&&(this.soundSystem.destroy(),this.soundSystem=void 0),this.active=!1,this.loadedChunks={},this.finishedChunks={},this.finishedSections={},this.sectionsWaiting.clear(),this.queuedChunks.clear(),this.blockStateModelInfo.clear(),this.renderUpdateEmitter.removeAllListeners(),this.abortController.abort(),ds()}};d(xe,"PHASE_PERF_LOG_INTERVAL",64),d(xe,"GEOMETRY_THROTTLE_THRESHOLD",1),d(xe,"GEOMETRY_THROTTLE_DELAY",100);var c1=xe,j6=(n,e="mesher.js")=>{let t;if(F.env.SINGLE_FILE_BUILD){let r=document.getElementById("mesher-worker-code").textContent,i=new Blob([r],{type:"text/javascript"});t=new Worker(window.URL.createObjectURL(i))}else t=new Worker(e);return t.onmessage=({data:r})=>{n(r)},t.on&&t.on("message",r=>{t.onmessage({data:r})}),t},us=!1,fs=(n,e,t=nt,r)=>{let i={version:JSON.parse(JSON.stringify(r.version))};for(let[s,o]of Object.entries(t))i[s]=r[o];"tints"in t&&!i.tints&&!us&&(us=!0);for(let s of n)s.postMessage({type:"mcData",mcData:i})},Lr=(n,e,t=nt,r,i=1e4)=>Promise.all(n.map(s=>new Promise((o,v)=>{let a=setTimeout(()=>{s.removeEventListener("message",l),v(new Error(`mcData transfer timeout (${i}ms)`))},i),l=({data:c})=>{c?.type==="mcDataApplied"&&(clearTimeout(a),s.removeEventListener("message",l),o())};s.addEventListener("message",l),fs([s],e,t,r)}))).then(()=>{});E();x();k();R();import{Vec3 as Y6}from"vec3";import*as ie from"three";E();x();k();R();function d1(n,e){let t=e/180*Math.PI,r=Math.cos(t),i=Math.sin(t),s={x:0,y:1,z:2}[n],o=(s+1)%3,v=(s+2)%3,a=[[0,0,0],[0,0,0],[0,0,0]];return a[s][s]=1,a[o][o]=r,a[o][v]=-i,a[v][o]=+i,a[v][v]=r,a}function Ur(n,e){return e?[n[0]+e[0],n[1]+e[1],n[2]+e[2]]:n}function Gr(n,e){return e?[n[0]-e[0],n[1]-e[1],n[2]-e[2]]:n}function Bt(n,e){return n?[n[0][0]*e[0]+n[0][1]*e[1]+n[0][2]*e[2],n[1][0]*e[0]+n[1][1]*e[1]+n[1][2]*e[2],n[2][0]*e[0]+n[2][1]*e[1]+n[2][2]*e[2]]:e}function hs(n,e){let t=[[0,0,0],[0,0,0],[0,0,0]],r=n[0][0],i=n[1][0],s=n[2][0],o=n[0][1],v=n[1][1],a=n[2][1],l=n[0][2],c=n[1][2],u=n[2][2],f=e[0][0],m=e[1][0],g=e[2][0],y=e[0][1],w=e[1][1],b=e[2][1],A=e[0][2],C=e[1][2],M=e[2][2];return t[0][0]=r*f+i*y+s*A,t[1][0]=r*m+i*w+s*C,t[2][0]=r*g+i*b+s*M,t[0][1]=o*f+v*y+a*A,t[1][1]=o*m+v*w+a*C,t[2][1]=o*g+v*b+a*M,t[0][2]=l*f+c*y+u*A,t[1][2]=l*m+c*w+u*C,t[2][2]=l*g+c*b+u*M,t}var Nr={up:{dir:[0,1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[0,1,1,0,1],[1,1,1,1,1],[0,1,0,0,0],[1,1,0,1,0]]},down:{dir:[0,-1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[1,0,1,0,1],[0,0,1,1,1],[1,0,0,0,0],[0,0,0,1,0]]},east:{dir:[1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],mask1:[1,0,1],mask2:[0,1,1],corners:[[1,0,0,1,1],[0,0,0,0,1],[1,1,0,1,0],[0,1,0,0,0]]},south:{dir:[0,0,1],mask1:[1,0,1],mask2:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function Q6(n,e,t,r,i,s,o,v){let a=new Y6(0,0,0);for(let l in n.faces){let c=n.faces[l],{corners:u,mask1:f,mask2:m}=Nr[l],g=Bt(r,Nr[l].dir);if(c.cullface&&v[l])continue;let y=n.from[0],w=n.from[1],b=n.from[2],A=n.to[0],C=n.to[1],M=n.to[2],S=c.texture,{u:H}=S,{v:B}=S,{su:I}=S,{sv:G}=S,O=Math.floor(t.positions.length/3),j=[1,1,1];c.tintindex!==void 0&&c.tintindex===0&&(j=[.5686274509803921,.7411764705882353,.34901960784313724]);let J=c.rotation||0,X=Math.cos(J*Math.PI/180),t0=-Math.sin(J*Math.PI/180),d0=null,l0=null;n.rotation&&(d0=d1(n.rotation.axis,n.rotation.angle),l0=Gr(n.rotation.origin,Bt(d0,n.rotation.origin)));let m0=[],p0=1;for(let E0 of u){let n0=[E0[0]?A:y,E0[1]?C:w,E0[2]?M:b];n0=Ur(Bt(d0,n0),l0),n0=Ur(Bt(r,n0),i),n0=n0.map(G0=>G0/16),t.positions.push(n0[0],n0[1],n0[2]),t.normals.push(...g);let Y=(E0[3]-.5)*X-(E0[4]-.5)*t0+.5,o0=(E0[3]-.5)*t0+(E0[4]-.5)*X+.5;t.uvs.push(Y*I+H,o0*G+B);let g0=1;e&&(g0=4/4*(15/15),m0.push(3)),t.colors.push(p0*j[0]*g0,p0*j[1]*g0,p0*j[2]*g0)}e&&m0[0]+m0[3]>=m0[1]+m0[2]?t.indices.push(O,O+3,O+2,O,O+1,O+3):t.indices.push(O,O+1,O+2,O+2,O+1,O+3)}}var K6=(n,e,t,r,i=[],s={})=>{let l={sx:.5,sy:.5,sz:.5,positions:[],normals:[],colors:[],uvs:[],t_positions:[],t_normals:[],t_colors:[],t_uvs:[],indices:[],tiles:{}};for(let[u,f]of n.entries()){let m=f[i[u]]??f[0];if(!m)continue;let g=null,y=null;for(let b of["x","y","z"])b in m&&(g?g=hs(g,d1(b,-(m[b]??0))):g=d1(b,-(m[b]??0)));g&&(y=[8,8,8],y=Gr(y,Bt(g,y)));let w=m.ao??!0;for(let b of m.elements??[])Q6(b,w,l,g,y,e,t,s)}let c=l.positions.length/3;for(let u=0;u<l.t_positions.length/12;u++)l.indices.push(c,c+1,c+2,c+2,c+1,c+3,c,c+2,c+1,c+2,c+3,c+1),c+=4;return l.positions.push(...l.t_positions),l.normals.push(...l.t_normals),l.colors.push(...l.t_colors),l.uvs.push(...l.t_uvs),delete l.t_positions,delete l.t_normals,delete l.t_colors,delete l.t_uvs,l.positions=new Float32Array(l.positions),l.normals=new Float32Array(l.normals),l.colors=new Float32Array(l.colors),l.uvs=new Float32Array(l.uvs),l},J6=(...n)=>{let t={geometry:K6(...n)},r=new ie.BufferGeometry;return r.setAttribute("position",new ie.BufferAttribute(t.geometry.positions,3)),r.setAttribute("normal",new ie.BufferAttribute(t.geometry.normals,3)),r.setAttribute("color",new ie.BufferAttribute(t.geometry.colors,3)),r.setAttribute("uv",new ie.BufferAttribute(t.geometry.uvs,2)),r.setIndex(t.geometry.indices),r.name="block-geometry",r},Wr=(n,...e)=>{let t=J6(...e),r=new ie.Mesh(t,n);r.position.set(-.5,-.5,-.5);let i=new ie.Group;return i.add(r),i.rotation.set(0,-ie.MathUtils.degToRad(90),0,"ZYX"),globalThis.mesh=i,i},ms=(n,e)=>{n.position.set(e.x+.5,e.y+.5,e.z+.5)};E();x();k();R();import*as D0 from"three";var y5=async(n,e)=>{let t;if(!n&&!e){let{canvas:l}=await Ae(re);t=new D0.CanvasTexture(l)}else{if(n||(n=await Ie(e,"skin")),!n)return;let{canvas:l}=await Ae(n);t=new D0.CanvasTexture(l)}t.magFilter=D0.NearestFilter,t.minFilter=D0.NearestFilter;let r=!1,s=q6(40,16,r?-2:-3,-2,-2,r?3:4,12,4,64,64),o=new D0.MeshStandardMaterial;o.map=t,o.needsUpdate=!0;let v=new D0.Mesh(s,o),a=new D0.Group;return a.add(v),a};function q6(n,e,t,r,i,s,o,v,a,l,c=!1){let u=t/16,f=r/16,m=i/16,g=(t+s)/16,y=(r+o)/16,w=(i+v)/16;c&&([u,g]=[g,u]);let b=[[u,f,m],[g,f,m],[g,y,m],[u,y,m],[u,f,w],[g,f,w],[g,y,w],[u,y,w]],A=n,C=n+v,M=n+v+s,S=n+v+s+s,H=n+v+s+v,B=n+v+s+v+s,I=e,G=e+v,O=e+v+o,j=[{vi:[5,4,0,1],uv:[C,I,M,G],n:[0,-1,0]},{vi:[2,3,7,6],uv:[M,G,S,I],n:[0,1,0]},{vi:[0,4,7,3],uv:[A,G,C,O],n:[-1,0,0]},{vi:[1,0,3,2],uv:[C,G,M,O],n:[0,0,-1]},{vi:[5,1,2,6],uv:[M,G,H,O],n:[1,0,0]},{vi:[4,5,6,7],uv:[H,G,B,O],n:[0,0,1]}],J=[],X=[],t0=[],d0=[];for(let m0=0;m0<j.length;m0++){let p0=j[m0],E0=m0*4,[n0,Y,o0,g0]=p0.uv,G0=[[o0/a,1-Y/l],[n0/a,1-Y/l],[n0/a,1-g0/l],[o0/a,1-g0/l]],O0=c?[3,2,1,0]:[0,1,2,3],Z0=c?-p0.n[0]:p0.n[0];for(let u0=0;u0<4;u0++){let ue=b[p0.vi[O0[u0]]];J.push(ue[0],ue[1],ue[2]),X.push(G0[u0][0],G0[u0][1]),t0.push(Z0,p0.n[1],p0.n[2])}d0.push(E0,E0+1,E0+2,E0,E0+2,E0+3)}let l0=new D0.BufferGeometry;return l0.setAttribute("position",new D0.Float32BufferAttribute(J,3)),l0.setAttribute("uv",new D0.Float32BufferAttribute(X,2)),l0.setAttribute("normal",new D0.Float32BufferAttribute(t0,3)),l0.setIndex(d0),l0}E();x();k();R();E();x();k();R();import*as C0 from"three";E();x();k();R();E();x();k();R();var He=class n{constructor(e,t,r,i,s="div"){this.parent=e,this.object=t,this.property=r,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(i),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.nextNameID}`,this.$widget=document.createElement(s),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",o=>o.stopPropagation()),this.domElement.addEventListener("keyup",o=>o.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(r)}name(e){return this._name=e,this.$name.innerHTML=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.object[this.property]=e,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Vr=class extends He{constructor(e,t,r){super(e,t,r,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function jr(n){let e,t;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),t?"#"+t:!1}var Z6={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:jr,toHexString:jr},w5={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},X6={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,t=1){let r=w5.fromHexString(n);e[0]=(r>>16&255)/255*t,e[1]=(r>>8&255)/255*t,e[2]=(r&255)/255*t},toHexString([n,e,t],r=1){r=255/r;let i=n*r<<16^e*r<<8^t*r<<0;return w5.toHexString(i)}},$6={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,t=1){let r=w5.fromHexString(n);e.r=(r>>16&255)/255*t,e.g=(r>>8&255)/255*t,e.b=(r&255)/255*t},toHexString({r:n,g:e,b:t},r=1){r=255/r;let i=n*r<<16^e*r<<8^t*r<<0;return w5.toHexString(i)}},e7=[Z6,w5,X6,$6];function t7(n){return e7.find(e=>e.match(n))}var Yr=class extends He{constructor(e,t,r,i){super(e,t,r,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=t7(this.initialValue),this._rgbScale=i,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let s=jr(this.$text.value);s&&this._setValueFromHexString(s)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},_5=class extends He{constructor(e,t,r){super(e,t,r,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",i=>{i.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},Qr=class extends He{constructor(e,t,r,i,s,o){super(e,t,r,"number"),this._initInput(),this.min(i),this.max(s);let v=o!==void 0;this.step(v?o:this._getImplicitStep(),v),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=t*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let t=()=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._stepExplicit&&(A=this._snap(A)),this.setValue(this._clamp(A)))},r=A=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+A),this.$input.value=this.getValue())},i=A=>{A.key==="Enter"&&this.$input.blur(),A.code==="ArrowUp"&&(A.preventDefault(),r(this._step*this._arrowKeyMultiplier(A))),A.code==="ArrowDown"&&(A.preventDefault(),r(this._step*this._arrowKeyMultiplier(A)*-1))},s=A=>{this._inputFocused&&(A.preventDefault(),r(this._step*this._normalizeMouseWheel(A)))},o=!1,v,a,l,c,u,f=5,m=A=>{v=A.clientX,a=l=A.clientY,o=!0,c=this.getValue(),u=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",y)},g=A=>{if(o){let C=A.clientX-v,M=A.clientY-a;Math.abs(M)>f?(A.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>f&&y()}if(!o){let C=A.clientY-l;u-=C*this._step*this._arrowKeyMultiplier(A),c+u>this._max?u=this._max-c:c+u<this._min&&(u=this._min-c),this._snapClampSetValue(c+u)}l=A.clientY},y=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)},w=()=>{this._inputFocused=!0},b=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",t),this.$input.addEventListener("keydown",i),this.$input.addEventListener("wheel",s,{passive:!1}),this.$input.addEventListener("mousedown",m),this.$input.addEventListener("focus",w),this.$input.addEventListener("blur",b)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=(b,A,C,M,S)=>(b-A)/(C-A)*(S-M)+M,t=b=>{let A=this.$slider.getBoundingClientRect(),C=e(b,A.left,A.right,this._min,this._max);this._snapClampSetValue(C)},r=b=>{this._setDraggingStyle(!0),t(b.clientX),window.addEventListener("mousemove",i),window.addEventListener("mouseup",s)},i=b=>{t(b.clientX)},s=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",s)},o=!1,v,a,l=b=>{b.preventDefault(),this._setDraggingStyle(!0),t(b.touches[0].clientX),o=!1},c=b=>{b.touches.length>1||(this._hasScrollBar?(v=b.touches[0].clientX,a=b.touches[0].clientY,o=!0):l(b),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",f))},u=b=>{if(o){let A=b.touches[0].clientX-v,C=b.touches[0].clientY-a;Math.abs(A)>Math.abs(C)?l(b):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",f))}else b.preventDefault(),t(b.touches[0].clientX)},f=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",f)},m=this._callOnFinishChange.bind(this),g=400,y,w=b=>{if(Math.abs(b.deltaX)<Math.abs(b.deltaY)&&this._hasScrollBar)return;b.preventDefault();let C=this._normalizeMouseWheel(b)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(y),y=setTimeout(m,g)};this.$slider.addEventListener("mousedown",r),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",w,{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:r}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,r=-e.wheelDelta/120,r*=this._stepExplicit?1:10),t+-r}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){let t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},Kr=class extends He{constructor(e,t,r,i){super(e,t,r,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(i)?i:Object.values(i),this._names=Array.isArray(i)?i:Object.keys(i),this._names.forEach(s=>{let o=document.createElement("option");o.innerHTML=s,this.$select.appendChild(o)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){let e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.innerHTML=t===-1?e:this._names[t],this}},Jr=class extends He{constructor(e,t,r){super(e,t,r,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",i=>{i.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},r7=`.lil-gui {
289
289
  font-family: var(--font-family);
290
290
  font-size: var(--font-size);
291
291
  line-height: 1;
@@ -716,11 +716,11 @@ void main() {
716
716
  @font-face {
717
717
  font-family: "lil-gui";
718
718
  src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");
719
- }`;function $7(n){let e=document.createElement("style");e.innerHTML=n;let t=document.querySelector("head link[rel=stylesheet], head style");t?document.head.insertBefore(e,t):document.head.appendChild(e)}var $s=!1,yi=class n{constructor({parent:e,autoPlace:t=e===void 0,container:r,width:i,title:s="Controls",closeFolders:o=!1,injectStyles:a=!0,touchStyles:v=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",l=>{(l.code==="Enter"||l.code==="Space")&&(l.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),v&&this.domElement.classList.add("allow-touch-styles"),!$s&&a&&($7(X7),$s=!0),r?r.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),i&&this.domElement.style.setProperty("--width",i+"px"),this._closeFolders=o}add(e,t,r,i,s){if(Object(r)===r)return new gi(this,e,t,r);switch(typeof e[t]){case"number":return new pi(this,e,t,r,i,s);case"boolean":return new fi(this,e,t);case"string":return new bi(this,e,t);case"function":return new C5(this,e,t)}}addColor(e,t,r=1){return new mi(this,e,t,r)}addFolder(e){let t=new n({parent:this,title:e});return this.root._closeFolders&&t.close(),t}load(e,t=!0){return e.controllers&&this.controllers.forEach(r=>{r instanceof C5||r._name in e.controllers&&r.load(e.controllers[r._name])}),t&&e.folders&&this.folders.forEach(r=>{r._title in e.folders&&r.load(e.folders[r._title])}),this}save(e=!0){let t={controllers:{},folders:{}};return this.controllers.forEach(r=>{if(!(r instanceof C5)){if(r._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${r._name}"`);t.controllers[r._name]=r.save()}}),e&&this.folders.forEach(r=>{if(r._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${r._title}"`);t.folders[r._title]=r.save()}),t}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");let r=s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",r))};this.$children.addEventListener("transitionend",r);let i=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=i+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(r=>r.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}},_i=yi;var Te=class{constructor(e,t,r,i){u(this,"gui",null);u(this,"storageKey","");u(this,"target");u(this,"params",[]);u(this,"paramsMeta",{});u(this,"_visible",!1);u(this,"initialValues",{});u(this,"initialized",!1);if(!k0){this.gui=new _i,this.storageKey=`debug_params_${e}`,this.target=t,this.paramsMeta=i??{},this.params=r??Object.keys(t);for(let s of this.params)this.initialValues[s]=t[s];this.gui.domElement.style.display="none"}}activate(){return k0?this:(!this.initialized&&this.gui&&(this.loadSavedValues(),this.setupControls(),this.initialized=!0),this.show(),this)}get visible(){return k0?!1:this._visible}set visible(e){k0||!this.gui||(this._visible=e,this.gui.domElement.style.display=e?"block":"none",this.saveVisibility())}loadSavedValues(){if(!k0)try{let e=localStorage.getItem(this.storageKey);if(e){let t=JSON.parse(e);for(let r of this.params)if(r in t){let i=t[r];i!==null&&(this.target[r]=i)}}}catch{}}saveValues(e=!1){if(!k0)try{let t={};for(let r of this.params)t[r]=this.target[r];e?localStorage.removeItem(this.storageKey):localStorage.setItem(this.storageKey,JSON.stringify(t))}catch{}}saveVisibility(){if(!k0)try{localStorage.setItem(`${this.storageKey}_visible`,this._visible.toString())}catch{}}setupControls(){if(!(k0||!this.gui)){this.gui.add(this,"visible").name("Show Controls"),this.gui.add({resetAll:()=>{if(this.gui){for(let e of this.params)this.target[e]=this.initialValues[e];this.saveValues(!0),this.gui.destroy(),this.gui=new _i,this.setupControls()}}},"resetAll").name("Reset All Parameters");for(let e of this.params){let t=this.target[e],r=this.paramsMeta[e]??{};if(typeof t=="number"){let i=r.min??t-Math.abs(t*2),s=r.max??t+Math.abs(t*2),o=r.step??Math.abs(t)/100;this.gui.add(this.target,e,i,s,o).onChange(()=>this.saveValues())}else if(typeof t=="boolean")this.gui.add(this.target,e).onChange(()=>this.saveValues());else if(typeof t=="string"&&["x","y","z"].includes(e)){let i=r.min??-10,s=r.max??10,o=r.step??.1;this.gui.add(this.target,e,i,s,o).onChange(()=>this.saveValues())}else Array.isArray(t)&&this.gui.add(this.target,e,t).onChange(()=>this.saveValues())}}}save(){k0||(this.saveValues(),this.saveVisibility())}destroy(){k0||!this.gui||(this.saveVisibility(),this.gui.destroy())}toggle(){this.visible=!this.visible}show(){this.visible=!0}hide(){this.visible=!1}};E();x();k();R();E();x();k();R();var S1=class{constructor(){u(this,"currentAnimation",null);u(this,"isAnimating",!1);u(this,"cancelRequested",!1);u(this,"completionCallbacks",[]);u(this,"currentCancelCallback",null)}async startAnimation(e,t){return this.isAnimating&&await this.cancelCurrentAnimation(),new Promise(r=>{this.isAnimating=!0,this.cancelRequested=!1,this.currentCancelCallback=t??null,this.currentAnimation=e(),this.completionCallbacks.push(()=>{this.isAnimating=!1,this.currentAnimation=null,r()})})}async cancelCurrentAnimation(){if(this.isAnimating){if(this.currentCancelCallback){let e=this.currentCancelCallback;this.currentCancelCallback=null,e()}return new Promise(e=>{this.cancelRequested=!0,this.completionCallbacks.push(()=>{e()})})}}animationCycleFinish(){this.cancelRequested&&this.forceFinish()}forceFinish(e=!0){if(!this.isAnimating)return;if(this.currentAnimation){for(let r of this.currentAnimation.getAll())r.stop();this.currentAnimation.removeAll(),this.currentAnimation=null}this.isAnimating=!1,this.cancelRequested=!1;let t=[...this.completionCallbacks];if(this.completionCallbacks=[],e)for(let r of t)r()}update(){this.currentAnimation&&this.currentAnimation.update()}get isActive(){return this.isAnimating}get shouldCancel(){return this.cancelRequested}};var e8={x:3e3,y:3e3,z:3e3,rotation:Math.PI,scale:1,default:3e3},lt=class{constructor(e,t,r){this.getState=e;this.setState=t;u(this,"animationController",new S1);u(this,"defaultState");u(this,"speeds");u(this,"currentStateName","");u(this,"transitioningToStateName","");this.speeds={...e8},r&&Object.assign(this.speeds,r),this.defaultState=this.getState()}calculateDuration(e){let t=0,r=this.getState();for(let[i,s]of Object.entries(e)){let o=r[i],a=Math.abs(s-o),v=this.getPropertySpeed(i),l=a/v*1e3;t=Math.max(t,l)}return Math.min(Math.max(t,200),2e3)}getPropertySpeed(e){return e in this.speeds?this.speeds[e]:e.toLowerCase().includes("rotation")?this.speeds.rotation:e.toLowerCase().includes("scale")?this.speeds.scale:e.toLowerCase()==="x"||e.toLowerCase()==="y"||e.toLowerCase()==="z"?this.speeds[e]:this.speeds.default}startTransition(e,t,r,i=H0.Linear.None,s){this.isTransitioning&&this.animationController.forceFinish(!1),this.transitioningToStateName=t??"";let o=this.getState(),a=this.calculateDuration(e);this.animationController.startAnimation(()=>{let v=new St;return new F0(o,v).to(e,a).easing(i).onUpdate(l=>{for(let c of Object.keys(l))this.setState(c,l[c])}).onComplete(()=>{this.animationController.forceFinish(),this.currentStateName=this.transitioningToStateName,this.transitioningToStateName="",r?.()}).start(),v},s)}reset(){this.startTransition(this.defaultState)}update(){this.animationController.update()}forceFinish(){this.animationController.forceFinish()}transitionTo(e,t,r,i){this.startTransition(e,t,r,H0.Linear.None,i)}getCurrentValue(e){return this.getState()[e]}get isTransitioning(){return this.animationController.isActive}};E();x();k();R();import{subscribeKey as t8}from"valtio/utils";function C1(n,e,t,r,i){let s=0,o,a=async()=>{let v=++s,l=await n(e[t]);v===s?(o&&i?.(o),r(l),o=l):i?.(l)};return a(),t8(e,t,a)}E();x();k();R();var eo=Math.PI/180;function B1(n){let{walkDist:e,prevWalkDist:t,bob:r,prevBob:i,partialTick:s}=n,o=e-t,a=-(e+o*s),v=i+(r-i)*s,l=Math.sin(a*Math.PI),c=Math.cos(a*Math.PI);return{position:{x:l*v*.5,y:-Math.abs(c*v)},rotation:{x:Math.abs(Math.cos(a*Math.PI-.2)*v)*5*eo,z:l*v*3*eo}}}E();x();k();R();var P1=n=>({"minecraft:display_context":"firstperson","minecraft:use_duration":n.playerStateReactive.itemUsageTicks,"minecraft:using_item":!!n.playerStateReactive.itemUsageTicks}),r8=()=>({"minecraft:display_context":"firstperson"}),zt=(n,e)=>{if(!e)return"empty";if(e.type==="hand")return"hand";let t=e.name??(e.id!==void 0?`#${e.id}`:"unknown");if(!n.resourcesManager.currentResources)return`${e.type}:${t}`;let r=n.getItemRenderData({...e.fullItem,itemId:e.id},r8());return`${e.type}:${t}:${r.modelName}`};var Y0=new C0.Matrix4,to=n=>(n=(n+Math.PI)%(Math.PI*2),n<0&&(n+=Math.PI*2),n-Math.PI);function i8(n,e){let t=new C0.Matrix4,r=1,i=Math.sqrt(n),s=-.3*Math.sin(i*Math.PI),o=.4*Math.sin(i*2*Math.PI),a=-.4*Math.sin(n*Math.PI);return t.multiply(Y0.makeTranslation(r*(s+.64),o-.6+e*-.6,a-.72)),t.multiply(Y0.makeRotationY(r*45*Math.PI/180)),t.multiply(Y0.makeRotationY(r*Math.sin(i*Math.PI)*70*Math.PI/180)),t.multiply(Y0.makeRotationZ(r*Math.sin(n*n*Math.PI)*-20*Math.PI/180)),t.multiply(Y0.makeTranslation(r*-1,3.6,3.5)),t.multiply(Y0.makeRotationZ(r*120*Math.PI/180)),t.multiply(Y0.makeRotationX(200*Math.PI/180)),t.multiply(Y0.makeRotationY(r*-135*Math.PI/180)),t.multiply(Y0.makeTranslation(r*5.6,0,0)),t.multiply(Y0.makeTranslation(r*-5/16,2/16,0)),t}function n8(n,e){let t=new C0.Matrix4,r=1,i=Math.sqrt(n),s=-.4*Math.sin(i*Math.PI),o=.2*Math.sin(i*2*Math.PI),a=-.2*Math.sin(n*Math.PI);t.multiply(Y0.makeTranslation(r*s,o,a)),t.multiply(Y0.makeTranslation(r*.56,-.52+e*-.6,-.72));let v=Math.sin(n*n*Math.PI),l=Math.sin(i*Math.PI);return t.multiply(Y0.makeRotationY(r*(45+v*-20)*Math.PI/180)),t.multiply(Y0.makeRotationZ(r*l*-20*Math.PI/180)),t.multiply(Y0.makeRotationX(l*-80*Math.PI/180)),t.multiply(Y0.makeRotationY(r*-45*Math.PI/180)),t}var P5=class{constructor(e,t=!1){this.worldRenderer=e;this.offHand=t;u(this,"holdingBlock");u(this,"blockSwapAnimation");u(this,"cameraGroup",new C0.Mesh);u(this,"armTransformGroup",new C0.Group);u(this,"camera",new C0.PerspectiveCamera(70,1,.05,100));u(this,"equipProgress",0);u(this,"stopUpdate",!1);u(this,"lastHeldItem");u(this,"lastHeldItemRenderKey");u(this,"currentDisplayType","hand");u(this,"isSwinging",!1);u(this,"nextIterStopCallbacks");u(this,"idleAnimator");u(this,"ready",!1);u(this,"lastUpdate",0);u(this,"xBob",0);u(this,"yBob",0);u(this,"lastBobUpdateTime",0);u(this,"lastBobWalkDist",0);u(this,"lastBobTickTime",0);u(this,"playerHand");u(this,"offHandDisplay",!1);u(this,"offHandModeLegacy",!1);u(this,"swingAnimator");u(this,"config");u(this,"disposed",!1);u(this,"unsubs",[]);u(this,"lastItemModelName");u(this,"switchRequest",0);this.initCameraGroup(),this.swingAnimator=new wi,this.unsubs.push(this.worldRenderer.onReactivePlayerStateUpdated("heldItemMain",()=>{this.offHand||this.updateItem()},!1),this.worldRenderer.onReactivePlayerStateUpdated("heldItemOff",()=>{this.offHand&&this.updateItem()},!1)),this.config=e.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||I5().then(r=>{this.disposed||(this.playerHand=r,this.updateItem())}).then(()=>{if(this.disposed)return;let r=C1(async()=>I5(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",i=>{i&&(this.playerHand=i,this.updateItem())},i=>{R0(i,!0)});this.unsubs.push(r)})}dispose(){this.disposed=!0,this.unsubs.forEach(e=>e()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,R0(this.cameraGroup,!0),this.holdingBlock&&this.holdingBlock!==this.playerHand&&R0(this.holdingBlock,!0),this.holdingBlock=void 0,this.playerHand&&(R0(this.playerHand,!0),this.playerHand=void 0),this.ready=!1}updateItem(){if(!this.ready)return;let e=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;e?this.setNewItem(e):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new C0.Mesh,this.armTransformGroup=new C0.Group,this.armTransformGroup.matrixAutoUpdate=!1,this.cameraGroup.add(this.armTransformGroup)}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(e,t,r,i){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),(this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage)&&this.swingAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new C0.Scene;o.add(this.cameraGroup);let a=t.getSize(new C0.Vector2),v=a.height>a.width;v?this.camera.aspect!==1&&(this.camera.aspect=1,this.camera.updateProjectionMatrix()):this.camera.aspect!==e.aspect&&(this.camera.aspect=e.aspect,this.camera.updateProjectionMatrix()),this.updateCameraGroup(),o.add(r.clone()),o.add(i.clone());let{offHandDisplay:l}=this;if(l&&(this.cameraGroup.scale.x=-1),t.autoClear=!1,t.clearDepth(),v){let c=Math.min(a.width,a.height);l?t.setViewport(0,0,c,c):t.setViewport(a.width-c,0,c,c)}t.render(o,this.camera),v&&t.setViewport(0,0,a.width,a.height),l&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(e){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new lt(()=>({progress:this.equipProgress}),(i,s)=>{i==="progress"&&(this.equipProgress=s)},{progress:4})});let t=e==="disappeared"?1:0,r=!1;return new Promise(i=>{this.blockSwapAnimation.switcher.transitionTo({progress:t},e,()=>{r||i(!0)},()=>{r=!0,i(!1)})})}isDifferentItem(e){return this.lastHeldItemRenderKey!==zt(this.worldRenderer,e)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:e}=this,t=performance.now(),r=this.worldRenderer.cameraShake.getBaseRotation(),i=r.pitch,s=r.yaw;if(this.lastBobUpdateTime===0)this.xBob=i,this.yBob=s;else{let f=Math.min((t-this.lastBobUpdateTime)/1e3,.1),m=1-Math.pow(.5,f*28),g=1-Math.pow(.5,f*36);this.xBob+=(i-this.xBob)*m,this.yBob+=to(s-this.yBob)*g}this.lastBobUpdateTime=t;let o=(i-this.xBob)*-.05,a=to(s-this.yBob)*-.035;if(this.cameraGroup.position.copy(e.position),this.cameraGroup.rotation.copy(e.rotation),this.worldRenderer.displayOptions.inWorldRenderingConfig.viewBobbing){let f=this.worldRenderer.playerStateReactive;f.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=t,this.lastBobWalkDist=f.walkDist);let m=Math.min((t-this.lastBobTickTime)/50,1),g=1.8,b=B1({walkDist:f.walkDist*g,prevWalkDist:f.prevWalkDist*g,bob:f.bob,prevBob:f.prevBob,partialTick:m});this.cameraGroup.position.x+=b.position.x,this.cameraGroup.position.y+=b.position.y,this.cameraGroup.rotation.z+=b.rotation.z,this.cameraGroup.rotation.x+=b.rotation.x}this.cameraGroup.rotation.x+=o,this.cameraGroup.rotation.y+=a;let l=this.currentDisplayType,c=this.swingAnimator?.getSwingProgress()??0,d;l==="hand"?d=i8(c,this.equipProgress):d=n8(c,this.equipProgress),this.armTransformGroup.matrix.copy(d),this.armTransformGroup.matrixWorldNeedsUpdate=!0}async createItemModel(e){if(this.lastUpdate=performance.now(),!e||e.type==="hand"&&!this.playerHand)return;let t;if(e.type==="item"||e.type==="block"){let r=this.worldRenderer.entities.getItemMesh({...e.fullItem,itemId:e.id},P1(this.worldRenderer),!1,this.lastItemModelName);if(r){let{mesh:i,isBlock:s,modelName:o}=r;s?(t=i,e.type="block"):(t=i,e.type="item"),this.lastItemModelName=o}}else t=this.playerHand;if(t){if(e.type==="item"||e.type==="block"){let r=new C0.Group;r.name="displayTransform",e.type==="item"?(r.position.set(1.13/16,3.2/16,1.13/16),r.rotation.set(0,C0.MathUtils.degToRad(-90),C0.MathUtils.degToRad(25),"XYZ"),r.scale.set(.68,.68,.68)):(r.rotation.set(0,C0.MathUtils.degToRad(45),0,"XYZ"),r.scale.set(.4,.4,.4)),r.add(t),t=r}return t.name="holdingBlock",{model:t,type:e.type}}}async replaceItemModel(e){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!e){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.currentDisplayType="hand";let r=this.swingAnimator;r?.stopSwing(),r&&(r.type="hand"),this.idleAnimator=void 0;return}let t=await this.createItemModel(e);t&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=t.model,this.currentDisplayType=t.type,this.armTransformGroup.add(t.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(e){let t=zt(this.worldRenderer,e),r=this.lastHeldItemRenderKey!==t;if(this.lastHeldItem=e,!r)return;this.lastHeldItemRenderKey=t,this.lastItemModelName=void 0;let i=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock.removeFromParent(),this.holdingBlock!==this.playerHand&&R0(this.holdingBlock,!1),this.holdingBlock=void 0}if(!e){this.currentDisplayType="hand";let v=this.swingAnimator;v?.stopSwing(),v&&(v.type="hand"),this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(i!==this.switchRequest)return;let o=await this.createItemModel(e);if(!o||i!==this.switchRequest)return;this.holdingBlock=o.model,this.currentDisplayType=o.type,this.armTransformGroup.add(this.holdingBlock),s&&await this.playBlockSwapAnimation("appeared");let a=this.swingAnimator;a&&(a.type=o.type),this.idleAnimator=void 0}};var wi=class{constructor(){u(this,"animationTimer",0);u(this,"lastTime",0);u(this,"isAnimating",!1);u(this,"stopRequested",!1);u(this,"swingProgress",0);u(this,"type","hand");u(this,"debugParams",{animationTime:250,animationStage:0});u(this,"debugGui");this.debugGui=new Te("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01}})}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.swingProgress=0;return}let e=performance.now(),t=(e-this.lastTime)/1e3;this.lastTime=e,this.animationTimer+=t*1e3;let r=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(r>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.swingProgress=0;return}this.animationTimer=0,this.swingProgress=0;return}this.swingProgress=r}getSwingProgress(){return this.swingProgress}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}},ro=(n,e,t,r,i)=>{let s=r.transformModel(e,{name:t,properties:{}});return $r(n,[[s]],void 0,"plains",i)};E();x();k();R();import*as s0 from"three";function s8(n,e){let{depth:t,pixelSize:r}=e;if(n.width<=0||n.height<=0)throw new Error(`Invalid canvas dimensions: ${n.width}x${n.height}`);let s=n.getContext("2d").getImageData(0,0,n.width,n.height),{data:o}=s,a=n.width,v=n.height,l=t/2,c=r??1/Math.max(a,v),d=(B,I)=>{if(B<0||I<0||B>=a||I>=v)return!1;let G=(I*a+B)*4;return o[G+3]>128},f=[],m=[],g=[],b=[],w=0,y=(B,I,G,O,j,J,X,t0)=>(f.push(B,I,G),g.push(O,j),b.push(J,X,t0),w++),A=(B,I,G,O)=>{m.push(B,I,G,B,G,O)},C=(B,I)=>{let G=(B/a-.5)*c*a,O=-(I/v-.5)*c*v;return{x:G,y:O}},M=Array.from({length:v+1},()=>Array.from({length:a+1},()=>null)),S=Array.from({length:v+1},()=>Array.from({length:a+1},()=>null));for(let B=0;B<=v;B++)for(let I=0;I<=a;I++){let{x:G,y:O}=C(I-.5,B-.5),j=I/a,J=B/v,X=!1,t0=[[I-1,B-1],[I,B-1],[I-1,B],[I,B]];for(let[d0,l0]of t0)if(d(d0,l0)){X=!0;break}X&&(M[B][I]=y(G,O,l,j,J,0,0,1),S[B][I]=y(G,O,-l,j,J,0,0,-1))}for(let B=0;B<v;B++)for(let I=0;I<a;I++){if(!d(I,B))continue;let G=M[B][I],O=M[B][I+1],j=M[B+1][I+1],J=M[B+1][I],X=S[B][I],t0=S[B][I+1],d0=S[B+1][I+1],l0=S[B+1][I];G!==null&&O!==null&&j!==null&&J!==null&&A(G,O,j,J),X!==null&&t0!==null&&d0!==null&&l0!==null&&A(t0,X,l0,d0)}for(let B=0;B<v;B++)for(let I=0;I<a;I++){if(!d(I,B))continue;let G=(I+.5)/a,O=(B+.5)/v;if(!d(I-1,B)){let j=M[B][I],J=M[B+1][I],X=S[B][I],t0=S[B+1][I];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=y(f[j*3],f[j*3+1],f[j*3+2],G,O,-1,0,0),l0=y(f[J*3],f[J*3+1],f[J*3+2],G,O,-1,0,0),m0=y(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,-1,0,0),p0=y(f[X*3],f[X*3+1],f[X*3+2],G,O,-1,0,0);A(d0,l0,m0,p0)}}if(!d(I+1,B)){let j=M[B+1][I+1],J=M[B][I+1],X=S[B+1][I+1],t0=S[B][I+1];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=y(f[j*3],f[j*3+1],f[j*3+2],G,O,1,0,0),l0=y(f[J*3],f[J*3+1],f[J*3+2],G,O,1,0,0),m0=y(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,1,0,0),p0=y(f[X*3],f[X*3+1],f[X*3+2],G,O,1,0,0);A(d0,l0,m0,p0)}}if(!d(I,B-1)){let j=M[B][I],J=M[B][I+1],X=S[B][I],t0=S[B][I+1];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=y(f[j*3],f[j*3+1],f[j*3+2],G,O,0,-1,0),l0=y(f[J*3],f[J*3+1],f[J*3+2],G,O,0,-1,0),m0=y(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,0,-1,0),p0=y(f[X*3],f[X*3+1],f[X*3+2],G,O,0,-1,0);A(d0,l0,m0,p0)}}if(!d(I,B+1)){let j=M[B+1][I+1],J=M[B+1][I],X=S[B+1][I+1],t0=S[B+1][I];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=y(f[j*3],f[j*3+1],f[j*3+2],G,O,0,1,0),l0=y(f[J*3],f[J*3+1],f[J*3+2],G,O,0,1,0),m0=y(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,0,1,0),p0=y(f[X*3],f[X*3+1],f[X*3+2],G,O,0,1,0);A(d0,l0,m0,p0)}}}let H=new s0.BufferGeometry;return H.setAttribute("position",new s0.Float32BufferAttribute(f,3)),H.setAttribute("uv",new s0.Float32BufferAttribute(g,2)),H.setAttribute("normal",new s0.Float32BufferAttribute(b,3)),H.setIndex(m),H.computeVertexNormals(),{geometry:H,totalVertices:w,totalTriangles:m.length/3}}function o8(n,e){let{u:t,v:r,sizeX:i,sizeY:s}=e,o=Math.max(1,Math.floor(i*n.image.width)),a=Math.max(1,Math.floor(s*n.image.height)),v=document.createElement("canvas");v.width=o,v.height=a;let l=v.getContext("2d");return l.imageSmoothingEnabled=!1,l.drawImage(n.image,t*n.image.width,r*n.image.height,i*n.image.width,s*n.image.height,0,0,v.width,v.height),v}function io(n,e,t={}){let{faceCamera:r=!1,use3D:i=!0,depth:s=.04}=t,{u:o,v:a,sizeX:v,sizeY:l}=e;if(r){let b=n.clone();b.flipY=!0,b.offset.set(o,1-a-l),b.repeat.set(v,l),b.needsUpdate=!0,b.magFilter=s0.NearestFilter,b.minFilter=s0.NearestFilter;let w=new s0.SpriteMaterial({map:b,transparent:!0,alphaTest:.1});return{mesh:new s0.Sprite(w),itemsTexture:b,cleanup(){b.dispose()}}}if(i)try{let b=o8(n,e),{geometry:w}=s8(b,{depth:s}),y=new s0.CanvasTexture(b);y.magFilter=s0.NearestFilter,y.minFilter=s0.NearestFilter,y.wrapS=y.wrapT=s0.ClampToEdgeWrapping,y.flipY=!1,y.needsUpdate=!0;let A=new s0.MeshStandardMaterial({map:y,side:s0.DoubleSide,transparent:!0,alphaTest:.1});return{mesh:new s0.Mesh(w,A),itemsTexture:y,cleanup(){y.dispose(),w.dispose(),A.map&&A.map.dispose(),A.dispose()}}}catch{}let c=n.clone();c.flipY=!0,c.offset.set(o,1-a-l),c.repeat.set(v,l),c.needsUpdate=!0,c.magFilter=s0.NearestFilter,c.minFilter=s0.NearestFilter;let d=c.clone();d.repeat.x*=-1,d.needsUpdate=!0,d.offset.set(o+v,1-a-l);let f=new s0.MeshStandardMaterial({map:c,transparent:!0,alphaTest:.1}),m=new s0.MeshStandardMaterial({map:d,transparent:!0,alphaTest:.1});return{mesh:new s0.Mesh(new s0.BoxGeometry(1,1,0),[new s0.MeshBasicMaterial({color:0}),new s0.MeshBasicMaterial({color:0}),new s0.MeshBasicMaterial({color:0}),new s0.MeshBasicMaterial({color:0}),f,m]),itemsTexture:c,itemsTextureFlipped:d,cleanup(){c.dispose(),d.dispose(),f.dispose(),m.dispose()}}}E();x();k();R();import*as q from"three";E();x();k();R();E();x();k();R();import{REVISION as a8}from"three";var no=parseInt(a8.replace(/\D+/g,""));E();x();k();R();import{Loader as v8,FileLoader as l8,Group as c8,BufferGeometry as so,Float32BufferAttribute as Lt,LineBasicMaterial as Ai,Material as oo,PointsMaterial as I1,MeshPhongMaterial as d8,LineSegments as ao,Points as Ei,Mesh as vo,Vector3 as H5}from"three";var u8=/^[og]\s*(.+)?/,f8=/^mtllib /,h8=/^usemtl /,m8=/^usemap /,lo=new H5,xi=new H5,co=new H5,uo=new H5,ce=new H5;function p8(){let n={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=t!==!1;return}let r=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:t!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(i,s){let o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);let a={index:this.materials.length,name:i||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(v){let l={index:typeof v=="number"?v:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return l.clone=this.clone.bind(l),l}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(i){let s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),i&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return i&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},r&&r.name&&typeof r.clone=="function"){let i=r.clone(0);i.inherited=!0,this.object.materials.push(i)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,t){let r=parseInt(e,10);return(r>=0?r-1:r+t/3)*3},parseNormalIndex:function(e,t){let r=parseInt(e,10);return(r>=0?r-1:r+t/3)*3},parseUVIndex:function(e,t){let r=parseInt(e,10);return(r>=0?r-1:r+t/2)*2},addVertex:function(e,t,r){let i=this.vertices,s=this.object.geometry.vertices;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[r+0],i[r+1],i[r+2])},addVertexPoint:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,r){let i=this.normals,s=this.object.geometry.normals;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[r+0],i[r+1],i[r+2])},addFaceNormal:function(e,t,r){let i=this.vertices,s=this.object.geometry.normals;lo.fromArray(i,e),xi.fromArray(i,t),co.fromArray(i,r),ce.subVectors(co,xi),uo.subVectors(lo,xi),ce.cross(uo),ce.normalize(),s.push(ce.x,ce.y,ce.z),s.push(ce.x,ce.y,ce.z),s.push(ce.x,ce.y,ce.z)},addColor:function(e,t,r){let i=this.colors,s=this.object.geometry.colors;i[e]!==void 0&&s.push(i[e+0],i[e+1],i[e+2]),i[t]!==void 0&&s.push(i[t+0],i[t+1],i[t+2]),i[r]!==void 0&&s.push(i[r+0],i[r+1],i[r+2])},addUV:function(e,t,r){let i=this.uvs,s=this.object.geometry.uvs;s.push(i[e+0],i[e+1]),s.push(i[t+0],i[t+1]),s.push(i[r+0],i[r+1])},addDefaultUV:function(){let e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){let t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,r,i,s,o,a,v,l){let c=this.vertices.length,d=this.parseVertexIndex(e,c),f=this.parseVertexIndex(t,c),m=this.parseVertexIndex(r,c);if(this.addVertex(d,f,m),this.addColor(d,f,m),a!==void 0&&a!==""){let g=this.normals.length;d=this.parseNormalIndex(a,g),f=this.parseNormalIndex(v,g),m=this.parseNormalIndex(l,g),this.addNormal(d,f,m)}else this.addFaceNormal(d,f,m);if(i!==void 0&&i!==""){let g=this.uvs.length;d=this.parseUVIndex(i,g),f=this.parseUVIndex(s,g),m=this.parseUVIndex(o,g),this.addUV(d,f,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";let t=this.vertices.length;for(let r=0,i=e.length;r<i;r++){let s=this.parseVertexIndex(e[r],t);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";let r=this.vertices.length,i=this.uvs.length;for(let s=0,o=e.length;s<o;s++)this.addVertexLine(this.parseVertexIndex(e[s],r));for(let s=0,o=t.length;s<o;s++)this.addUVLine(this.parseUVIndex(t[s],i))}};return n.startObject("",!1),n}var Ut=class extends v8{constructor(e){super(e),this.materials=null}load(e,t,r,i){let s=this,o=new l8(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(a))}catch(v){i&&i(v),s.manager.itemError(e)}},r,i)}setMaterials(e){return this.materials=e,this}parse(e){let t=new p8;e.indexOf(`\r
719
+ }`;function i7(n){let e=document.createElement("style");e.innerHTML=n;let t=document.querySelector("head link[rel=stylesheet], head style");t?document.head.insertBefore(e,t):document.head.appendChild(e)}var ps=!1,qr=class n{constructor({parent:e,autoPlace:t=e===void 0,container:r,width:i,title:s="Controls",closeFolders:o=!1,injectStyles:v=!0,touchStyles:a=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",l=>{(l.code==="Enter"||l.code==="Space")&&(l.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),a&&this.domElement.classList.add("allow-touch-styles"),!ps&&v&&(i7(r7),ps=!0),r?r.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),i&&this.domElement.style.setProperty("--width",i+"px"),this._closeFolders=o}add(e,t,r,i,s){if(Object(r)===r)return new Kr(this,e,t,r);switch(typeof e[t]){case"number":return new Qr(this,e,t,r,i,s);case"boolean":return new Vr(this,e,t);case"string":return new Jr(this,e,t);case"function":return new _5(this,e,t)}}addColor(e,t,r=1){return new Yr(this,e,t,r)}addFolder(e){let t=new n({parent:this,title:e});return this.root._closeFolders&&t.close(),t}load(e,t=!0){return e.controllers&&this.controllers.forEach(r=>{r instanceof _5||r._name in e.controllers&&r.load(e.controllers[r._name])}),t&&e.folders&&this.folders.forEach(r=>{r._title in e.folders&&r.load(e.folders[r._title])}),this}save(e=!0){let t={controllers:{},folders:{}};return this.controllers.forEach(r=>{if(!(r instanceof _5)){if(r._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${r._name}"`);t.controllers[r._name]=r.save()}}),e&&this.folders.forEach(r=>{if(r._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${r._title}"`);t.folders[r._title]=r.save()}),t}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");let r=s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",r))};this.$children.addEventListener("transitionend",r);let i=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=i+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(r=>r.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}},Zr=qr;var Re=class{constructor(e,t,r,i){d(this,"gui",null);d(this,"storageKey","");d(this,"target");d(this,"params",[]);d(this,"paramsMeta",{});d(this,"_visible",!1);d(this,"initialValues",{});d(this,"initialized",!1);if(!y0){this.gui=new Zr,this.storageKey=`debug_params_${e}`,this.target=t,this.paramsMeta=i??{},this.params=r??Object.keys(t);for(let s of this.params)this.initialValues[s]=t[s];this.gui.domElement.style.display="none"}}activate(){return y0?this:(!this.initialized&&this.gui&&(this.loadSavedValues(),this.setupControls(),this.initialized=!0),this.show(),this)}get visible(){return y0?!1:this._visible}set visible(e){y0||!this.gui||(this._visible=e,this.gui.domElement.style.display=e?"block":"none",this.saveVisibility())}loadSavedValues(){if(!y0)try{let e=localStorage.getItem(this.storageKey);if(e){let t=JSON.parse(e);for(let r of this.params)if(r in t){let i=t[r];i!==null&&(this.target[r]=i)}}}catch{}}saveValues(e=!1){if(!y0)try{let t={};for(let r of this.params)t[r]=this.target[r];e?localStorage.removeItem(this.storageKey):localStorage.setItem(this.storageKey,JSON.stringify(t))}catch{}}saveVisibility(){if(!y0)try{localStorage.setItem(`${this.storageKey}_visible`,this._visible.toString())}catch{}}setupControls(){if(!(y0||!this.gui)){this.gui.add(this,"visible").name("Show Controls"),this.gui.add({resetAll:()=>{if(this.gui){for(let e of this.params)this.target[e]=this.initialValues[e];this.saveValues(!0),this.gui.destroy(),this.gui=new Zr,this.setupControls()}}},"resetAll").name("Reset All Parameters");for(let e of this.params){let t=this.target[e],r=this.paramsMeta[e]??{};if(typeof t=="number"){let i=r.min??t-Math.abs(t*2),s=r.max??t+Math.abs(t*2),o=r.step??Math.abs(t)/100;this.gui.add(this.target,e,i,s,o).onChange(()=>this.saveValues())}else if(typeof t=="boolean")this.gui.add(this.target,e).onChange(()=>this.saveValues());else if(typeof t=="string"&&["x","y","z"].includes(e)){let i=r.min??-10,s=r.max??10,o=r.step??.1;this.gui.add(this.target,e,i,s,o).onChange(()=>this.saveValues())}else Array.isArray(t)&&this.gui.add(this.target,e,t).onChange(()=>this.saveValues())}}}save(){y0||(this.saveValues(),this.saveVisibility())}destroy(){y0||!this.gui||(this.saveVisibility(),this.gui.destroy())}toggle(){this.visible=!this.visible}show(){this.visible=!0}hide(){this.visible=!1}};E();x();k();R();E();x();k();R();var u1=class{constructor(){d(this,"currentAnimation",null);d(this,"isAnimating",!1);d(this,"cancelRequested",!1);d(this,"completionCallbacks",[]);d(this,"currentCancelCallback",null)}async startAnimation(e,t){return this.isAnimating&&await this.cancelCurrentAnimation(),new Promise(r=>{this.isAnimating=!0,this.cancelRequested=!1,this.currentCancelCallback=t??null,this.currentAnimation=e(),this.completionCallbacks.push(()=>{this.isAnimating=!1,this.currentAnimation=null,r()})})}async cancelCurrentAnimation(){if(this.isAnimating){if(this.currentCancelCallback){let e=this.currentCancelCallback;this.currentCancelCallback=null,e()}return new Promise(e=>{this.cancelRequested=!0,this.completionCallbacks.push(()=>{e()})})}}animationCycleFinish(){this.cancelRequested&&this.forceFinish()}forceFinish(e=!0){if(!this.isAnimating)return;if(this.currentAnimation){for(let r of this.currentAnimation.getAll())r.stop();this.currentAnimation.removeAll(),this.currentAnimation=null}this.isAnimating=!1,this.cancelRequested=!1;let t=[...this.completionCallbacks];if(this.completionCallbacks=[],e)for(let r of t)r()}update(){this.currentAnimation&&this.currentAnimation.update()}get isActive(){return this.isAnimating}get shouldCancel(){return this.cancelRequested}};var n7={x:3e3,y:3e3,z:3e3,rotation:Math.PI,scale:1,default:3e3},st=class{constructor(e,t,r){this.getState=e;this.setState=t;d(this,"animationController",new u1);d(this,"defaultState");d(this,"speeds");d(this,"currentStateName","");d(this,"transitioningToStateName","");this.speeds={...n7},r&&Object.assign(this.speeds,r),this.defaultState=this.getState()}calculateDuration(e){let t=0,r=this.getState();for(let[i,s]of Object.entries(e)){let o=r[i],v=Math.abs(s-o),a=this.getPropertySpeed(i),l=v/a*1e3;t=Math.max(t,l)}return Math.min(Math.max(t,200),2e3)}getPropertySpeed(e){return e in this.speeds?this.speeds[e]:e.toLowerCase().includes("rotation")?this.speeds.rotation:e.toLowerCase().includes("scale")?this.speeds.scale:e.toLowerCase()==="x"||e.toLowerCase()==="y"||e.toLowerCase()==="z"?this.speeds[e]:this.speeds.default}startTransition(e,t,r,i=H0.Linear.None,s){this.isTransitioning&&this.animationController.forceFinish(!1),this.transitioningToStateName=t??"";let o=this.getState(),v=this.calculateDuration(e);this.animationController.startAnimation(()=>{let a=new Rt;return new F0(o,a).to(e,v).easing(i).onUpdate(l=>{for(let c of Object.keys(l))this.setState(c,l[c])}).onComplete(()=>{this.animationController.forceFinish(),this.currentStateName=this.transitioningToStateName,this.transitioningToStateName="",r?.()}).start(),a},s)}reset(){this.startTransition(this.defaultState)}update(){this.animationController.update()}forceFinish(){this.animationController.forceFinish()}transitionTo(e,t,r,i){this.startTransition(e,t,r,H0.Linear.None,i)}getCurrentValue(e){return this.getState()[e]}get isTransitioning(){return this.animationController.isActive}};E();x();k();R();import{subscribeKey as s7}from"valtio/utils";function f1(n,e,t,r,i){let s=0,o,v=async()=>{let a=++s,l=await n(e[t]);a===s?(o&&i?.(o),r(l),o=l):i?.(l)};return v(),s7(e,t,v)}E();x();k();R();var gs=Math.PI/180;function h1(n){let{walkDist:e,prevWalkDist:t,bob:r,prevBob:i,partialTick:s}=n,o=e-t,v=-(e+o*s),a=i+(r-i)*s,l=Math.sin(v*Math.PI),c=Math.cos(v*Math.PI);return{position:{x:l*a*.5,y:-Math.abs(c*a)},rotation:{x:Math.abs(Math.cos(v*Math.PI-.2)*a)*5*gs,z:l*a*3*gs}}}E();x();k();R();var m1=n=>({"minecraft:display_context":"firstperson","minecraft:use_duration":n.playerStateReactive.itemUsageTicks,"minecraft:using_item":!!n.playerStateReactive.itemUsageTicks}),o7=()=>({"minecraft:display_context":"firstperson"}),Pt=(n,e)=>{if(!e)return"empty";if(e.type==="hand")return"hand";let t=e.name??(e.id!==void 0?`#${e.id}`:"unknown");if(!n.resourcesManager.currentResources)return`${e.type}:${t}`;let r=n.getItemRenderData({...e.fullItem,itemId:e.id},o7());return`${e.type}:${t}:${r.modelName}`};var j0=new C0.Matrix4,bs=n=>(n=(n+Math.PI)%(Math.PI*2),n<0&&(n+=Math.PI*2),n-Math.PI);function a7(n,e){let t=new C0.Matrix4,r=1,i=Math.sqrt(n),s=-.3*Math.sin(i*Math.PI),o=.4*Math.sin(i*2*Math.PI),v=-.4*Math.sin(n*Math.PI);return t.multiply(j0.makeTranslation(r*(s+.64),o-.6+e*-.6,v-.72)),t.multiply(j0.makeRotationY(r*45*Math.PI/180)),t.multiply(j0.makeRotationY(r*Math.sin(i*Math.PI)*70*Math.PI/180)),t.multiply(j0.makeRotationZ(r*Math.sin(n*n*Math.PI)*-20*Math.PI/180)),t.multiply(j0.makeTranslation(r*-1,3.6,3.5)),t.multiply(j0.makeRotationZ(r*120*Math.PI/180)),t.multiply(j0.makeRotationX(200*Math.PI/180)),t.multiply(j0.makeRotationY(r*-135*Math.PI/180)),t.multiply(j0.makeTranslation(r*5.6,0,0)),t.multiply(j0.makeTranslation(r*-5/16,2/16,0)),t}function v7(n,e){let t=new C0.Matrix4,r=1,i=Math.sqrt(n),s=-.4*Math.sin(i*Math.PI),o=.2*Math.sin(i*2*Math.PI),v=-.2*Math.sin(n*Math.PI);t.multiply(j0.makeTranslation(r*s,o,v)),t.multiply(j0.makeTranslation(r*.56,-.52+e*-.6,-.72));let a=Math.sin(n*n*Math.PI),l=Math.sin(i*Math.PI);return t.multiply(j0.makeRotationY(r*(45+a*-20)*Math.PI/180)),t.multiply(j0.makeRotationZ(r*l*-20*Math.PI/180)),t.multiply(j0.makeRotationX(l*-80*Math.PI/180)),t.multiply(j0.makeRotationY(r*-45*Math.PI/180)),t}var A5=class{constructor(e,t=!1){this.worldRenderer=e;this.offHand=t;d(this,"holdingBlock");d(this,"blockSwapAnimation");d(this,"cameraGroup",new C0.Mesh);d(this,"armTransformGroup",new C0.Group);d(this,"camera",new C0.PerspectiveCamera(70,1,.05,100));d(this,"equipProgress",0);d(this,"stopUpdate",!1);d(this,"lastHeldItem");d(this,"lastHeldItemRenderKey");d(this,"currentDisplayType","hand");d(this,"isSwinging",!1);d(this,"nextIterStopCallbacks");d(this,"idleAnimator");d(this,"ready",!1);d(this,"lastUpdate",0);d(this,"xBob",0);d(this,"yBob",0);d(this,"lastBobUpdateTime",0);d(this,"lastBobWalkDist",0);d(this,"lastBobTickTime",0);d(this,"playerHand");d(this,"offHandDisplay",!1);d(this,"offHandModeLegacy",!1);d(this,"swingAnimator");d(this,"config");d(this,"disposed",!1);d(this,"unsubs",[]);d(this,"lastItemModelName");d(this,"switchRequest",0);this.initCameraGroup(),this.swingAnimator=new Xr,this.unsubs.push(this.worldRenderer.onReactivePlayerStateUpdated("heldItemMain",()=>{this.offHand||this.updateItem()},!1),this.worldRenderer.onReactivePlayerStateUpdated("heldItemOff",()=>{this.offHand&&this.updateItem()},!1)),this.config=e.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||y5().then(r=>{this.disposed||(this.playerHand=r,this.updateItem())}).then(()=>{if(this.disposed)return;let r=f1(async()=>y5(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",i=>{i&&(this.playerHand=i,this.updateItem())},i=>{k0(i,!0)});this.unsubs.push(r)})}dispose(){this.disposed=!0,this.unsubs.forEach(e=>e()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,k0(this.cameraGroup,!0),this.holdingBlock&&this.holdingBlock!==this.playerHand&&k0(this.holdingBlock,!0),this.holdingBlock=void 0,this.playerHand&&(k0(this.playerHand,!0),this.playerHand=void 0),this.ready=!1}updateItem(){if(!this.ready)return;let e=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;e?this.setNewItem(e):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new C0.Mesh,this.armTransformGroup=new C0.Group,this.armTransformGroup.matrixAutoUpdate=!1,this.cameraGroup.add(this.armTransformGroup)}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(e,t,r,i){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),(this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage)&&this.swingAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new C0.Scene;o.add(this.cameraGroup);let v=t.getSize(new C0.Vector2),a=v.height>v.width;a?this.camera.aspect!==1&&(this.camera.aspect=1,this.camera.updateProjectionMatrix()):this.camera.aspect!==e.aspect&&(this.camera.aspect=e.aspect,this.camera.updateProjectionMatrix()),this.updateCameraGroup(),o.add(r.clone()),o.add(i.clone());let{offHandDisplay:l}=this;if(l&&(this.cameraGroup.scale.x=-1),t.autoClear=!1,t.clearDepth(),a){let c=Math.min(v.width,v.height);l?t.setViewport(0,0,c,c):t.setViewport(v.width-c,0,c,c)}t.render(o,this.camera),a&&t.setViewport(0,0,v.width,v.height),l&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(e){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new st(()=>({progress:this.equipProgress}),(i,s)=>{i==="progress"&&(this.equipProgress=s)},{progress:4})});let t=e==="disappeared"?1:0,r=!1;return new Promise(i=>{this.blockSwapAnimation.switcher.transitionTo({progress:t},e,()=>{r||i(!0)},()=>{r=!0,i(!1)})})}isDifferentItem(e){return this.lastHeldItemRenderKey!==Pt(this.worldRenderer,e)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:e}=this,t=performance.now(),r=this.worldRenderer.cameraShake.getBaseRotation(),i=r.pitch,s=r.yaw;if(this.lastBobUpdateTime===0)this.xBob=i,this.yBob=s;else{let f=Math.min((t-this.lastBobUpdateTime)/1e3,.1),m=1-Math.pow(.5,f*28),g=1-Math.pow(.5,f*36);this.xBob+=(i-this.xBob)*m,this.yBob+=bs(s-this.yBob)*g}this.lastBobUpdateTime=t;let o=(i-this.xBob)*-.05,v=bs(s-this.yBob)*-.035;if(this.cameraGroup.position.copy(e.position),this.cameraGroup.rotation.copy(e.rotation),this.worldRenderer.displayOptions.inWorldRenderingConfig.viewBobbing){let f=this.worldRenderer.playerStateReactive;f.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=t,this.lastBobWalkDist=f.walkDist);let m=Math.min((t-this.lastBobTickTime)/50,1),g=1.8,y=h1({walkDist:f.walkDist*g,prevWalkDist:f.prevWalkDist*g,bob:f.bob,prevBob:f.prevBob,partialTick:m});this.cameraGroup.position.x+=y.position.x,this.cameraGroup.position.y+=y.position.y,this.cameraGroup.rotation.z+=y.rotation.z,this.cameraGroup.rotation.x+=y.rotation.x}this.cameraGroup.rotation.x+=o,this.cameraGroup.rotation.y+=v;let l=this.currentDisplayType,c=this.swingAnimator?.getSwingProgress()??0,u;l==="hand"?u=a7(c,this.equipProgress):u=v7(c,this.equipProgress),this.armTransformGroup.matrix.copy(u),this.armTransformGroup.matrixWorldNeedsUpdate=!0}async createItemModel(e){if(this.lastUpdate=performance.now(),!e||e.type==="hand"&&!this.playerHand)return;let t;if(e.type==="item"||e.type==="block"){let r=this.worldRenderer.entities.getItemMesh({...e.fullItem,itemId:e.id},m1(this.worldRenderer),!1,this.lastItemModelName);if(r){let{mesh:i,isBlock:s,modelName:o}=r;s?(t=i,e.type="block"):(t=i,e.type="item"),this.lastItemModelName=o}}else t=this.playerHand;if(t){if(e.type==="item"||e.type==="block"){let r=new C0.Group;r.name="displayTransform",e.type==="item"?(r.position.set(1.13/16,3.2/16,1.13/16),r.rotation.set(0,C0.MathUtils.degToRad(-90),C0.MathUtils.degToRad(25),"XYZ"),r.scale.set(.68,.68,.68)):(r.rotation.set(0,C0.MathUtils.degToRad(45),0,"XYZ"),r.scale.set(.4,.4,.4)),r.add(t),t=r}return t.name="holdingBlock",{model:t,type:e.type}}}async replaceItemModel(e){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!e){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.currentDisplayType="hand";let r=this.swingAnimator;r?.stopSwing(),r&&(r.type="hand"),this.idleAnimator=void 0;return}let t=await this.createItemModel(e);t&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=t.model,this.currentDisplayType=t.type,this.armTransformGroup.add(t.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(e){let t=Pt(this.worldRenderer,e),r=this.lastHeldItemRenderKey!==t;if(this.lastHeldItem=e,!r)return;this.lastHeldItemRenderKey=t,this.lastItemModelName=void 0;let i=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock.removeFromParent(),this.holdingBlock!==this.playerHand&&k0(this.holdingBlock,!1),this.holdingBlock=void 0}if(!e){this.currentDisplayType="hand";let a=this.swingAnimator;a?.stopSwing(),a&&(a.type="hand"),this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(i!==this.switchRequest)return;let o=await this.createItemModel(e);if(!o||i!==this.switchRequest)return;this.holdingBlock=o.model,this.currentDisplayType=o.type,this.armTransformGroup.add(this.holdingBlock),s&&await this.playBlockSwapAnimation("appeared");let v=this.swingAnimator;v&&(v.type=o.type),this.idleAnimator=void 0}};var Xr=class{constructor(){d(this,"animationTimer",0);d(this,"lastTime",0);d(this,"isAnimating",!1);d(this,"stopRequested",!1);d(this,"swingProgress",0);d(this,"type","hand");d(this,"debugParams",{animationTime:250,animationStage:0});d(this,"debugGui");this.debugGui=new Re("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01}})}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.swingProgress=0;return}let e=performance.now(),t=(e-this.lastTime)/1e3;this.lastTime=e,this.animationTimer+=t*1e3;let r=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(r>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.swingProgress=0;return}this.animationTimer=0,this.swingProgress=0;return}this.swingProgress=r}getSwingProgress(){return this.swingProgress}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}},ys=(n,e,t,r,i)=>{let s=r.transformModel(e,{name:t,properties:{}});return Wr(n,[[s]],void 0,"plains",i)};E();x();k();R();import*as v0 from"three";import{subscribeKey as f3}from"valtio/utils";E();x();k();R();import*as L0 from"three";E();x();k();R();import Ai from"prismarine-nbt";import*as W from"three";E();x();k();R();E();x();k();R();import{BoxGeometry as Y0,DoubleSide as ni,FrontSide as ws,Group as ve,Mesh as N0,MeshStandardMaterial as E5,Vector2 as p1}from"three";function si(n,e,t,r,i,s,o,v){let a=(B,I,G,O)=>[new p1(B/o,1-O/v),new p1(G/o,1-O/v),new p1(G/o,1-I/v),new p1(B/o,1-I/v)],l=a(e+s,t,e+r+s,t+s),c=a(e+r+s,t,e+r*2+s,t+s),u=a(e,t+s,e+s,t+s+i),f=a(e+s,t+s,e+r+s,t+s+i),m=a(e+r+s,t+s,e+r+s*2,t+i+s),g=a(e+r+s*2,t+s,e+r*2+s*2,t+i+s),y=n.attributes.uv,w=[m[3],m[2],m[0],m[1]],b=[u[3],u[2],u[0],u[1]],A=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],M=[f[3],f[2],f[0],f[1]],S=[g[3],g[2],g[0],g[1]],H=[];for(let B of[w,b,A,C,M,S])for(let I of B)H.push(I.x,I.y);y.set(new Float32Array(H)),y.needsUpdate=!0}function ae(n,e,t,r,i,s){si(n,e,t,r,i,s,64,64)}function $r(n,e,t,r,i,s){si(n,e,t,r,i,s,64,32)}var ke=class extends ve{constructor(e,t){super(),Object.defineProperty(this,"innerLayer",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"outerLayer",{enumerable:!0,configurable:!0,writable:!0,value:t}),e.name="inner",t.name="outer"}},ei=class extends ve{constructor(){super(),Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftArm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftLeg",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"modelListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"slim",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_map",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"layer1Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer1MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2Material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"layer2MaterialBiased",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.layer1Material=new E5({side:ws}),this.layer2Material=new E5({side:ni,transparent:!0,alphaTest:1e-5}),this.layer1MaterialBiased=this.layer1Material.clone(),this.layer1MaterialBiased.polygonOffset=!0,this.layer1MaterialBiased.polygonOffsetFactor=1,this.layer1MaterialBiased.polygonOffsetUnits=1,this.layer2MaterialBiased=this.layer2Material.clone(),this.layer2MaterialBiased.polygonOffset=!0,this.layer2MaterialBiased.polygonOffsetFactor=1,this.layer2MaterialBiased.polygonOffsetUnits=1;let e=new Y0(8,8,8);ae(e,0,0,8,8,8);let t=new N0(e,this.layer1Material),r=new Y0(9,9,9);ae(r,32,0,8,8,8);let i=new N0(r,this.layer2Material);this.head=new ke(t,i),this.head.name="head",this.head.add(t,i),t.position.y=4,i.position.y=4,this.add(this.head);let s=new Y0(8,12,4);ae(s,16,16,8,12,4);let o=new N0(s,this.layer1Material),v=new Y0(8.5,12.5,4.5);ae(v,16,32,8,12,4);let a=new N0(v,this.layer2Material);this.body=new ke(o,a),this.body.name="body",this.body.add(o,a),this.body.position.y=-6,this.add(this.body);let l=new Y0,c=new N0(l,this.layer1MaterialBiased);this.modelListeners.push(()=>{c.scale.x=this.slim?3:4,c.scale.y=12,c.scale.z=4,ae(l,40,16,this.slim?3:4,12,4)});let u=new Y0,f=new N0(u,this.layer2MaterialBiased);this.modelListeners.push(()=>{f.scale.x=this.slim?3.5:4.5,f.scale.y=12.5,f.scale.z=4.5,ae(u,40,32,this.slim?3:4,12,4)});let m=new ve;m.add(c,f),this.modelListeners.push(()=>{m.position.x=this.slim?-.5:-1}),m.position.y=-4,this.rightArm=new ke(c,f),this.rightArm.name="rightArm",this.rightArm.add(m),this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.add(this.rightArm);let g=new Y0,y=new N0(g,this.layer1MaterialBiased);this.modelListeners.push(()=>{y.scale.x=this.slim?3:4,y.scale.y=12,y.scale.z=4,ae(g,32,48,this.slim?3:4,12,4)});let w=new Y0,b=new N0(w,this.layer2MaterialBiased);this.modelListeners.push(()=>{b.scale.x=this.slim?3.5:4.5,b.scale.y=12.5,b.scale.z=4.5,ae(w,48,48,this.slim?3:4,12,4)});let A=new ve;A.add(y,b),this.modelListeners.push(()=>{A.position.x=this.slim?.5:1}),A.position.y=-4,this.leftArm=new ke(y,b),this.leftArm.name="leftArm",this.leftArm.add(A),this.leftArm.position.x=5,this.leftArm.position.y=-2,this.add(this.leftArm);let C=new Y0(4,12,4);ae(C,0,16,4,12,4);let M=new N0(C,this.layer1MaterialBiased),S=new Y0(4.5,12.5,4.5);ae(S,0,32,4,12,4);let H=new N0(S,this.layer2MaterialBiased),B=new ve;B.add(M,H),B.position.y=-6,this.rightLeg=new ke(M,H),this.rightLeg.name="rightLeg",this.rightLeg.add(B),this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.add(this.rightLeg);let I=new Y0(4,12,4);ae(I,16,48,4,12,4);let G=new N0(I,this.layer1MaterialBiased),O=new Y0(4.5,12.5,4.5);ae(O,0,48,4,12,4);let j=new N0(O,this.layer2MaterialBiased),J=new ve;J.add(G,j),J.position.y=-6,this.leftLeg=new ke(G,j),this.leftLeg.name="leftLeg",this.leftLeg.add(J),this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1,this.add(this.leftLeg),this.modelType="default"}get map(){return this._map}set map(e){this._map=e,this.layer1Material.map=e,this.layer1Material.needsUpdate=!0,this.layer1MaterialBiased.map=e,this.layer1MaterialBiased.needsUpdate=!0,this.layer2Material.map=e,this.layer2Material.needsUpdate=!0,this.layer2MaterialBiased.map=e,this.layer2MaterialBiased.needsUpdate=!0}get modelType(){return this.slim?"slim":"default"}set modelType(e){this.slim=e==="slim",this.modelListeners.forEach(t=>t())}getBodyParts(){return this.children.filter(e=>e instanceof ke)}setInnerLayerVisible(e){this.getBodyParts().forEach(t=>t.innerLayer.visible=e)}setOuterLayerVisible(e){this.getBodyParts().forEach(t=>t.outerLayer.visible=e)}resetJoints(){this.head.rotation.set(0,0,0),this.leftArm.rotation.set(0,0,0),this.rightArm.rotation.set(0,0,0),this.leftLeg.rotation.set(0,0,0),this.rightLeg.rotation.set(0,0,0),this.body.rotation.set(0,0,0),this.head.position.y=0,this.body.position.y=-6,this.body.position.z=0,this.rightArm.position.x=-5,this.rightArm.position.y=-2,this.rightArm.position.z=0,this.leftArm.position.x=5,this.leftArm.position.y=-2,this.leftArm.position.z=0,this.rightLeg.position.x=-1.9,this.rightLeg.position.y=-12,this.rightLeg.position.z=-.1,this.leftLeg.position.x=1.9,this.leftLeg.position.y=-12,this.leftLeg.position.z=-.1}},ti=class extends ve{constructor(){super(),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new E5({side:ni,transparent:!0,alphaTest:1e-5});let e=new Y0(10,16,1);$r(e,0,0,10,16,1),this.cape=new N0(e,this.material),this.cape.position.y=-8,this.cape.position.z=.5,this.add(this.cape)}get map(){return this.material.map}set map(e){this.material.map=e,this.material.needsUpdate=!0}},ri=class extends ve{constructor(){super(),Object.defineProperty(this,"leftWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rightWing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new E5({side:ni,transparent:!0,alphaTest:1e-5});let e=new Y0(12,22,4);$r(e,22,0,10,20,2);let t=new N0(e,this.material);t.position.x=-5,t.position.y=-10,t.position.z=-1,this.leftWing=new ve,this.leftWing.add(t),this.add(this.leftWing);let r=new Y0(12,22,4);$r(r,22,0,10,20,2);let i=new N0(r,this.material);i.scale.x=-1,i.position.x=5,i.position.y=-10,i.position.z=-1,this.rightWing=new ve,this.rightWing.add(i),this.add(this.rightWing),this.leftWing.position.x=5,this.leftWing.rotation.x=.2617994,this.resetJoints()}resetJoints(){this.leftWing.rotation.y=.01,this.leftWing.rotation.z=.2617994,this.updateRightWing()}updateRightWing(){this.rightWing.position.x=-this.leftWing.position.x,this.rightWing.position.y=this.leftWing.position.y,this.rightWing.rotation.x=this.leftWing.rotation.x,this.rightWing.rotation.y=-this.leftWing.rotation.y,this.rightWing.rotation.z=-this.leftWing.rotation.z}get map(){return this.material.map}set map(e){this.material.map=e,this.material.needsUpdate=!0}},ii=class extends ve{constructor(){super(),Object.defineProperty(this,"rightEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"leftEar",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"material",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.material=new E5({side:ws});let e=new Y0(8,8,4/3);si(e,0,0,6,6,1,14,7),this.rightEar=new N0(e,this.material),this.rightEar.name="rightEar",this.rightEar.position.x=-6,this.add(this.rightEar),this.leftEar=new N0(e,this.material),this.leftEar.name="leftEar",this.leftEar.position.x=6,this.add(this.leftEar)}get map(){return this.material.map}set map(e){this.material.map=e,this.material.needsUpdate=!0}},_s=10.8*Math.PI/180,x5=class extends ve{constructor(){super(),Object.defineProperty(this,"skin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"elytra",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ears",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.skin=new ei,this.skin.name="skin",this.skin.position.y=8,this.add(this.skin),this.cape=new ti,this.cape.name="cape",this.cape.position.y=8,this.cape.position.z=-2,this.cape.rotation.x=_s,this.cape.rotation.y=Math.PI,this.add(this.cape),this.elytra=new ri,this.elytra.name="elytra",this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.visible=!1,this.add(this.elytra),this.ears=new ii,this.ears.name="ears",this.ears.position.y=10,this.ears.position.z=2/3,this.ears.visible=!1,this.skin.head.add(this.ears)}get backEquipment(){return this.cape.visible?"cape":this.elytra.visible?"elytra":null}set backEquipment(e){this.cape.visible=e==="cape",this.elytra.visible=e==="elytra"}resetJoints(){this.skin.resetJoints(),this.cape.rotation.x=_s,this.cape.position.y=8,this.cape.position.z=-2,this.elytra.position.y=8,this.elytra.position.z=-2,this.elytra.rotation.x=0,this.elytra.resetJoints()}};E();x();k();R();import{Color as Cp,PointLight as Bp,EquirectangularReflectionMapping as Pp,Group as Ip,NearestFilter as Hp,PerspectiveCamera as Op,Scene as Fp,Texture as Dp,Vector2 as zp,WebGLRenderer as Lp,AmbientLight as Up,CanvasTexture as Gp,WebGLRenderTarget as Np,FloatType as Wp,DepthTexture as Vp,Clock as jp,Object3D as Yp,ColorManagement as Qp}from"three";import{OrbitControls as Jp}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as Zp}from"three/examples/jsm/postprocessing/EffectComposer.js";import"three/examples/jsm/postprocessing/Pass.js";import{RenderPass as tg}from"three/examples/jsm/postprocessing/RenderPass.js";import{ShaderPass as ig}from"three/examples/jsm/postprocessing/ShaderPass.js";import{FXAAShader as sg}from"three/examples/jsm/shaders/FXAAShader.js";E();x();k();R();var g1=class{constructor(){Object.defineProperty(this,"speed",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"paused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"progress",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"currentId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"progress0",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"animationObjects",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}update(e,t){if(this.paused)return;let r=t*this.speed;this.animate(e,r),this.animationObjects.forEach((i,s)=>{let o=this.progress0.get(s);i(e,this.progress-o,s)}),this.progress+=r}addAnimation(e){let t=this.currentId++;return this.progress0.set(t,this.progress),this.animationObjects.set(t,e),t}removeAnimation(e){e!=null&&(this.animationObjects.delete(e),this.progress0.delete(e))}};E();x();k();R();import{CanvasTexture as mp,NearestFilter as pp,Sprite as gp,SpriteMaterial as bp}from"three";E();x();k();R();var l7=Object.defineProperty,c7=(n,e,t)=>e in n?l7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_0=(n,e,t)=>(c7(n,typeof e!="symbol"?e+"":e,t),t);function oi(n){let e=[n];if(n.extra&&n.extra.length!==0)for(let t of n.extra)e.push(...oi(t));return e}var Z=class{constructor(n,e,t,r,i,s){this.key=n,this.value=e,this.name=t,this.code=r,this.cssForeground=i,this.cssBackground=s}applyToStyle(n){n[this.key]=this.value}matchStyle(n){return n[this.key]===this.value}static fromCode(n){let t="0123456789abcdefklmnor".indexOf(n);if(t)return this.list[t]}toString(){return`${Z.CONTROL_STRING}${this.code}`}},w0=Z;_0(w0,"CONTROL_STRING","\xA7");_0(w0,"BLACK",new Z("color","black","BLACK","0",{color:"#000000"},{color:"#000000"}));_0(w0,"DARK_BLUE",new Z("color","dark_blue","DARK_BLUE","1",{color:"#0000AA"},{color:"#00002A"}));_0(w0,"DARK_GREEN",new Z("color","dark_green","DARK_GREEN","2",{color:"#00AA00"},{color:"#002A00"}));_0(w0,"DARK_AQUA",new Z("color","dark_aqua","DARK_AQUA","3",{color:"#00AAAA"},{color:"#002A2A"}));_0(w0,"DARK_RED",new Z("color","dark_red","DARK_RED","4",{color:"#AA0000"},{color:"#2A0000"}));_0(w0,"DARK_PURPLE",new Z("color","dark_purple","DARK_PURPLE","5",{color:"#AA00AA"},{color:"#2A002A"}));_0(w0,"GOLD",new Z("color","gold","GOLD","6",{color:"#FFAA00"},{color:"#2A2A00"}));_0(w0,"GRAY",new Z("color","gray","GRAY","7",{color:"#AAAAAA"},{color:"#2A2A2A"}));_0(w0,"DARK_GRAY",new Z("color","dark_gray","DARK_GRAY","8",{color:"#555555"},{color:"#151515"}));_0(w0,"BLUE",new Z("color","blue","BLUE","9",{color:"#5555FF"},{color:"#15153F"}));_0(w0,"GREEN",new Z("color","green","GREEN","a",{color:"#55FF55"},{color:"#153F15"}));_0(w0,"AQUA",new Z("color","aqua","AQUA","b",{color:"#55FFFF"},{color:"#153F3F"}));_0(w0,"RED",new Z("color","red","RED","c",{color:"#FF5555"},{color:"#3F1515"}));_0(w0,"LIGHT_PURPLE",new Z("color","light_purple","LIGHT_PURPLE","d",{color:"#FF55FF"},{color:"#3F153F"}));_0(w0,"YELLOW",new Z("color","yellow","YELLOW","e",{color:"#FFFF55"},{color:"#3F3F15"}));_0(w0,"WHITE",new Z("color","white","WHITE","f",{color:"#FFFFFF"},{color:"#3F3F3F"}));_0(w0,"OBFUSCATED",new Z("obfuscated",!0,"OBFUSCATED","k",{}));_0(w0,"BOLD",new Z("bold",!0,"BOLD","l",{"font-weight":"bold"}));_0(w0,"STRIKETHROUGH",new Z("strikethrough",!0,"STRIKETHROUGH","m",{"text-decoration":"line-through"}));_0(w0,"UNDERLINE",new Z("underlined",!0,"UNDERLINE","n",{"text-decoration":"underline"}));_0(w0,"ITALIC",new Z("italic",!0,"ITALIC","o",{"font-style":"italic"}));_0(w0,"RESET",{name:"RESET",code:"r",applyToStyle(n){n.bold=!1,n.strikethrough=!1,n.underlined=!1,n.italic=!1,n.obfuscated=!1,n.color=void 0},matchStyle(n){return!1},cssBackground:{},cssForeground:{},toString(){return`${Z.CONTROL_STRING}r`}});_0(w0,"list",[Z.BLACK,Z.DARK_BLUE,Z.DARK_GREEN,Z.DARK_AQUA,Z.DARK_RED,Z.DARK_PURPLE,Z.GOLD,Z.GRAY,Z.DARK_GRAY,Z.BLUE,Z.GREEN,Z.AQUA,Z.RED,Z.LIGHT_PURPLE,Z.YELLOW,Z.WHITE,Z.OBFUSCATED,Z.BOLD,Z.STRIKETHROUGH,Z.UNDERLINE,Z.ITALIC,Z.RESET]);var B5=r5(ai(),1);di();var v3=r5(Ys(),1);import l3 from"prismarine-chat";E();x();k();R();import*as s0 from"three";function J7(n,e){let{depth:t,pixelSize:r}=e;if(n.width<=0||n.height<=0)throw new Error(`Invalid canvas dimensions: ${n.width}x${n.height}`);let s=n.getContext("2d").getImageData(0,0,n.width,n.height),{data:o}=s,v=n.width,a=n.height,l=t/2,c=r??1/Math.max(v,a),u=(B,I)=>{if(B<0||I<0||B>=v||I>=a)return!1;let G=(I*v+B)*4;return o[G+3]>128},f=[],m=[],g=[],y=[],w=0,b=(B,I,G,O,j,J,X,t0)=>(f.push(B,I,G),g.push(O,j),y.push(J,X,t0),w++),A=(B,I,G,O)=>{m.push(B,I,G,B,G,O)},C=(B,I)=>{let G=(B/v-.5)*c*v,O=-(I/a-.5)*c*a;return{x:G,y:O}},M=Array.from({length:a+1},()=>Array.from({length:v+1},()=>null)),S=Array.from({length:a+1},()=>Array.from({length:v+1},()=>null));for(let B=0;B<=a;B++)for(let I=0;I<=v;I++){let{x:G,y:O}=C(I-.5,B-.5),j=I/v,J=B/a,X=!1,t0=[[I-1,B-1],[I,B-1],[I-1,B],[I,B]];for(let[d0,l0]of t0)if(u(d0,l0)){X=!0;break}X&&(M[B][I]=b(G,O,l,j,J,0,0,1),S[B][I]=b(G,O,-l,j,J,0,0,-1))}for(let B=0;B<a;B++)for(let I=0;I<v;I++){if(!u(I,B))continue;let G=M[B][I],O=M[B][I+1],j=M[B+1][I+1],J=M[B+1][I],X=S[B][I],t0=S[B][I+1],d0=S[B+1][I+1],l0=S[B+1][I];G!==null&&O!==null&&j!==null&&J!==null&&A(G,O,j,J),X!==null&&t0!==null&&d0!==null&&l0!==null&&A(t0,X,l0,d0)}for(let B=0;B<a;B++)for(let I=0;I<v;I++){if(!u(I,B))continue;let G=(I+.5)/v,O=(B+.5)/a;if(!u(I-1,B)){let j=M[B][I],J=M[B+1][I],X=S[B][I],t0=S[B+1][I];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=b(f[j*3],f[j*3+1],f[j*3+2],G,O,-1,0,0),l0=b(f[J*3],f[J*3+1],f[J*3+2],G,O,-1,0,0),m0=b(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,-1,0,0),p0=b(f[X*3],f[X*3+1],f[X*3+2],G,O,-1,0,0);A(d0,l0,m0,p0)}}if(!u(I+1,B)){let j=M[B+1][I+1],J=M[B][I+1],X=S[B+1][I+1],t0=S[B][I+1];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=b(f[j*3],f[j*3+1],f[j*3+2],G,O,1,0,0),l0=b(f[J*3],f[J*3+1],f[J*3+2],G,O,1,0,0),m0=b(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,1,0,0),p0=b(f[X*3],f[X*3+1],f[X*3+2],G,O,1,0,0);A(d0,l0,m0,p0)}}if(!u(I,B-1)){let j=M[B][I],J=M[B][I+1],X=S[B][I],t0=S[B][I+1];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=b(f[j*3],f[j*3+1],f[j*3+2],G,O,0,-1,0),l0=b(f[J*3],f[J*3+1],f[J*3+2],G,O,0,-1,0),m0=b(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,0,-1,0),p0=b(f[X*3],f[X*3+1],f[X*3+2],G,O,0,-1,0);A(d0,l0,m0,p0)}}if(!u(I,B+1)){let j=M[B+1][I+1],J=M[B+1][I],X=S[B+1][I+1],t0=S[B+1][I];if(j!==null&&J!==null&&X!==null&&t0!==null){let d0=b(f[j*3],f[j*3+1],f[j*3+2],G,O,0,1,0),l0=b(f[J*3],f[J*3+1],f[J*3+2],G,O,0,1,0),m0=b(f[t0*3],f[t0*3+1],f[t0*3+2],G,O,0,1,0),p0=b(f[X*3],f[X*3+1],f[X*3+2],G,O,0,1,0);A(d0,l0,m0,p0)}}}let H=new s0.BufferGeometry;return H.setAttribute("position",new s0.Float32BufferAttribute(f,3)),H.setAttribute("uv",new s0.Float32BufferAttribute(g,2)),H.setAttribute("normal",new s0.Float32BufferAttribute(y,3)),H.setIndex(m),H.computeVertexNormals(),{geometry:H,totalVertices:w,totalTriangles:m.length/3}}function q7(n,e){let{u:t,v:r,sizeX:i,sizeY:s}=e,o=Math.max(1,Math.floor(i*n.image.width)),v=Math.max(1,Math.floor(s*n.image.height)),a=document.createElement("canvas");a.width=o,a.height=v;let l=a.getContext("2d");return l.imageSmoothingEnabled=!1,l.drawImage(n.image,t*n.image.width,r*n.image.height,i*n.image.width,s*n.image.height,0,0,a.width,a.height),a}function Qs(n,e,t={}){let{faceCamera:r=!1,use3D:i=!0,depth:s=.04}=t,{u:o,v,sizeX:a,sizeY:l}=e;if(r){let y=n.clone();y.flipY=!0,y.offset.set(o,1-v-l),y.repeat.set(a,l),y.needsUpdate=!0,y.magFilter=s0.NearestFilter,y.minFilter=s0.NearestFilter;let w=new s0.SpriteMaterial({map:y,transparent:!0,alphaTest:.1});return{mesh:new s0.Sprite(w),itemsTexture:y,cleanup(){y.dispose()}}}if(i)try{let y=q7(n,e),{geometry:w}=J7(y,{depth:s}),b=new s0.CanvasTexture(y);b.magFilter=s0.NearestFilter,b.minFilter=s0.NearestFilter,b.wrapS=b.wrapT=s0.ClampToEdgeWrapping,b.flipY=!1,b.needsUpdate=!0;let A=new s0.MeshStandardMaterial({map:b,side:s0.DoubleSide,transparent:!0,alphaTest:.1});return{mesh:new s0.Mesh(w,A),itemsTexture:b,cleanup(){b.dispose(),w.dispose(),A.map&&A.map.dispose(),A.dispose()}}}catch{}let c=n.clone();c.flipY=!0,c.offset.set(o,1-v-l),c.repeat.set(a,l),c.needsUpdate=!0,c.magFilter=s0.NearestFilter,c.minFilter=s0.NearestFilter;let u=c.clone();u.repeat.x*=-1,u.needsUpdate=!0,u.offset.set(o+a,1-v-l);let f=new s0.MeshStandardMaterial({map:c,transparent:!0,alphaTest:.1}),m=new s0.MeshStandardMaterial({map:u,transparent:!0,alphaTest:.1});return{mesh:new s0.Mesh(new s0.BoxGeometry(1,1,0),[new s0.MeshBasicMaterial({color:0}),new s0.MeshBasicMaterial({color:0}),new s0.MeshBasicMaterial({color:0}),new s0.MeshBasicMaterial({color:0}),f,m]),itemsTexture:c,itemsTextureFlipped:u,cleanup(){c.dispose(),u.dispose(),f.dispose(),m.dispose()}}}E();x();k();R();import*as q from"three";E();x();k();R();E();x();k();R();import{REVISION as Z7}from"three";var Ks=parseInt(Z7.replace(/\D+/g,""));E();x();k();R();import{Loader as X7,FileLoader as $7,Group as e8,BufferGeometry as Js,Float32BufferAttribute as zt,LineBasicMaterial as ui,Material as qs,PointsMaterial as x1,MeshPhongMaterial as t8,LineSegments as Zs,Points as fi,Mesh as Xs,Vector3 as S5}from"three";var r8=/^[og]\s*(.+)?/,i8=/^mtllib /,n8=/^usemtl /,s8=/^usemap /,$s=new S5,hi=new S5,eo=new S5,to=new S5,le=new S5;function o8(){let n={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=t!==!1;return}let r=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:t!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(i,s){let o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);let v={index:this.materials.length,name:i||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(a){let l={index:typeof a=="number"?a:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return l.clone=this.clone.bind(l),l}};return this.materials.push(v),v},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(i){let s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),i&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return i&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},r&&r.name&&typeof r.clone=="function"){let i=r.clone(0);i.inherited=!0,this.object.materials.push(i)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,t){let r=parseInt(e,10);return(r>=0?r-1:r+t/3)*3},parseNormalIndex:function(e,t){let r=parseInt(e,10);return(r>=0?r-1:r+t/3)*3},parseUVIndex:function(e,t){let r=parseInt(e,10);return(r>=0?r-1:r+t/2)*2},addVertex:function(e,t,r){let i=this.vertices,s=this.object.geometry.vertices;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[r+0],i[r+1],i[r+2])},addVertexPoint:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,r){let i=this.normals,s=this.object.geometry.normals;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[r+0],i[r+1],i[r+2])},addFaceNormal:function(e,t,r){let i=this.vertices,s=this.object.geometry.normals;$s.fromArray(i,e),hi.fromArray(i,t),eo.fromArray(i,r),le.subVectors(eo,hi),to.subVectors($s,hi),le.cross(to),le.normalize(),s.push(le.x,le.y,le.z),s.push(le.x,le.y,le.z),s.push(le.x,le.y,le.z)},addColor:function(e,t,r){let i=this.colors,s=this.object.geometry.colors;i[e]!==void 0&&s.push(i[e+0],i[e+1],i[e+2]),i[t]!==void 0&&s.push(i[t+0],i[t+1],i[t+2]),i[r]!==void 0&&s.push(i[r+0],i[r+1],i[r+2])},addUV:function(e,t,r){let i=this.uvs,s=this.object.geometry.uvs;s.push(i[e+0],i[e+1]),s.push(i[t+0],i[t+1]),s.push(i[r+0],i[r+1])},addDefaultUV:function(){let e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){let t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,r,i,s,o,v,a,l){let c=this.vertices.length,u=this.parseVertexIndex(e,c),f=this.parseVertexIndex(t,c),m=this.parseVertexIndex(r,c);if(this.addVertex(u,f,m),this.addColor(u,f,m),v!==void 0&&v!==""){let g=this.normals.length;u=this.parseNormalIndex(v,g),f=this.parseNormalIndex(a,g),m=this.parseNormalIndex(l,g),this.addNormal(u,f,m)}else this.addFaceNormal(u,f,m);if(i!==void 0&&i!==""){let g=this.uvs.length;u=this.parseUVIndex(i,g),f=this.parseUVIndex(s,g),m=this.parseUVIndex(o,g),this.addUV(u,f,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";let t=this.vertices.length;for(let r=0,i=e.length;r<i;r++){let s=this.parseVertexIndex(e[r],t);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";let r=this.vertices.length,i=this.uvs.length;for(let s=0,o=e.length;s<o;s++)this.addVertexLine(this.parseVertexIndex(e[s],r));for(let s=0,o=t.length;s<o;s++)this.addUVLine(this.parseUVIndex(t[s],i))}};return n.startObject("",!1),n}var Lt=class extends X7{constructor(e){super(e),this.materials=null}load(e,t,r,i){let s=this,o=new $7(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(v){try{t(s.parse(v))}catch(a){i&&i(a),s.manager.itemError(e)}},r,i)}setMaterials(e){return this.materials=e,this}parse(e){let t=new o8;e.indexOf(`\r
720
720
  `)!==-1&&(e=e.replace(/\r\n/g,`
721
721
  `)),e.indexOf(`\\
722
722
  `)!==-1&&(e=e.replace(/\\\n/g,""));let r=e.split(`
723
- `),i="",s="",o=0,a=[],v=typeof"".trimLeft=="function";for(let d=0,f=r.length;d<f;d++)if(i=r[d],i=v?i.trimLeft():i.trim(),o=i.length,o!==0&&(s=i.charAt(0),s!=="#")){if(s==="v"){let m=i.split(/\s+/);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?t.colors.push(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6])):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]));break;case"vt":t.uvs.push(parseFloat(m[1]),parseFloat(m[2]));break}}else if(s==="f"){let g=i.substr(1).trim().split(/\s+/),b=[];for(let y=0,A=g.length;y<A;y++){let C=g[y];if(C.length>0){let M=C.split("/");b.push(M)}}let w=b[0];for(let y=1,A=b.length-1;y<A;y++){let C=b[y],M=b[y+1];t.addFace(w[0],C[0],M[0],w[1],C[1],M[1],w[2],C[2],M[2])}}else if(s==="l"){let m=i.substring(1).trim().split(" "),g=[],b=[];if(i.indexOf("/")===-1)g=m;else for(let w=0,y=m.length;w<y;w++){let A=m[w].split("/");A[0]!==""&&g.push(A[0]),A[1]!==""&&b.push(A[1])}t.addLineGeometry(g,b)}else if(s==="p"){let g=i.substr(1).trim().split(" ");t.addPointGeometry(g)}else if((a=u8.exec(i))!==null){let m=(" "+a[0].substr(1).trim()).substr(1);t.startObject(m)}else if(h8.test(i))t.object.startMaterial(i.substring(7).trim(),t.materialLibraries);else if(f8.test(i))t.materialLibraries.push(i.substring(7).trim());else if(!m8.test(i)){if(s==="s"){if(a=i.split(" "),a.length>1){let g=a[1].trim().toLowerCase();t.object.smooth=g!=="0"&&g!=="off"}else t.object.smooth=!0;let m=t.object.currentMaterial();m&&(m.smooth=t.object.smooth)}else if(i==="\0")continue}}t.finalize();let l=new c8;if(l.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0)===!0)for(let d=0,f=t.objects.length;d<f;d++){let m=t.objects[d],g=m.geometry,b=m.materials,w=g.type==="Line",y=g.type==="Points",A=!1;if(g.vertices.length===0)continue;let C=new so;C.setAttribute("position",new Lt(g.vertices,3)),g.normals.length>0&&C.setAttribute("normal",new Lt(g.normals,3)),g.colors.length>0&&(A=!0,C.setAttribute("color",new Lt(g.colors,3))),g.hasUVIndices===!0&&C.setAttribute("uv",new Lt(g.uvs,2));let M=[];for(let H=0,B=b.length;H<B;H++){let I=b[H],G=I.name+"_"+I.smooth+"_"+A,O=t.materials[G];if(this.materials!==null){if(O=this.materials.create(I.name),w&&O&&!(O instanceof Ai)){let j=new Ai;oo.prototype.copy.call(j,O),j.color.copy(O.color),O=j}else if(y&&O&&!(O instanceof I1)){let j=new I1({size:10,sizeAttenuation:!1});oo.prototype.copy.call(j,O),j.color.copy(O.color),j.map=O.map,O=j}}O===void 0&&(w?O=new Ai:y?O=new I1({size:1,sizeAttenuation:!1}):O=new d8,O.name=I.name,O.flatShading=!I.smooth,O.vertexColors=A,t.materials[G]=O),M.push(O)}let S;if(M.length>1){for(let H=0,B=b.length;H<B;H++){let I=b[H];C.addGroup(I.groupStart,I.groupCount,H)}w?S=new ao(C,M):y?S=new Ei(C,M):S=new vo(C,M)}else w?S=new ao(C,M[0]):y?S=new Ei(C,M[0]):S=new vo(C,M[0]);S.name=m.name,l.add(S)}else if(t.vertices.length>0){let d=new I1({size:1,sizeAttenuation:!1}),f=new so;f.setAttribute("position",new Lt(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(f.setAttribute("color",new Lt(t.colors,3)),d.vertexColors=!0);let m=new Ei(f,d);l.add(m)}return l}};E();x();k();R();import{InstancedBufferGeometry as g8,Float32BufferAttribute as fo,InstancedInterleavedBuffer as ho,InterleavedBufferAttribute as H1,WireframeGeometry as b8,Box3 as po,Sphere as y8,Vector3 as _8}from"three";var mo=new po,O1=new _8,ct=class extends g8{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";let e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],r=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(r),this.setAttribute("position",new fo(e,3)),this.setAttribute("uv",new fo(t,2))}applyMatrix4(e){let t=this.attributes.instanceStart,r=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),r.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let r=new ho(t,6,1);return this.setAttribute("instanceStart",new H1(r,3,0)),this.setAttribute("instanceEnd",new H1(r,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let r;e instanceof Float32Array?r=e:Array.isArray(e)&&(r=new Float32Array(e));let i=new ho(r,t*2,1);return this.setAttribute("instanceColorStart",new H1(i,t,0)),this.setAttribute("instanceColorEnd",new H1(i,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new b8(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new po);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),mo.setFromBufferAttribute(t),this.boundingBox.union(mo))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new y8),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){let r=this.boundingSphere.center;this.boundingBox.getCenter(r);let i=0;for(let s=0,o=e.count;s<o;s++)O1.fromBufferAttribute(e,s),i=Math.max(i,r.distanceToSquared(O1)),O1.fromBufferAttribute(t,s),i=Math.max(i,r.distanceToSquared(O1));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)}}toJSON(){}applyMatrix(e){return this.applyMatrix4(e)}};E();x();k();R();import{Mesh as E8,InstancedInterleavedBuffer as x8,InterleavedBufferAttribute as yo,Vector3 as Ao,Vector4 as R8}from"three";E();x();k();R();import{ShaderMaterial as w8,UniformsUtils as go,UniformsLib as bo,Vector2 as A8}from"three";var dt=class extends w8{constructor(e){super({type:"LineMaterial",uniforms:go.clone(go.merge([bo.common,bo.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new A8(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
723
+ `),i="",s="",o=0,v=[],a=typeof"".trimLeft=="function";for(let u=0,f=r.length;u<f;u++)if(i=r[u],i=a?i.trimLeft():i.trim(),o=i.length,o!==0&&(s=i.charAt(0),s!=="#")){if(s==="v"){let m=i.split(/\s+/);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?t.colors.push(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6])):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]));break;case"vt":t.uvs.push(parseFloat(m[1]),parseFloat(m[2]));break}}else if(s==="f"){let g=i.substr(1).trim().split(/\s+/),y=[];for(let b=0,A=g.length;b<A;b++){let C=g[b];if(C.length>0){let M=C.split("/");y.push(M)}}let w=y[0];for(let b=1,A=y.length-1;b<A;b++){let C=y[b],M=y[b+1];t.addFace(w[0],C[0],M[0],w[1],C[1],M[1],w[2],C[2],M[2])}}else if(s==="l"){let m=i.substring(1).trim().split(" "),g=[],y=[];if(i.indexOf("/")===-1)g=m;else for(let w=0,b=m.length;w<b;w++){let A=m[w].split("/");A[0]!==""&&g.push(A[0]),A[1]!==""&&y.push(A[1])}t.addLineGeometry(g,y)}else if(s==="p"){let g=i.substr(1).trim().split(" ");t.addPointGeometry(g)}else if((v=r8.exec(i))!==null){let m=(" "+v[0].substr(1).trim()).substr(1);t.startObject(m)}else if(n8.test(i))t.object.startMaterial(i.substring(7).trim(),t.materialLibraries);else if(i8.test(i))t.materialLibraries.push(i.substring(7).trim());else if(!s8.test(i)){if(s==="s"){if(v=i.split(" "),v.length>1){let g=v[1].trim().toLowerCase();t.object.smooth=g!=="0"&&g!=="off"}else t.object.smooth=!0;let m=t.object.currentMaterial();m&&(m.smooth=t.object.smooth)}else if(i==="\0")continue}}t.finalize();let l=new e8;if(l.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0)===!0)for(let u=0,f=t.objects.length;u<f;u++){let m=t.objects[u],g=m.geometry,y=m.materials,w=g.type==="Line",b=g.type==="Points",A=!1;if(g.vertices.length===0)continue;let C=new Js;C.setAttribute("position",new zt(g.vertices,3)),g.normals.length>0&&C.setAttribute("normal",new zt(g.normals,3)),g.colors.length>0&&(A=!0,C.setAttribute("color",new zt(g.colors,3))),g.hasUVIndices===!0&&C.setAttribute("uv",new zt(g.uvs,2));let M=[];for(let H=0,B=y.length;H<B;H++){let I=y[H],G=I.name+"_"+I.smooth+"_"+A,O=t.materials[G];if(this.materials!==null){if(O=this.materials.create(I.name),w&&O&&!(O instanceof ui)){let j=new ui;qs.prototype.copy.call(j,O),j.color.copy(O.color),O=j}else if(b&&O&&!(O instanceof x1)){let j=new x1({size:10,sizeAttenuation:!1});qs.prototype.copy.call(j,O),j.color.copy(O.color),j.map=O.map,O=j}}O===void 0&&(w?O=new ui:b?O=new x1({size:1,sizeAttenuation:!1}):O=new t8,O.name=I.name,O.flatShading=!I.smooth,O.vertexColors=A,t.materials[G]=O),M.push(O)}let S;if(M.length>1){for(let H=0,B=y.length;H<B;H++){let I=y[H];C.addGroup(I.groupStart,I.groupCount,H)}w?S=new Zs(C,M):b?S=new fi(C,M):S=new Xs(C,M)}else w?S=new Zs(C,M[0]):b?S=new fi(C,M[0]):S=new Xs(C,M[0]);S.name=m.name,l.add(S)}else if(t.vertices.length>0){let u=new x1({size:1,sizeAttenuation:!1}),f=new Js;f.setAttribute("position",new zt(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(f.setAttribute("color",new zt(t.colors,3)),u.vertexColors=!0);let m=new fi(f,u);l.add(m)}return l}};E();x();k();R();import{InstancedBufferGeometry as a8,Float32BufferAttribute as ro,InstancedInterleavedBuffer as io,InterleavedBufferAttribute as R1,WireframeGeometry as v8,Box3 as so,Sphere as l8,Vector3 as c8}from"three";var no=new so,k1=new c8,vt=class extends a8{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";let e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],r=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(r),this.setAttribute("position",new ro(e,3)),this.setAttribute("uv",new ro(t,2))}applyMatrix4(e){let t=this.attributes.instanceStart,r=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),r.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let r=new io(t,6,1);return this.setAttribute("instanceStart",new R1(r,3,0)),this.setAttribute("instanceEnd",new R1(r,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let r;e instanceof Float32Array?r=e:Array.isArray(e)&&(r=new Float32Array(e));let i=new io(r,t*2,1);return this.setAttribute("instanceColorStart",new R1(i,t,0)),this.setAttribute("instanceColorEnd",new R1(i,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new v8(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new so);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),no.setFromBufferAttribute(t),this.boundingBox.union(no))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new l8),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){let r=this.boundingSphere.center;this.boundingBox.getCenter(r);let i=0;for(let s=0,o=e.count;s<o;s++)k1.fromBufferAttribute(e,s),i=Math.max(i,r.distanceToSquared(k1)),k1.fromBufferAttribute(t,s),i=Math.max(i,r.distanceToSquared(k1));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)}}toJSON(){}applyMatrix(e){return this.applyMatrix4(e)}};E();x();k();R();import{Mesh as f8,InstancedInterleavedBuffer as h8,InterleavedBufferAttribute as vo,Vector3 as uo,Vector4 as m8}from"three";E();x();k();R();import{ShaderMaterial as d8,UniformsUtils as oo,UniformsLib as ao,Vector2 as u8}from"three";var lt=class extends d8{constructor(e){super({type:"LineMaterial",uniforms:oo.clone(oo.merge([ao.common,ao.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new u8(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
724
724
  #include <common>
725
725
  #include <fog_pars_vertex>
726
726
  #include <logdepthbuf_pars_vertex>
@@ -1123,12 +1123,12 @@ void main() {
1123
1123
  gl_FragColor = diffuseColor;
1124
1124
 
1125
1125
  #include <tonemapping_fragment>
1126
- #include <${no>=154?"colorspace_fragment":"encodings_fragment"}>
1126
+ #include <${Ks>=154?"colorspace_fragment":"encodings_fragment"}>
1127
1127
  #include <fog_fragment>
1128
1128
  #include <premultiplied_alpha_fragment>
1129
1129
 
1130
1130
  }
1131
- `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(t){t===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(t){!!t!="USE_DASH"in this.defines&&(this.needsUpdate=!0),t===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(t){this.uniforms.dashOffset.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(t){!!t!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),t===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}};var _o=new Ao,wo=new Ao,Ri=new R8,O5=class extends E8{constructor(e=new ct,t=new dt({color:Math.random()*16777215})){super(e,t),this.isWireframe=!0,this.type="Wireframe"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,r=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,a=0,v=t.count;o<v;o++,a+=2)_o.fromBufferAttribute(t,o),wo.fromBufferAttribute(r,o),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+_o.distanceTo(wo);let s=new x8(i,2,1);return e.setAttribute("instanceDistanceStart",new yo(s,1,0)),e.setAttribute("instanceDistanceEnd",new yo(s,1,1)),this}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(Ri),this.material.uniforms.resolution.value.set(Ri.z,Ri.w))}};import{GLTFLoader as d4}from"three/examples/jsm/loaders/GLTFLoader.js";import u4 from"mc-assets/dist/other-textures/latest/entity/zombie/husk.png";import{Vec3 as F1}from"vec3";import f4 from"mc-assets/dist/other-textures/latest/entity/cat/ocelot.png";import h4 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/arrow.png";import m4 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/spectral_arrow.png";import p4 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/tipped_arrow.png";var Eo={armor_stand:{identifier:"minecraft:armor_stand",min_engine_version:"1.8.0",materials:{default:"armor_stand"},textures:{default:"textures/entity/armorstand/wood"},geometry:{default:{bones:[{name:"baseplate",parent:"waist",cubes:[{origin:[-6,0,-6],size:[12,1,12],uv:[0,32]}]},{name:"waist",pivot:[0,12,0]},{name:"body",parent:"waist",pivot:[0,13,0],cubes:[{origin:[-6,21,-1.5],size:[12,3,3],uv:[0,26]},{origin:[-3,14,-1],size:[2,7,2],uv:[16,0]},{origin:[1,14,-1],size:[2,7,2],uv:[48,16]},{origin:[-4,12,-1],size:[8,2,2],uv:[0,48]}]},{name:"head",parent:"waist",pivot:[0,12,0],cubes:[{origin:[-1,24,-1],size:[2,7,2],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0]}]},{name:"leftarm",parent:"waist",mirror:!0,pivot:[5,10,0],cubes:[{origin:[5,12,-1],size:[2,12,2],uv:[32,16]}]},{name:"leftitem",parent:"leftarm",pivot:[1,-9,-5]},{name:"leftleg",parent:"waist",mirror:!0,pivot:[1.9,1,0],cubes:[{origin:[.9,1,-1],size:[2,11,2],uv:[40,16]}]},{name:"rightarm",parent:"waist",pivot:[-5,10,0],cubes:[{origin:[-7,12,-1],size:[2,12,2],uv:[24,0]}]},{name:"rightitem",parent:"rightarm",pivot:[-1,-9,-5]},{name:"rightleg",parent:"waist",pivot:[-1.9,1,0],cubes:[{origin:[-2.9,1,-1],size:[2,11,2],uv:[8,0]}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.armor_stand"],enable_attachables:!0},arrow:{identifier:"minecraft:arrow",materials:{default:"arrow"},textures:{default:"textures/entity/arrow"},geometry:{default:{bones:[{name:"body",pivot:[0,1,0],cubes:[{origin:[0,-2.5,-3],rotation:[0,0,45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[0,-2.5,-3],rotation:[0,0,-45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[-2.5,-2.5,12],rotation:[0,0,45],size:[5,5,0],uv:{south:{uv:[0,5]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.arrow"]},bat:{_comment:"Wing tip mirror flags are swapped vs vanilla Bedrock model: our addCube() mirror implementation flips UVs in the opposite direction, so rightWingTip needs mirror=true and leftWingTip needs mirror=false to render correctly.",identifier:"minecraft:bat",materials:{default:"bat"},textures:{default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAALHSURBVHja7VrBSiQxFJybHvci6G1gF2TBwyoKelnWy55kWYS9ePDmD+in+KcevLb7GgpqipeeTkzPpGdewSNJmx6nKtXJS3oWiwTOv33pbs6Ou9vr731YHddQ5/ZiAHa/9cXnjLln62DyLALIL48P+4AIQ+RZAP2cnO909/PH4uvRQcdh1zSqwCMPIiDPIqwT8uHufMVJuDfnOxnhq9OT7vHPZR9WZxEgSjUBUi7IcQBG++XpphfB6rgvVwCQ//f7og8WAeL8F6Kr6oD7X8s+PPuOmQNYAAsIUOIAkDeSLIK1LeCMagIweZQ8iRkBlJuYl5gwSlxjZ2R9KM/2XBphsyxEQGhfOCEVNQXQ0UZdo2i21+edR57DmxjZFRpTCaD2/7QAXsAFcEKq3zYEGHJBtgCeC97f3vtnG0uY1e1aavQ3/QgMuaBoDtCsDyWv3yqSlxhpTClAygXZArAILIaS8ezOo52TIJVA1/sqAswRnhCfEoAnuqGkZwpbZxJfyflTQuysAN7GxxNiZ62fEoCFMBGqpcK8h8ckqIkRoiU3VPkHIM/2R4rMaTLK0pGr9oVrw9v7Iy/QDLFEAH5umxTAW9utreTHOuD1+e/KaQ4mrGrb1ykE0L07HODFmKMsJs1b2GYfAc0MdYPEThiTvIA8DjWayNxSs3pJePPDOvJNCKDL27r22L95AlRJXaewuh57cVuPx7Acen1VlNkIoKR0++udCer84PXn42wj660EW38BooS99rqTn1R/FkCTnibyAH3l5bW9GOqjx+Wa8TWVCXpn/NzW63oIote1bH6HlSKUK0BKkFkIgDSX01+taz9+vTV0X/MC6Hu+1OFmSb9tHp6MRopIrQgBAjMDtr2bfOvb3KTIP2vZy9HnvH6vXJD6ZdheOYAJl/yOZ/YCMOFYygKBQCAQCAQCgUAgEAgEAoFAIBDYKXwAXSs8dJ1Ggb4AAAAASUVORK5CYII="},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],bones:[{name:"head",pivot:[0,24,0],cubes:[{origin:[-3,21,-3],size:[6,6,6],uv:[0,0]}]},{name:"rightEar",pivot:[0,24,0],cubes:[{origin:[-4,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"leftEar",mirror:!0,pivot:[0,24,0],cubes:[{origin:[1,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"body",pivot:[0,24,0],cubes:[{origin:[-3,8,-3],size:[6,12,6],uv:[0,16]},{origin:[-5,-8,0],size:[10,16,1],uv:[0,34]}]},{name:"rightWing",pivot:[0,24,0],cubes:[{origin:[-12,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"rightWingTip",mirror:!0,pivot:[-12,23,1.5],cubes:[{origin:[-20,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"rightWing"},{name:"leftWing",mirror:!0,pivot:[0,24,0],cubes:[{origin:[2,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"leftWingTip",pivot:[12,23,1.5],cubes:[{origin:[12,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"leftWing"}]}},render_controllers:["controller.render.bat"],spawn_egg:{texture:"spawn_egg",texture_index:18}},bee:{identifier:"minecraft:bee",materials:{default:"bee"},textures:{default:"textures/entity/bee/bee",angry:"textures/entity/bee/bee_angry",nectar:"textures/entity/bee/bee_nectar",angry_nectar:"textures/entity/bee/bee_angry_nectar"},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1.5,visible_bounds_height:1.5,visible_bounds_offset:[0,.25,0],bones:[{name:"body",pivot:[.5,5,0],cubes:[{origin:[-3,2,-5],size:[7,7,10],uv:[0,0]},{origin:[2,7,-8],size:[1,2,3],uv:[2,0]},{origin:[-2,7,-8],size:[1,2,3],uv:[2,3]}],locators:{lead:[0,4,-1]}},{name:"stinger",parent:"body",pivot:[.5,6,1],cubes:[{origin:[.5,5,5],size:[0,1,2],uv:[26,7]}]},{name:"rightwing_bone",parent:"body",pivot:[-1,9,-3],rotation:[15,-15,0],cubes:[{origin:[-10,9,-3],size:[9,0,6],uv:[0,18]}]},{name:"leftwing_bone",parent:"body",pivot:[2,9,-3],rotation:[15,15,0],cubes:[{origin:[2,9,-3],size:[9,0,6],uv:[9,24]}]},{name:"leg_front",parent:"body",pivot:[2,2,-2],cubes:[{origin:[-3,0,-2],size:[7,2,0],uv:[26,1]}]},{name:"leg_mid",parent:"body",pivot:[2,2,0],cubes:[{origin:[-3,0,0],size:[7,2,0],uv:[26,3]}]},{name:"leg_back",parent:"body",pivot:[2,2,2],cubes:[{origin:[-3,0,2],size:[7,2,0],uv:[26,5]}]}]}},particle_effects:{nectar_dripping:"minecraft:nectar_drip_particle"},render_controllers:["controller.render.bee"],spawn_egg:{texture:"egg_bee",texture_index:0}},cave_spider:{identifier:"minecraft:cave_spider",min_engine_version:"1.8.0",materials:{default:"spider",invisible:"spider_invisible"},textures:{default:"textures/entity/spider/cave_spider"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"head",pivot:[0,9,-3],cubes:[{origin:[-4,5,-11],size:[8,8,8],uv:[32,4]}],parent:"body0"},{name:"body0",pivot:[0,9,0],cubes:[{origin:[-3,6,-3],size:[6,6,6],uv:[0,0]}]},{name:"body1",pivot:[0,9,9],cubes:[{origin:[-5,5,3],size:[10,8,12],uv:[0,12]}],parent:"body0"},{name:"leg0",pivot:[-4,9,2],cubes:[{origin:[-19,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg1",pivot:[4,9,2],cubes:[{origin:[3,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg2",pivot:[-4,9,1],cubes:[{origin:[-19,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg3",pivot:[4,9,1],cubes:[{origin:[3,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg4",pivot:[-4,9,0],cubes:[{origin:[-19,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg5",pivot:[4,9,0],cubes:[{origin:[3,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg6",pivot:[-4,9,-1],cubes:[{origin:[-19,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg7",pivot:[4,9,-1],cubes:[{origin:[3,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"}]}},render_controllers:["controller.render.spider"],spawn_egg:{texture:"spawn_egg",texture_index:22}},chest_minecart:{identifier:"minecraft:chest_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},command_block_minecart:{identifier:"minecraft:command_block_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},cow:{identifier:"minecraft:cow",min_engine_version:"1.8.0",materials:{default:"cow"},textures:{default:"textures/entity/cow/cow"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.75,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",parent:"body",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.cow"],spawn_egg:{texture:"spawn_egg",texture_index:1}},dragon_fireball:{identifier:"minecraft:dragon_fireball",materials:{default:"fireball"},textures:{default:"textures/entity/enderdragon/dragon_fireball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},drowned:{identifier:"minecraft:drowned",min_engine_version:"1.16.0",materials:{default:"drowned"},textures:{default:"textures/entity/zombie/drowned"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"jacket",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.5}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0],inflate:.5}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:1}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[0,16]}]},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],mirror:!0}]},{name:"rightSleeve",parent:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[48,48],inflate:.5}]},{name:"leftSleeve",parent:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,32],inflate:.5,mirror:!0}]},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4.05,0,-2],size:[4,12,4],uv:[16,48]}]},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[.05,0,-2],size:[4,12,4],uv:[32,48],mirror:!0}]},{name:"rightPants",parent:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-4.25,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]},{name:"leftPants",parent:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[.25,0,-2],size:[4,12,4],uv:[0,32],inflate:.25,mirror:!0}]},{name:"waist",parent:"body",pivot:[0,12,0]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]}],visible_bounds_width:2.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.drowned"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:48}},egg:{identifier:"minecraft:egg",materials:{default:"egg"},textures:{default:"textures/items/egg"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},elder_guardian:{identifier:"minecraft:elder_guardian",min_engine_version:"1.8.0",materials:{default:"guardian",ghost:"guardian_ghost"},textures:{default:"textures/entity/guardian",elder:"textures/entity/guardian_elder",beam:"textures/entity/guardian_beam"},geometry:{default:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,0,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,6,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]},ghost:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,24,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,7,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]}},render_controllers:["controller.render.guardian"],spawn_egg:{texture:"spawn_egg",texture_index:36}},eye_of_ender:{identifier:"minecraft:eye_of_ender_signal",materials:{default:"eye_of_ender_signal"},textures:{default:"textures/items/ender_eye"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},ender_pearl:{identifier:"minecraft:ender_pearl",materials:{default:"ender_pearl"},textures:{default:"textures/items/ender_pearl"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},evoker_fangs:{identifier:"minecraft:evocation_fang",materials:{default:"fang"},textures:{default:"textures/entity/illager/evoker_fangs"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:64,textureheight:32,bones:[{name:"upper_jaw",parent:"base",pivot:[0,11,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0],inflate:.01}]},{name:"lower_jaw",parent:"base",pivot:[0,11,0],bind_pose_rotation:[0,180,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0]}]},{name:"base",pivot:[0,0,0],bind_pose_rotation:[0,90,0],cubes:[{origin:[-5,0,-5],size:[10,12,10],uv:[0,0]}]}]}},render_controllers:["controller.render.evocation_fang"]},evoker:{identifier:"minecraft:evocation_illager",min_engine_version:"1.8.0",materials:{default:"evoker"},textures:{default:"textures/entity/illager/evoker"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],locators:{right_hand:[-6,12,0]},cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],locators:{left_hand:[6,12,0]},mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},particle_effects:{spell:"minecraft:evoker_spell"},render_controllers:["controller.render.evoker"],spawn_egg:{texture:"spawn_egg",texture_index:40}},experience_bottle:{identifier:"minecraft:xp_bottle",materials:{default:"xp_bottle"},textures:{default:"textures/items/experience_bottle",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.experience_bottle"]},experience_orb:{identifier:"minecraft:xp_orb",materials:{default:"experience_orb"},textures:{default:"textures/entity/experience_orb"},geometry:{default:{bones:[{name:"body",pivot:[8,8,0],cubes:[{origin:[0,0,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:64,textureheight:64}},render_controllers:["controller.render.experience_orb"]},fireball:{identifier:"minecraft:fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},firework_rocket:{identifier:"minecraft:fireworks_rocket",materials:{default:"fireworks_rocket"},textures:{default:"textures/entity/fireworks"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],rotation:[0,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}},{origin:[-8,-8,0],rotation:[90,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.fireworks_rocket"]},fishing_bobber:{identifier:"minecraft:fishing_hook",materials:{default:"fishing_hook"},textures:{default:"textures/entity/fishing_hook"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-1.5,-1.5,-1.5],size:[3,3,3],rotation:[0,0,180],uv:{up:{uv:[0,0]},down:{uv:[3,0]},south:{uv:[9,0],uv_size:[-3,3]},north:{uv:[9,0]},east:{uv:[12,0]},west:{uv:[15,0]}}},{origin:[0,-4.5,-.5],size:[0,3,3],uv:{east:{uv:[18,0]}}},{origin:[0,1.5,-1.5],size:[0,3,3],uv:{east:{uv:[21,0]}}},{origin:[-1.5,1.5,0],size:[3,3,0],uv:{north:{uv:[21,0]}}}]}],texturewidth:24,textureheight:3}},render_controllers:["controller.render.fishing_hook"]},hoglin:{identifier:"minecraft:hoglin",materials:{default:"hoglin"},textures:{default:"textures/entity/hoglin/hoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#C66E55",overlay_color:"#5f6464"},render_controllers:["controller.render.hoglin"]},hopper_minecart:{identifier:"minecraft:hopper_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},husk:{identifier:"minecraft:husk",min_engine_version:"1.8.0",materials:{default:"husk"},textures:{default:"textures/entity/zombie/husk"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.husk"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:28}},iron_golem:{identifier:"minecraft:iron_golem",materials:{default:"iron_golem"},textures:{default:"textures/entity/iron_golem/iron_golem"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:128,bones:[{name:"body",pivot:[0,31,0],cubes:[{origin:[-9,21,-6],size:[18,12,11],uv:[0,40]},{origin:[-4.5,16,-3],size:[9,5,6],uv:[0,70],inflate:.5}]},{name:"head",parent:"body",pivot:[0,31,-2],locators:{lead:[0,31,-2]},cubes:[{origin:[-4,33,-7.5],size:[8,10,8],uv:[0,0]},{origin:[-1,32,-9.5],size:[2,4,2],uv:[24,0]}]},{name:"arm0",parent:"body",pivot:[0,31,0],cubes:[{origin:[-13,3.5,-3],size:[4,30,6],uv:[60,21]}]},{name:"arm1",parent:"body",pivot:[0,31,0],cubes:[{origin:[9,3.5,-3],size:[4,30,6],uv:[60,58]}]},{name:"leg0",parent:"body",pivot:[-4,13,0],cubes:[{origin:[-7.5,0,-3],size:[6,16,5],uv:[37,0]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[5,13,0],cubes:[{origin:[1.5,0,-3],size:[6,16,5],uv:[60,0]}]}]}},render_controllers:["controller.render.iron_golem"]},item_frame:{identifier:"minecraft:item_frame",materials:{default:"item_frame"},textures:{background:"block:item_frame",frame:"block:oak_planks"},geometry:{background:{bones:[{name:"base"},{name:"background",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-5,-5,-8],size:[10,10,.5],uv:[3,3]}]}],texturewidth:16,textureheight:16},frame:{bones:[{name:"frame",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-6,-6,-8],size:[12,1,1],uv:[2,2]},{origin:[-6,5,-8],size:[12,1,1],uv:[2,13]},{origin:[-6,-5,-8],size:[1,10,1],uv:[2,3]},{origin:[5,-5,-8],size:[1,10,1],uv:[13,3]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_frame"]},leash_knot:{identifier:"minecraft:leash_knot",materials:{default:"leash_knot"},textures:{default:"textures/entity/lead_knot"},geometry:{default:{bones:[{name:"knot",rotation:[0,180,0],cubes:[{origin:[5,6,5],size:[6,8,6],uv:[0,0]}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.leash_knot"]},llama_spit:{identifier:"minecraft:llama_spit",materials:{default:"llama_spit"},textures:{default:"textures/entity/llama/spit"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,26,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,-4],size:[2,2,2],uv:[0,0]},{origin:[0,22,0],size:[2,2,2],uv:[0,0]},{origin:[2,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,20,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,2],size:[2,2,2],uv:[0,0]}]}]}},render_controllers:["controller.render.llama_spit"]},magma_cube:{identifier:"minecraft:magma_cube",materials:{default:"magma_cube"},textures:{default:"textures/entity/slime/magmacube"},geometry:{default:{visible_bounds_width:2.5,visible_bounds_height:5,visible_bounds_offset:[0,2.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyCube_0",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,7,-4],size:[8,1,8],uv:[0,0]}]},{name:"bodyCube_1",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,6,-4],size:[8,1,8],uv:[0,1]}]},{name:"bodyCube_2",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,5,-4],size:[8,1,8],uv:[24,10]}]},{name:"bodyCube_3",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,4,-4],size:[8,1,8],uv:[24,19]}]},{name:"bodyCube_4",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,3,-4],size:[8,1,8],uv:[0,4]}]},{name:"bodyCube_5",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,2,-4],size:[8,1,8],uv:[0,5]}]},{name:"bodyCube_6",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,1,-4],size:[8,1,8],uv:[0,6]}]},{name:"bodyCube_7",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,1,8],uv:[0,7]}]},{name:"insideCube",pivot:[0,0,0],cubes:[{origin:[-2,2,-2],size:[4,4,4],uv:[0,16]}]}]}},render_controllers:["controller.render.magma_cube"],spawn_egg:{texture:"spawn_egg",texture_index:20}},mooshroom:{identifier:"minecraft:mooshroom",min_engine_version:"1.8.0",materials:{default:"mooshroom"},textures:{default:"textures/entity/cow/red_mooshroom",brown:"textures/entity/cow/brown_mooshroom"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.mooshroom"],spawn_egg:{texture:"spawn_egg",texture_index:5}},panda:{identifier:"minecraft:panda",materials:{default:"panda"},textures:{default:"textures/entity/panda/panda",lazy:"textures/entity/panda/lazy_panda",worried:"textures/entity/panda/worried_panda",playful:"textures/entity/panda/playful_panda",brown:"textures/entity/panda/brown_panda",weak:"textures/entity/panda/weak_panda",aggressive:"textures/entity/panda/aggressive_panda"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,12.5,-17],locators:{lead:[0,14,-16]},cubes:[{origin:[-6.5,7.5,-21],size:[13,10,9],uv:[0,6]},{origin:[-3.5,7.5,-23],size:[7,5,2],uv:[45,16]},{origin:[-8.5,16.5,-18],size:[5,4,1],uv:[52,25]},{origin:[3.5,16.5,-18],size:[5,4,1],uv:[52,25]}]},{name:"body",pivot:[0,14,0],bind_pose_rotation:[90,0,0],cubes:[{origin:[-9.5,1,-6.5],size:[19,26,13],uv:[0,25]}]},{name:"leg0",parent:"body",pivot:[-5.5,9,9],cubes:[{origin:[-8.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg1",parent:"body",pivot:[5.5,9,9],cubes:[{origin:[2.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg2",parent:"body",pivot:[-5.5,9,-9],cubes:[{origin:[-8.5,0,-12],size:[6,9,6],uv:[40,0]}]},{name:"leg3",parent:"body",pivot:[5.5,9,-9],cubes:[{origin:[2.5,0,-12],size:[6,9,6],uv:[40,0]}]}]}},render_controllers:["controller.render.panda"],spawn_egg:{texture:"spawn_egg",texture_index:54}},phantom:{identifier:"minecraft:phantom",materials:{default:"phantom",invisible:"phantom_invisible"},textures:{default:"textures/entity/phantom"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],bind_pose_rotation:[0,0,0],cubes:[{origin:[-3,23,-8],size:[5,3,9],uv:[0,8]}]},{name:"wing0",pivot:[2,26,-8],bind_pose_rotation:[0,0,5.7],cubes:[{origin:[2,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip0",pivot:[8,26,-8],bind_pose_rotation:[0,0,5.7],locators:{left_wing:[21,26,0]},cubes:[{origin:[8,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing0"},{name:"wing1",pivot:[-3,26,-8],bind_pose_rotation:[0,0,-5.7],mirror:!0,cubes:[{origin:[-9,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip1",pivot:[-9,24,-8],bind_pose_rotation:[0,0,-5.7],locators:{right_wing:[-22,24,0]},mirror:!0,cubes:[{origin:[-22,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing1"},{name:"head",pivot:[0,23,-7],bind_pose_rotation:[11.5,0,0],cubes:[{origin:[-4,22,-12],size:[7,3,5],uv:[0,0]}],parent:"body"},{name:"tail",pivot:[0,26,1],bind_pose_rotation:[0,0,0],cubes:[{origin:[-2,24,1],size:[3,2,6],uv:[3,20]}],parent:"body"},{name:"tailtip",pivot:[0,25.5,7],bind_pose_rotation:[0,0,0],cubes:[{origin:[-1,24.5,7],size:[1,1,6],uv:[4,29]}],parent:"tail"}]}},particle_effects:{wing_dust:"minecraft:phantom_trail_particle"},sound_effects:{flap:"mob.phantom.flap"},render_controllers:["controller.render.phantom"],spawn_egg:{texture:"spawn_egg",texture_index:51}},pig:{identifier:"minecraft:pig",min_engine_version:"1.8.0",materials:{default:"pig"},textures:{default:"textures/entity/pig/pig",saddled:"textures/entity/pig/pig_saddle"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,13,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-5,7,-5],size:[10,16,8],uv:[28,8]}]},{name:"head",parent:"body",pivot:[0,12,-6],locators:{lead:[0,14,-6]},cubes:[{origin:[-4,8,-14],size:[8,8,8],uv:[0,0]},{origin:[-2,9,-15],size:[4,3,1],uv:[16,16]}]},{name:"leg0",parent:"body",pivot:[-3,6,7],cubes:[{origin:[-5,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[3,6,7],cubes:[{origin:[1,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,6,-5],cubes:[{origin:[-5,0,-7],size:[4,6,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[3,6,-5],cubes:[{origin:[1,0,-7],size:[4,6,4],uv:[0,16]}]}]}},render_controllers:["controller.render.pig"],spawn_egg:{texture:"spawn_egg",texture_index:2}},piglin_brute:{identifier:"minecraft:piglin_brute",materials:{default:"piglin_brute"},textures:{default:"textures/entity/piglin/piglin_brute"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{base_color:"#592A10",overlay_color:"#F9F3A4"},render_controllers:["controller.render.piglin_brute"],enable_attachables:!0},polar_bear:{identifier:"minecraft:polar_bear",materials:{default:"polar_bear"},textures:{default:"textures/entity/bear/polarbear"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:128,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,14,-16],locators:{lead:[0,14,-16]},mirror:!0,cubes:[{mirror:!1,origin:[-3.5,10,-19],size:[7,7,7],uv:[0,0]},{mirror:!1,origin:[-2.5,10,-22],size:[5,3,3],uv:[0,44]},{mirror:!1,origin:[-4.5,16,-17],size:[2,2,1],uv:[26,0]},{origin:[2.5,16,-17],size:[2,2,1],uv:[26,0]}]},{name:"body",pivot:[-2,15,12],bind_pose_rotation:[90,0,0],cubes:[{origin:[-7,14,5],size:[14,14,11],uv:[0,19]},{origin:[-6,28,5],size:[12,12,10],uv:[39,0]}]},{name:"leg0",parent:"body",pivot:[-4.5,10,6],cubes:[{origin:[-6.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg1",parent:"body",pivot:[4.5,10,6],cubes:[{origin:[2.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg2",parent:"body",pivot:[-3.5,10,-8],cubes:[{origin:[-5.5,0,-10],size:[4,10,6],uv:[50,40]}]},{name:"leg3",parent:"body",pivot:[3.5,10,-8],cubes:[{origin:[1.5,0,-10],size:[4,10,6],uv:[50,40]}]}]}},render_controllers:["controller.render.polarbear"],spawn_egg:{texture:"spawn_egg",texture_index:37}},pufferfish:{identifier:"minecraft:pufferfish",min_engine_version:"1.8.0",materials:{default:"pufferfish"},textures:{default:"textures/entity/fish/pufferfish"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-1.5,0,-1.5],size:[3,2,3],uv:[0,27]},{origin:[.5,2,-1.5],size:[1,1,1],uv:[24,6]},{origin:[-1.5,2,-1.5],size:[1,1,1],uv:[28,6]}],locators:{lead:[0,0,0]}},{name:"tailfin",parent:"body",cubes:[{origin:[-1.5,1,1.5],size:[3,0,3],uv:[-3,0]}]},{name:"leftFin",parent:"body",pivot:[6.5,5,.5],cubes:[{origin:[1.5,0,-1.5],size:[1,1,2],uv:[25,0],mirror:!0}]},{name:"rightFin",parent:"body",pivot:[-6.5,5,.5],cubes:[{origin:[-2.5,0,-1.5],size:[1,1,2],uv:[25,0]}]}]},mid:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-2.5,1,-2.5],size:[5,5,5],uv:[12,22]}]},{name:"leftFin",parent:"body",pivot:[2.5,5,.5],cubes:[{origin:[2.5,4,-1.5],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-2.5,5,.5],cubes:[{origin:[-4.5,4,-1.5],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,6,-2.5],cubes:[{origin:[-2.5,6,-2.5],size:[5,1,0],uv:[19,17]}]},{name:"spines_top_back",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,6,2.5],cubes:[{origin:[-2.5,6,2.5],size:[5,1,0],uv:[11,17]}]},{name:"spines_bottom_front",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,1,-2.5],cubes:[{origin:[-2.5,0,-2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_bottom_back",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,1,2.5],rotation:[45,0,0],cubes:[{origin:[-2.5,0,2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_left_front",parent:"body",bind_pose_rotation:[0,45,0],pivot:[2.5,0,-2.5],rotation:[0,45,0],cubes:[{origin:[2.5,1,-2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_left_back",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[2.5,0,2.5],rotation:[0,-45,0],cubes:[{origin:[2.5,1,2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_right_front",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[-2.5,0,-2.5],rotation:[0,-45,0],cubes:[{origin:[-3.5,1,-2.5],size:[1,5,0],uv:[5,17]}]},{name:"spines_right_back",parent:"body",bind_pose_rotation:[0,45,0],pivot:[-2.5,0,2.5],rotation:[0,45,0],cubes:[{origin:[-3.5,1,2.5],size:[1,5,0],uv:[9,17]}]}]},large:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"leftFin",parent:"body",pivot:[4,7,1],cubes:[{origin:[4,6,-2.9904],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-4,7,1],cubes:[{origin:[-5.9968,6,-2.992],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",pivot:[-4,8,-4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,8,-4],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_mid",parent:"body",pivot:[0,8,0],cubes:[{origin:[-4,8,0],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_back",parent:"body",pivot:[0,8,4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,8,4],size:[8,1,1],uv:[14,16]}]},{name:"spines_bottom_front",parent:"body",pivot:[0,0,-4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,-1,-4],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_mid",parent:"body",pivot:[0,-1,0],cubes:[{origin:[-4,-1,0],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_back",parent:"body",pivot:[0,0,4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,-1,4],size:[8,1,1],uv:[14,19]}]},{name:"spines_left_front",parent:"body",pivot:[4,0,-4],bind_pose_rotation:[0,45,0],cubes:[{origin:[4,0,-4],size:[1,8,1],uv:[0,16]}]},{name:"spines_left_mid",parent:"body",pivot:[4,0,0],cubes:[{origin:[4,0,0],size:[1,8,1],uv:[4,16],mirror:!0}]},{name:"spines_left_back",parent:"body",pivot:[4,0,4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[4,0,4],size:[1,8,1],uv:[8,16],mirror:!0}]},{name:"spines_right_front",parent:"body",pivot:[-4,0,-4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[-5,0,-4],size:[1,8,1],uv:[4,16]}]},{name:"spines_right_mid",parent:"body",pivot:[-4,0,0],cubes:[{origin:[-5,0,0],size:[1,8,1],uv:[8,16]}]},{name:"spines_right_back",parent:"body",pivot:[-4,0,4],bind_pose_rotation:[0,45,0],cubes:[{origin:[-5,0,4],size:[1,8,1],uv:[8,16]}]}]}},render_controllers:[{"controller.render.pufferfish.small":"query.variant == 0"},{"controller.render.pufferfish.medium":"query.variant == 1"},{"controller.render.pufferfish.large":"query.variant == 2"}],spawn_egg:{texture:"spawn_egg",texture_index:46}},rabbit:{identifier:"minecraft:rabbit",min_engine_version:"1.8.0",materials:{default:"rabbit"},textures:{brown:"textures/entity/rabbit/brown",white:"textures/entity/rabbit/white",black:"textures/entity/rabbit/black",white_splotched:"textures/entity/rabbit/white_splotched",gold:"textures/entity/rabbit/gold",salt:"textures/entity/rabbit/salt",toast:"textures/entity/rabbit/toast"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"rearFootLeft",pivot:[3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[2,0,0],size:[2,1,7],uv:[8,24]}]},{name:"rearFootRight",pivot:[-3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[-4,0,0],size:[2,1,7],uv:[26,24]}]},{name:"haunchLeft",pivot:[3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,2.5,3.7],size:[2,4,5],uv:[16,15]}]},{name:"haunchRight",pivot:[-3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,2.5,3.7],size:[2,4,5],uv:[30,15]}]},{name:"body",pivot:[0,5,8],bind_pose_rotation:[-20,0,0],mirror:!0,cubes:[{origin:[-3,2,-2],size:[6,5,10],uv:[0,0]}]},{name:"frontLegLeft",pivot:[3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,0,-2],size:[2,7,2],uv:[8,15]}]},{name:"frontLegRight",pivot:[-3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,0,-2],size:[2,7,2],uv:[0,15]}]},{name:"head",pivot:[0,8,-1],locators:{lead:[0,8,-1]},mirror:!0,parent:"body",cubes:[{origin:[-2.5,8,-6],size:[5,4,5],uv:[32,0]}]},{name:"earRight",pivot:[0,8,-1],bind_pose_rotation:[0,-15,0],mirror:!0,parent:"body",cubes:[{origin:[-2.5,12,-2],size:[2,5,1],uv:[58,0]}]},{name:"earLeft",pivot:[0,8,-1],bind_pose_rotation:[0,15,0],mirror:!0,parent:"body",cubes:[{origin:[.5,12,-2],size:[2,5,1],uv:[52,0]}]},{name:"tail",pivot:[0,4,7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-1.5,2.5,7],size:[3,3,2],uv:[52,6]}]},{name:"nose",pivot:[0,8,-1],mirror:!0,parent:"body",cubes:[{origin:[-.5,9.5,-6.5],size:[1,1,1],uv:[32,9]}]}]}},render_controllers:["controller.render.rabbit"],spawn_egg:{texture:"spawn_egg",texture_index:24}},ravager:{identifier:"minecraft:ravager",textures:{default:"textures/entity/illager/ravager"},materials:{default:"ravager"},geometry:{default:{bones:[{pivot:[0,19,2],rotation:[90,0,0],cubes:[{origin:[-7,10,-2],size:[14,16,20],uv:[0,55]},{origin:[-6,-3,-2],size:[12,13,18],uv:[0,91]}],name:"body"},{pivot:[0,15,-10],cubes:[{origin:[-8,13,-24],size:[16,3,16],uv:[0,36]}],name:"mouth",parent:"head"},{pivot:[0,20,-20],cubes:[{origin:[-5,21,-10],size:[10,10,18],uv:[68,73]}],name:"neck"},{locators:{stun:[0,32,-15]},pivot:[0,28,-10],cubes:[{origin:[-8,14,-24],size:[16,20,16],uv:[0,0]},{origin:[-2,12,-28],size:[4,8,4],uv:[0,0]}],name:"head",parent:"neck"},{pivot:[-12,30,22],cubes:[{origin:[-12,0,17],size:[8,37,8],uv:[96,0]}],name:"leg0"},{pivot:[4,30,22],cubes:[{origin:[4,0,17],size:[8,37,8],uv:[96,0]}],name:"leg1"},{pivot:[-4,26,-4],cubes:[{origin:[-12,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg2"},{pivot:[-4,26,-4],cubes:[{origin:[4,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg3"},{pivot:[-5,27,-19],rotation:[60,0,0],cubes:[{origin:[-10,27,-20],size:[2,14,4],uv:[74,55]},{origin:[8,27,-20],size:[2,14,4],uv:[74,55]}],name:"horns",parent:"head"}],texturewidth:128,textureheight:128,visible_bounds_width:4,visible_bounds_height:3.5,visible_bounds_offset:[0,1.25,0]}},render_controllers:["controller.render.ravager"],spawn_egg:{texture:"spawn_egg",texture_index:57},particle_effects:{stun_particles:"minecraft:stunned_emitter"}},salmon:{identifier:"minecraft:salmon",materials:{default:"salmon"},textures:{default:"textures/entity/fish/salmon"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,visible_bounds_offset:[0,.5,0],texturewidth:32,textureheight:32,bones:[{name:"body_front",pivot:[0,0,-4],cubes:[{origin:[-1.5,3.5,-4],size:[3,5,8],uv:[0,0]}]},{name:"body_back",parent:"body_front",pivot:[0,0,4],cubes:[{origin:[-1.5,3.5,4],size:[3,5,8],uv:[0,13]}]},{name:"dorsal_front",parent:"body_front",pivot:[0,5,2],cubes:[{origin:[0,8.5,2],size:[0,2,2],uv:[4,2]}]},{name:"dorsal_back",parent:"body_back",pivot:[0,5,4],cubes:[{origin:[0,8.5,4],size:[0,2,3],uv:[2,3]}]},{name:"tailfin",parent:"body_back",pivot:[0,0,12],cubes:[{origin:[0,3.5,12],size:[0,5,6],uv:[20,10]}]},{name:"head",parent:"body_front",pivot:[0,3,-4],locators:{lead:[0,3,-4]},cubes:[{origin:[-1,4.5,-7],size:[2,4,3],uv:[22,0]}]},{name:"leftFin",parent:"body_front",pivot:[1.5,1,-4],rotation:[0,0,35],cubes:[{origin:[-.50752,3.86703,-4],size:[2,0,2],uv:[2,0]}]},{name:"rightFin",parent:"body_front",pivot:[-1.5,1,-4],rotation:[0,0,-35],cubes:[{origin:[-1.49258,3.86703,-4],size:[2,0,2],uv:[-2,0]}]}]}},render_controllers:["controller.render.salmon"],spawn_egg:{texture:"spawn_egg",texture_index:47}},sheep:{identifier:"minecraft:sheep",materials:{default:"sheep"},textures:{default:"textures/entity/sheep/sheep",wool:"textures/entity/sheep/sheep_fur"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,8]}]},{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-14],size:[6,6,8],uv:[0,0]}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,0,-7],size:[4,12,4],uv:[0,16]}]}]},wool:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-12],size:[6,6,6],uv:[0,32],inflate:.6}]},{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,40],inflate:1.75}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]}]}}},shulker_bullet:{identifier:"minecraft:shulker_bullet",materials:{default:"shulker_bullet"},textures:{default:"textures/entity/shulker/spark"},geometry:{default:{texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-4,-4,-1],size:[8,8,2],uv:[0,0]},{origin:[-1,-4,-4],size:[2,8,8],uv:[0,10]},{origin:[-4,-1,-4],size:[8,2,8],uv:[20,0]}]}]}},render_controllers:["controller.render.shulker_bullet"]},silverfish:{identifier:"minecraft:silverfish",materials:{default:"silverfish",body_layer:"silverfish_layers"},textures:{default:"textures/entity/silverfish"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyPart_0",parent:"bodyPart_2",pivot:[0,2,-3.5],cubes:[{origin:[-1.5,0,-4.5],size:[3,2,2],uv:[0,0]}]},{name:"bodyPart_1",parent:"bodyPart_2",pivot:[0,3,-1.5],cubes:[{origin:[-2,0,-2.5],size:[4,3,2],uv:[0,4]}]},{name:"bodyPart_2",pivot:[0,4,1],cubes:[{origin:[-3,0,-.5],size:[6,4,3],uv:[0,9]}]},{name:"bodyPart_3",parent:"bodyPart_2",pivot:[0,3,4],cubes:[{origin:[-1.5,0,2.5],size:[3,3,3],uv:[0,16]}]},{name:"bodyPart_4",parent:"bodyPart_2",pivot:[0,2,7],cubes:[{origin:[-1,0,5.5],size:[2,2,3],uv:[0,22]}]},{name:"bodyPart_5",parent:"bodyPart_2",pivot:[0,1,9.5],cubes:[{origin:[-1,0,8.5],size:[2,1,2],uv:[11,0]}]},{name:"bodyPart_6",parent:"bodyPart_2",pivot:[0,1,11.5],cubes:[{origin:[-.5,0,10.5],size:[1,1,2],uv:[13,4]}]},{name:"bodyLayer_0",parent:"bodyPart_2",pivot:[0,8,1],cubes:[{origin:[-5,0,-.5],size:[10,8,3],uv:[20,0]}]},{name:"bodyLayer_1",parent:"bodyPart_4",pivot:[0,4,7],cubes:[{origin:[-3,0,5.5],size:[6,4,3],uv:[20,11]}]},{name:"bodyLayer_2",parent:"bodyPart_1",pivot:[0,5,-1.5],cubes:[{origin:[-3,0,-3],size:[6,5,2],uv:[20,18]}]}]}},render_controllers:["controller.render.silverfish"],spawn_egg:{texture:"spawn_egg",texture_index:8}},skeleton:{identifier:"minecraft:skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:9},render_controllers:["controller.render.skeleton"],enable_attachables:!0},skeleton_horse:{identifier:"minecraft:skeleton_horse",textures:{base_brown:"textures/entity/horse/horse_brown",base_white:"textures/entity/horse/horse_white",base_chestnut:"textures/entity/horse/horse_chestnut",base_creamy:"textures/entity/horse/horse_creamy",base_black:"textures/entity/horse/horse_black",base_gray:"textures/entity/horse/horse_gray",base_darkbrown:"textures/entity/horse/horse_darkbrown",markings_none:"textures/entity/horse/horse_markings_none",markings_white:"textures/entity/horse/horse_markings_white",markings_whitefield:"textures/entity/horse/horse_markings_whitefield",markings_whitedots:"textures/entity/horse/horse_markings_whitedots",markings_blackdots:"textures/entity/horse/horse_markings_blackdots",mule:"textures/entity/horse/mule",donkey:"textures/entity/horse/donkey",skeleton:"textures/entity/horse/horse_skeleton",zombie:"textures/entity/horse/horse_zombie",armor_none:"textures/entity/horse/armor/horse_armor_none",armor_leather:"textures/entity/horse/armor/horse_armor_leather",armor_iron:"textures/entity/horse/armor/horse_armor_iron",armor_gold:"textures/entity/horse/armor/horse_armor_gold",armor_diamond:"textures/entity/horse/armor/horse_armor_diamond"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:3,visible_bounds_offset:[0,1,0],texturewidth:128,textureheight:128,bones:[{name:"Body",pivot:[0,13,9],rotation:[0,0,0],cubes:[{origin:[-5,11,-10],size:[10,10,24],uv:[0,34]}]},{name:"TailA",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1,20,14],size:[2,2,3],uv:[44,0]}]},{name:"TailB",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1.5,19,17],size:[3,4,7],uv:[38,7]}]},{name:"TailC",pivot:[0,21,14],rotation:[-80.34,0,0],cubes:[{origin:[-1.5,21.5,23],size:[3,4,7],uv:[24,3]}]},{name:"Leg1A",pivot:[4,15,11],rotation:[0,0,0],cubes:[{origin:[1.5,8,8.5],size:[4,9,5],uv:[78,29]}]},{name:"Leg1B",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[2,3,9.5],size:[3,5,3],uv:[78,43]}]},{name:"Leg1C",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[1.5,-.1,9],size:[4,3,4],uv:[78,51]}]},{name:"Leg2A",pivot:[-4,15,11],rotation:[0,0,0],cubes:[{origin:[-5.5,8,8.5],size:[4,9,5],uv:[96,29]}]},{name:"Leg2B",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5,3,9.5],size:[3,5,3],uv:[96,43]}]},{name:"Leg2C",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5.5,-.1,9],size:[4,3,4],uv:[96,51]}]},{name:"Leg3A",pivot:[4,15,-8],rotation:[0,0,0],cubes:[{origin:[2.1,8,-10.1],size:[3,8,4],uv:[44,29]}]},{name:"Leg3B",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[2.1,3,-9.6],size:[3,5,3],uv:[44,41]}]},{name:"Leg3C",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[1.6,-.1,-10.1],size:[4,3,4],uv:[44,51]}]},{name:"Leg4A",pivot:[-4,15,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,8,-10.1],size:[3,8,4],uv:[60,29]}]},{name:"Leg4B",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,3,-9.6],size:[3,5,3],uv:[60,41]}]},{name:"Leg4C",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.6,-.1,-10.1],size:[4,3,4],uv:[60,51]}]},{name:"Head",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25,-11.5],size:[5,5,7],uv:[0,0]}]},{name:"UMouth",pivot:[0,20.05,-10],rotation:[30,0,0],cubes:[{origin:[-2,27.05,-17],size:[4,3,6],uv:[24,18]}]},{name:"LMouth",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2,25,-16.5],size:[4,2,5],uv:[24,27]}]},{name:"Ear1",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"Ear2",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"MuleEarL",pivot:[0,20,-10],rotation:[30,0,15],cubes:[{origin:[-2,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"MuleEarR",pivot:[0,20,-10],rotation:[30,0,-15],cubes:[{origin:[0,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"Neck",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.05,15.8,-12],size:[4,14,8],uv:[0,12]}]},{name:"Bag1",pivot:[-7.5,21,10],rotation:[0,90,0],cubes:[{origin:[-10.5,13,10],size:[8,8,3],uv:[0,34]}]},{name:"Bag2",pivot:[4.5,21,10],rotation:[0,90,0],cubes:[{origin:[1.5,13,10],size:[8,8,3],uv:[0,47]}]},{name:"Saddle",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-5,21,-1],size:[10,1,8],uv:[80,0]}]},{name:"SaddleB",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-1.5,22,-1],size:[3,1,2],uv:[106,9]}]},{name:"SaddleC",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-4,22,5],size:[8,1,2],uv:[80,9]}]},{name:"SaddleL2",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,13,1],size:[1,2,2],uv:[74,0]}]},{name:"SaddleL",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,15,1.5],size:[1,6,1],uv:[70,0]}]},{name:"SaddleR2",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,13,1],size:[1,2,2],uv:[74,4]}]},{name:"SaddleR",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,15,1.5],size:[1,6,1],uv:[80,0]}]},{name:"SaddleMouthL",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[1.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthR",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthLine",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[2.6,23,-16],size:[0,3,16],uv:[44,10]}]},{name:"SaddleMouthLineR",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[-2.6,23,-16],size:[0,3,16],uv:[44,5]}]},{name:"Mane",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-1,15.5,-5],size:[2,16,4],uv:[58,0]}]},{name:"HeadSaddle",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25.1,-17],size:[5,5,12],uv:[80,12],inflate:.05}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:32}},slime:{identifier:"minecraft:slime",materials:{default:"slime",outer:"slime_outer"},textures:{default:"textures/entity/slime/slime"},geometry:{default:{visible_bounds_width:5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-3,1,-3],size:[6,6,6],uv:[0,16]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]},armor:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]}},render_controllers:["controller.render.slime","controller.render.slime_armor"],spawn_egg:{texture:"spawn_egg",texture_index:10}},small_fireball:{identifier:"minecraft:small_fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},snow_golem:{identifier:"minecraft:snow_golem",min_engine_version:"1.8.0",materials:{default:"snow_golem",head:"snow_golem_pumpkin"},textures:{default:"textures/entity/snow_golem"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"head",parent:"piece1",pivot:[0,20,0],locators:{lead:[0,20,0]},cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0],inflate:-.5}]},{name:"arm1",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,0,57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"arm2",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,180,-57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"piece1",parent:"piece2",pivot:[0,11,0],cubes:[{origin:[-5,11,-5],size:[10,10,10],uv:[0,16],inflate:-.5}]},{name:"piece2",pivot:[0,0,0],cubes:[{origin:[-6,0,-6],size:[12,12,12],uv:[0,36],inflate:-.5}]}]}},render_controllers:["controller.render.snowgolem"]},snowball:{identifier:"minecraft:snowball",materials:{default:"snowball"},textures:{default:"textures/items/snowball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},potion:{identifier:"minecraft:splash_potion",materials:{default:"splash_potion_enchanted"},textures:{moveSlowdown:"textures/items/potion_bottle_splash_moveSlowdown",moveSpeed:"textures/items/potion_bottle_splash_moveSpeed",digSlowdown:"textures/items/potion_bottle_splash_digSlowdown",digSpeed:"textures/items/potion_bottle_splash_digSpeed",damageBoost:"textures/items/potion_bottle_splash_damageBoost",heal:"textures/items/potion_bottle_splash_heal",harm:"textures/items/potion_bottle_splash_harm",jump:"textures/items/potion_bottle_splash_jump",confusion:"textures/items/potion_bottle_splash_confusion",regeneration:"textures/items/potion_bottle_splash_regeneration",resistance:"textures/items/potion_bottle_splash_resistance",fireResistance:"textures/items/potion_bottle_splash_fireResistance",waterBreathing:"textures/items/potion_bottle_splash_waterBreathing",invisibility:"textures/items/potion_bottle_splash_invisibility",blindness:"textures/items/potion_bottle_splash_blindness",nightVision:"textures/items/potion_bottle_splash_nightVision",hunger:"textures/items/potion_bottle_splash_hunger",weakness:"textures/items/potion_bottle_splash_weakness",poison:"textures/items/potion_bottle_splash_poison",wither:"textures/items/potion_bottle_splash_wither",healthBoost:"textures/items/potion_bottle_splash_healthBoost",absorption:"textures/items/potion_bottle_splash_absorption",saturation:"textures/items/potion_bottle_splash_saturation",levitation:"textures/items/potion_bottle_splash_levitation",turtleMaster:"textures/items/potion_bottle_splash_turtleMaster",slowFall:"textures/items/potion_bottle_splash_slowFall",default:"textures/items/potion_bottle_splash",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.splash_potion"]},squid:{identifier:"minecraft:squid",materials:{default:"squid"},textures:{default:"textures/entity/squid"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",cubes:[{origin:[-6,-8,-6],size:[12,16,12],uv:[0,0]}]},{name:"tentacle1",parent:"body",pivot:[5,-7,0],cubes:[{origin:[4,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,90,0]},{name:"tentacle2",parent:"body",pivot:[3.5,-7,3.5],cubes:[{origin:[2.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,45,0]},{name:"tentacle3",parent:"body",pivot:[0,-7,5],cubes:[{origin:[-1,-25,4],size:[2,18,2],uv:[48,0]}],rotation:[0,0,0]},{name:"tentacle4",parent:"body",pivot:[-3.5,-7,3.5],cubes:[{origin:[-4.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-45,0]},{name:"tentacle5",parent:"body",pivot:[-5,-7,0],cubes:[{origin:[-6,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,-90,0]},{name:"tentacle6",parent:"body",pivot:[-3.5,-7,-3.5],cubes:[{origin:[-4.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-135,0]},{name:"tentacle7",parent:"body",pivot:[0,-7,-5],cubes:[{origin:[-1,-25,-6],size:[2,18,2],uv:[48,0]}],rotation:[0,-180,0]},{name:"tentacle8",parent:"body",pivot:[3.5,-7,-3.5],cubes:[{origin:[2.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-225,0]}]}},render_controllers:["controller.render.squid"],spawn_egg:{texture:"spawn_egg",texture_index:15}},stray:{identifier:"minecraft:stray",min_engine_version:"1.8.0",materials:{default:"stray",overlay:"stray_clothes"},textures:{default:"textures/entity/skeleton/stray",overlay:"textures/entity/skeleton/stray_overlay"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],locators:{lead:[0,24,0]},cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]},overlay:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],inflate:.25},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],inflate:.25},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],inflate:.25},{name:"rightItem",parent:"rightArm",pivot:[-6,15,1],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,inflate:.25},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25,mirror:!0}]}},spawn_egg:{texture:"spawn_egg",texture_index:27},render_controllers:["controller.render.stray_clothes","controller.render.stray"],enable_attachables:!0},strider:{identifier:"minecraft:strider",materials:{default:"strider"},textures:{default:"textures/entity/strider/strider",saddled:"textures/entity/strider/strider",suffocated:"textures/entity/strider/strider_cold",suffocated_saddled:"textures/entity/strider/strider_cold"},geometry:{default:{bones:[{name:"right_leg",pivot:[-4,16,0],cubes:[{origin:[-6,0,-2],size:[4,16,4],uv:[0,32]}]},{name:"left_leg",pivot:[4,16,0],cubes:[{origin:[2,0,-2],size:[4,16,4],uv:[0,55]}]},{name:"body",pivot:[0,16,0],cubes:[{origin:[-8,14,-8],size:[16,14,16],uv:[0,0]}],locators:{lead:[0,15,-1]}},{name:"bristle5",parent:"body",pivot:[8,19,0],cubes:[{origin:[8,19,-8],size:[12,0,16],pivot:[8,19,0],rotation:[0,0,70],uv:[16,65]}]},{name:"bristle4",parent:"body",pivot:[8,24,0],cubes:[{origin:[8,24,-8],size:[12,0,16],pivot:[8,24,0],rotation:[0,0,65],uv:[16,49]}]},{name:"bristle3",parent:"body",pivot:[8,28,0],cubes:[{origin:[8,28,-8],size:[12,0,16],pivot:[8,28,0],rotation:[0,0,50],uv:[16,33]}]},{name:"bristle2",parent:"body",pivot:[-8,28,0],cubes:[{origin:[-20,28,-8],size:[12,0,16],pivot:[-8,28,0],rotation:[0,0,-50],uv:[16,33],mirror:!0}]},{name:"bristle1",parent:"body",pivot:[-8,24,0],cubes:[{origin:[-20,24,-8],size:[12,0,16],pivot:[-8,24,0],rotation:[0,0,-65],uv:[16,49],mirror:!0}]},{name:"bristle0",parent:"body",pivot:[-8,19,0],cubes:[{origin:[-20,19,-8],size:[12,0,16],pivot:[-8,19,0],rotation:[0,0,-70],uv:[16,65],mirror:!0}]}],visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:128}},spawn_egg:{base_color:"#9c3436",overlay_color:"#4d494d"},render_controllers:["controller.render.strider"]},text_display:{identifier:"minecraft:text_display",geometry:{}},trident:{identifier:"minecraft:thrown_trident",textures:{default:"textures/entity/trident",loyalty_rope:"textures/entity/lead_knot"},geometry:{default:{texturewidth:32,textureheight:32,bones:[{name:"pole",pivot:[0,24,0],cubes:[{origin:[-.5,-3,-.5],size:[1,31,1],inflate:.01,uv:[0,0]},{origin:[-1.5,22,-.5],size:[3,2,1],uv:[4,0]},{origin:[-2.5,23,-.5],size:[1,4,1],uv:[4,3]},{origin:[1.5,23,-.5],size:[1,4,1],uv:[4,3]}]}]}}},tnt_minecart:{identifier:"minecraft:tnt_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},tropical_fish:{identifier:"minecraft:tropicalfish",materials:{default:"tropicalfish"},textures:{typeA:"textures/entity/fish/tropical_a",typeB:"textures/entity/fish/tropical_b",aPattern1:"textures/entity/fish/tropical_a_pattern_1",aPattern2:"textures/entity/fish/tropical_a_pattern_2",aPattern3:"textures/entity/fish/tropical_a_pattern_3",aPattern4:"textures/entity/fish/tropical_a_pattern_4",aPattern5:"textures/entity/fish/tropical_a_pattern_5",aPattern6:"textures/entity/fish/tropical_a_pattern_6",bPattern1:"textures/entity/fish/tropical_b_pattern_1",bPattern2:"textures/entity/fish/tropical_b_pattern_2",bPattern3:"textures/entity/fish/tropical_b_pattern_3",bPattern4:"textures/entity/fish/tropical_b_pattern_4",bPattern5:"textures/entity/fish/tropical_b_pattern_5",bPattern6:"textures/entity/fish/tropical_b_pattern_6"},geometry:{typeA:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-3],size:[2,3,6],uv:[0,0]},{origin:[0,3,-2.9992],size:[0,4,6],uv:[10,-6]}],name:"body"},{pivot:[0,0,3],cubes:[{origin:[0,0,3],size:[0,3,4],uv:[24,-4]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[.336,0,-.10594],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-2.336,0,-.10594],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32},typeB:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-8e-4],size:[2,6,6],uv:[0,20]},{origin:[0,-5,-8e-4],size:[0,5,6],uv:[20,21]},{origin:[0,6,-8e-4],size:[0,5,6],uv:[20,10]}],name:"body"},{pivot:[0,0,6],cubes:[{origin:[0,8e-4,6],size:[0,6,5],uv:[21,16]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[2.05673,0,2.35152],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-4.05673,0,2.35152],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.tropicalfish"],spawn_egg:{texture:"spawn_egg",texture_index:44}},vindicator:{identifier:"minecraft:vindicator",min_engine_version:"1.8.0",materials:{default:"vindicator"},textures:{default:"textures/entity/illager/vindicator"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:39},render_controllers:["controller.render.vindicator"],enable_attachables:!0},wandering_trader:{identifier:"minecraft:wandering_trader",materials:{default:"wandering_trader"},textures:{default:"textures/entity/wandering_trader"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"helmet",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[32,0],inflate:.5}]},{name:"brim",parent:"head",pivot:[0,24,0],bind_pose_rotation:[-90,0,0],cubes:[{origin:[-8,16,-6],size:[16,16,1],uv:[30,47],inflate:.1}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",locators:{lead_hold:[0,40,0]},cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]},{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22],mirror:!0}]},{name:"held_item",parent:"arms",pivot:[0,0,0]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22],mirror:!0}]}]}},render_controllers:["controller.render.wandering_trader"],spawn_egg:{texture:"spawn_egg_wandering_trader"}},wither:{identifier:"minecraft:wither",min_engine_version:"1.8.0",materials:{default:"wither_boss",armor:"wither_boss_armor"},textures:{default:"textures/entity/wither/wither",armor_white:"textures/entity/wither/wither_armor",armor_blue:"textures/entity/wither/wither_armor",invulnerable:"textures/entity/wither/wither_invulnerable"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}]},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}]},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}]},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}]},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}]},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}]}]},armor:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}],inflate:2},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}],inflate:2},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}],inflate:2},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}],inflate:2},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2}]}},render_controllers:["controller.render.wither_boss","controller.render.wither_boss_armor_white","controller.render.wither_boss_armor_blue"]},wither_skeleton:{identifier:"minecraft:wither_skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/wither_skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"waist",pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5],neverRender:!0},{name:"rightLeg",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}]},{name:"leftLeg",parent:"body",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0}]}},render_controllers:["controller.render.wither_skeleton"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:29}},wither_skull:{identifier:"minecraft:wither_skull",materials:{default:"wither_skull"},textures:{default:"textures/entity/wither/wither"},geometry:{default:{bones:[{name:"head",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,35]}]}],visible_bounds_width:1,visible_bounds_height:1,texturewidth:64,textureheight:64}},render_controllers:["controller.render.wither_skull"]},zoglin:{identifier:"minecraft:zoglin",materials:{default:"zoglin"},textures:{default:"textures/entity/hoglin/zoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#c66e55",overlay_color:"#e6e6e6"},render_controllers:["controller.render.zoglin"]},zombie:{identifier:"minecraft:zombie",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/zombie/zombie"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:12},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.zombie"],enable_attachables:!0},zombified_piglin:{identifier:"minecraft:zombie_pigman",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/piglin/zombified_piglin"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{texture:"spawn_egg",texture_index:13},render_controllers:["controller.render.zombie_pigman"],enable_attachables:!0}};E();x();k();R();var Gt={};Z5(Gt,{allay:()=>xo,arrow:()=>Ko,axolotl:()=>Ro,blaze:()=>ko,boat:()=>o3,camel:()=>To,cat:()=>Mo,chicken:()=>So,cod:()=>Co,creeper:()=>Bo,dolphin:()=>Po,ender_dragon:()=>Io,enderman:()=>Ho,endermite:()=>Oo,fox:()=>Fo,frog:()=>Do,ghast:()=>zo,goat:()=>Lo,guardian:()=>Uo,horse:()=>Go,llama:()=>No,minecart:()=>Wo,parrot:()=>Vo,piglin:()=>jo,pillager:()=>Yo,rabbit:()=>Qo,shulker:()=>Jo,sniffer:()=>qo,spider:()=>Zo,tadpole:()=>Xo,turtle:()=>$o,vex:()=>e3,villager:()=>t3,warden:()=>r3,witch:()=>i3,wolf:()=>n3,zombie_villager:()=>s3});E();x();k();R();var xo=`# Made in Blockbench 4.9.4
1131
+ `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(t){t===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(t){!!t!="USE_DASH"in this.defines&&(this.needsUpdate=!0),t===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(t){this.uniforms.dashOffset.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(t){!!t!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),t===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}};var lo=new uo,co=new uo,mi=new m8,C5=class extends f8{constructor(e=new vt,t=new lt({color:Math.random()*16777215})){super(e,t),this.isWireframe=!0,this.type="Wireframe"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,r=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,v=0,a=t.count;o<a;o++,v+=2)lo.fromBufferAttribute(t,o),co.fromBufferAttribute(r,o),i[v]=v===0?0:i[v-1],i[v+1]=i[v]+lo.distanceTo(co);let s=new h8(i,2,1);return e.setAttribute("instanceDistanceStart",new vo(s,1,0)),e.setAttribute("instanceDistanceEnd",new vo(s,1,1)),this}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(mi),this.material.uniforms.resolution.value.set(mi.z,mi.w))}};import{GLTFLoader as t4}from"three/examples/jsm/loaders/GLTFLoader.js";import r4 from"mc-assets/dist/other-textures/latest/entity/zombie/husk.png";import{Vec3 as T1}from"vec3";import i4 from"mc-assets/dist/other-textures/latest/entity/cat/ocelot.png";import n4 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/arrow.png";import s4 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/spectral_arrow.png";import o4 from"mc-assets/dist/other-textures/1.21.2/entity/projectiles/tipped_arrow.png";var fo={armor_stand:{identifier:"minecraft:armor_stand",min_engine_version:"1.8.0",materials:{default:"armor_stand"},textures:{default:"textures/entity/armorstand/wood"},geometry:{default:{bones:[{name:"baseplate",parent:"waist",cubes:[{origin:[-6,0,-6],size:[12,1,12],uv:[0,32]}]},{name:"waist",pivot:[0,12,0]},{name:"body",parent:"waist",pivot:[0,13,0],cubes:[{origin:[-6,21,-1.5],size:[12,3,3],uv:[0,26]},{origin:[-3,14,-1],size:[2,7,2],uv:[16,0]},{origin:[1,14,-1],size:[2,7,2],uv:[48,16]},{origin:[-4,12,-1],size:[8,2,2],uv:[0,48]}]},{name:"head",parent:"waist",pivot:[0,12,0],cubes:[{origin:[-1,24,-1],size:[2,7,2],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0]}]},{name:"leftarm",parent:"waist",mirror:!0,pivot:[5,10,0],cubes:[{origin:[5,12,-1],size:[2,12,2],uv:[32,16]}]},{name:"leftitem",parent:"leftarm",pivot:[1,-9,-5]},{name:"leftleg",parent:"waist",mirror:!0,pivot:[1.9,1,0],cubes:[{origin:[.9,1,-1],size:[2,11,2],uv:[40,16]}]},{name:"rightarm",parent:"waist",pivot:[-5,10,0],cubes:[{origin:[-7,12,-1],size:[2,12,2],uv:[24,0]}]},{name:"rightitem",parent:"rightarm",pivot:[-1,-9,-5]},{name:"rightleg",parent:"waist",pivot:[-1.9,1,0],cubes:[{origin:[-2.9,1,-1],size:[2,11,2],uv:[8,0]}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.armor_stand"],enable_attachables:!0},arrow:{identifier:"minecraft:arrow",materials:{default:"arrow"},textures:{default:"textures/entity/arrow"},geometry:{default:{bones:[{name:"body",pivot:[0,1,0],cubes:[{origin:[0,-2.5,-3],rotation:[0,0,45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[0,-2.5,-3],rotation:[0,0,-45],size:[0,5,16],uv:{east:{uv:[0,0]}}},{origin:[-2.5,-2.5,12],rotation:[0,0,45],size:[5,5,0],uv:{south:{uv:[0,5]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.arrow"]},bat:{_comment:"Wing tip mirror flags are swapped vs vanilla Bedrock model: our addCube() mirror implementation flips UVs in the opposite direction, so rightWingTip needs mirror=true and leftWingTip needs mirror=false to render correctly.",identifier:"minecraft:bat",materials:{default:"bat"},textures:{default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAALHSURBVHja7VrBSiQxFJybHvci6G1gF2TBwyoKelnWy55kWYS9ePDmD+in+KcevLb7GgpqipeeTkzPpGdewSNJmx6nKtXJS3oWiwTOv33pbs6Ou9vr731YHddQ5/ZiAHa/9cXnjLln62DyLALIL48P+4AIQ+RZAP2cnO909/PH4uvRQcdh1zSqwCMPIiDPIqwT8uHufMVJuDfnOxnhq9OT7vHPZR9WZxEgSjUBUi7IcQBG++XpphfB6rgvVwCQ//f7og8WAeL8F6Kr6oD7X8s+PPuOmQNYAAsIUOIAkDeSLIK1LeCMagIweZQ8iRkBlJuYl5gwSlxjZ2R9KM/2XBphsyxEQGhfOCEVNQXQ0UZdo2i21+edR57DmxjZFRpTCaD2/7QAXsAFcEKq3zYEGHJBtgCeC97f3vtnG0uY1e1aavQ3/QgMuaBoDtCsDyWv3yqSlxhpTClAygXZArAILIaS8ezOo52TIJVA1/sqAswRnhCfEoAnuqGkZwpbZxJfyflTQuysAN7GxxNiZ62fEoCFMBGqpcK8h8ckqIkRoiU3VPkHIM/2R4rMaTLK0pGr9oVrw9v7Iy/QDLFEAH5umxTAW9utreTHOuD1+e/KaQ4mrGrb1ykE0L07HODFmKMsJs1b2GYfAc0MdYPEThiTvIA8DjWayNxSs3pJePPDOvJNCKDL27r22L95AlRJXaewuh57cVuPx7Acen1VlNkIoKR0++udCer84PXn42wj660EW38BooS99rqTn1R/FkCTnibyAH3l5bW9GOqjx+Wa8TWVCXpn/NzW63oIote1bH6HlSKUK0BKkFkIgDSX01+taz9+vTV0X/MC6Hu+1OFmSb9tHp6MRopIrQgBAjMDtr2bfOvb3KTIP2vZy9HnvH6vXJD6ZdheOYAJl/yOZ/YCMOFYygKBQCAQCAQCgUAgEAgEAoFAIBDYKXwAXSs8dJ1Ggb4AAAAASUVORK5CYII="},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],bones:[{name:"head",pivot:[0,24,0],cubes:[{origin:[-3,21,-3],size:[6,6,6],uv:[0,0]}]},{name:"rightEar",pivot:[0,24,0],cubes:[{origin:[-4,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"leftEar",mirror:!0,pivot:[0,24,0],cubes:[{origin:[1,26,-2],size:[3,4,1],uv:[24,0]}],parent:"head"},{name:"body",pivot:[0,24,0],cubes:[{origin:[-3,8,-3],size:[6,12,6],uv:[0,16]},{origin:[-5,-8,0],size:[10,16,1],uv:[0,34]}]},{name:"rightWing",pivot:[0,24,0],cubes:[{origin:[-12,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"rightWingTip",mirror:!0,pivot:[-12,23,1.5],cubes:[{origin:[-20,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"rightWing"},{name:"leftWing",mirror:!0,pivot:[0,24,0],cubes:[{origin:[2,7,1.5],size:[10,16,1],uv:[42,0]}],parent:"body"},{name:"leftWingTip",pivot:[12,23,1.5],cubes:[{origin:[12,10,1.5],size:[8,12,1],uv:[24,16]}],parent:"leftWing"}]}},render_controllers:["controller.render.bat"],spawn_egg:{texture:"spawn_egg",texture_index:18}},bee:{identifier:"minecraft:bee",materials:{default:"bee"},textures:{default:"textures/entity/bee/bee",angry:"textures/entity/bee/bee_angry",nectar:"textures/entity/bee/bee_nectar",angry_nectar:"textures/entity/bee/bee_angry_nectar"},geometry:{default:{texturewidth:64,textureheight:64,visible_bounds_width:1.5,visible_bounds_height:1.5,visible_bounds_offset:[0,.25,0],bones:[{name:"body",pivot:[.5,5,0],cubes:[{origin:[-3,2,-5],size:[7,7,10],uv:[0,0]},{origin:[2,7,-8],size:[1,2,3],uv:[2,0]},{origin:[-2,7,-8],size:[1,2,3],uv:[2,3]}],locators:{lead:[0,4,-1]}},{name:"stinger",parent:"body",pivot:[.5,6,1],cubes:[{origin:[.5,5,5],size:[0,1,2],uv:[26,7]}]},{name:"rightwing_bone",parent:"body",pivot:[-1,9,-3],rotation:[15,-15,0],cubes:[{origin:[-10,9,-3],size:[9,0,6],uv:[0,18]}]},{name:"leftwing_bone",parent:"body",pivot:[2,9,-3],rotation:[15,15,0],cubes:[{origin:[2,9,-3],size:[9,0,6],uv:[9,24]}]},{name:"leg_front",parent:"body",pivot:[2,2,-2],cubes:[{origin:[-3,0,-2],size:[7,2,0],uv:[26,1]}]},{name:"leg_mid",parent:"body",pivot:[2,2,0],cubes:[{origin:[-3,0,0],size:[7,2,0],uv:[26,3]}]},{name:"leg_back",parent:"body",pivot:[2,2,2],cubes:[{origin:[-3,0,2],size:[7,2,0],uv:[26,5]}]}]}},particle_effects:{nectar_dripping:"minecraft:nectar_drip_particle"},render_controllers:["controller.render.bee"],spawn_egg:{texture:"egg_bee",texture_index:0}},cave_spider:{identifier:"minecraft:cave_spider",min_engine_version:"1.8.0",materials:{default:"spider",invisible:"spider_invisible"},textures:{default:"textures/entity/spider/cave_spider"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"head",pivot:[0,9,-3],cubes:[{origin:[-4,5,-11],size:[8,8,8],uv:[32,4]}],parent:"body0"},{name:"body0",pivot:[0,9,0],cubes:[{origin:[-3,6,-3],size:[6,6,6],uv:[0,0]}]},{name:"body1",pivot:[0,9,9],cubes:[{origin:[-5,5,3],size:[10,8,12],uv:[0,12]}],parent:"body0"},{name:"leg0",pivot:[-4,9,2],cubes:[{origin:[-19,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg1",pivot:[4,9,2],cubes:[{origin:[3,8,1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg2",pivot:[-4,9,1],cubes:[{origin:[-19,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg3",pivot:[4,9,1],cubes:[{origin:[3,8,0],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg4",pivot:[-4,9,0],cubes:[{origin:[-19,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg5",pivot:[4,9,0],cubes:[{origin:[3,8,-1],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg6",pivot:[-4,9,-1],cubes:[{origin:[-19,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"},{name:"leg7",pivot:[4,9,-1],cubes:[{origin:[3,8,-2],size:[16,2,2],uv:[18,0]}],parent:"body0"}]}},render_controllers:["controller.render.spider"],spawn_egg:{texture:"spawn_egg",texture_index:22}},chest_minecart:{identifier:"minecraft:chest_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},command_block_minecart:{identifier:"minecraft:command_block_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},cow:{identifier:"minecraft:cow",min_engine_version:"1.8.0",materials:{default:"cow"},textures:{default:"textures/entity/cow/cow"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.75,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",parent:"body",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.cow"],spawn_egg:{texture:"spawn_egg",texture_index:1}},dragon_fireball:{identifier:"minecraft:dragon_fireball",materials:{default:"fireball"},textures:{default:"textures/entity/enderdragon/dragon_fireball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},drowned:{identifier:"minecraft:drowned",min_engine_version:"1.16.0",materials:{default:"drowned"},textures:{default:"textures/entity/zombie/drowned"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"jacket",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.5}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0],inflate:.5}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:1}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[0,16]}]},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],mirror:!0}]},{name:"rightSleeve",parent:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-7,12,-2],size:[4,12,4],uv:[48,48],inflate:.5}]},{name:"leftSleeve",parent:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,32],inflate:.5,mirror:!0}]},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4.05,0,-2],size:[4,12,4],uv:[16,48]}]},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[.05,0,-2],size:[4,12,4],uv:[32,48],mirror:!0}]},{name:"rightPants",parent:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-4.25,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]},{name:"leftPants",parent:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[.25,0,-2],size:[4,12,4],uv:[0,32],inflate:.25,mirror:!0}]},{name:"waist",parent:"body",pivot:[0,12,0]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]}],visible_bounds_width:2.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64}},render_controllers:["controller.render.drowned"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:48}},egg:{identifier:"minecraft:egg",materials:{default:"egg"},textures:{default:"textures/items/egg"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},elder_guardian:{identifier:"minecraft:elder_guardian",min_engine_version:"1.8.0",materials:{default:"guardian",ghost:"guardian_ghost"},textures:{default:"textures/entity/guardian",elder:"textures/entity/guardian_elder",beam:"textures/entity/guardian_beam"},geometry:{default:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,0,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,6,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]},ghost:{visible_bounds_width:3.5,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,24,0],mirror:!0,cubes:[{mirror:!1,origin:[-6,2,-8],size:[12,12,16],uv:[0,0]},{mirror:!1,origin:[-8,2,-6],size:[2,12,12],uv:[0,28]},{origin:[6,2,-6],size:[2,12,12],uv:[0,28]},{origin:[-6,14,-6],size:[12,2,12],uv:[16,40]},{origin:[-6,0,-6],size:[12,2,12],uv:[16,40]}]},{name:"eye",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,7,0],size:[2,2,1],uv:[8,0]}]},{name:"tailpart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-2,6,7],size:[4,4,8],uv:[40,0]}]},{name:"tailpart1",parent:"tailpart0",pivot:[0,24,0],cubes:[{origin:[0,7,0],size:[3,3,7],uv:[0,54]}]},{name:"tailpart2",parent:"tailpart1",pivot:[0,24,0],cubes:[{origin:[0,8,0],size:[2,2,6],uv:[41,32]},{origin:[1,4.5,3],size:[1,9,9],uv:[25,19]}]},{name:"spikepart0",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart1",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart2",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart3",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart4",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart5",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart6",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart7",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart8",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart9",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart10",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]},{name:"spikepart11",parent:"head",pivot:[0,24,0],cubes:[{origin:[-1,19.5,-1],size:[2,9,2],uv:[0,0]}]}]}},render_controllers:["controller.render.guardian"],spawn_egg:{texture:"spawn_egg",texture_index:36}},eye_of_ender:{identifier:"minecraft:eye_of_ender_signal",materials:{default:"eye_of_ender_signal"},textures:{default:"textures/items/ender_eye"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},ender_pearl:{identifier:"minecraft:ender_pearl",materials:{default:"ender_pearl"},textures:{default:"textures/items/ender_pearl"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},evoker_fangs:{identifier:"minecraft:evocation_fang",materials:{default:"fang"},textures:{default:"textures/entity/illager/evoker_fangs"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:64,textureheight:32,bones:[{name:"upper_jaw",parent:"base",pivot:[0,11,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0],inflate:.01}]},{name:"lower_jaw",parent:"base",pivot:[0,11,0],bind_pose_rotation:[0,180,0],cubes:[{origin:[-1.5,0,-4],size:[4,14,8],uv:[40,0]}]},{name:"base",pivot:[0,0,0],bind_pose_rotation:[0,90,0],cubes:[{origin:[-5,0,-5],size:[10,12,10],uv:[0,0]}]}]}},render_controllers:["controller.render.evocation_fang"]},evoker:{identifier:"minecraft:evocation_illager",min_engine_version:"1.8.0",materials:{default:"evoker"},textures:{default:"textures/entity/illager/evoker"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],locators:{right_hand:[-6,12,0]},cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],locators:{left_hand:[6,12,0]},mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},particle_effects:{spell:"minecraft:evoker_spell"},render_controllers:["controller.render.evoker"],spawn_egg:{texture:"spawn_egg",texture_index:40}},experience_bottle:{identifier:"minecraft:xp_bottle",materials:{default:"xp_bottle"},textures:{default:"textures/items/experience_bottle",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.experience_bottle"]},experience_orb:{identifier:"minecraft:xp_orb",materials:{default:"experience_orb"},textures:{default:"textures/entity/experience_orb"},geometry:{default:{bones:[{name:"body",pivot:[8,8,0],cubes:[{origin:[0,0,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:64,textureheight:64}},render_controllers:["controller.render.experience_orb"]},fireball:{identifier:"minecraft:fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},firework_rocket:{identifier:"minecraft:fireworks_rocket",materials:{default:"fireworks_rocket"},textures:{default:"textures/entity/fireworks"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],rotation:[0,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}},{origin:[-8,-8,0],rotation:[90,90,0],size:[16,16,0],uv:{north:{uv:[0,0]}}}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.fireworks_rocket"]},fishing_bobber:{identifier:"minecraft:fishing_hook",materials:{default:"fishing_hook"},textures:{default:"textures/entity/fishing_hook"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-1.5,-1.5,-1.5],size:[3,3,3],rotation:[0,0,180],uv:{up:{uv:[0,0]},down:{uv:[3,0]},south:{uv:[9,0],uv_size:[-3,3]},north:{uv:[9,0]},east:{uv:[12,0]},west:{uv:[15,0]}}},{origin:[0,-4.5,-.5],size:[0,3,3],uv:{east:{uv:[18,0]}}},{origin:[0,1.5,-1.5],size:[0,3,3],uv:{east:{uv:[21,0]}}},{origin:[-1.5,1.5,0],size:[3,3,0],uv:{north:{uv:[21,0]}}}]}],texturewidth:24,textureheight:3}},render_controllers:["controller.render.fishing_hook"]},hoglin:{identifier:"minecraft:hoglin",materials:{default:"hoglin"},textures:{default:"textures/entity/hoglin/hoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#C66E55",overlay_color:"#5f6464"},render_controllers:["controller.render.hoglin"]},hopper_minecart:{identifier:"minecraft:hopper_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},husk:{identifier:"minecraft:husk",min_engine_version:"1.8.0",materials:{default:"husk"},textures:{default:"textures/entity/zombie/husk"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.husk"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:28}},iron_golem:{identifier:"minecraft:iron_golem",materials:{default:"iron_golem"},textures:{default:"textures/entity/iron_golem/iron_golem"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:128,bones:[{name:"body",pivot:[0,31,0],cubes:[{origin:[-9,21,-6],size:[18,12,11],uv:[0,40]},{origin:[-4.5,16,-3],size:[9,5,6],uv:[0,70],inflate:.5}]},{name:"head",parent:"body",pivot:[0,31,-2],locators:{lead:[0,31,-2]},cubes:[{origin:[-4,33,-7.5],size:[8,10,8],uv:[0,0]},{origin:[-1,32,-9.5],size:[2,4,2],uv:[24,0]}]},{name:"arm0",parent:"body",pivot:[0,31,0],cubes:[{origin:[-13,3.5,-3],size:[4,30,6],uv:[60,21]}]},{name:"arm1",parent:"body",pivot:[0,31,0],cubes:[{origin:[9,3.5,-3],size:[4,30,6],uv:[60,58]}]},{name:"leg0",parent:"body",pivot:[-4,13,0],cubes:[{origin:[-7.5,0,-3],size:[6,16,5],uv:[37,0]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[5,13,0],cubes:[{origin:[1.5,0,-3],size:[6,16,5],uv:[60,0]}]}]}},render_controllers:["controller.render.iron_golem"]},item_frame:{identifier:"minecraft:item_frame",materials:{default:"item_frame"},textures:{background:"block:item_frame",frame:"block:oak_planks"},geometry:{background:{bones:[{name:"base"},{name:"background",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-5,-5,-8],size:[10,10,.5],uv:[3,3]}]}],texturewidth:16,textureheight:16},frame:{bones:[{name:"frame",parent:"base",rotation:[0,180,0],pivot:[0,0,0],cubes:[{origin:[-6,-6,-8],size:[12,1,1],uv:[2,2]},{origin:[-6,5,-8],size:[12,1,1],uv:[2,13]},{origin:[-6,-5,-8],size:[1,10,1],uv:[2,3]},{origin:[5,-5,-8],size:[1,10,1],uv:[13,3]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_frame"]},leash_knot:{identifier:"minecraft:leash_knot",materials:{default:"leash_knot"},textures:{default:"textures/entity/lead_knot"},geometry:{default:{bones:[{name:"knot",rotation:[0,180,0],cubes:[{origin:[5,6,5],size:[6,8,6],uv:[0,0]}]}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.leash_knot"]},llama_spit:{identifier:"minecraft:llama_spit",materials:{default:"llama_spit"},textures:{default:"textures/entity/llama/spit"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,26,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,-4],size:[2,2,2],uv:[0,0]},{origin:[0,22,0],size:[2,2,2],uv:[0,0]},{origin:[2,22,0],size:[2,2,2],uv:[0,0]},{origin:[0,20,0],size:[2,2,2],uv:[0,0]},{origin:[0,22,2],size:[2,2,2],uv:[0,0]}]}]}},render_controllers:["controller.render.llama_spit"]},magma_cube:{identifier:"minecraft:magma_cube",materials:{default:"magma_cube"},textures:{default:"textures/entity/slime/magmacube"},geometry:{default:{visible_bounds_width:2.5,visible_bounds_height:5,visible_bounds_offset:[0,2.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyCube_0",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,7,-4],size:[8,1,8],uv:[0,0]}]},{name:"bodyCube_1",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,6,-4],size:[8,1,8],uv:[0,1]}]},{name:"bodyCube_2",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,5,-4],size:[8,1,8],uv:[24,10]}]},{name:"bodyCube_3",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,4,-4],size:[8,1,8],uv:[24,19]}]},{name:"bodyCube_4",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,3,-4],size:[8,1,8],uv:[0,4]}]},{name:"bodyCube_5",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,2,-4],size:[8,1,8],uv:[0,5]}]},{name:"bodyCube_6",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,1,-4],size:[8,1,8],uv:[0,6]}]},{name:"bodyCube_7",parent:"insideCube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,1,8],uv:[0,7]}]},{name:"insideCube",pivot:[0,0,0],cubes:[{origin:[-2,2,-2],size:[4,4,4],uv:[0,16]}]}]}},render_controllers:["controller.render.magma_cube"],spawn_egg:{texture:"spawn_egg",texture_index:20}},mooshroom:{identifier:"minecraft:mooshroom",min_engine_version:"1.8.0",materials:{default:"mooshroom"},textures:{default:"textures/entity/cow/red_mooshroom",brown:"textures/entity/cow/brown_mooshroom"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-6,11,-5],size:[12,18,10],uv:[18,4]},{origin:[-2,11,-6],size:[4,6,1],uv:[52,0]}]},{name:"head",pivot:[0,20,-8],locators:{lead:[0,20,-8]},cubes:[{origin:[-4,16,-14],size:[8,8,6],uv:[0,0]},{origin:[-5,22,-12],size:[1,3,1],uv:[22,0]},{origin:[4,22,-12],size:[1,3,1],uv:[22,0]}]},{name:"leg0",parent:"body",pivot:[-4,12,7],cubes:[{origin:[-6,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[4,12,7],cubes:[{origin:[2,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-4,12,-6],cubes:[{origin:[-6,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[4,12,-6],cubes:[{origin:[2,0,-7],size:[4,12,4],uv:[0,16]}]}]}},render_controllers:["controller.render.mooshroom"],spawn_egg:{texture:"spawn_egg",texture_index:5}},panda:{identifier:"minecraft:panda",materials:{default:"panda"},textures:{default:"textures/entity/panda/panda",lazy:"textures/entity/panda/lazy_panda",worried:"textures/entity/panda/worried_panda",playful:"textures/entity/panda/playful_panda",brown:"textures/entity/panda/brown_panda",weak:"textures/entity/panda/weak_panda",aggressive:"textures/entity/panda/aggressive_panda"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,12.5,-17],locators:{lead:[0,14,-16]},cubes:[{origin:[-6.5,7.5,-21],size:[13,10,9],uv:[0,6]},{origin:[-3.5,7.5,-23],size:[7,5,2],uv:[45,16]},{origin:[-8.5,16.5,-18],size:[5,4,1],uv:[52,25]},{origin:[3.5,16.5,-18],size:[5,4,1],uv:[52,25]}]},{name:"body",pivot:[0,14,0],bind_pose_rotation:[90,0,0],cubes:[{origin:[-9.5,1,-6.5],size:[19,26,13],uv:[0,25]}]},{name:"leg0",parent:"body",pivot:[-5.5,9,9],cubes:[{origin:[-8.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg1",parent:"body",pivot:[5.5,9,9],cubes:[{origin:[2.5,0,6],size:[6,9,6],uv:[40,0]}]},{name:"leg2",parent:"body",pivot:[-5.5,9,-9],cubes:[{origin:[-8.5,0,-12],size:[6,9,6],uv:[40,0]}]},{name:"leg3",parent:"body",pivot:[5.5,9,-9],cubes:[{origin:[2.5,0,-12],size:[6,9,6],uv:[40,0]}]}]}},render_controllers:["controller.render.panda"],spawn_egg:{texture:"spawn_egg",texture_index:54}},phantom:{identifier:"minecraft:phantom",materials:{default:"phantom",invisible:"phantom_invisible"},textures:{default:"textures/entity/phantom"},geometry:{default:{texturewidth:64,textureheight:64,bones:[{name:"body",pivot:[0,24,0],bind_pose_rotation:[0,0,0],cubes:[{origin:[-3,23,-8],size:[5,3,9],uv:[0,8]}]},{name:"wing0",pivot:[2,26,-8],bind_pose_rotation:[0,0,5.7],cubes:[{origin:[2,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip0",pivot:[8,26,-8],bind_pose_rotation:[0,0,5.7],locators:{left_wing:[21,26,0]},cubes:[{origin:[8,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing0"},{name:"wing1",pivot:[-3,26,-8],bind_pose_rotation:[0,0,-5.7],mirror:!0,cubes:[{origin:[-9,24,-8],size:[6,2,9],uv:[23,12]}],parent:"body"},{name:"wingtip1",pivot:[-9,24,-8],bind_pose_rotation:[0,0,-5.7],locators:{right_wing:[-22,24,0]},mirror:!0,cubes:[{origin:[-22,25,-8],size:[13,1,9],uv:[16,24]}],parent:"wing1"},{name:"head",pivot:[0,23,-7],bind_pose_rotation:[11.5,0,0],cubes:[{origin:[-4,22,-12],size:[7,3,5],uv:[0,0]}],parent:"body"},{name:"tail",pivot:[0,26,1],bind_pose_rotation:[0,0,0],cubes:[{origin:[-2,24,1],size:[3,2,6],uv:[3,20]}],parent:"body"},{name:"tailtip",pivot:[0,25.5,7],bind_pose_rotation:[0,0,0],cubes:[{origin:[-1,24.5,7],size:[1,1,6],uv:[4,29]}],parent:"tail"}]}},particle_effects:{wing_dust:"minecraft:phantom_trail_particle"},sound_effects:{flap:"mob.phantom.flap"},render_controllers:["controller.render.phantom"],spawn_egg:{texture:"spawn_egg",texture_index:51}},pig:{identifier:"minecraft:pig",min_engine_version:"1.8.0",materials:{default:"pig"},textures:{default:"textures/entity/pig/pig",saddled:"textures/entity/pig/pig_saddle"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,13,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-5,7,-5],size:[10,16,8],uv:[28,8]}]},{name:"head",parent:"body",pivot:[0,12,-6],locators:{lead:[0,14,-6]},cubes:[{origin:[-4,8,-14],size:[8,8,8],uv:[0,0]},{origin:[-2,9,-15],size:[4,3,1],uv:[16,16]}]},{name:"leg0",parent:"body",pivot:[-3,6,7],cubes:[{origin:[-5,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg1",parent:"body",mirror:!0,pivot:[3,6,7],cubes:[{origin:[1,0,5],size:[4,6,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,6,-5],cubes:[{origin:[-5,0,-7],size:[4,6,4],uv:[0,16]}]},{name:"leg3",parent:"body",mirror:!0,pivot:[3,6,-5],cubes:[{origin:[1,0,-7],size:[4,6,4],uv:[0,16]}]}]}},render_controllers:["controller.render.pig"],spawn_egg:{texture:"spawn_egg",texture_index:2}},piglin_brute:{identifier:"minecraft:piglin_brute",materials:{default:"piglin_brute"},textures:{default:"textures/entity/piglin/piglin_brute"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{base_color:"#592A10",overlay_color:"#F9F3A4"},render_controllers:["controller.render.piglin_brute"],enable_attachables:!0},polar_bear:{identifier:"minecraft:polar_bear",materials:{default:"polar_bear"},textures:{default:"textures/entity/bear/polarbear"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:128,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,14,-16],locators:{lead:[0,14,-16]},mirror:!0,cubes:[{mirror:!1,origin:[-3.5,10,-19],size:[7,7,7],uv:[0,0]},{mirror:!1,origin:[-2.5,10,-22],size:[5,3,3],uv:[0,44]},{mirror:!1,origin:[-4.5,16,-17],size:[2,2,1],uv:[26,0]},{origin:[2.5,16,-17],size:[2,2,1],uv:[26,0]}]},{name:"body",pivot:[-2,15,12],bind_pose_rotation:[90,0,0],cubes:[{origin:[-7,14,5],size:[14,14,11],uv:[0,19]},{origin:[-6,28,5],size:[12,12,10],uv:[39,0]}]},{name:"leg0",parent:"body",pivot:[-4.5,10,6],cubes:[{origin:[-6.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg1",parent:"body",pivot:[4.5,10,6],cubes:[{origin:[2.5,0,4],size:[4,10,8],uv:[50,22]}]},{name:"leg2",parent:"body",pivot:[-3.5,10,-8],cubes:[{origin:[-5.5,0,-10],size:[4,10,6],uv:[50,40]}]},{name:"leg3",parent:"body",pivot:[3.5,10,-8],cubes:[{origin:[1.5,0,-10],size:[4,10,6],uv:[50,40]}]}]}},render_controllers:["controller.render.polarbear"],spawn_egg:{texture:"spawn_egg",texture_index:37}},pufferfish:{identifier:"minecraft:pufferfish",min_engine_version:"1.8.0",materials:{default:"pufferfish"},textures:{default:"textures/entity/fish/pufferfish"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-1.5,0,-1.5],size:[3,2,3],uv:[0,27]},{origin:[.5,2,-1.5],size:[1,1,1],uv:[24,6]},{origin:[-1.5,2,-1.5],size:[1,1,1],uv:[28,6]}],locators:{lead:[0,0,0]}},{name:"tailfin",parent:"body",cubes:[{origin:[-1.5,1,1.5],size:[3,0,3],uv:[-3,0]}]},{name:"leftFin",parent:"body",pivot:[6.5,5,.5],cubes:[{origin:[1.5,0,-1.5],size:[1,1,2],uv:[25,0],mirror:!0}]},{name:"rightFin",parent:"body",pivot:[-6.5,5,.5],cubes:[{origin:[-2.5,0,-1.5],size:[1,1,2],uv:[25,0]}]}]},mid:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-2.5,1,-2.5],size:[5,5,5],uv:[12,22]}]},{name:"leftFin",parent:"body",pivot:[2.5,5,.5],cubes:[{origin:[2.5,4,-1.5],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-2.5,5,.5],cubes:[{origin:[-4.5,4,-1.5],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,6,-2.5],cubes:[{origin:[-2.5,6,-2.5],size:[5,1,0],uv:[19,17]}]},{name:"spines_top_back",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,6,2.5],cubes:[{origin:[-2.5,6,2.5],size:[5,1,0],uv:[11,17]}]},{name:"spines_bottom_front",parent:"body",bind_pose_rotation:[-45,0,0],pivot:[0,1,-2.5],cubes:[{origin:[-2.5,0,-2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_bottom_back",parent:"body",bind_pose_rotation:[45,0,0],pivot:[0,1,2.5],rotation:[45,0,0],cubes:[{origin:[-2.5,0,2.5],size:[5,1,0],uv:[18,20]}]},{name:"spines_left_front",parent:"body",bind_pose_rotation:[0,45,0],pivot:[2.5,0,-2.5],rotation:[0,45,0],cubes:[{origin:[2.5,1,-2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_left_back",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[2.5,0,2.5],rotation:[0,-45,0],cubes:[{origin:[2.5,1,2.5],size:[1,5,0],uv:[1,17]}]},{name:"spines_right_front",parent:"body",bind_pose_rotation:[0,-45,0],pivot:[-2.5,0,-2.5],rotation:[0,-45,0],cubes:[{origin:[-3.5,1,-2.5],size:[1,5,0],uv:[5,17]}]},{name:"spines_right_back",parent:"body",bind_pose_rotation:[0,45,0],pivot:[-2.5,0,2.5],rotation:[0,45,0],cubes:[{origin:[-3.5,1,2.5],size:[1,5,0],uv:[9,17]}]}]},large:{visible_bounds_width:.5,visible_bounds_height:.5,texturewidth:32,textureheight:32,bones:[{name:"body",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"leftFin",parent:"body",pivot:[4,7,1],cubes:[{origin:[4,6,-2.9904],size:[2,1,2],uv:[24,3]}]},{name:"rightFin",parent:"body",pivot:[-4,7,1],cubes:[{origin:[-5.9968,6,-2.992],size:[2,1,2],uv:[24,0]}]},{name:"spines_top_front",parent:"body",pivot:[-4,8,-4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,8,-4],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_mid",parent:"body",pivot:[0,8,0],cubes:[{origin:[-4,8,0],size:[8,1,1],uv:[14,16]}]},{name:"spines_top_back",parent:"body",pivot:[0,8,4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,8,4],size:[8,1,1],uv:[14,16]}]},{name:"spines_bottom_front",parent:"body",pivot:[0,0,-4],bind_pose_rotation:[-45,0,0],cubes:[{origin:[-4,-1,-4],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_mid",parent:"body",pivot:[0,-1,0],cubes:[{origin:[-4,-1,0],size:[8,1,1],uv:[14,19]}]},{name:"spines_bottom_back",parent:"body",pivot:[0,0,4],bind_pose_rotation:[45,0,0],cubes:[{origin:[-4,-1,4],size:[8,1,1],uv:[14,19]}]},{name:"spines_left_front",parent:"body",pivot:[4,0,-4],bind_pose_rotation:[0,45,0],cubes:[{origin:[4,0,-4],size:[1,8,1],uv:[0,16]}]},{name:"spines_left_mid",parent:"body",pivot:[4,0,0],cubes:[{origin:[4,0,0],size:[1,8,1],uv:[4,16],mirror:!0}]},{name:"spines_left_back",parent:"body",pivot:[4,0,4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[4,0,4],size:[1,8,1],uv:[8,16],mirror:!0}]},{name:"spines_right_front",parent:"body",pivot:[-4,0,-4],bind_pose_rotation:[0,-45,0],cubes:[{origin:[-5,0,-4],size:[1,8,1],uv:[4,16]}]},{name:"spines_right_mid",parent:"body",pivot:[-4,0,0],cubes:[{origin:[-5,0,0],size:[1,8,1],uv:[8,16]}]},{name:"spines_right_back",parent:"body",pivot:[-4,0,4],bind_pose_rotation:[0,45,0],cubes:[{origin:[-5,0,4],size:[1,8,1],uv:[8,16]}]}]}},render_controllers:[{"controller.render.pufferfish.small":"query.variant == 0"},{"controller.render.pufferfish.medium":"query.variant == 1"},{"controller.render.pufferfish.large":"query.variant == 2"}],spawn_egg:{texture:"spawn_egg",texture_index:46}},rabbit:{identifier:"minecraft:rabbit",min_engine_version:"1.8.0",materials:{default:"rabbit"},textures:{brown:"textures/entity/rabbit/brown",white:"textures/entity/rabbit/white",black:"textures/entity/rabbit/black",white_splotched:"textures/entity/rabbit/white_splotched",gold:"textures/entity/rabbit/gold",salt:"textures/entity/rabbit/salt",toast:"textures/entity/rabbit/toast"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"rearFootLeft",pivot:[3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[2,0,0],size:[2,1,7],uv:[8,24]}]},{name:"rearFootRight",pivot:[-3,6.5,3.7],mirror:!0,parent:"body",cubes:[{origin:[-4,0,0],size:[2,1,7],uv:[26,24]}]},{name:"haunchLeft",pivot:[3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,2.5,3.7],size:[2,4,5],uv:[16,15]}]},{name:"haunchRight",pivot:[-3,6.5,3.7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,2.5,3.7],size:[2,4,5],uv:[30,15]}]},{name:"body",pivot:[0,5,8],bind_pose_rotation:[-20,0,0],mirror:!0,cubes:[{origin:[-3,2,-2],size:[6,5,10],uv:[0,0]}]},{name:"frontLegLeft",pivot:[3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[2,0,-2],size:[2,7,2],uv:[8,15]}]},{name:"frontLegRight",pivot:[-3,7,-1],bind_pose_rotation:[-10,0,0],mirror:!0,parent:"body",cubes:[{origin:[-4,0,-2],size:[2,7,2],uv:[0,15]}]},{name:"head",pivot:[0,8,-1],locators:{lead:[0,8,-1]},mirror:!0,parent:"body",cubes:[{origin:[-2.5,8,-6],size:[5,4,5],uv:[32,0]}]},{name:"earRight",pivot:[0,8,-1],bind_pose_rotation:[0,-15,0],mirror:!0,parent:"body",cubes:[{origin:[-2.5,12,-2],size:[2,5,1],uv:[58,0]}]},{name:"earLeft",pivot:[0,8,-1],bind_pose_rotation:[0,15,0],mirror:!0,parent:"body",cubes:[{origin:[.5,12,-2],size:[2,5,1],uv:[52,0]}]},{name:"tail",pivot:[0,4,7],bind_pose_rotation:[-20,0,0],mirror:!0,parent:"body",cubes:[{origin:[-1.5,2.5,7],size:[3,3,2],uv:[52,6]}]},{name:"nose",pivot:[0,8,-1],mirror:!0,parent:"body",cubes:[{origin:[-.5,9.5,-6.5],size:[1,1,1],uv:[32,9]}]}]}},render_controllers:["controller.render.rabbit"],spawn_egg:{texture:"spawn_egg",texture_index:24}},ravager:{identifier:"minecraft:ravager",textures:{default:"textures/entity/illager/ravager"},materials:{default:"ravager"},geometry:{default:{bones:[{pivot:[0,19,2],rotation:[90,0,0],cubes:[{origin:[-7,10,-2],size:[14,16,20],uv:[0,55]},{origin:[-6,-3,-2],size:[12,13,18],uv:[0,91]}],name:"body"},{pivot:[0,15,-10],cubes:[{origin:[-8,13,-24],size:[16,3,16],uv:[0,36]}],name:"mouth",parent:"head"},{pivot:[0,20,-20],cubes:[{origin:[-5,21,-10],size:[10,10,18],uv:[68,73]}],name:"neck"},{locators:{stun:[0,32,-15]},pivot:[0,28,-10],cubes:[{origin:[-8,14,-24],size:[16,20,16],uv:[0,0]},{origin:[-2,12,-28],size:[4,8,4],uv:[0,0]}],name:"head",parent:"neck"},{pivot:[-12,30,22],cubes:[{origin:[-12,0,17],size:[8,37,8],uv:[96,0]}],name:"leg0"},{pivot:[4,30,22],cubes:[{origin:[4,0,17],size:[8,37,8],uv:[96,0]}],name:"leg1"},{pivot:[-4,26,-4],cubes:[{origin:[-12,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg2"},{pivot:[-4,26,-4],cubes:[{origin:[4,0,-8],size:[8,37,8],uv:[64,0]}],name:"leg3"},{pivot:[-5,27,-19],rotation:[60,0,0],cubes:[{origin:[-10,27,-20],size:[2,14,4],uv:[74,55]},{origin:[8,27,-20],size:[2,14,4],uv:[74,55]}],name:"horns",parent:"head"}],texturewidth:128,textureheight:128,visible_bounds_width:4,visible_bounds_height:3.5,visible_bounds_offset:[0,1.25,0]}},render_controllers:["controller.render.ravager"],spawn_egg:{texture:"spawn_egg",texture_index:57},particle_effects:{stun_particles:"minecraft:stunned_emitter"}},salmon:{identifier:"minecraft:salmon",materials:{default:"salmon"},textures:{default:"textures/entity/fish/salmon"},geometry:{default:{visible_bounds_width:.5,visible_bounds_height:.5,visible_bounds_offset:[0,.5,0],texturewidth:32,textureheight:32,bones:[{name:"body_front",pivot:[0,0,-4],cubes:[{origin:[-1.5,3.5,-4],size:[3,5,8],uv:[0,0]}]},{name:"body_back",parent:"body_front",pivot:[0,0,4],cubes:[{origin:[-1.5,3.5,4],size:[3,5,8],uv:[0,13]}]},{name:"dorsal_front",parent:"body_front",pivot:[0,5,2],cubes:[{origin:[0,8.5,2],size:[0,2,2],uv:[4,2]}]},{name:"dorsal_back",parent:"body_back",pivot:[0,5,4],cubes:[{origin:[0,8.5,4],size:[0,2,3],uv:[2,3]}]},{name:"tailfin",parent:"body_back",pivot:[0,0,12],cubes:[{origin:[0,3.5,12],size:[0,5,6],uv:[20,10]}]},{name:"head",parent:"body_front",pivot:[0,3,-4],locators:{lead:[0,3,-4]},cubes:[{origin:[-1,4.5,-7],size:[2,4,3],uv:[22,0]}]},{name:"leftFin",parent:"body_front",pivot:[1.5,1,-4],rotation:[0,0,35],cubes:[{origin:[-.50752,3.86703,-4],size:[2,0,2],uv:[2,0]}]},{name:"rightFin",parent:"body_front",pivot:[-1.5,1,-4],rotation:[0,0,-35],cubes:[{origin:[-1.49258,3.86703,-4],size:[2,0,2],uv:[-2,0]}]}]}},render_controllers:["controller.render.salmon"],spawn_egg:{texture:"spawn_egg",texture_index:47}},sheep:{identifier:"minecraft:sheep",materials:{default:"sheep"},textures:{default:"textures/entity/sheep/sheep",wool:"textures/entity/sheep/sheep_fur"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,8]}]},{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-14],size:[6,6,8],uv:[0,0]}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,0,5],size:[4,12,4],uv:[0,16]}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,0,-7],size:[4,12,4],uv:[0,16]}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,0,-7],size:[4,12,4],uv:[0,16]}]}]},wool:{visible_bounds_width:2,visible_bounds_height:1.75,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:64,bones:[{name:"head",pivot:[0,18,-8],cubes:[{origin:[-3,16,-12],size:[6,6,6],uv:[0,32],inflate:.6}]},{name:"body",pivot:[0,19,2],bind_pose_rotation:[90,0,0],cubes:[{origin:[-4,13,-5],size:[8,16,6],uv:[28,40],inflate:1.75}]},{name:"leg0",parent:"body",pivot:[-3,12,7],cubes:[{origin:[-5,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg1",parent:"body",pivot:[3,12,7],cubes:[{origin:[1,6,5],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg2",parent:"body",pivot:[-3,12,-5],cubes:[{origin:[-5,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]},{name:"leg3",parent:"body",pivot:[3,12,-5],cubes:[{origin:[1,6,-7],size:[4,6,4],uv:[0,48],inflate:.5}]}]}}},shulker_bullet:{identifier:"minecraft:shulker_bullet",materials:{default:"shulker_bullet"},textures:{default:"textures/entity/shulker/spark"},geometry:{default:{texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-4,-4,-1],size:[8,8,2],uv:[0,0]},{origin:[-1,-4,-4],size:[2,8,8],uv:[0,10]},{origin:[-4,-1,-4],size:[8,2,8],uv:[20,0]}]}]}},render_controllers:["controller.render.shulker_bullet"]},silverfish:{identifier:"minecraft:silverfish",materials:{default:"silverfish",body_layer:"silverfish_layers"},textures:{default:"textures/entity/silverfish"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"bodyPart_0",parent:"bodyPart_2",pivot:[0,2,-3.5],cubes:[{origin:[-1.5,0,-4.5],size:[3,2,2],uv:[0,0]}]},{name:"bodyPart_1",parent:"bodyPart_2",pivot:[0,3,-1.5],cubes:[{origin:[-2,0,-2.5],size:[4,3,2],uv:[0,4]}]},{name:"bodyPart_2",pivot:[0,4,1],cubes:[{origin:[-3,0,-.5],size:[6,4,3],uv:[0,9]}]},{name:"bodyPart_3",parent:"bodyPart_2",pivot:[0,3,4],cubes:[{origin:[-1.5,0,2.5],size:[3,3,3],uv:[0,16]}]},{name:"bodyPart_4",parent:"bodyPart_2",pivot:[0,2,7],cubes:[{origin:[-1,0,5.5],size:[2,2,3],uv:[0,22]}]},{name:"bodyPart_5",parent:"bodyPart_2",pivot:[0,1,9.5],cubes:[{origin:[-1,0,8.5],size:[2,1,2],uv:[11,0]}]},{name:"bodyPart_6",parent:"bodyPart_2",pivot:[0,1,11.5],cubes:[{origin:[-.5,0,10.5],size:[1,1,2],uv:[13,4]}]},{name:"bodyLayer_0",parent:"bodyPart_2",pivot:[0,8,1],cubes:[{origin:[-5,0,-.5],size:[10,8,3],uv:[20,0]}]},{name:"bodyLayer_1",parent:"bodyPart_4",pivot:[0,4,7],cubes:[{origin:[-3,0,5.5],size:[6,4,3],uv:[20,11]}]},{name:"bodyLayer_2",parent:"bodyPart_1",pivot:[0,5,-1.5],cubes:[{origin:[-3,0,-3],size:[6,5,2],uv:[20,18]}]}]}},render_controllers:["controller.render.silverfish"],spawn_egg:{texture:"spawn_egg",texture_index:8}},skeleton:{identifier:"minecraft:skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:9},render_controllers:["controller.render.skeleton"],enable_attachables:!0},skeleton_horse:{identifier:"minecraft:skeleton_horse",textures:{base_brown:"textures/entity/horse/horse_brown",base_white:"textures/entity/horse/horse_white",base_chestnut:"textures/entity/horse/horse_chestnut",base_creamy:"textures/entity/horse/horse_creamy",base_black:"textures/entity/horse/horse_black",base_gray:"textures/entity/horse/horse_gray",base_darkbrown:"textures/entity/horse/horse_darkbrown",markings_none:"textures/entity/horse/horse_markings_none",markings_white:"textures/entity/horse/horse_markings_white",markings_whitefield:"textures/entity/horse/horse_markings_whitefield",markings_whitedots:"textures/entity/horse/horse_markings_whitedots",markings_blackdots:"textures/entity/horse/horse_markings_blackdots",mule:"textures/entity/horse/mule",donkey:"textures/entity/horse/donkey",skeleton:"textures/entity/horse/horse_skeleton",zombie:"textures/entity/horse/horse_zombie",armor_none:"textures/entity/horse/armor/horse_armor_none",armor_leather:"textures/entity/horse/armor/horse_armor_leather",armor_iron:"textures/entity/horse/armor/horse_armor_iron",armor_gold:"textures/entity/horse/armor/horse_armor_gold",armor_diamond:"textures/entity/horse/armor/horse_armor_diamond"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:3,visible_bounds_offset:[0,1,0],texturewidth:128,textureheight:128,bones:[{name:"Body",pivot:[0,13,9],rotation:[0,0,0],cubes:[{origin:[-5,11,-10],size:[10,10,24],uv:[0,34]}]},{name:"TailA",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1,20,14],size:[2,2,3],uv:[44,0]}]},{name:"TailB",pivot:[0,21,14],rotation:[-65,0,0],cubes:[{origin:[-1.5,19,17],size:[3,4,7],uv:[38,7]}]},{name:"TailC",pivot:[0,21,14],rotation:[-80.34,0,0],cubes:[{origin:[-1.5,21.5,23],size:[3,4,7],uv:[24,3]}]},{name:"Leg1A",pivot:[4,15,11],rotation:[0,0,0],cubes:[{origin:[1.5,8,8.5],size:[4,9,5],uv:[78,29]}]},{name:"Leg1B",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[2,3,9.5],size:[3,5,3],uv:[78,43]}]},{name:"Leg1C",pivot:[4,8,11],rotation:[0,0,0],cubes:[{origin:[1.5,-.1,9],size:[4,3,4],uv:[78,51]}]},{name:"Leg2A",pivot:[-4,15,11],rotation:[0,0,0],cubes:[{origin:[-5.5,8,8.5],size:[4,9,5],uv:[96,29]}]},{name:"Leg2B",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5,3,9.5],size:[3,5,3],uv:[96,43]}]},{name:"Leg2C",pivot:[-4,8,11],rotation:[0,0,0],cubes:[{origin:[-5.5,-.1,9],size:[4,3,4],uv:[96,51]}]},{name:"Leg3A",pivot:[4,15,-8],rotation:[0,0,0],cubes:[{origin:[2.1,8,-10.1],size:[3,8,4],uv:[44,29]}]},{name:"Leg3B",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[2.1,3,-9.6],size:[3,5,3],uv:[44,41]}]},{name:"Leg3C",pivot:[4,8,-8],rotation:[0,0,0],cubes:[{origin:[1.6,-.1,-10.1],size:[4,3,4],uv:[44,51]}]},{name:"Leg4A",pivot:[-4,15,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,8,-10.1],size:[3,8,4],uv:[60,29]}]},{name:"Leg4B",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.1,3,-9.6],size:[3,5,3],uv:[60,41]}]},{name:"Leg4C",pivot:[-4,8,-8],rotation:[0,0,0],cubes:[{origin:[-5.6,-.1,-10.1],size:[4,3,4],uv:[60,51]}]},{name:"Head",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25,-11.5],size:[5,5,7],uv:[0,0]}]},{name:"UMouth",pivot:[0,20.05,-10],rotation:[30,0,0],cubes:[{origin:[-2,27.05,-17],size:[4,3,6],uv:[24,18]}]},{name:"LMouth",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2,25,-16.5],size:[4,2,5],uv:[24,27]}]},{name:"Ear1",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"Ear2",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.45,29,-6],size:[2,3,1],uv:[0,0]}]},{name:"MuleEarL",pivot:[0,20,-10],rotation:[30,0,15],cubes:[{origin:[-2,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"MuleEarR",pivot:[0,20,-10],rotation:[30,0,-15],cubes:[{origin:[0,29,-6],size:[2,7,1],uv:[0,12]}]},{name:"Neck",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.05,15.8,-12],size:[4,14,8],uv:[0,12]}]},{name:"Bag1",pivot:[-7.5,21,10],rotation:[0,90,0],cubes:[{origin:[-10.5,13,10],size:[8,8,3],uv:[0,34]}]},{name:"Bag2",pivot:[4.5,21,10],rotation:[0,90,0],cubes:[{origin:[1.5,13,10],size:[8,8,3],uv:[0,47]}]},{name:"Saddle",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-5,21,-1],size:[10,1,8],uv:[80,0]}]},{name:"SaddleB",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-1.5,22,-1],size:[3,1,2],uv:[106,9]}]},{name:"SaddleC",pivot:[0,22,2],rotation:[0,0,0],cubes:[{origin:[-4,22,5],size:[8,1,2],uv:[80,9]}]},{name:"SaddleL2",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,13,1],size:[1,2,2],uv:[74,0]}]},{name:"SaddleL",pivot:[5,21,2],rotation:[0,0,0],cubes:[{origin:[4.5,15,1.5],size:[1,6,1],uv:[70,0]}]},{name:"SaddleR2",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,13,1],size:[1,2,2],uv:[74,4]}]},{name:"SaddleR",pivot:[-5,21,2],rotation:[0,0,0],cubes:[{origin:[-5.5,15,1.5],size:[1,6,1],uv:[80,0]}]},{name:"SaddleMouthL",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[1.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthR",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,26,-14],size:[1,2,2],uv:[74,13]}]},{name:"SaddleMouthLine",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[2.6,23,-16],size:[0,3,16],uv:[44,10]}]},{name:"SaddleMouthLineR",pivot:[0,20,-10],rotation:[0,0,0],cubes:[{origin:[-2.6,23,-16],size:[0,3,16],uv:[44,5]}]},{name:"Mane",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-1,15.5,-5],size:[2,16,4],uv:[58,0]}]},{name:"HeadSaddle",pivot:[0,20,-10],rotation:[30,0,0],cubes:[{origin:[-2.5,25.1,-17],size:[5,5,12],uv:[80,12],inflate:.05}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:32}},slime:{identifier:"minecraft:slime",materials:{default:"slime",outer:"slime_outer"},textures:{default:"textures/entity/slime/slime"},geometry:{default:{visible_bounds_width:5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-3,1,-3],size:[6,6,6],uv:[0,16]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]},armor:{visible_bounds_width:1,visible_bounds_height:1,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"cube",pivot:[0,24,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0]}]},{name:"eye0",parent:"cube",pivot:[0,24,0],cubes:[{origin:[-3.3,4,-3.5],size:[2,2,2],uv:[32,0]}]},{name:"eye1",parent:"cube",pivot:[0,24,0],cubes:[{origin:[1.3,4,-3.5],size:[2,2,2],uv:[32,4]}]},{name:"mouth",parent:"cube",pivot:[0,24,0],cubes:[{origin:[0,2,-3.5],size:[1,1,1],uv:[32,8]}]}]}},render_controllers:["controller.render.slime","controller.render.slime_armor"],spawn_egg:{texture:"spawn_egg",texture_index:10}},small_fireball:{identifier:"minecraft:small_fireball",materials:{default:"fireball"},textures:{default:"textures/items/fire_charge"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-4,0],size:[16,16,0],uv:{south:{uv:[0,0]}}}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.fireball"]},snow_golem:{identifier:"minecraft:snow_golem",min_engine_version:"1.8.0",materials:{default:"snow_golem",head:"snow_golem_pumpkin"},textures:{default:"textures/entity/snow_golem"},geometry:{default:{visible_bounds_width:1,visible_bounds_height:2,visible_bounds_offset:[0,1,0],bones:[{name:"head",parent:"piece1",pivot:[0,20,0],locators:{lead:[0,20,0]},cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0],inflate:-.5}]},{name:"arm1",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,0,57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"arm2",parent:"piece1",pivot:[0,18,0],bind_pose_rotation:[0,180,-57.3],cubes:[{origin:[1,20,-1],size:[12,2,2],uv:[32,0],inflate:-.5}]},{name:"piece1",parent:"piece2",pivot:[0,11,0],cubes:[{origin:[-5,11,-5],size:[10,10,10],uv:[0,16],inflate:-.5}]},{name:"piece2",pivot:[0,0,0],cubes:[{origin:[-6,0,-6],size:[12,12,12],uv:[0,36],inflate:-.5}]}]}},render_controllers:["controller.render.snowgolem"]},snowball:{identifier:"minecraft:snowball",materials:{default:"snowball"},textures:{default:"textures/items/snowball"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.item_sprite"]},potion:{identifier:"minecraft:splash_potion",materials:{default:"splash_potion_enchanted"},textures:{moveSlowdown:"textures/items/potion_bottle_splash_moveSlowdown",moveSpeed:"textures/items/potion_bottle_splash_moveSpeed",digSlowdown:"textures/items/potion_bottle_splash_digSlowdown",digSpeed:"textures/items/potion_bottle_splash_digSpeed",damageBoost:"textures/items/potion_bottle_splash_damageBoost",heal:"textures/items/potion_bottle_splash_heal",harm:"textures/items/potion_bottle_splash_harm",jump:"textures/items/potion_bottle_splash_jump",confusion:"textures/items/potion_bottle_splash_confusion",regeneration:"textures/items/potion_bottle_splash_regeneration",resistance:"textures/items/potion_bottle_splash_resistance",fireResistance:"textures/items/potion_bottle_splash_fireResistance",waterBreathing:"textures/items/potion_bottle_splash_waterBreathing",invisibility:"textures/items/potion_bottle_splash_invisibility",blindness:"textures/items/potion_bottle_splash_blindness",nightVision:"textures/items/potion_bottle_splash_nightVision",hunger:"textures/items/potion_bottle_splash_hunger",weakness:"textures/items/potion_bottle_splash_weakness",poison:"textures/items/potion_bottle_splash_poison",wither:"textures/items/potion_bottle_splash_wither",healthBoost:"textures/items/potion_bottle_splash_healthBoost",absorption:"textures/items/potion_bottle_splash_absorption",saturation:"textures/items/potion_bottle_splash_saturation",levitation:"textures/items/potion_bottle_splash_levitation",turtleMaster:"textures/items/potion_bottle_splash_turtleMaster",slowFall:"textures/items/potion_bottle_splash_slowFall",default:"textures/items/potion_bottle_splash",enchanted:"textures/misc/enchanted_item_glint"},geometry:{default:{bones:[{name:"body",pivot:[0,0,0],cubes:[{origin:[-8,-8,0],size:[16,16,0],uv:[0,0],rotation:[0,0,0]}]}],texturewidth:16,textureheight:16}},render_controllers:["controller.render.splash_potion"]},squid:{identifier:"minecraft:squid",materials:{default:"squid"},textures:{default:"textures/entity/squid"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32,bones:[{name:"body",cubes:[{origin:[-6,-8,-6],size:[12,16,12],uv:[0,0]}]},{name:"tentacle1",parent:"body",pivot:[5,-7,0],cubes:[{origin:[4,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,90,0]},{name:"tentacle2",parent:"body",pivot:[3.5,-7,3.5],cubes:[{origin:[2.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,45,0]},{name:"tentacle3",parent:"body",pivot:[0,-7,5],cubes:[{origin:[-1,-25,4],size:[2,18,2],uv:[48,0]}],rotation:[0,0,0]},{name:"tentacle4",parent:"body",pivot:[-3.5,-7,3.5],cubes:[{origin:[-4.5,-25,2.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-45,0]},{name:"tentacle5",parent:"body",pivot:[-5,-7,0],cubes:[{origin:[-6,-25,-1],size:[2,18,2],uv:[48,0]}],rotation:[0,-90,0]},{name:"tentacle6",parent:"body",pivot:[-3.5,-7,-3.5],cubes:[{origin:[-4.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-135,0]},{name:"tentacle7",parent:"body",pivot:[0,-7,-5],cubes:[{origin:[-1,-25,-6],size:[2,18,2],uv:[48,0]}],rotation:[0,-180,0]},{name:"tentacle8",parent:"body",pivot:[3.5,-7,-3.5],cubes:[{origin:[2.5,-25,-4.5],size:[2,18,2],uv:[48,0]}],rotation:[0,-225,0]}]}},render_controllers:["controller.render.squid"],spawn_egg:{texture:"spawn_egg",texture_index:15}},stray:{identifier:"minecraft:stray",min_engine_version:"1.8.0",materials:{default:"stray",overlay:"stray_clothes"},textures:{default:"textures/entity/skeleton/stray",overlay:"textures/entity/skeleton/stray_overlay"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",pivot:[0,12,0]},{name:"head",pivot:[0,24,0],locators:{lead:[0,24,0]},cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0,parent:"body"}]},overlay:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],inflate:.25},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],inflate:.25},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],inflate:.25},{name:"rightItem",parent:"rightArm",pivot:[-6,15,1],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,inflate:.25},{name:"rightLeg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25},{name:"leftLeg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],inflate:.25,mirror:!0}]}},spawn_egg:{texture:"spawn_egg",texture_index:27},render_controllers:["controller.render.stray_clothes","controller.render.stray"],enable_attachables:!0},strider:{identifier:"minecraft:strider",materials:{default:"strider"},textures:{default:"textures/entity/strider/strider",saddled:"textures/entity/strider/strider",suffocated:"textures/entity/strider/strider_cold",suffocated_saddled:"textures/entity/strider/strider_cold"},geometry:{default:{bones:[{name:"right_leg",pivot:[-4,16,0],cubes:[{origin:[-6,0,-2],size:[4,16,4],uv:[0,32]}]},{name:"left_leg",pivot:[4,16,0],cubes:[{origin:[2,0,-2],size:[4,16,4],uv:[0,55]}]},{name:"body",pivot:[0,16,0],cubes:[{origin:[-8,14,-8],size:[16,14,16],uv:[0,0]}],locators:{lead:[0,15,-1]}},{name:"bristle5",parent:"body",pivot:[8,19,0],cubes:[{origin:[8,19,-8],size:[12,0,16],pivot:[8,19,0],rotation:[0,0,70],uv:[16,65]}]},{name:"bristle4",parent:"body",pivot:[8,24,0],cubes:[{origin:[8,24,-8],size:[12,0,16],pivot:[8,24,0],rotation:[0,0,65],uv:[16,49]}]},{name:"bristle3",parent:"body",pivot:[8,28,0],cubes:[{origin:[8,28,-8],size:[12,0,16],pivot:[8,28,0],rotation:[0,0,50],uv:[16,33]}]},{name:"bristle2",parent:"body",pivot:[-8,28,0],cubes:[{origin:[-20,28,-8],size:[12,0,16],pivot:[-8,28,0],rotation:[0,0,-50],uv:[16,33],mirror:!0}]},{name:"bristle1",parent:"body",pivot:[-8,24,0],cubes:[{origin:[-20,24,-8],size:[12,0,16],pivot:[-8,24,0],rotation:[0,0,-65],uv:[16,49],mirror:!0}]},{name:"bristle0",parent:"body",pivot:[-8,19,0],cubes:[{origin:[-20,19,-8],size:[12,0,16],pivot:[-8,19,0],rotation:[0,0,-70],uv:[16,65],mirror:!0}]}],visible_bounds_width:3,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:128}},spawn_egg:{base_color:"#9c3436",overlay_color:"#4d494d"},render_controllers:["controller.render.strider"]},text_display:{identifier:"minecraft:text_display",geometry:{}},trident:{identifier:"minecraft:thrown_trident",textures:{default:"textures/entity/trident",loyalty_rope:"textures/entity/lead_knot"},geometry:{default:{texturewidth:32,textureheight:32,bones:[{name:"pole",pivot:[0,24,0],cubes:[{origin:[-.5,-3,-.5],size:[1,31,1],inflate:.01,uv:[0,0]},{origin:[-1.5,22,-.5],size:[3,2,1],uv:[4,0]},{origin:[-2.5,23,-.5],size:[1,4,1],uv:[4,3]},{origin:[1.5,23,-.5],size:[1,4,1],uv:[4,3]}]}]}}},tnt_minecart:{identifier:"minecraft:tnt_minecart",min_engine_version:"1.8.0",materials:{default:"minecart"},textures:{default:"textures/entity/minecart"},geometry:{default:{bones:[{name:"bottom",pivot:[0,6,0],cubes:[{origin:[-10,-6.5,-1],size:[20,16,2],rotation:[90,0,0],uv:[0,10]}]},{name:"back",pivot:[0,0,0],cubes:[{origin:[-17,2.5,-1],size:[16,8,2],rotation:[0,270,0],uv:[0,0]}],parent:"bottom"},{name:"front",pivot:[0,0,0],cubes:[{origin:[1,2.5,-1],size:[16,8,2],rotation:[0,90,0],uv:[0,0]}],parent:"bottom"},{name:"right",pivot:[0,0,0],cubes:[{origin:[-8,2.5,-8],size:[16,8,2],rotation:[0,180,0],uv:[0,0]}],parent:"bottom"},{name:"left",pivot:[0,0,0],cubes:[{origin:[-8,2.5,6],size:[16,8,2],uv:[0,0]}],parent:"bottom"}],texturewidth:64,textureheight:32}},render_controllers:["controller.render.minecart"]},tropical_fish:{identifier:"minecraft:tropicalfish",materials:{default:"tropicalfish"},textures:{typeA:"textures/entity/fish/tropical_a",typeB:"textures/entity/fish/tropical_b",aPattern1:"textures/entity/fish/tropical_a_pattern_1",aPattern2:"textures/entity/fish/tropical_a_pattern_2",aPattern3:"textures/entity/fish/tropical_a_pattern_3",aPattern4:"textures/entity/fish/tropical_a_pattern_4",aPattern5:"textures/entity/fish/tropical_a_pattern_5",aPattern6:"textures/entity/fish/tropical_a_pattern_6",bPattern1:"textures/entity/fish/tropical_b_pattern_1",bPattern2:"textures/entity/fish/tropical_b_pattern_2",bPattern3:"textures/entity/fish/tropical_b_pattern_3",bPattern4:"textures/entity/fish/tropical_b_pattern_4",bPattern5:"textures/entity/fish/tropical_b_pattern_5",bPattern6:"textures/entity/fish/tropical_b_pattern_6"},geometry:{typeA:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-3],size:[2,3,6],uv:[0,0]},{origin:[0,3,-2.9992],size:[0,4,6],uv:[10,-6]}],name:"body"},{pivot:[0,0,3],cubes:[{origin:[0,0,3],size:[0,3,4],uv:[24,-4]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[.336,0,-.10594],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-2.336,0,-.10594],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32},typeB:{visible_bounds_width:.5,visible_bounds_height:.5,bones:[{pivot:[-.5,0,0],cubes:[{origin:[-1,0,-8e-4],size:[2,6,6],uv:[0,20]},{origin:[0,-5,-8e-4],size:[0,5,6],uv:[20,21]},{origin:[0,6,-8e-4],size:[0,5,6],uv:[20,10]}],name:"body"},{pivot:[0,0,6],cubes:[{origin:[0,8e-4,6],size:[0,6,5],uv:[21,16]}],name:"tailfin",parent:"body"},{pivot:[.5,0,1],bind_pose_rotation:[0,-35,0],cubes:[{origin:[2.05673,0,2.35152],size:[2,2,0],uv:[2,12]}],name:"leftFin",parent:"body"},{pivot:[-.5,0,1],bind_pose_rotation:[0,35,0],cubes:[{origin:[-4.05673,0,2.35152],size:[2,2,0],uv:[2,16]}],name:"rightFin",parent:"body"}],texturewidth:32,textureheight:32}},render_controllers:["controller.render.tropicalfish"],spawn_egg:{texture:"spawn_egg",texture_index:44}},vindicator:{identifier:"minecraft:vindicator",min_engine_version:"1.8.0",materials:{default:"vindicator"},textures:{default:"textures/entity/illager/vindicator"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],texturewidth:64,textureheight:64,bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22]},{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]}]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],mirror:!0,cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,46]}]},{name:"rightItem",pivot:[-5.5,16,.5],neverRender:!0,parent:"rightArm"},{name:"leftArm",parent:"body",pivot:[5,22,0],mirror:!0,cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,46]}]}]}},spawn_egg:{texture:"spawn_egg",texture_index:39},render_controllers:["controller.render.vindicator"],enable_attachables:!0},wandering_trader:{identifier:"minecraft:wandering_trader",materials:{default:"wandering_trader"},textures:{default:"textures/entity/wandering_trader"},geometry:{default:{visible_bounds_width:1.5,visible_bounds_height:2.5,visible_bounds_offset:[0,1.25,0],bones:[{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[0,0]}]},{name:"helmet",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,10,8],uv:[32,0],inflate:.5}]},{name:"brim",parent:"head",pivot:[0,24,0],bind_pose_rotation:[-90,0,0],cubes:[{origin:[-8,16,-6],size:[16,16,1],uv:[30,47],inflate:.1}]},{name:"nose",parent:"head",pivot:[0,26,0],cubes:[{origin:[-1,23,-6],size:[2,4,2],uv:[24,0]}]},{name:"body",locators:{lead_hold:[0,40,0]},cubes:[{origin:[-4,12,-3],size:[8,12,6],uv:[16,20]},{origin:[-4,6,-3],size:[8,18,6],uv:[0,38],inflate:.5}]},{name:"arms",parent:"body",pivot:[0,22,0],cubes:[{origin:[-4,16,-2],size:[8,4,4],uv:[40,38]},{origin:[-8,16,-2],size:[4,8,4],uv:[44,22]},{origin:[4,16,-2],size:[4,8,4],uv:[44,22],mirror:!0}]},{name:"held_item",parent:"arms",pivot:[0,0,0]},{name:"leg0",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,22]}]},{name:"leg1",parent:"body",pivot:[2,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[0,22],mirror:!0}]}]}},render_controllers:["controller.render.wandering_trader"],spawn_egg:{texture:"spawn_egg_wandering_trader"}},wither:{identifier:"minecraft:wither",min_engine_version:"1.8.0",materials:{default:"wither_boss",armor:"wither_boss_armor"},textures:{default:"textures/entity/wither/wither",armor_white:"textures/entity/wither/wither_armor",armor_blue:"textures/entity/wither/wither_armor",invulnerable:"textures/entity/wither/wither_invulnerable"},geometry:{default:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}]},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}]},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}]},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}]},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}]},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}]}]},armor:{visible_bounds_width:3,visible_bounds_height:4,visible_bounds_offset:[0,2,0],texturewidth:64,textureheight:64,bones:[{name:"upperBodyPart1",cubes:[{origin:[-10,17.1,-.5],size:[20,3,3],uv:[0,16]}],inflate:2},{name:"upperBodyPart2",parent:"upperBodyPart1",pivot:[-2,17.1,-.5],cubes:[{origin:[-2,7.1,-.5],size:[3,10,3],uv:[0,22]},{origin:[-6,13.6,0],size:[11,2,2],uv:[24,22]},{origin:[-6,11.1,0],size:[11,2,2],uv:[24,22]},{origin:[-6,8.6,0],size:[11,2,2],uv:[24,22]}],inflate:2},{name:"upperBodyPart3",parent:"upperBodyPart2",pivot:[0,24,0],cubes:[{origin:[0,18,0],size:[3,6,3],uv:[12,22]}],inflate:2},{name:"head1",parent:"upperBodyPart1",pivot:[0,20,0],cubes:[{origin:[-4,20,-4],size:[8,8,8],uv:[0,0]}],inflate:2},{name:"head2",parent:"upperBodyPart1",pivot:[-9,18,-1],cubes:[{origin:[-12,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2},{name:"head3",parent:"upperBodyPart1",pivot:[9,18,-1],cubes:[{origin:[6,18,-4],size:[6,6,6],uv:[32,0]}],inflate:2}]}},render_controllers:["controller.render.wither_boss","controller.render.wither_boss_armor_white","controller.render.wither_boss_armor_blue"]},wither_skeleton:{identifier:"minecraft:wither_skeleton",min_engine_version:"1.8.0",materials:{default:"skeleton"},textures:{default:"textures/entity/skeleton/wither_skeleton"},geometry:{default:{texturewidth:64,textureheight:32,visible_bounds_width:1.5,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],bones:[{name:"body",parent:"waist",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}]},{name:"waist",pivot:[0,12,0]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}]},{name:"hat",parent:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0},{name:"rightArm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-6,12,-1],size:[2,12,2],uv:[40,16]}]},{name:"rightItem",parent:"rightArm",pivot:[-1,-45,-5],neverRender:!0},{name:"leftArm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-1],size:[2,12,2],uv:[40,16]}],mirror:!0},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5],neverRender:!0},{name:"rightLeg",parent:"body",pivot:[-2,12,0],cubes:[{origin:[-3,0,-1],size:[2,12,2],uv:[0,16]}]},{name:"leftLeg",parent:"body",pivot:[2,12,0],cubes:[{origin:[1,0,-1],size:[2,12,2],uv:[0,16]}],mirror:!0}]}},render_controllers:["controller.render.wither_skeleton"],enable_attachables:!0,spawn_egg:{texture:"spawn_egg",texture_index:29}},wither_skull:{identifier:"minecraft:wither_skull",materials:{default:"wither_skull"},textures:{default:"textures/entity/wither/wither"},geometry:{default:{bones:[{name:"head",cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,35]}]}],visible_bounds_width:1,visible_bounds_height:1,texturewidth:64,textureheight:64}},render_controllers:["controller.render.wither_skull"]},zoglin:{identifier:"minecraft:zoglin",materials:{default:"zoglin"},textures:{default:"textures/entity/hoglin/zoglin"},geometry:{default:{bones:[{name:"body",pivot:[0,19,-3],cubes:[{origin:[-8,11,-7],size:[16,14,26],inflate:.02,uv:[1,1]},{origin:[0,22,-10],size:[0,10,19],inflate:.02,uv:[90,33]}],locators:{lead:[0,20,-5]}},{name:"head",parent:"body",pivot:[0,22,-5],rotation:[50,0,0],cubes:[{origin:[-7,21,-24],size:[14,6,19],uv:[61,1]},{origin:[-8,22,-19],size:[2,11,2],uv:[1,13]},{origin:[6,22,-19],size:[2,11,2],uv:[1,13]}]},{name:"right_ear",parent:"head",pivot:[-7,27,-7],rotation:[0,0,-50],cubes:[{origin:[-13,26,-10],size:[6,1,4],uv:[1,1]}]},{name:"left_ear",parent:"head",pivot:[7,27,-7],rotation:[0,0,50],cubes:[{origin:[7,26,-10],size:[6,1,4],uv:[1,6]}]},{name:"leg_back_right",pivot:[6,8,17],cubes:[{origin:[-8,0,13],size:[5,11,5],uv:[21,45]}]},{name:"leg_back_left",pivot:[-6,8,17],cubes:[{origin:[3,0,13],size:[5,11,5],uv:[0,45]}]},{name:"leg_front_right",pivot:[-6,12,-3],cubes:[{origin:[-8,0,-6],size:[6,14,6],uv:[66,42]}]},{name:"leg_front_left",pivot:[6,12,-3],cubes:[{origin:[2,0,-6],size:[6,14,6],uv:[41,42]}]}],visible_bounds_width:4,visible_bounds_height:3,visible_bounds_offset:[0,1.5,0],texturewidth:128,textureheight:64}},spawn_egg:{base_color:"#c66e55",overlay_color:"#e6e6e6"},render_controllers:["controller.render.zoglin"]},zombie:{identifier:"minecraft:zombie",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/zombie/zombie"},geometry:{default:{visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:32,bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]}],parent:"waist"},{name:"waist",neverRender:!0,pivot:[0,12,0]},{name:"head",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[0,0]}],parent:"body"},{name:"hat",pivot:[0,24,0],cubes:[{origin:[-4,24,-4],size:[8,8,8],uv:[32,0],inflate:.5}],neverRender:!0,parent:"head"},{name:"rightArm",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]}],parent:"body"},{name:"rightItem",pivot:[-1,-45,-5],neverRender:!0,parent:"rightArm"},{name:"leftArm",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16]}],mirror:!0,parent:"body"},{name:"leftItem",pivot:[1,-45,-5],neverRender:!0,parent:"leftArm"},{name:"rightLeg",pivot:[-1.9,12,0],cubes:[{origin:[-3.9,0,-2],size:[4,12,4],uv:[0,16]}],parent:"body"},{name:"leftLeg",pivot:[1.9,12,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16]}],mirror:!0,parent:"body"}]}},spawn_egg:{texture:"spawn_egg",texture_index:12},scripts:{pre_animation:["variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;"]},animations:{humanoid_big_head:{loop:!0,bones:{head:{scale:1.4}}},look_at_target_default:{loop:!0,bones:{head:{relative_to:{rotation:"entity"},rotation:["query.target_x_rotation","query.target_y_rotation",0]}}},look_at_target_gliding:{loop:!0,bones:{head:{rotation:[-45,"query.target_y_rotation",0]}}},look_at_target_swimming:{loop:!0,bones:{head:{rotation:["math.lerp(query.target_x_rotation, -45.0, variable.swim_amount)","query.target_y_rotation",0]}}},move:{loop:!0,bones:{leftarm:{rotation:["variable.tcos0",0,0]},leftleg:{rotation:["variable.tcos0 * -1.4",0,0]},rightarm:{rotation:["-variable.tcos0",0,0]},rightleg:{rotation:["variable.tcos0 * 1.4",0,0]}}},"riding.arms":{loop:!0,bones:{leftarm:{rotation:[-36,0,0]},rightarm:{rotation:[-36,0,0]}}},"riding.legs":{loop:!0,bones:{leftleg:{rotation:["-72.0 - this","-18.0 - this","-this"]},rightleg:{rotation:["-72.0 - this","18.0 - this","-this"]}}},holding:{loop:!0,bones:{leftarm:{rotation:["variable.is_holding_left ? (-this * 0.5 - 18.0) : 0.0",0,0]},rightarm:{rotation:["variable.is_holding_right ? (-this * 0.5 - 18.0) : 0.0",0,0]}}},brandish_spear:{loop:!0,bones:{rightarm:{rotation:["this * -0.5 - 157.5 - 22.5 * variable.charge_amount","-this",0]}}},charging:{loop:!0,bones:{rightarm:{rotation:["22.5 * variable.charge_amount - this","-this",0]}}},"attack.rotations":{loop:!0,bones:{body:{rotation:[0,"math.sin(math.sqrt(variable.attack_time) * 360) * 11.46 - this",0]},leftarm:{rotation:["math.sin(math.sqrt(variable.attack_time) * 360) * 11.46",0,0]},rightarm:{rotation:["math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * (variable.is_brandishing_spear ? -1.0 : 1.0 )","variable.is_brandishing_spear ? 0.0 : (math.sin(math.sqrt(variable.attack_time) * 360) * 11.46) * 2.0",0]}}},sneaking:{loop:!0,bones:{body:{rotation:["0.5 - this",0,0]},head:{position:[0,1,0]},leftarm:{rotation:[72,0,0]},leftleg:{position:[0,-3,4]},rightarm:{rotation:[72,0,0]},rightleg:{position:[0,-3,4]}}},bob:{loop:!0,bones:{leftarm:{rotation:[0,0,"((math.cos(query.life_time * 103.2) * 2.865) + 2.865) *-1.0"]},rightarm:{rotation:[0,0,"(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},damage_nearby_mobs:{loop:!0,bones:{leftarm:{rotation:["-45.0-this","-this","-this"]},leftleg:{rotation:["45.0-this","-this","-this"]},rightarm:{rotation:["45.0-this","-this","-this"]},rightleg:{rotation:["-45.0-this","-this","-this"]}}},bow_and_arrow:{loop:!0,bones:{leftarm:{rotation:["query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation + 28.65","-(math.cos(query.life_time * 103.2) * 2.865) - 2.865"]},rightarm:{rotation:["query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.8) * 2.865 - this","query.target_y_rotation - 5.73","(math.cos(query.life_time * 103.2) * 2.865) + 2.865"]}}},use_item_progress:{loop:!0,bones:{rightarm:{rotation:["variable.use_item_startup_progress * -60.0 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -22.5 + variable.use_item_interval_progress * 11.25","variable.use_item_startup_progress * -5.625 + variable.use_item_interval_progress * 11.25"]}}},zombie_attack_bare_hand:{loop:!0,bones:{leftarm:{rotation:["-90.0 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) - (math.sin(query.life_time * 76.776372) * 2.865) - this","5.73 - ((math.sin(variable.attack_time * 180.0) * 57.3) * 0.6) - this","math.cos(query.life_time * 103.13244) * -2.865 - 2.865 - this"]},rightarm:{rotation:["90.0 * (variable.is_brandishing_spear - 1.0) - ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4) + (math.sin(query.life_time * 76.776372) * 2.865) - this","(math.sin(variable.attack_time * 180.0) * 57.3) * 0.6 - 5.73 - this","math.cos(query.life_time * 103.13244) * 2.865 + 2.865 - this"]}}},swimming:{loop:!0,bones:{body:{position:[0,"variable.swim_amount * -10.0 - this","variable.swim_amount * 9.0 - this"],rotation:["variable.swim_amount * (90.0 + query.target_x_rotation)",0,0]},leftarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) - (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, 14.325, variable.swim_amount) - (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},leftleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0 + 180.0) * 0.3, variable.swim_amount)",0,0]},rightarm:{rotation:["math.lerp(this, -180.0, variable.swim_amount) - (variable.swim_amount * ((math.sin(variable.attack_time * 180.0) * 57.3) * 1.2 - (math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3) * 0.4)) + (variable.swim_amount * (math.sin(query.life_time * 76.776372) * 2.865)) - this","math.lerp(this, 14.325, variable.swim_amount) - this","math.lerp(this, -14.325, variable.swim_amount) + (variable.swim_amount * (math.cos(query.life_time * 103.13244) * 2.865 + 2.865)) - this"]},rightleg:{rotation:["math.lerp(this, math.cos(query.life_time * 390.0) * 0.3, variable.swim_amount)",0,0]}}}},animation_controllers:{humanoid_baby_big_head:{initial_state:"default",states:{baby:{animations:["humanoid_big_head"],transitions:[{default:"!query.is_baby"}]},default:{transitions:[{baby:"query.is_baby"}]}}},look_at_target:{initial_state:"default",states:{default:{animations:["look_at_target_default"],transitions:[{gliding:"query.is_gliding"},{swimming:"query.is_swimming"}]},gliding:{animations:["look_at_target_gliding"],transitions:[{swimming:"query.is_swimming"},{default:"!query.is_gliding"}]},swimming:{animations:["look_at_target_swimming"],transitions:[{gliding:"query.is_gliding"},{default:"!query.is_swimming"}]}}},move:{initial_state:"default",states:{default:{animations:["move"]}}},riding:{initial_state:"default",states:{default:{transitions:[{riding:"query.is_riding"}]},riding:{animations:["riding.arms","riding.legs"],transitions:[{default:"!query.is_riding"}]}}},holding:{initial_state:"default",states:{default:{animations:["holding"]}}},brandish_spear:{initial_state:"default",states:{brandish_spear:{animations:["brandish_spear"],transitions:[{default:"!variable.is_brandishing_spear"}]},default:{transitions:[{brandish_spear:"variable.is_brandishing_spear"}]}}},charging:{initial_state:"default",states:{charging:{animations:["charging"],transitions:[{default:"!query.is_charging"}]},default:{transitions:[{charging:"query.is_charging"}]}}},attack:{initial_state:"default",states:{attacking:{animations:["attack.rotations"],transitions:[{default:"variable.attack_time < 0.0"}]},default:{transitions:[{attacking:"variable.attack_time >= 0.0"}]}}},sneaking:{initial_state:"default",states:{default:{transitions:[{sneaking:"query.is_sneaking"}]},sneaking:{animations:["sneaking"],transitions:[{default:"!query.is_sneaking"}]}}},bob:{initial_state:"default",states:{default:{animations:["bob"]}}},damage_nearby_mobs:{initial_state:"default",states:{damage_nearby_mobs:{animations:["damage_nearby_mobs"],transitions:[{default:"!variable.damage_nearby_mobs"}]},default:{transitions:[{damage_nearby_mobs:"variable.damage_nearby_mobs"}]}}},bow_and_arrow:{initial_state:"default",states:{bow_and_arrow:{animations:["bow_and_arrow"],transitions:[{default:"!query.has_target"}]},default:{transitions:[{bow_and_arrow:"query.has_target"}]}}},use_item_progress:{initial_state:"default",states:{default:{transitions:[{use_item_progress:"( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 )"}]},use_item_progress:{animations:["use_item_progress"],transitions:[{default:"( variable.use_item_interval_progress <= 0.0 ) && ( variable.use_item_startup_progress <= 0.0 )"}]}}},zombie_attack_bare_hand:{initial_state:"default",states:{default:{transitions:[{is_bare_hand:"variable.is_holding_left != 1.0"}]},is_bare_hand:{animations:["zombie_attack_bare_hand"],transitions:[{default:"variable.is_holding_left == 1.0"}]}}},swimming:{initial_state:"default",states:{default:{transitions:[{is_swimming:"variable.swim_amount > 0.0"}]},is_swimming:{animations:["swimming"],transitions:[{default:"variable.swim_amount <= 0.0"}]}}}},render_controllers:["controller.render.zombie"],enable_attachables:!0},zombified_piglin:{identifier:"minecraft:zombie_pigman",min_engine_version:"1.8.0",materials:{default:"zombie"},textures:{default:"textures/entity/piglin/zombified_piglin"},geometry:{default:{bones:[{name:"body",pivot:[0,24,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16]},{origin:[-4,12,-2],size:[8,12,4],uv:[16,32],inflate:.25}]},{name:"head",parent:"body",pivot:[0,24,0],cubes:[{origin:[-5,24,-4],size:[10,8,8],uv:[0,0],inflate:-.02},{origin:[-2,24,-5],size:[4,4,1],uv:[31,1]},{origin:[2,24,-5],size:[1,2,1],uv:[2,4]},{origin:[-3,24,-5],size:[1,2,1],uv:[2,0]}],inflate:-.02},{name:"leftear",parent:"head",pivot:[5,30,0],rotation:[0,0,-30],cubes:[{origin:[4,25,-2],size:[1,5,4],uv:[51,6]}]},{name:"rightear",parent:"head",pivot:[-5,30,0],rotation:[0,0,30],cubes:[{origin:[-5,25,-2],size:[1,5,4],uv:[39,6]}]},{name:"hat",parent:"head",pivot:[0,24,0]},{name:"rightarm",parent:"body",pivot:[-5,22,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16]},{origin:[-8,12,-2],size:[4,12,4],uv:[40,32],inflate:.25}]},{name:"rightItem",parent:"rightarm",pivot:[-1,-45,-5]},{name:"leftarm",parent:"body",pivot:[5,22,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[32,48]},{origin:[4,12,-2],size:[4,12,4],uv:[48,48],inflate:.25}]},{name:"leftItem",parent:"leftArm",pivot:[1,-45,-5]},{name:"rightleg",parent:"body",pivot:[-1.9,12,0],cubes:[{origin:[-4,0,-2],size:[4,12,4],uv:[0,16]},{origin:[-4,0,-2],size:[4,12,4],uv:[0,32],inflate:.25}]},{name:"leftleg",parent:"body",pivot:[1.9,12,0],cubes:[{origin:[0,0,-2],size:[4,12,4],uv:[16,48]},{origin:[0,0,-2],size:[4,12,4],uv:[0,48],inflate:.25}]}],visible_bounds_width:2,visible_bounds_height:2,visible_bounds_offset:[0,1,0],texturewidth:64,textureheight:64}},spawn_egg:{texture:"spawn_egg",texture_index:13},render_controllers:["controller.render.zombie_pigman"],enable_attachables:!0}};E();x();k();R();var Ut={};j5(Ut,{allay:()=>ho,arrow:()=>zo,axolotl:()=>mo,blaze:()=>po,boat:()=>qo,camel:()=>go,cat:()=>bo,chicken:()=>yo,cod:()=>_o,creeper:()=>wo,dolphin:()=>Ao,ender_dragon:()=>Eo,enderman:()=>xo,endermite:()=>Ro,fox:()=>ko,frog:()=>To,ghast:()=>Mo,goat:()=>So,guardian:()=>Co,horse:()=>Bo,llama:()=>Po,minecart:()=>Io,parrot:()=>Ho,piglin:()=>Oo,pillager:()=>Fo,rabbit:()=>Do,shulker:()=>Lo,sniffer:()=>Uo,spider:()=>Go,tadpole:()=>No,turtle:()=>Wo,vex:()=>Vo,villager:()=>jo,warden:()=>Yo,witch:()=>Qo,wolf:()=>Ko,zombie_villager:()=>Jo});E();x();k();R();var ho=`# Made in Blockbench 4.9.4
1132
1132
  mtllib materials.mtl
1133
1133
 
1134
1134
  o head
@@ -1452,7 +1452,7 @@ f 51/152/38 52/151/38 50/150/38 49/149/38
1452
1452
  f 56/156/39 51/155/39 49/154/39 54/153/39
1453
1453
  f 55/160/40 56/159/40 54/158/40 53/157/40
1454
1454
  f 54/164/41 49/163/41 50/162/41 53/161/41
1455
- f 55/168/42 52/167/42 51/166/42 56/165/42`;var Ro=`# Made in Blockbench 4.9.4
1455
+ f 55/168/42 52/167/42 51/166/42 56/165/42`;var mo=`# Made in Blockbench 4.9.4
1456
1456
  mtllib materials.mtl
1457
1457
 
1458
1458
  o body
@@ -1960,7 +1960,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
1960
1960
  f 88/252/63 83/251/63 81/250/63 86/249/63
1961
1961
  f 87/256/64 88/255/64 86/254/64 85/253/64
1962
1962
  f 86/260/65 81/259/65 82/258/65 85/257/65
1963
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var ko=`# Made in Blockbench 4.9.4
1963
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var po=`# Made in Blockbench 4.9.4
1964
1964
  mtllib materials.mtl
1965
1965
 
1966
1966
  o upperBodyParts0
@@ -2560,7 +2560,7 @@ f 99/296/74 100/295/74 98/294/74 97/293/74
2560
2560
  f 104/300/75 99/299/75 97/298/75 102/297/75
2561
2561
  f 103/304/76 104/303/76 102/302/76 101/301/76
2562
2562
  f 102/308/77 97/307/77 98/306/77 101/305/77
2563
- f 103/312/78 100/311/78 99/310/78 104/309/78`;var To=`# Made in Blockbench 4.9.4
2563
+ f 103/312/78 100/311/78 99/310/78 104/309/78`;var go=`# Made in Blockbench 4.9.4
2564
2564
  mtllib materials.mtl
2565
2565
 
2566
2566
  o body
@@ -3620,7 +3620,7 @@ f 179/536/134 180/535/134 178/534/134 177/533/134
3620
3620
  f 184/540/135 179/539/135 177/538/135 182/537/135
3621
3621
  f 183/544/136 184/543/136 182/542/136 181/541/136
3622
3622
  f 182/548/137 177/547/137 178/546/137 181/545/137
3623
- f 183/552/138 180/551/138 179/550/138 184/549/138`;var Mo=`# Made in Blockbench 4.9.4
3623
+ f 183/552/138 180/551/138 179/550/138 184/549/138`;var bo=`# Made in Blockbench 4.9.4
3624
3624
  mtllib materials.mtl
3625
3625
 
3626
3626
  o body
@@ -4128,7 +4128,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
4128
4128
  f 88/252/63 83/251/63 81/250/63 86/249/63
4129
4129
  f 87/256/64 88/255/64 86/254/64 85/253/64
4130
4130
  f 86/260/65 81/259/65 82/258/65 85/257/65
4131
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var So=`# Made in Blockbench 4.9.4
4131
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var yo=`# Made in Blockbench 4.9.4
4132
4132
  mtllib materials.mtl
4133
4133
 
4134
4134
  o body
@@ -4498,7 +4498,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
4498
4498
  f 64/180/45 59/179/45 57/178/45 62/177/45
4499
4499
  f 63/184/46 64/183/46 62/182/46 61/181/46
4500
4500
  f 62/188/47 57/187/47 58/186/47 61/185/47
4501
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var Co=`# Made in Blockbench 4.9.4
4501
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var _o=`# Made in Blockbench 4.9.4
4502
4502
  mtllib materials.mtl
4503
4503
 
4504
4504
  o body
@@ -4868,7 +4868,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
4868
4868
  f 64/180/45 59/179/45 57/178/45 62/177/45
4869
4869
  f 63/184/46 64/183/46 62/182/46 61/181/46
4870
4870
  f 62/188/47 57/187/47 58/186/47 61/185/47
4871
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var Bo=`# Made in Blockbench 4.9.4
4871
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var wo=`# Made in Blockbench 4.9.4
4872
4872
  mtllib materials.mtl
4873
4873
 
4874
4874
  o Body
@@ -5146,7 +5146,7 @@ f 43/128/32 44/127/32 42/126/32 41/125/32
5146
5146
  f 48/132/33 43/131/33 41/130/33 46/129/33
5147
5147
  f 47/136/34 48/135/34 46/134/34 45/133/34
5148
5148
  f 46/140/35 41/139/35 42/138/35 45/137/35
5149
- f 47/144/36 44/143/36 43/142/36 48/141/36`;var Po=`# Made in Blockbench 4.9.4
5149
+ f 47/144/36 44/143/36 43/142/36 48/141/36`;var Ao=`# Made in Blockbench 4.9.4
5150
5150
  mtllib materials.mtl
5151
5151
 
5152
5152
  o body
@@ -5516,7 +5516,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
5516
5516
  f 64/180/45 59/179/45 57/178/45 62/177/45
5517
5517
  f 63/184/46 64/183/46 62/182/46 61/181/46
5518
5518
  f 62/188/47 57/187/47 58/186/47 61/185/47
5519
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var Io=`# Made in Blockbench 4.9.4
5519
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var Eo=`# Made in Blockbench 4.9.4
5520
5520
  mtllib materials.mtl
5521
5521
 
5522
5522
  o neck
@@ -8508,7 +8508,7 @@ f 515/1544/386 516/1543/386 514/1542/386 513/1541/386
8508
8508
  f 520/1548/387 515/1547/387 513/1546/387 518/1545/387
8509
8509
  f 519/1552/388 520/1551/388 518/1550/388 517/1549/388
8510
8510
  f 518/1556/389 513/1555/389 514/1554/389 517/1553/389
8511
- f 519/1560/390 516/1559/390 515/1558/390 520/1557/390`;var Ho=`# Made in Blockbench 4.9.4
8511
+ f 519/1560/390 516/1559/390 515/1558/390 520/1557/390`;var xo=`# Made in Blockbench 4.9.4
8512
8512
  mtllib materials.mtl
8513
8513
 
8514
8514
  o Head
@@ -8832,7 +8832,7 @@ f 51/152/38 52/151/38 50/150/38 49/149/38
8832
8832
  f 56/156/39 51/155/39 49/154/39 54/153/39
8833
8833
  f 55/160/40 56/159/40 54/158/40 53/157/40
8834
8834
  f 54/164/41 49/163/41 50/162/41 53/161/41
8835
- f 55/168/42 52/167/42 51/166/42 56/165/42`;var Oo=`# Made in Blockbench 4.9.4
8835
+ f 55/168/42 52/167/42 51/166/42 56/165/42`;var Ro=`# Made in Blockbench 4.9.4
8836
8836
  mtllib materials.mtl
8837
8837
 
8838
8838
  o section_2
@@ -9018,7 +9018,7 @@ f 27/80/20 28/79/20 26/78/20 25/77/20
9018
9018
  f 32/84/21 27/83/21 25/82/21 30/81/21
9019
9019
  f 31/88/22 32/87/22 30/86/22 29/85/22
9020
9020
  f 30/92/23 25/91/23 26/90/23 29/89/23
9021
- f 31/96/24 28/95/24 27/94/24 32/93/24`;var Fo=`# Made in Blockbench 4.9.4
9021
+ f 31/96/24 28/95/24 27/94/24 32/93/24`;var ko=`# Made in Blockbench 4.9.4
9022
9022
  mtllib materials.mtl
9023
9023
 
9024
9024
  o body
@@ -9480,7 +9480,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
9480
9480
  f 80/228/57 75/227/57 73/226/57 78/225/57
9481
9481
  f 79/232/58 80/231/58 78/230/58 77/229/58
9482
9482
  f 78/236/59 73/235/59 74/234/59 77/233/59
9483
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var Do=`# Made in Blockbench 4.9.4
9483
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var To=`# Made in Blockbench 4.9.4
9484
9484
  mtllib materials.mtl
9485
9485
 
9486
9486
  o body
@@ -10218,7 +10218,7 @@ f 123/368/92 124/367/92 122/366/92 121/365/92
10218
10218
  f 128/372/93 123/371/93 121/370/93 126/369/93
10219
10219
  f 127/376/94 128/375/94 126/374/94 125/373/94
10220
10220
  f 126/380/95 121/379/95 122/378/95 125/377/95
10221
- f 127/384/96 124/383/96 123/382/96 128/381/96`;var zo=`# Made in Blockbench 4.9.4
10221
+ f 127/384/96 124/383/96 123/382/96 128/381/96`;var Mo=`# Made in Blockbench 4.9.4
10222
10222
  mtllib materials.mtl
10223
10223
 
10224
10224
  o body
@@ -10680,7 +10680,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
10680
10680
  f 80/228/57 75/227/57 73/226/57 78/225/57
10681
10681
  f 79/232/58 80/231/58 78/230/58 77/229/58
10682
10682
  f 78/236/59 73/235/59 74/234/59 77/233/59
10683
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var Lo=`# Made in Blockbench 4.9.4
10683
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var So=`# Made in Blockbench 4.9.4
10684
10684
  mtllib materials.mtl
10685
10685
 
10686
10686
  o left_back_leg
@@ -11280,7 +11280,7 @@ f 99/296/74 100/295/74 98/294/74 97/293/74
11280
11280
  f 104/300/75 99/299/75 97/298/75 102/297/75
11281
11281
  f 103/304/76 104/303/76 102/302/76 101/301/76
11282
11282
  f 102/308/77 97/307/77 98/306/77 101/305/77
11283
- f 103/312/78 100/311/78 99/310/78 104/309/78`;var Uo=`# Made in Blockbench 4.9.4
11283
+ f 103/312/78 100/311/78 99/310/78 104/309/78`;var Co=`# Made in Blockbench 4.9.4
11284
11284
  mtllib materials.mtl
11285
11285
 
11286
11286
  o head
@@ -12294,7 +12294,7 @@ f 171/512/128 172/511/128 170/510/128 169/509/128
12294
12294
  f 176/516/129 171/515/129 169/514/129 174/513/129
12295
12295
  f 175/520/130 176/519/130 174/518/130 173/517/130
12296
12296
  f 174/524/131 169/523/131 170/522/131 173/521/131
12297
- f 175/528/132 172/527/132 171/526/132 176/525/132`;var Go=`# Made in Blockbench 4.9.4
12297
+ f 175/528/132 172/527/132 171/526/132 176/525/132`;var Bo=`# Made in Blockbench 4.9.4
12298
12298
  mtllib materials.mtl
12299
12299
 
12300
12300
  o Body
@@ -13354,7 +13354,7 @@ f 179/536/134 180/535/134 178/534/134 177/533/134
13354
13354
  f 184/540/135 179/539/135 177/538/135 182/537/135
13355
13355
  f 183/544/136 184/543/136 182/542/136 181/541/136
13356
13356
  f 182/548/137 177/547/137 178/546/137 181/545/137
13357
- f 183/552/138 180/551/138 179/550/138 184/549/138`;var No=`# Made in Blockbench 4.9.4
13357
+ f 183/552/138 180/551/138 179/550/138 184/549/138`;var Po=`# Made in Blockbench 4.9.4
13358
13358
  mtllib materials.mtl
13359
13359
 
13360
13360
  o head
@@ -13862,7 +13862,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
13862
13862
  f 88/252/63 83/251/63 81/250/63 86/249/63
13863
13863
  f 87/256/64 88/255/64 86/254/64 85/253/64
13864
13864
  f 86/260/65 81/259/65 82/258/65 85/257/65
13865
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var Wo=`# Made in Blockbench 4.9.4
13865
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Io=`# Made in Blockbench 4.9.4
13866
13866
  mtllib materials.mtl
13867
13867
 
13868
13868
  o bottom
@@ -14094,7 +14094,7 @@ f 35/104/26 36/103/26 34/102/26 33/101/26
14094
14094
  f 40/108/27 35/107/27 33/106/27 38/105/27
14095
14095
  f 39/112/28 40/111/28 38/110/28 37/109/28
14096
14096
  f 38/116/29 33/115/29 34/114/29 37/113/29
14097
- f 39/120/30 36/119/30 35/118/30 40/117/30`;var Vo=`# Made in Blockbench 4.9.4
14097
+ f 39/120/30 36/119/30 35/118/30 40/117/30`;var Ho=`# Made in Blockbench 4.9.4
14098
14098
  mtllib materials.mtl
14099
14099
 
14100
14100
  o body
@@ -14602,7 +14602,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
14602
14602
  f 88/252/63 83/251/63 81/250/63 86/249/63
14603
14603
  f 87/256/64 88/255/64 86/254/64 85/253/64
14604
14604
  f 86/260/65 81/259/65 82/258/65 85/257/65
14605
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var jo=`# Made in Blockbench 4.9.4
14605
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Oo=`# Made in Blockbench 4.9.4
14606
14606
  mtllib materials.mtl
14607
14607
 
14608
14608
  o Body
@@ -15340,7 +15340,7 @@ f 123/368/92 124/367/92 122/366/92 121/365/92
15340
15340
  f 128/372/93 123/371/93 121/370/93 126/369/93
15341
15341
  f 127/376/94 128/375/94 126/374/94 125/373/94
15342
15342
  f 126/380/95 121/379/95 122/378/95 125/377/95
15343
- f 127/384/96 124/383/96 123/382/96 128/381/96`;var Yo=`# Made in Blockbench 4.9.4
15343
+ f 127/384/96 124/383/96 123/382/96 128/381/96`;var Fo=`# Made in Blockbench 4.9.4
15344
15344
  mtllib materials.mtl
15345
15345
 
15346
15346
  o Body
@@ -15710,7 +15710,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
15710
15710
  f 64/180/45 59/179/45 57/178/45 62/177/45
15711
15711
  f 63/184/46 64/183/46 62/182/46 61/181/46
15712
15712
  f 62/188/47 57/187/47 58/186/47 61/185/47
15713
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var Qo=`# Made in Blockbench 4.9.4
15713
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var Do=`# Made in Blockbench 4.9.4
15714
15714
  mtllib materials.mtl
15715
15715
 
15716
15716
  o rearFootLeft
@@ -16264,7 +16264,7 @@ f 91/272/68 92/271/68 90/270/68 89/269/68
16264
16264
  f 96/276/69 91/275/69 89/274/69 94/273/69
16265
16265
  f 95/280/70 96/279/70 94/278/70 93/277/70
16266
16266
  f 94/284/71 89/283/71 90/282/71 93/281/71
16267
- f 95/288/72 92/287/72 91/286/72 96/285/72`;var Ko=`# Aspose.3D Wavefront OBJ Exporter
16267
+ f 95/288/72 92/287/72 91/286/72 96/285/72`;var zo=`# Aspose.3D Wavefront OBJ Exporter
16268
16268
  # Copyright 2004-2024 Aspose Pty Ltd.
16269
16269
  # File created: 02/12/2025 20:01:28
16270
16270
 
@@ -16324,7 +16324,7 @@ f 5/8/5 6/4/6 8/3/7 7/5/8
16324
16324
  f 9/11/9 10/7/10 12/6/11 11/12/12
16325
16325
  #3 polygons
16326
16326
 
16327
- `;var Jo=`# Made in Blockbench 4.9.4
16327
+ `;var Lo=`# Made in Blockbench 4.9.4
16328
16328
  mtllib materials.mtl
16329
16329
 
16330
16330
  o base
@@ -16464,7 +16464,7 @@ f 19/56/14 20/55/14 18/54/14 17/53/14
16464
16464
  f 24/60/15 19/59/15 17/58/15 22/57/15
16465
16465
  f 23/64/16 24/63/16 22/62/16 21/61/16
16466
16466
  f 22/68/17 17/67/17 18/66/17 21/65/17
16467
- f 23/72/18 20/71/18 19/70/18 24/69/18`;var qo=`# Made in Blockbench 4.9.4
16467
+ f 23/72/18 20/71/18 19/70/18 24/69/18`;var Uo=`# Made in Blockbench 4.9.4
16468
16468
  mtllib materials.mtl
16469
16469
 
16470
16470
  o body
@@ -17156,7 +17156,7 @@ f 115/344/86 116/343/86 114/342/86 113/341/86
17156
17156
  f 120/348/87 115/347/87 113/346/87 118/345/87
17157
17157
  f 119/352/88 120/351/88 118/350/88 117/349/88
17158
17158
  f 118/356/89 113/355/89 114/354/89 117/353/89
17159
- f 119/360/90 116/359/90 115/358/90 120/357/90`;var Zo=`# Made in Blockbench 4.9.4
17159
+ f 119/360/90 116/359/90 115/358/90 120/357/90`;var Go=`# Made in Blockbench 4.9.4
17160
17160
  mtllib materials.mtl
17161
17161
 
17162
17162
  o head
@@ -17664,7 +17664,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
17664
17664
  f 88/252/63 83/251/63 81/250/63 86/249/63
17665
17665
  f 87/256/64 88/255/64 86/254/64 85/253/64
17666
17666
  f 86/260/65 81/259/65 82/258/65 85/257/65
17667
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var Xo=`# Made in Blockbench 4.9.4
17667
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var No=`# Made in Blockbench 4.9.4
17668
17668
  mtllib materials.mtl
17669
17669
 
17670
17670
  o body
@@ -17758,7 +17758,7 @@ f 11/32/8 12/31/8 10/30/8 9/29/8
17758
17758
  f 16/36/9 11/35/9 9/34/9 14/33/9
17759
17759
  f 15/40/10 16/39/10 14/38/10 13/37/10
17760
17760
  f 14/44/11 9/43/11 10/42/11 13/41/11
17761
- f 15/48/12 12/47/12 11/46/12 16/45/12`;var $o=`# Made in Blockbench 4.9.4
17761
+ f 15/48/12 12/47/12 11/46/12 16/45/12`;var Wo=`# Made in Blockbench 4.9.4
17762
17762
  mtllib materials.mtl
17763
17763
 
17764
17764
  o body
@@ -18128,7 +18128,7 @@ f 59/176/44 60/175/44 58/174/44 57/173/44
18128
18128
  f 64/180/45 59/179/45 57/178/45 62/177/45
18129
18129
  f 63/184/46 64/183/46 62/182/46 61/181/46
18130
18130
  f 62/188/47 57/187/47 58/186/47 61/185/47
18131
- f 63/192/48 60/191/48 59/190/48 64/189/48`;var e3=`# Made in Blockbench 4.9.4
18131
+ f 63/192/48 60/191/48 59/190/48 64/189/48`;var Vo=`# Made in Blockbench 4.9.4
18132
18132
  mtllib materials.mtl
18133
18133
 
18134
18134
  o body
@@ -18452,7 +18452,7 @@ f 51/152/38 52/151/38 50/150/38 49/149/38
18452
18452
  f 56/156/39 51/155/39 49/154/39 54/153/39
18453
18453
  f 55/160/40 56/159/40 54/158/40 53/157/40
18454
18454
  f 54/164/41 49/163/41 50/162/41 53/161/41
18455
- f 55/168/42 52/167/42 51/166/42 56/165/42`;var t3=`# Made in Blockbench 4.9.4
18455
+ f 55/168/42 52/167/42 51/166/42 56/165/42`;var jo=`# Made in Blockbench 4.9.4
18456
18456
  mtllib materials.mtl
18457
18457
 
18458
18458
  o body
@@ -18960,7 +18960,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
18960
18960
  f 88/252/63 83/251/63 81/250/63 86/249/63
18961
18961
  f 87/256/64 88/255/64 86/254/64 85/253/64
18962
18962
  f 86/260/65 81/259/65 82/258/65 85/257/65
18963
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var r3=`# Made in Blockbench 4.9.4
18963
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Yo=`# Made in Blockbench 4.9.4
18964
18964
  mtllib materials.mtl
18965
18965
 
18966
18966
  o body
@@ -19422,7 +19422,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
19422
19422
  f 80/228/57 75/227/57 73/226/57 78/225/57
19423
19423
  f 79/232/58 80/231/58 78/230/58 77/229/58
19424
19424
  f 78/236/59 73/235/59 74/234/59 77/233/59
19425
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var i3=`# Made in Blockbench 4.9.4
19425
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var Qo=`# Made in Blockbench 4.9.4
19426
19426
  mtllib materials.mtl
19427
19427
 
19428
19428
  o head
@@ -20068,7 +20068,7 @@ f 107/320/80 108/319/80 106/318/80 105/317/80
20068
20068
  f 112/324/81 107/323/81 105/322/81 110/321/81
20069
20069
  f 111/328/82 112/327/82 110/326/82 109/325/82
20070
20070
  f 110/332/83 105/331/83 106/330/83 109/329/83
20071
- f 111/336/84 108/335/84 107/334/84 112/333/84`;var n3=`# Made in Blockbench 4.9.4
20071
+ f 111/336/84 108/335/84 107/334/84 112/333/84`;var Ko=`# Made in Blockbench 4.9.4
20072
20072
  mtllib materials.mtl
20073
20073
 
20074
20074
  o head
@@ -20576,7 +20576,7 @@ f 83/248/62 84/247/62 82/246/62 81/245/62
20576
20576
  f 88/252/63 83/251/63 81/250/63 86/249/63
20577
20577
  f 87/256/64 88/255/64 86/254/64 85/253/64
20578
20578
  f 86/260/65 81/259/65 82/258/65 85/257/65
20579
- f 87/264/66 84/263/66 83/262/66 88/261/66`;var s3=`# Made in Blockbench 4.9.4
20579
+ f 87/264/66 84/263/66 83/262/66 88/261/66`;var Jo=`# Made in Blockbench 4.9.4
20580
20580
  mtllib materials.mtl
20581
20581
 
20582
20582
  o Body
@@ -21038,7 +21038,7 @@ f 75/224/56 76/223/56 74/222/56 73/221/56
21038
21038
  f 80/228/57 75/227/57 73/226/57 78/225/57
21039
21039
  f 79/232/58 80/231/58 78/230/58 77/229/58
21040
21040
  f 78/236/59 73/235/59 74/234/59 77/233/59
21041
- f 79/240/60 76/239/60 75/238/60 80/237/60`;var o3=`# Made in Blockbench 4.9.4
21041
+ f 79/240/60 76/239/60 75/238/60 80/237/60`;var qo=`# Made in Blockbench 4.9.4
21042
21042
  mtllib materials.mtl
21043
21043
 
21044
21044
  o bottom
@@ -21454,9 +21454,9 @@ f 67/200/50 68/199/50 66/198/50 65/197/50
21454
21454
  f 72/204/51 67/203/51 65/202/51 70/201/51
21455
21455
  f 71/208/52 72/207/52 70/206/52 69/205/52
21456
21456
  f 70/212/53 65/211/53 66/210/53 69/209/53
21457
- f 71/216/54 68/215/54 67/214/54 72/213/54`;var ki={allay:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAV1BMVEUAAAA4jNkuh9Ypg9FBnNpCm9r///+c/P+A/P9k+/9N8/hM6f9Q2f8+5eo94PdG0P821+4s1ewiz/8syf8ox/8bxPNNq+wQwf8os+hCnNpCm9oep9s0h8D7j8AOAAAABnRSTlMAoKCg3PODq/XXAAAA60lEQVR42tWP0W7DIAxFb9OtwdA6xQ3rzZL//84BD0nRljzsZdqxZCx8hLio3Lz4GwtYMWLDi4jnPM+vwogNKTTC43Elr6vgRMQ1wvM5ktsbvRPXN38wGxKHMmnI9M65vgxavwsg2WCpCvlSg6iqlCF4ceKbFEGZVC+5NFFXYUtxZzILl1xmiffoxUcA5DUHKULZp6iqsQzU6KNWYcxBUMnp8A2mwWxAhTPR0qRYFs6sDT+zTMZpWj5pO8L0wamexJ9xXvm10J27rrQ94dSdOqC0PSFXPV4JRuwRzIxGHMB38O14j4N9Wf4/vgDzpRGDwkNeQQAAAABJRU5ErkJggg==",axolotl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAP1BMVEUAAACvsv+zsPmmqv+nn/+GkPXWhCt+iOyBb+d1b/9odutodOyTWuRbb+NlZfS0W0xsV+JpVuNNWc82QZ86AGw+Ir4cAAAAAXRSTlMAQObYZgAAAUdJREFUeNrtk9FugzAMRXG4twFS1jbl/791cbJUQnuAmE2VKk5cKpDukeNA9zeAhP4mwDlgahdAEoDm1dAukI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F4MCeidg5puQ4YMELPNgO5UeXsWVEgAYVJlMALkIBKIAAwHnH0SI8FE2xybddYr5tmzZFJAwAeWYIorcACzE5KC4wBwDLYVgu24gwPeR57KlFHpN1XRsiZgehACKz2wUJ+xnOF7uu/1pcL77Kq6caZUD2/0ZFAk9zM9XrfYvrb1L1TPXvNbFnhwqQEPOKZbVKaZW0aWIpvy+bZVOypUYT7vFx9tGz9zOcFuDN/+gIHIEjcASOwBH44cB/1lQM4ZNhKecAAAAASUVORK5CYII="};E();x();k();R();import*as D0 from"three";var Ti=class{constructor(e,t){this.object=e;this.animations=t;u(this,"clock",new D0.Clock);u(this,"animatedObjects",new Set);u(this,"state")}createAnimationState(){let e=new D0.AnimationMixer(this.object),t=new Map;for(let r of this.animations)t.set(r.name,e.clipAction(r));return this.state={mixer:e,animations:this.animations,actions:t,speed:1,loop:!0},this.object.traverse(r=>{if(r instanceof D0.Mesh||r instanceof D0.Line||r instanceof D0.Points||r instanceof D0.Sprite){let i=r.onBeforeRender;r.onBeforeRender=(s,o,a,v,l,c)=>{let d=this.clock.getDelta();e.update(d),i?.(s,o,a,v,l,c)}}}),this.animatedObjects.add(this.object),this.state}playAnimation(e,t,r){let i=this.state.actions.get(e);if(!i)return!1;this.state.mixer.stopAllAction();let s=t??this.state.loop;return i.setLoop(s?D0.LoopRepeat:D0.LoopOnce,1/0),i.clampWhenFinished=!s,r===void 0?i.timeScale=this.state.speed:i.timeScale=r,i.reset().fadeIn(.1).play(),!0}updateAnimationParams(e,t){e!==void 0&&(this.state.speed=e),t!==void 0&&(this.state.loop=t);for(let r of this.state.actions.values())e!==void 0&&(r.timeScale=e),t!==void 0&&(r.setLoop(t?D0.LoopRepeat:D0.LoopOnce,1/0),r.clampWhenFinished=!t)}stopAnimations(){this.state.mixer.stopAllAction()}getDelta(){return this.clock.getDelta()}};function a3(n,e){let t=new Ti(n,e);return t.createAnimationState(),t}function g4(n){return"parts"in n&&Array.isArray(n.parts)?n.parts:[n]}var b4={up:{dir:[0,1,0],u0:[0,0,1],v0:[0,0,0],u1:[1,0,1],v1:[0,0,1],corners:[[0,1,1,0,0],[1,1,1,1,0],[0,1,0,0,1],[1,1,0,1,1]]},down:{dir:[0,-1,0],u0:[1,0,1],v0:[0,0,0],u1:[2,0,1],v1:[0,0,1],corners:[[1,0,1,0,0],[0,0,1,1,0],[1,0,0,0,1],[0,0,0,1,1]]},east:{dir:[1,0,0],u0:[0,0,0],v0:[0,0,1],u1:[0,0,1],v1:[0,1,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],u0:[1,0,1],v0:[0,0,1],u1:[1,0,2],v1:[0,1,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],u0:[0,0,1],v0:[0,0,1],u1:[1,0,1],v1:[0,1,1],corners:[[1,0,0,0,1],[0,0,0,1,1],[1,1,0,0,0],[0,1,0,1,0]]},south:{dir:[0,0,1],u0:[1,0,2],v0:[0,0,1],u1:[2,0,2],v1:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function v3(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function y4(n,e,t,r,i=!1,s=64,o=64,a=!1,v=[]){let l=new q.Euler(0,0,0);r.rotation&&(l.x=-r.rotation[0]*Math.PI/180,l.y=-r.rotation[1]*Math.PI/180,l.z=-r.rotation[2]*Math.PI/180);for(let{dir:c,corners:d,u0:f,v0:m,u1:g,v1:b}of Object.values(b4)){let w=Math.floor(n.positions.length/3),y=c[0]!==0,A=[];for(let C of d){let M,S;i?(M=(r.uv[0]+C[3]*r.size[0])/s,S=(r.uv[1]+C[4]*r.size[1])/o):(M=(r.uv[0]+v3(C[3]?g:f,r.size))/s,S=(r.uv[1]+v3(C[4]?b:m,r.size))/o);let H=y&&a?C[0]^1:C[0],B=C[1],I=y&&a?C[2]^1:C[2],G=r.inflate??0,O=new q.Vector3(r.origin[0]+H*r.size[0]+(H?G:-G),r.origin[1]+B*r.size[1]+(B?G:-G),r.origin[2]+I*r.size[2]+(I?G:-G));O=O.applyEuler(l),O=O.sub(t.position),O=O.applyEuler(t.rotation),O=O.add(t.position),n.positions.push(O.x,O.y,O.z),n.normals.push(c[0],c[1],c[2]),A.push(M,S),n.skinIndices.push(e,0,0,0),n.skinWeights.push(1,0,0,0)}if(a)for(let C=0;C+1<d.length;C+=2){let M=C*2,S=A.slice(M,M+4);A[M]=S[2],A[M+1]=S[y?1:3],A[M+2]=S[0],A[M+3]=S[y?3:1]}n.uvs.push(...A),n.indices.push(w,w+1,w+2,w+2,w+1,w+3)}}function De(n,e,t,r={},i={}){let s=t.texturewidth??64,o=t.textureheight??64,a,v=e.startsWith("block:"),l=n?.material.map;if(v){if(!n)throw new Error("worldRenderer is required for block textures");let A=e.slice(6),C=n.resourcesManager.currentResources.blocksAtlasJson.textures[A];C&&(s=l?.image.width??s,o=l?.image.height??o,a=[C.u,C.v])}let c={},d={positions:[],normals:[],uvs:[],indices:[],skinIndices:[],skinWeights:[]},f=0;for(let A of t.bones){let C=new q.Bone;if(A.pivot&&(C.position.x=A.pivot[0],C.position.y=A.pivot[1],C.position.z=A.pivot[2]),A.bind_pose_rotation?(C.rotation.x=-A.bind_pose_rotation[0]*Math.PI/180,C.rotation.y=-A.bind_pose_rotation[1]*Math.PI/180,C.rotation.z=-A.bind_pose_rotation[2]*Math.PI/180):A.rotation&&(C.rotation.x=-A.rotation[0]*Math.PI/180,C.rotation.y=-A.rotation[1]*Math.PI/180,C.rotation.z=-A.rotation[2]*Math.PI/180),r.rotation?.[A.name]&&(C.rotation.x-=(r.rotation[A.name].x??0)*Math.PI/180,C.rotation.y-=(r.rotation[A.name].y??0)*Math.PI/180,C.rotation.z-=(r.rotation[A.name].z??0)*Math.PI/180),C.name=`bone_${A.name}`,c[A.name]=C,A.cubes)for(let M of A.cubes){let S=[];y4(d,f,C,M,v,s,o,A.mirror,S),S.length&&(i.errors??(i.errors=[]),i.errors.push(...S.map(H=>`Bone ${A.name}: ${H}`)))}f++}let m=[];for(let A of t.bones)A.parent&&c[A.parent]?c[A.parent].add(c[A.name]):m.push(c[A.name]);let g=new q.Skeleton(Object.values(c)),b=new q.BufferGeometry;b.setAttribute("position",new q.Float32BufferAttribute(d.positions,3)),b.setAttribute("normal",new q.Float32BufferAttribute(d.normals,3)),b.setAttribute("uv",new q.Float32BufferAttribute(d.uvs,2)),b.setAttribute("skinIndex",new q.Uint16BufferAttribute(d.skinIndices,4)),b.setAttribute("skinWeight",new q.Float32BufferAttribute(d.skinWeights,4)),b.setIndex(d.indices);let w=new q.MeshLambertMaterial({transparent:!0,alphaTest:.1,side:q.DoubleSide}),y=new q.SkinnedMesh(b,w);if(y.add(...m),y.bind(g),y.scale.set(1/16,1/16,1/16),a){let A=l.clone();A.offset.set(a[0],a[1]),A.needsUpdate=!0,w.map=A}else l1(e,A=>{w.map||(A.magFilter=q.NearestFilter,A.minFilter=q.NearestFilter,A.flipY=!1,A.wrapS=q.RepeatWrapping,A.wrapT=q.RepeatWrapping,w.map=A)},()=>{let A=w.map.image.width;A&&s!==A&&(w.map.repeat.x=s/A);let C=w.map.image.height;C&&o!==C&&(w.map.repeat.y=o/C),w.needsUpdate=!0});return y}var _4=[{pattern:"furnace_minecart",target:"minecart"},{pattern:"spawner_minecart",target:"minecart"},{pattern:"chest_minecart",target:"minecart"},{pattern:"hopper_minecart",target:"minecart"},{pattern:"command_block_minecart",target:"minecart"},{pattern:"tnt_minecart",target:"minecart"},{pattern:"glow_item_frame",target:"item_frame"},{pattern:"glow_squid",target:"squid"},{pattern:"trader_llama",target:"llama"},{pattern:"chest_boat",target:"boat"},{pattern:"spectral_arrow",target:"arrow"},{pattern:"husk",target:"zombie"},{pattern:"zombie_horse",target:"horse"},{pattern:"donkey",target:"horse"},{pattern:"skeleton_horse",target:"horse"},{pattern:"mule",target:"horse"},{pattern:"ocelot",target:"cat"},{pattern:/_minecraft$/,target:"minecraft"},{pattern:/_boat$/,target:"boat"},{pattern:/_raft$/,target:"boat"},{pattern:/_horse$/,target:"horse"},{pattern:/_zombie$/,target:"zombie"},{pattern:/_arrow$/,target:"zombie"}];function l3(n){for(let e of _4)if(typeof e.pattern=="string"){if(e.pattern===n)return e.target}else if(e.pattern.test(n))return e.target}var c3=n=>Eo[n],d3={zombie:1.85,husk:1.85,arrow:.0025},w4={zombie:new F1(0,1,0),husk:new F1(0,1,0),boat:new F1(0,-1,0),arrow:new F1(0,-.9,0)},Me=class{constructor(e,t,r,i={},s={}){u(this,"mesh");u(this,"animations");u(this,"animationControllers",[]);let o=t,a=l3(t);if(a&&(t=a,s.tempMap=a),i.customModel){let l=g4(i.customModel);this.mesh=new q.Object3D;for(let c=0;c<l.length;c++){let{modelPath:d,modelType:f,metadata:m}=l[c],g=new q.Object3D;switch(g.name=`custom_part_${c}`,f){case"gltf":{new d4().parseAsync(d,"").then(w=>{if(g.add(w.scene),m?.scale){let y=m.scale;g.scale.set(y,y,y)}if(m?.offset){let{x:y=0,y:A=0,z:C=0}=m.offset;g.position.set(y,A,C)}if(m?.texture){let y=new q.TextureLoader().load(m.texture);y.minFilter=q.NearestFilter,y.magFilter=q.NearestFilter,g.traverse(A=>{A instanceof q.Mesh&&(A.material=new q.MeshBasicMaterial({map:y,transparent:!0,alphaTest:.1}))})}if(w.animations?.length){this.animations=[...this.animations??[],...w.animations];let y=a3(g,w.animations);this.animationControllers.push(y);let A=m?.animation,C=m?.animationLoop??!0;A?y.playAnimation(A,C):y.playAnimation(w.animations[0].name,C)}}).catch(w=>{});break}case"obj":{let w=new Ut().parse(d);if(m?.scale){let{scale:y}=m;w.scale.set(y,y,y)}if(m?.offset){let{x:y=0,y:A=0,z:C=0}=m.offset;w.position.set(y,A,C)}if(m?.texture){let y=new q.TextureLoader().load(m.texture);y.minFilter=q.NearestFilter,y.magFilter=q.NearestFilter;let A=new q.MeshBasicMaterial({map:y,transparent:!0,alphaTest:.1});w.traverse(C=>{C instanceof q.Mesh&&(C.material=A)})}g.add(w);break}case"bedrock":{let b=JSON.parse(d);if(m?.scale&&g.scale.set(m.scale,m.scale,m.scale),m?.offset){let{x:w=0,y=0,z:A=0}=m.offset;g.position.set(w,y,A)}for(let[w,y]of Object.entries(b.geometry)){let A=m?.textures?.[w]??b.textures?.[w];if(!A)continue;let C=De(r,A.endsWith(".png")||A.startsWith("data:image/")||A.startsWith("block:")?A:A+".png",y,i,s);C.name=`geometry_${w}`,g.add(C)}break}}this.mesh.add(g)}s.type=l.length===1?l[0].modelType:"special";return}if(Gt[t]){let l=new Ut,c={zombie_horse:`textures/${e}/entity/horse/horse_zombie.png`,husk:u4,skeleton_horse:`textures/${e}/entity/horse/horse_skeleton.png`,donkey:`textures/${e}/entity/horse/donkey.png`,mule:`textures/${e}/entity/horse/mule.png`,ocelot:f4,arrow:h4,spectral_arrow:m4,tipped_arrow:p4},d=c[o]||c[t];d&&(s.textureMap=!0);let f=d||ki[t];if(ki[t]&&(s.isHardcodedTexture=!0),!f)throw new Error(`No texture for ${t}`);let m=new q.TextureLoader().load(f);m.minFilter=q.NearestFilter,m.magFilter=q.NearestFilter;let g=new q.MeshBasicMaterial({map:m,transparent:!0,alphaTest:.1}),b=l.parse(Gt[t]),w=d3[o]||d3[t];w&&b.scale.set(w,w,w);let y=w4[o];y&&b.position.set(y.x,y.y,y.z),b.traverse(A=>{A instanceof q.Mesh&&(A.material=g,A.name==="Head layer"&&(A.visible=!1),A.name==="Head"&&i.rotation?.head&&(A.rotation.x-=(i.rotation.head.x??0)*Math.PI/180,A.rotation.y-=(i.rotation.head.y??0)*Math.PI/180,A.rotation.z-=(i.rotation.head.z??0)*Math.PI/180))}),this.mesh=b,s.type="obj";return}let v=c3(t);if(v){this.mesh=new q.Object3D;for(let[l,c]of Object.entries(v.geometry)){let d=i.textures?.[l]??v.textures[l];if(!d)continue;let f=De(r,d.endsWith(".png")||d.startsWith("data:image/")||d.startsWith("block:")?d:d+".png",c,i,s);f.name=`geometry_${l}`,this.mesh.add(f)}s.type="bedrock"}}playAnimation(e,t=!1){if(!this.animationControllers.length)return;let r=!1;for(let i of this.animationControllers)i.playAnimation(e,t)&&(r=!0)}update(e){}static getStaticData(e){if(e=l3(e)||e,Gt[e])return{boneNames:[]};let t=c3(e);if(!t)throw new Error(`Unknown entity ${e}`);return{boneNames:Object.values(t.geometry).flatMap(r=>r.name)}}};globalThis.EntityMesh=Me;E();x();k();R();var Nt=n=>Math.max(0,Math.min(1,n)),u3=(n,e,t)=>Math.max(e,Math.min(t,n)),re=(n,e,t)=>n+(e-n)*t,E4=n=>(n=(n+Math.PI)%(Math.PI*2),n<0&&(n+=Math.PI*2),n-Math.PI);function x4(n){let e=n?.elytra;if(!e)return;if(typeof e.updateRightWing=="function"){e.updateRightWing();return}if(typeof e.updateRightWingRotation=="function"){e.updateRightWingRotation();return}let t=e.leftWing,r=e.rightWing;!t?.rotation||!r?.rotation||typeof r.rotation.copy=="function"&&(r.rotation.copy(t.rotation),r.rotation.z*=-1)}var D1=class extends A1{constructor(){super(...arguments);u(this,"switchAnimationCallback");u(this,"isRunning",!1);u(this,"isMoving",!0);u(this,"isCrouched",!1);u(this,"moveAmount",0);u(this,"runAmount",0);u(this,"lookYaw",0);u(this,"lookPitch",0);u(this,"_dt",0);u(this,"_phase",0);u(this,"_idlePhase",0);u(this,"_moveBlend",0);u(this,"_runBlend",0);u(this,"_crouchBlend",0);u(this,"_lookYawBlend",0);u(this,"_lookPitchBlend",0);u(this,"_swingTime",null);u(this,"_swingDuration",.25);u(this,"_defaults",null)}update(t,r){this._dt=r,super.update(t,r)}swingArm(){this._swingTime=0}resetLocomotion(){this._moveBlend=0,this._runBlend=0,this._crouchBlend=0,this._phase=0}_captureDefaults(t){let r=t?.skin;this._defaults={playerRot:t?.rotation?.clone?.(),bodyPos:r?.body?.position?.clone?.(),bodyRot:r?.body?.rotation?.clone?.(),leftArmPos:r?.leftArm?.position?.clone?.(),leftArmRot:r?.leftArm?.rotation?.clone?.(),rightArmPos:r?.rightArm?.position?.clone?.(),rightArmRot:r?.rightArm?.rotation?.clone?.(),leftLegPos:r?.leftLeg?.position?.clone?.(),leftLegRot:r?.leftLeg?.rotation?.clone?.(),rightLegPos:r?.rightLeg?.position?.clone?.(),rightLegRot:r?.rightLeg?.rotation?.clone?.(),headPos:r?.head?.position?.clone?.(),headRot:r?.head?.rotation?.clone?.(),capePos:t?.cape?.position?.clone?.(),capeRot:t?.cape?.rotation?.clone?.(),elytraPos:t?.elytra?.position?.clone?.(),elytraRot:t?.elytra?.rotation?.clone?.()}}_applyDefaults(t){let r=this._defaults;if(!r)return;let i=t?.skin,s=t?.cape,o=t?.elytra;r.playerRot&&t?.rotation&&t.rotation.copy(r.playerRot),r.bodyPos&&i?.body?.position&&i.body.position.copy(r.bodyPos),r.bodyRot&&i?.body?.rotation&&i.body.rotation.copy(r.bodyRot),r.leftArmPos&&i?.leftArm?.position&&i.leftArm.position.copy(r.leftArmPos),r.leftArmRot&&i?.leftArm?.rotation&&i.leftArm.rotation.copy(r.leftArmRot),r.rightArmPos&&i?.rightArm?.position&&i.rightArm.position.copy(r.rightArmPos),r.rightArmRot&&i?.rightArm?.rotation&&i.rightArm.rotation.copy(r.rightArmRot),r.leftLegPos&&i?.leftLeg?.position&&i.leftLeg.position.copy(r.leftLegPos),r.leftLegRot&&i?.leftLeg?.rotation&&i.leftLeg.rotation.copy(r.leftLegRot),r.rightLegPos&&i?.rightLeg?.position&&i.rightLeg.position.copy(r.rightLegPos),r.rightLegRot&&i?.rightLeg?.rotation&&i.rightLeg.rotation.copy(r.rightLegRot),r.headPos&&i?.head?.position&&i.head.position.copy(r.headPos),r.headRot&&i?.head?.rotation&&i.head.rotation.copy(r.headRot),r.capePos&&s?.position&&s.position.copy(r.capePos),r.capeRot&&s?.rotation&&s.rotation.copy(r.capeRot),r.elytraPos&&o?.position&&o.position.copy(r.elytraPos),r.elytraRot&&o?.rotation&&o.rotation.copy(r.elytraRot)}animate(t){let r=this._dt||0;this._defaults||this._captureDefaults(t),this._applyDefaults(t);let i=typeof this.moveAmount=="number"?this.moveAmount:this.isMoving?1:0,s=typeof this.runAmount=="number"?this.runAmount:this.isRunning?1:0,o=Nt(i),a=Nt(s),v=this.isCrouched?1:0,l=Math.min(1,r*8),c=Math.min(1,r*6),d=Math.min(1,r*7);this._moveBlend+=(o-this._moveBlend)*l,this._runBlend+=(a-this._runBlend)*c,this._crouchBlend+=(v-this._crouchBlend)*d;let f=Nt(this._moveBlend),m=Nt(this._runBlend),g=Nt(this._crouchBlend),b=re(8,10,m),w=re(1,.55,g),y=b*w;this._phase+=r*y*f,this._phase+=r*y*f,this._idlePhase+=r*1.15;let A=this._phase+(m>.5?Math.PI*.5:0);if(this.switchAnimationCallback&&Math.abs(Math.sin(A))<.02){let O=this.switchAnimationCallback;this.switchAnimationCallback=null,O?.()}k4(t,g);let C=80*Math.PI/180,M=75*Math.PI/180,S=u3(E4(this.lookYaw||0),-C,C),H=u3(this.lookPitch||0,-M,M),B=Math.min(1,r*14);this._lookYawBlend+=(S-this._lookYawBlend)*B,this._lookPitchBlend+=(H-this._lookPitchBlend)*B,t?.skin?.head?.rotation&&(t.skin.head.rotation.y+=this._lookYawBlend,t.skin.head.rotation.x+=this._lookPitchBlend);let I=(1-f)*(1-.25*m);if(I>1e-4&&t?.skin){let G=Math.sin(this._idlePhase);t.skin.body.rotation.x+=G*.02*I,t.skin.head.rotation.x+=-G*.015*I,t.skin.leftArm.rotation.x+=G*.03*I,t.skin.rightArm.rotation.x+=-G*.03*I,t?.cape?.rotation&&(t.cape.rotation.x+=Math.sin(this._idlePhase*.7)*.03*I)}if(f>1e-4&&t?.skin){let G=re(1,.85,g),O=re(1,.7,g),j=Math.sin(A)*.5,J=Math.sin(A+Math.PI)*.5,X=Math.cos(A+Math.PI)*1.3,t0=Math.cos(A)*1.3;t.skin.leftLeg.rotation.x+=re(j,X,m)*f*G,t.skin.rightLeg.rotation.x+=re(J,t0,m)*f*G;let d0=Math.sin(A+Math.PI)*.5,l0=Math.sin(A)*.5,m0=Math.cos(A)*1.5,p0=Math.cos(A+Math.PI)*1.5;t.skin.leftArm.rotation.x+=re(d0,m0,m)*f*O,t.skin.rightArm.rotation.x+=re(l0,p0,m)*f*O;let A0=Math.PI*.02,n0=Math.PI*.1,Y=re(A0,n0,m),o0=Math.cos(A)*.03+A0,g0=Math.cos(A+Math.PI)*.03-A0,U0=Math.cos(A)*.1+n0,O0=Math.cos(A+Math.PI)*.1-n0;t.skin.leftArm.rotation.z+=(re(o0,U0,m)*f+Y*.15*f)*O,t.skin.rightArm.rotation.z+=(re(g0,O0,m)*f-Y*.15*f)*O,this._defaults?.playerRot&&(t.rotation.z=this._defaults.playerRot.z+Math.cos(A+Math.PI)*.01*m*f);let $0=re(Math.PI*.06,Math.PI*.3,m),u0=re(Math.sin(A/1.5)*.06,Math.sin(A*2)*.1,m);t?.cape?.rotation&&(t.cape.rotation.x+=($0+u0)*f)}if(this._swingTime!==null){this._swingTime+=r;let G=Math.min(this._swingTime/this._swingDuration,1);R4.animate(G,t,f>.2),G>=1&&(this._swingTime=null)}}},R4={animate(n,e,t){if(!e?.skin?.rightArm?.rotation)return;let r=n*18;if(e.skin.rightArm.rotation.x=-.4537860552*2+2*Math.sin(r+Math.PI)*.3,!t){let i=.01*Math.PI+.06;e.skin.rightArm.rotation.z=-Math.cos(r)*.403+i,e.skin.body.rotation.y=-Math.cos(r)*.06,e.skin.leftArm.rotation.x=Math.sin(r+Math.PI)*.077,e.skin.leftArm.rotation.z=-Math.cos(r)*.015+.13-.05,e.skin.leftArm.position.z=Math.cos(r)*.3,e.skin.leftArm.position.x=5-Math.cos(r)*.05}}};function k4(n,e){let t=n?.skin,r=n?.cape,i=n?.elytra;if(!t||!r)return;let s=Nt(e),o=Math.abs(Math.sin(s*Math.PI/2));if(o<=1e-6)return;t.body.rotation.x+=.4537860552*o,t.body.position.z+=(1.3256181-3.4500310377)*o,t.body.position.y+=-2.103677462*o,r.position.y+=-1.851236166577372*o,r.rotation.x+=.294220265771*o,r.position.z+=(3.786619432-3.4500310377)*o,i?.position&&i.position.copy(r.position),i?.rotation&&i.rotation.copy(r.rotation),i?.rotation&&(i.rotation.x-=10.8*Math.PI/180),i?.leftWing?.rotation&&(i.leftWing.rotation.z=re(.72,.26179944+.4582006,o)),x4(n),t.head.position.y+=-3.618325234674*o;let a=.1*o,v=(3.618325234674-3.4500310377)*o,l=-2.53943318*o;t.leftArm.position.z+=v,t.rightArm.position.z+=v,t.leftArm.rotation.x+=.410367746202*o,t.rightArm.rotation.x+=.410367746202*o,t.leftArm.rotation.z+=a,t.rightArm.rotation.z+=-a,t.leftArm.position.y+=l,t.rightArm.position.y+=l,t.rightLeg.position.z+=-3.4500310377*o,t.leftLeg.position.z+=-3.4500310377*o}E();x();k();R();import{default as M4}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_1.png";import{default as S4}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_2.png";import{default as C4}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_1.png";import{default as B4}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_2.png";import{default as P4}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_1.png";import{default as I4}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_2.png";import{default as H4}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_1.png";import{default as O4}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_2.png";import{default as F4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1.png";import{default as D4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1_overlay.png";import{default as z4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2.png";import{default as L4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2_overlay.png";import{default as U4}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_1.png";import{default as G4}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_2.png";import{default as N4}from"mc-assets/dist/other-textures/latest/models/armor/turtle_layer_1.png";import{default as h3}from"mc-assets/dist/other-textures/latest/entity/elytra.png";var ze={skull:{bones:[{name:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},head:{bones:[{name:"armor",pivot:[0,12,0]},{name:"head",parent:"armor",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},chest:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:1}]},{name:"leftarm",parent:"armor",pivot:[5,10,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}]},{name:"rightarm",parent:"armor",pivot:[-5,10,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},legs:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:.5}]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.5}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,0,-2.01],size:[4,12,4],uv:[0,16],inflate:.5}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},feet:{bones:[{name:"armor",pivot:[0,12,0]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.8}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,.01,-2.01],size:[4,12,4],uv:[0,16],inflate:.8}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32}};var f3={leather_layer_1:F4,leather_layer_1_overlay:D4,leather_layer_2:z4,leather_layer_2_overlay:L4,chainmail_layer_1:M4,chainmail_layer_2:S4,iron_layer_1:H4,iron_layer_2:O4,diamond_layer_1:C4,diamond_layer_2:B4,golden_layer_1:P4,golden_layer_2:I4,netherite_layer_1:U4,netherite_layer_2:G4,turtle_layer_1:N4};var z5=Ie(ge),W4=120,Mi=n=>n*(Math.PI/180),Si=n=>Math.max(0,Math.min(1,n)),Ci=(n,e,t)=>Math.max(e,Math.min(t,n)),Wt=n=>(n=(n+Math.PI)%(Math.PI*2),n<0&&(n+=Math.PI*2),n-Math.PI);function V4(n){return n<0&&(n=4294967295+n+1>>>0),n.toString(16)}function j4(n){if(n===void 0)return;if(parseInt(n,10)===0)return"rgba(0, 0, 0, 0)";let e=V4(parseInt(n,10));return e.length===8?`#${e.slice(2,8)}${e.slice(0,2)}`:`#${e}`}function m3(n,e){return n===void 0?e:n instanceof W.Quaternion?n:Array.isArray(n)?new W.Quaternion(n[0],n[1],n[2],n[3]):new W.Quaternion(n.x,n.y,n.z,n.w)}function ye(n,e){return n===void 0?e??new W.Euler:n instanceof W.Euler?n:n.yaw!==void 0&&n.pitch!==void 0&&n.roll!==void 0?new W.Euler(-Mi(n.pitch),-Mi(n.yaw),Mi(n.roll),"ZYX"):n.x!==void 0&&n.y!==void 0&&n.z!==void 0?new W.Euler(n.z,n.y,n.x,"ZYX"):Array.isArray(n)?new W.Euler(n[0],n[1],n[2]):e??new W.Euler}var z1=Math.PI*2;function p3(n,e){let t=((e-n)%z1+z1)%z1;return t>Math.PI?t-z1:t}function _3({username:n,nameTagBackgroundColor:e="rgba(0, 0, 0, 0.3)",nameTagTextOpacity:t=255},{fontFamily:r="mojangles"},i){let s=V0(64,64),o=y3(i),a=s.getContext("2d");if(!a)throw new Error("Could not get 2d context");let v=48,l=5;a.font=`${v}px ${r}`;let c=String(typeof n=="string"?n:new o(n).toString()).split(`
21458
- `),d=0;for(let m of c){let g=a.measureText(m).width+l*2;g>d&&(d=g)}if(s.width=d,s.height=(v+l)*c.length,a.fillStyle=e,a.fillRect(0,0,s.width,s.height),a.globalAlpha=t/255,!!Dr(n,o,s,v,"white",-l+v))return a.globalAlpha=1,s}globalThis.getUsernameTexture=_3;var U1=(n,e,t,r)=>{for(let v of t.children)v.name==="nametag"&&v.removeFromParent();if(n.username===void 0||n.username===null||(typeof n.username=="string"?n.username:new(y3(r))(n.username).toString()).startsWith("EMPTY"))return;let s=_3(n,e,r);if(!s)return;let o=new W.Texture(s);o.needsUpdate=!0;let a;if(n.nameTagFixed){let v=new W.PlaneGeometry,l=new W.MeshBasicMaterial({map:o});l.transparent=!0,a=new W.Mesh(v,l),a.rotation.set(n.pitch,W.MathUtils.degToRad(n.yaw+180),0),a.position.y+=n.height+.3}else{let v=new W.SpriteMaterial({map:o});a=new W.Sprite(v),a.position.y+=n.height+.6}return a.renderOrder=1e3,a.scale.set(s.width*.005,s.height*.005,1),n.nameTagRotationRight&&a.applyQuaternion(n.nameTagRotationRight),n.nameTagScale&&a.scale.multiply(n.nameTagScale),n.nameTagRotationLeft&&a.applyQuaternion(n.nameTagRotationLeft),n.nameTagTranslation&&a.position.add(n.nameTagTranslation),a.name="nametag",t.add(a),a},g3={},Y4=n=>n.charAt(0)===n.charAt(0).toUpperCase();function Q4(n,e,t,r,i){if(e.name)try{let l=(Y4(e.name)?di(e.name):e.name).toLowerCase(),c=new Me("1.16.4",l,t,i);if(c.mesh)return U1(e,r,c.mesh,t.version),c.mesh}catch(l){reportError?.(l)}if(!n||!(0,b3.isEntityAttackable)(n,e))return;let s=new W.BoxGeometry(e.width,e.height,e.width);s.translate(0,e.height/2,0);let o=new W.MeshBasicMaterial({color:16711935}),a=new W.Mesh(s,o);return(g3[e.name]=(g3[e.name]||0)+1)<6&&U1({username:e.name,height:e.height},r,a,t.version),a}var G1=class{constructor(e,t){this.worldRenderer=e;this.mcData=t;u(this,"entities",{});u(this,"playerEntity",null);u(this,"entitiesOptions",{fontFamily:"mojangles"});u(this,"debugMode");u(this,"onSkinUpdate");u(this,"clock",new W.Clock);u(this,"currentlyRendering",!0);u(this,"cachedMapsImages",{});u(this,"itemFrameMaps",{});u(this,"pendingModelOverrides",new Map);u(this,"motionCache",new Map);u(this,"_wasThirdPerson",!1);u(this,"_tpBodyYaw",0);u(this,"_tpHasBodyYaw",!1);u(this,"uuidPerSkinUrlsCache",{});u(this,"currentSkinUrls",{});u(this,"loadedSkinEntityIds",new Set);u(this,"playerPerAnimation",{});this.debugMode="none",this.onSkinUpdate=()=>{},this.watchResourcesUpdates()}updateAutoWalkFlags(e,t,r,i){if(!t.playerObject?.animation)return;let s=t.playerObject.animation;if(r<=0)return;let o=i??t.position,a=this.motionCache.get(e);if(!a){this.motionCache.set(e,{pos:o.clone(),speed:0}),s.isMoving=!1,s.isRunning=!1,s.moveAmount=0,s.runAmount=0;return}let v=o.x-a.pos.x,l=o.z-a.pos.z;a.pos.copy(o);let c=Math.hypot(v,l)/Math.max(r,1e-6),d=1-Math.exp(-r*12);a.speed+=(c-a.speed)*d;let f=a.speed,m=(M,S,H)=>{let B=Si((H-M)/(S-M));return B*B*(3-2*B)},g=.08,b=.6,w=4.3,y=5.6,A=m(g,b,f),C=m(w,y,f);s.moveAmount=A,s.runAmount=C,s.isMoving=A>.15,s.isRunning=C>.55}getLocalSneak(){let e=this.worldRenderer.playerStateReactive;return e?.movementState==="SNEAKING"||e?.movementState==="CROUCHING"||!!e?.isSneaking||!!e?.sneaking||!!e?.isCrouching||!!e?.crouching||!!e?.controls?.sneak||!!e?.controlState?.sneak}updateThirdPersonHeadAndBody(e,t){let r=e.playerObject?.animation,i=this.worldRenderer.cameraShake.getBaseRotation(),s=i.yaw,o=i.pitch,a=Si(r?.moveAmount??(r?.isMoving?1:0)),v=Si(r?.runAmount??(r?.isRunning?1:0)),l=a>.15;if(this._tpHasBodyYaw||(this._tpHasBodyYaw=!0,this._tpBodyYaw=s),l){let g=1-Math.exp(-t*(18+10*v));this._tpBodyYaw=this._tpBodyYaw+Wt(s-this._tpBodyYaw)*g,e.rotation.set(0,this._tpBodyYaw,0);let b=(25-8*v)*Math.PI/180,w=Ci(Wt(s-this._tpBodyYaw),-b,b);r&&"lookYaw"in r&&(r.lookYaw=w),r&&"lookPitch"in r&&(r.lookPitch=-o);return}let c=85*Math.PI/180,d=55*Math.PI/180,f=Wt(s-this._tpBodyYaw);f=Ci(f,-c,c);let m=Math.abs(f)-d;if(m>0){let g=m/(c-d),b=s-Math.sign(f)*d,w=1-Math.exp(-t*(6+10*g));this._tpBodyYaw=this._tpBodyYaw+Wt(b-this._tpBodyYaw)*w,f=Wt(s-this._tpBodyYaw),f=Ci(f,-c,c)}else{let g=1-Math.exp(-t*5);this._tpBodyYaw=this._tpBodyYaw+Wt(s-this._tpBodyYaw)*(g*.15)}e.rotation.set(0,this._tpBodyYaw,0),r&&"lookYaw"in r&&(r.lookYaw=f),r&&"lookPitch"in r&&(r.lookPitch=-o)}get entitiesByName(){let e={};for(let t of Object.values(this.entities))t.realName&&(e[t.realName]=e[t.realName]||[],e[t.realName].push(t));return e}get entitiesRenderingCount(){return Object.values(this.entities).filter(e=>e.visible).length}getDebugString(){let e=Object.keys(this.entities).length,t=this.entitiesRenderingCount,r=Object.values(this.entities).filter(s=>s.playerObject),i=r.filter(s=>s.visible);return`${t}/${e} ${i.length}/${r.length}`}handlePlayerEntity(e){if(!this.playerEntity){let t=new W.Group;t.originalEntity={...e,name:"player"};let r=new W.Group,i=this.setupPlayerObject(e,r,{});t.playerObject=i,t.add(r),t.name="player_entity",this.playerEntity=t,this.worldRenderer.scene.add(t),this.updatePlayerSkin(e.id,e.username,e.uuid??void 0,ge)}this.playerEntity.originalEntity={...e,name:"player"},e.position&&(this.worldRenderer.sceneOrigin.getWorldPosition(this.playerEntity)||this.worldRenderer.sceneOrigin.track(this.playerEntity),this.playerEntity.position.set(e.position.x,e.position.y,e.position.z)),e.yaw!==void 0&&(this.playerEntity.rotation.y=e.yaw),this.updateEntityEquipment(this.playerEntity,e)}clear(){for(let e of Object.values(this.entities))this.worldRenderer.sceneOrigin.removeAndUntrack(e),R0(e);this.entities={},this.currentSkinUrls={},this.motionCache.clear(),this._wasThirdPerson=!1,this._tpHasBodyYaw=!1,this.playerEntity&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.playerEntity),R0(this.playerEntity),this.playerEntity=null)}reloadEntities(){for(let e of Object.values(this.entities))this.update({...e.originalEntity,delete:!0},{}),this.update(e.originalEntity,{})}watchResourcesUpdates(){this.worldRenderer.resourcesManager.on("assetsTexturesUpdated",()=>this.reloadEntities()),this.worldRenderer.resourcesManager.on("assetsInventoryReady",()=>this.reloadEntities())}setDebugMode(e,t=null){this.debugMode=e;for(let r of t?[t]:Object.values(this.entities)){let i=r.children.find(s=>s.name==="debug");i.visible=!1,this.debugMode==="basic"&&(i.visible=!0)}}setRendering(e,t=null){this.currentlyRendering=e;for(let r of t?[t]:Object.values(this.entities))e?this.worldRenderer.scene.children.includes(r)||this.worldRenderer.scene.add(r):this.worldRenderer.scene.remove(r)}playEntityModelAnimation(e,t,r=!1){let i=this.entities[e];i&&i.traverse(s=>{s instanceof Me&&s.playAnimation(t,r)})}render(){let e=this.worldRenderer.worldRendererConfig.renderEntities;e!==this.currentlyRendering&&this.setRendering(e);let t=this.clock.getDelta(),r=Math.min(t,1/30),i=this.worldRenderer.viewerChunkPosition,s=10*10,o=this.worldRenderer.playerStateUtils.isThirdPerson();if(o!==this._wasThirdPerson){this._wasThirdPerson=o;let a=String(this.playerEntity?.originalEntity.id??"player_entity");this.motionCache.delete(a);let v=this.playerEntity?.playerObject?.animation;v?.resetLocomotion&&v.resetLocomotion(),this._tpHasBodyYaw=!1}for(let[a,v]of[...Object.entries(this.entities),["player_entity",this.playerEntity]]){if(!v)continue;let l=a==="player_entity",c=String(l?this.playerEntity?.originalEntity.id??"player_entity":a);if(l)if(v.visible=o,o){let f=this.worldRenderer.playerStateReactive.eyeHeight;v.position.set(this.worldRenderer.cameraWorldPos.x,this.worldRenderer.cameraWorldPos.y-f,this.worldRenderer.cameraWorldPos.z);let m=this.worldRenderer.playerStateReactive.position;if(m&&typeof m.x=="number")this.updateAutoWalkFlags(c,v,t,new W.Vector3(m.x,m.y,m.z));else{let g=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,t,g?new W.Vector3(g.x,g.y,g.z):v.position)}this.updateThirdPersonHeadAndBody(v,r)}else{let f=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,t,f?new W.Vector3(f.x,f.y,f.z):v.position)}else{let f=this.worldRenderer.sceneOrigin.getWorldPosition(v);this.updateAutoWalkFlags(c,v,t,f?new W.Vector3(f.x,f.y,f.z):v.position)}let{playerObject:d}=v;if(d?.animation){let f=d.animation,g=(Number(v.originalEntity?.metadata?.[0]??0)&2)!==0,b=this.getLocalSneak();"isCrouched"in f&&(f.isCrouched=l?b:g),d.animation.update(d,r)}if(v.traverse(f=>{f instanceof Me&&f.update(r)}),!l&&i&&v.position){let f=v.position.x-i.x,m=v.position.y-i.y,g=v.position.z-i.z,b=f*f+m*m+g*g;v.visible=!!(b<s||this.worldRenderer.shouldObjectVisible(v)),this.maybeRenderPlayerSkin(a)}v.visible&&this.syncArmorPositions(v)}}syncArmorPositions(e){e.playerObject&&e.traverse(t=>{if(!t.name.startsWith("geometry_armor_"))return;let{skin:r}=e.playerObject;switch(t.name){case"geometry_armor_head":t.children[0]?.children[0]&&t.children[0].children[0].rotation.set(-r.head.rotation.x,r.head.rotation.y,r.head.rotation.z,r.head.rotation.order);break;case"geometry_armor_legs":t.children[0]&&(t.children[0].children[2]&&t.children[0].children[2].rotation.set(-r.leftLeg.rotation.x,r.leftLeg.rotation.y,r.leftLeg.rotation.z,r.leftLeg.rotation.order),t.children[0].children[1]&&t.children[0].children[1].rotation.set(-r.rightLeg.rotation.x,r.rightLeg.rotation.y,r.rightLeg.rotation.z,r.rightLeg.rotation.order));break;case"geometry_armor_feet":t.children[0]&&(t.children[0].children[0]&&t.children[0].children[0].rotation.set(-r.rightLeg.rotation.x,r.rightLeg.rotation.y,r.rightLeg.rotation.z,r.rightLeg.rotation.order),t.children[0].children[1]&&t.children[0].children[1].rotation.set(-r.leftLeg.rotation.x,r.leftLeg.rotation.y,-r.leftLeg.rotation.z,r.leftLeg.rotation.order));break}})}getPlayerObject(e){return this.playerEntity?.originalEntity.id===e?this.playerEntity?.playerObject:this.entities[e]?.playerObject}isCanvasBlank(e){return!e.getContext("2d")?.getImageData(0,0,e.width,e.height).data.some(t=>t!==0)}async updatePlayerSkin(e,t,r,i,s=void 0){i!==ge&&this.loadedSkinEntityIds.add(String(e)),r&&((typeof i=="string"||typeof s=="string")&&(this.uuidPerSkinUrlsCache[r]={}),typeof i=="string"&&(this.uuidPerSkinUrlsCache[r].skinUrl=i),typeof s=="string"&&(this.uuidPerSkinUrlsCache[r].capeUrl=s),i===!0&&(i=this.uuidPerSkinUrlsCache[r]?.skinUrl??i),s??(s=this.uuidPerSkinUrlsCache[r]?.capeUrl));let a=this.getPlayerObject(e);if(!a)return;if(i===!0){if(!t)return;let l=await He(t,"skin");if(!this.getPlayerObject(e)||!l)return;i=l}if(typeof i!="string")throw new Error("Invalid skin url");if(this.currentSkinUrls[String(e)]===i){if(s){if(s===!0&&t){let l=await He(t,"cape");if(!this.getPlayerObject(e)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(e,s)}return}i!==ge&&(this.currentSkinUrls[String(e)]=i);let v=this.worldRenderer.worldRendererConfig.renderEars||t==="deadmau5";this.loadAndApplySkin(e,i,v).then(async()=>{if(s){if(s===!0&&t){let l=await He(t,"cape");if(!this.getPlayerObject(e)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(e,s)}}),a.cape.visible=!1,s||(a.backEquipment=null,a.elytra.map=null,a.cape.map&&a.cape.map.dispose(),a.cape.map=null)}async loadAndApplySkin(e,t,r){let i=this.getPlayerObject(e);if(i)try{let s;if(i=this.getPlayerObject(e),!i)return;let o,a;if(t===ge){o=await z5;let l=V0(64,64),c=l.getContext("2d");if(!c)throw new Error("Failed to get context");c.drawImage(o.image,0,0),a=l}else{let{canvas:l,image:c}=await ot(t);s=c,o=new W.CanvasTexture(l),a=l}o.magFilter=W.NearestFilter,o.minFilter=W.NearestFilter,o.needsUpdate=!0,i.skin.map=o,i.skin.modelType=Ir(a),i.skin.isCustom=t!==ge;let v;if(s?r&&(v=document.createElement("canvas"),Hr(v,s),r=!this.isCanvasBlank(v)):r=!1,r){let l=new W.CanvasTexture(v);l.magFilter=W.NearestFilter,l.minFilter=W.NearestFilter,l.needsUpdate=!0,i.ears.map=l,i.ears.visible=!0}else i.ears.map=null,i.ears.visible=!1;this.onSkinUpdate?.()}catch{}}async loadAndApplyCape(e,t){let r=this.getPlayerObject(e);if(r)try{let{canvas:i,image:s}=await ot(t);if(r=this.getPlayerObject(e),!r)return;Pr(i,s);let o=new W.CanvasTexture(i);o.magFilter=W.NearestFilter,o.minFilter=W.NearestFilter,o.needsUpdate=!0,r.cape.map=o,r.cape.visible=!0,r.elytra.map=o,this.onSkinUpdate?.(),r.backEquipment||(r.backEquipment="cape")}catch{}}debugSwingArm(){let e=Object.values(this.entities).find(r=>r.playerObject?.animation);if(!e||!e.playerObject?.animation)return;let t=e.playerObject.animation;t.swingArm&&t.swingArm()}playAnimation(e,t){let r=String(e);if(this.playerPerAnimation[r]===t)return;if(this.playerPerAnimation[r]=t,e==="player_entity"&&this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(t==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=t==="walking"||t==="running"||t==="crouchWalking",o.isRunning=t==="running",o.isCrouched=t==="crouch"||t==="crouchWalking")});return}let i=this.getPlayerObject(e);if(i){if(t==="oneSwing"){i.animation&&i.animation.swingArm&&i.animation.swingArm();return}i.animation&&i.animation.switchAnimationCallback!==void 0&&(i.animation.switchAnimationCallback=()=>{let s=i.animation;s&&(s.isMoving=t==="walking"||t==="running"||t==="crouchWalking",s.isRunning=t==="running",s.isCrouched=t==="crouch"||t==="crouchWalking")});return}if(this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(t==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=t==="walking"||t==="running"||t==="crouchWalking",o.isRunning=t==="running",o.isCrouched=t==="crouch"||t==="crouchWalking")})}}parseEntityLabel(e){if(e)try{if(e.type==="string")return e.value;let t=typeof e=="string"?F5.default.simplify(F5.default.parse(e)):Pi.simplify(e);return ai(t).map(this.textFromComponent).join("")}catch{return e}}textFromComponent(e){return typeof e=="string"?e:e.text??""}getItemMesh(e,t,r=!1,i){!e.nbt&&e.nbtData&&(e.nbt=e.nbtData);let s=this.worldRenderer.getItemRenderData(e,t);if(!(i&&i===s?.modelName)){if(s&&"resolvedModel"in s){let o=ro(this.worldRenderer.material,s.resolvedModel,s.modelName,this.worldRenderer.resourcesManager.currentResources.worldBlockProvider,this.worldRenderer.resourcesManager.currentResources.mcData),a=1;t["minecraft:display_context"]==="ground"?a=.5:t["minecraft:display_context"]==="thirdperson"&&(a=6),o.scale.set(a,a,a);let v=new W.Group;return v.add(o),{mesh:v,isBlock:!0,modelName:s.modelName}}if(s){let o=s.renderInfo?.texture==="blocks"?this.worldRenderer.material.map:this.worldRenderer.itemsTexture,{u:a,v,su:l,sv:c}=s,m=io(o,{u:a,v,sizeX:l??1,sizeY:c??1},{faceCamera:r,use3D:!r}),g=1;return t["minecraft:display_context"]==="ground"?g=.5:t["minecraft:display_context"]==="thirdperson"&&(g=6),m.mesh.scale.set(g,g,g),{mesh:m.mesh,isBlock:!1,modelName:s.modelName,cleanup:m.cleanup}}}}setVisible(e,t){t?e.scale.set(1,1,1):e.scale.set(0,0,0)}update(e,t){let r=e.name==="player";(e.name==="zombie_villager"||e.name==="husk")&&(t.texture=`textures/1.16.4/entity/${e.name==="zombie_villager"?"zombie_villager/zombie_villager.png":`zombie/${e.name}.png`}`),e.name==="glow_item_frame"&&(t.textures||(t.textures=[]),t.textures.background="block:glow_item_frame");let i=this.entities[e.id],s=!i;if(e.delete){if(!i)return;i.userData._posTween?.stop(),i.additionalCleanup&&i.additionalCleanup(),i.traverse(m=>{m.additionalCleanup&&m.additionalCleanup()}),this.onRemoveEntity(e),this.worldRenderer.sceneOrigin.removeAndUntrack(i),R0(i),delete this.entities[e.id];return}let o;if(i===void 0){this.beforeEntityAdded(e);let m=new W.Group;if(m.originalEntity=e,e.name==="item"||e.name==="tnt"||e.name==="falling_block"||e.name==="snowball"||e.name==="egg"||e.name==="ender_pearl"||e.name==="experience_bottle"||e.name==="splash_potion"||e.name==="lingering_potion"){let w=e.name==="tnt"||e.type==="projectile"?{name:e.name}:e.name==="falling_block"?{blockState:e.objectData}:e.metadata?.find(y=>typeof y=="object"&&y?.itemCount);if(w){let y=this.getItemMesh(w,{"minecraft:display_context":"ground"},e.type==="projectile");if(y){if(o=y.mesh,e.name==="item"||e.type==="projectile"?(o.scale.set(.5,.5,.5),o.position.set(0,e.name==="item"?.2:.1,0)):(o.scale.set(2,2,2),o.position.set(0,.5,0)),e.name==="item"){let A=new W.Clock;o.onBeforeRender=()=>{let C=A.getDelta();o.rotation.y+=C}}m.additionalCleanup=()=>{y.cleanup&&y.cleanup()}}}}else if(r){let w=new W.Group,y=this.setupPlayerObject(e,w,t);if(m.playerObject=y,o=w,e.username){let A=U1(e,{fontFamily:"mojangles"},w,this.worldRenderer.version);A&&(A.position.y=y.position.y+y.scale.y*16+3,A.scale.multiplyScalar(12))}}else o=Q4(this.mcData,e,this.worldRenderer,this.entitiesOptions,{...t,customModel:e.customModel});if(!o)return;o.name="mesh";let g=e.pos??e.position;this.worldRenderer.sceneOrigin.track(m),m.position.set(g.x,g.y,g.z);let b=new W.BoxHelper(o,e.type==="hostile"?16711680:e.type==="mob"?65280:e.type==="player"?255:16753920);b.name="debug",m.add(o),m.add(b),b.visible=!1,this.worldRenderer.scene.add(m),i=m,i.name="entity",i.realName=e.name,this.entities[e.id]=i,r&&this.updatePlayerSkin(e.id,e.username,t?.texture?e.uuid:void 0,t?.texture||ge),this.setDebugMode(this.debugMode,m),this.setRendering(this.currentlyRendering,m),this.afterAddEntity(e)}else o=i.children.find(m=>m.name==="mesh");this.updateEntityEquipment(i,e);let a=w3(e,this.mcData),v=(e.metadata?.[0]??0)&32||this.worldRenderer.playerStateReactive.cameraSpectatingEntity===e.id&&this.worldRenderer.playerStateUtils.isSpectator();for(let m of o.children??[])m.name!=="nametag"&&(m.visible=!v);a.baby?i.scale.set(.5,.5,.5):i.scale.set(1,1,1);let l=L1("text_display",e,this.mcData),c=l?.text||a.custom_name_visible&&a.custom_name;if(e.name!=="player"&&c){let m=l&&(l.billboard_render_constraints==="fixed"||!l.billboard_render_constraints),g=l&&!(parseInt(l.style_flags,10)&4)?j4(l.background_color):void 0,b;if(l?.text_opacity){let w=parseInt(l?.text_opacity,10);b=w>0?w:256-w}U1({...e,username:typeof c=="string"?F5.default.simplify(F5.default.parse(c)):Pi.simplify(c),nameTagBackgroundColor:g,nameTagTextOpacity:b,nameTagFixed:m,nameTagScale:l?.scale,nameTagTranslation:l&&(l.translation||new W.Vector3(0,0,0)),nameTagRotationLeft:m3(l?.left_rotation),nameTagRotationRight:m3(l?.right_rotation)},this.entitiesOptions,o,this.worldRenderer.version)}let d=L1("armor_stand",e,this.mcData);if(d){let m=(parseInt(d.client_flags,10)&1)!==0,g=(parseInt(d.client_flags,10)&4)!==0,b=(parseInt(d.client_flags,10)&8)===0,w=(parseInt(d.client_flags,10)&16)!==0;o.castShadow=!w,o.receiveShadow=!w,m?i.scale.set(.5,.5,.5):i.scale.set(1,1,1),i.traverse(y=>{switch(y.name){case"bone_baseplate":this.setVisible(y,b),y.rotation.y=-i.rotation.y;break;case"bone_head":d.head_pose&&y.setRotationFromEuler(ye(d.head_pose));break;case"bone_body":d.body_pose&&y.setRotationFromEuler(ye(d.body_pose));break;case"bone_rightarm":y.parent?.name!=="bone_armor"&&this.setVisible(y,g),d.left_arm_pose?y.setRotationFromEuler(ye(d.left_arm_pose)):y.setRotationFromEuler(ye({yaw:-10,pitch:-10,roll:0}));break;case"bone_leftarm":y.parent?.name!=="bone_armor"&&this.setVisible(y,g),d.right_arm_pose?y.setRotationFromEuler(ye(d.right_arm_pose)):y.setRotationFromEuler(ye({yaw:10,pitch:-10,roll:0}));break;case"bone_rightleg":d.left_leg_pose?y.setRotationFromEuler(ye(d.left_leg_pose)):y.setRotationFromEuler(ye({yaw:-1,pitch:-1,roll:0}));break;case"bone_leftleg":d.right_leg_pose?y.setRotationFromEuler(ye(d.right_leg_pose)):y.setRotationFromEuler(ye({yaw:1,pitch:1,roll:0}));break}})}let f=L1("item_frame",e,this.mcData);if(f||(f=L1("glow_item_frame",e,this.mcData)),f){let m=f?.item??e.metadata?.[8];if(o.scale.set(1,1,1),o.position.set(0,0,-.5),i.rotation.x=-e.pitch,i.children.find(g=>{if(g.name.startsWith("map_")){R0(g);let b=parseInt(g.name.split("_")[1],10);return this.itemFrameMaps[b]=this.itemFrameMaps[b]?.filter(w=>w!==g),g instanceof W.Mesh&&g.material?.map?.dispose(),!0}else if(g.name==="item")return R0(g),!0;return!1})?.removeFromParent(),m&&(m.itemId??m.blockId??0)!==0){let g=f.rotation??0,b=m.nbtData?.value?.map?.value??m.components?.find(w=>w.type==="map_id")?.data;if(b)o.scale.set(16/12,16/12,1),this.addMapModel(i,b,g);else{let w=this.getItemMesh(m,{"minecraft:display_context":"fixed"});w&&(w.mesh.position.set(0,0,-.05),w.isBlock?w.mesh.scale.set(.25,.25,.25):w.mesh.scale.set(.5,.5,.5),w.mesh.rotateY(Math.PI),w.mesh.rotateZ(-g*Math.PI/4),w.mesh.name="item",i.add(w.mesh))}}}e.username!==void 0&&(i.username=e.username),this.updateNameTagVisibility(i),this.updateEntityPosition(e,s,t)}updateEntityPosition(e,t,r){let i=this.entities[e.id];if(!i)return;let s=t?0:W4;if(e.position){let o=this.worldRenderer.sceneOrigin.getWorldPosition(i)??{x:e.position.x,y:e.position.y,z:e.position.z};i.userData._tweenTarget||(i.userData._tweenTarget={x:o.x,y:o.y,z:o.z}),i.userData._posTween?.stop(),i.userData._posTween=new F0(i.userData._tweenTarget).to({x:e.position.x,y:e.position.y,z:e.position.z},s).onUpdate(()=>{i.position.set(i.userData._tweenTarget.x,i.userData._tweenTarget.y,i.userData._tweenTarget.z)}).start()}if(typeof e.yaw=="number"&&Number.isFinite(e.yaw)){let o=p3(i.rotation.y,e.yaw);new F0(i.rotation).to({y:i.rotation.y+o},s).start()}if(i?.playerObject&&r?.rotation?.head){let{playerObject:o}=i,a=r.rotation.head.y,v=typeof a=="number"&&Number.isFinite(a)?a:e.yaw,l=typeof v=="number"&&typeof e.yaw=="number"&&Number.isFinite(v)&&Number.isFinite(e.yaw)?p3(e.yaw,v):0;o.skin.head.rotation.y=l;let c=r.rotation.head.x;o.skin.head.rotation.x=typeof c=="number"&&Number.isFinite(c)?-c:0}}afterAddEntity(e){}beforeEntityAdded(e){let t=this.pendingModelOverrides.get(e.id.toString());if(t){let{parts:r}=t;e.customModel=r.length===1?r[0]:{parts:r},this.pendingModelOverrides.delete(e.id.toString())}}maybeRenderPlayerSkin(e){let t=this.entities[e];if(e==="player_entity"&&(t=this.playerEntity,e=this.playerEntity?.originalEntity.id),!t||!t.playerObject||!t.visible)return;let r=128,i=this.worldRenderer.getCameraPosition(),s=this.worldRenderer.sceneOrigin.getWorldPosition(t),a=(s?new W.Vector3(s.x,s.y,s.z):t.position.clone().add(new W.Vector3(this.worldRenderer.sceneOrigin.x,this.worldRenderer.sceneOrigin.y,this.worldRenderer.sceneOrigin.z))).distanceTo(i);if(a<r&&a<this.worldRenderer.viewDistance*16){if(this.loadedSkinEntityIds.has(String(e)))return;this.updatePlayerSkin(e,t.playerObject.realUsername,t.playerObject.realPlayerUuid,!0,!0)}}onRemoveEntity(e){this.loadedSkinEntityIds.delete(e.id.toString()),delete this.currentSkinUrls[e.id.toString()],this.motionCache.delete(e.id.toString())}updateMap(e,t){this.cachedMapsImages[e]=t;let r=this.itemFrameMaps[e];if(r&&(r=r.filter(i=>i.parent),this.itemFrameMaps[e]=r,r))for(let i of r)i.material.map=this.loadMap(t),i.material.needsUpdate=!0,i.visible=!0}updateNameTagVisibility(e){let t=this.worldRenderer.playerStateReactive.team,r=e.originalEntity.team,i=r?.nameTagVisibility||"always",s=i==="always"||i==="hideForOwnTeam"&&r?.team!==t?.team||i==="hideForOtherTeams"&&(r?.team===t?.team||t===void 0);e.traverse(o=>{o.name==="nametag"&&(o.visible=s)})}addMapModel(e,t,r){let i=this.cachedMapsImages?.[t],s=null;i&&(s=this.loadMap(i));let o={transparent:!0,alphaTest:.1};s&&(o.map=s);let a=new W.MeshLambertMaterial(o),v=new W.Mesh(new W.PlaneGeometry(1,1),a);v.rotation.set(0,Math.PI,0),e.add(v);let l=!0;e.traverseVisible(c=>{c.name==="geometry_frame"&&(l=!1)}),l?v.position.set(0,0,.499):v.position.set(0,0,.437),v.rotateZ(Math.PI*2-r*Math.PI/2),v.name=`map_${t}`,s||(v.visible=!1),this.itemFrameMaps[t]||(this.itemFrameMaps[t]=[]),this.itemFrameMaps[t].push(v)}loadMap(e){let t=new W.TextureLoader().load(e);return t&&(t.magFilter=W.NearestFilter,t.minFilter=W.NearestFilter,t.needsUpdate=!0),t}addItemModel(e,t,r,i=!1){let s=`bone_${t}item`,o=`custom_item_${t}`;if(e.traverse(v=>{v.name===o&&(v.removeFromParent(),v.additionalCleanup&&v.additionalCleanup())}),!r)return;let a=this.getItemMesh(r,{"minecraft:display_context":"thirdperson"});a?.mesh&&e.traverse(v=>{if(v.name.toLowerCase()===s||v.name===`${t}Arm`){let l=new W.Object3D;l.additionalCleanup=()=>{a.cleanup&&a.cleanup()};let c=a.mesh;l.rotation.z=-Math.PI/16,a.isBlock?l.rotation.y=Math.PI/4:(c.rotation.z=-Math.PI/4,l.rotation.y=Math.PI/2,l.scale.multiplyScalar(2)),i&&(l.position.y=-8,l.position.z=5,l.position.x=t==="left"?1:-1,l.rotation.x=Math.PI),l.add(c),l.name=o,v.add(l)}})}handleDamageEvent(e,t){let r=this.entities[e]?.children.find(i=>i.name==="mesh");r&&r.traverse(i=>{if(i instanceof W.Mesh&&i.material.clone){i.material.clone().dispose(),i.material=i.material.clone();let o=i.material.color.clone();i.material.color.set(16711680),new F0(i.material.color).to(o,500).start()}})}raycastSceneDebug(){let e=new W.Raycaster;return e.setFromCamera(new W.Vector2(0,0),this.worldRenderer.camera),e.intersectObjects(this.worldRenderer.scene.children)[0]?.object}updateEntityModel(e,t,r,i){let s=Array.isArray(t)?t:[{modelPath:t,modelType:r,metadata:i}];this.pendingModelOverrides.set(e,{parts:s});let o=this.entities[e];o&&(this.update({...o.originalEntity,delete:!0},{}),this.update(o.originalEntity,{}))}setupPlayerObject(e,t,r){let i=new R5;i.realPlayerUuid=e.uuid??"",i.realUsername=e.username??"",i.position.set(0,16,0),i.traverse(o=>{o instanceof W.Mesh&&o.material instanceof W.MeshStandardMaterial&&(o.material.transparent=!0)}),t.add(i);let s=1/16;return t.scale.set(s,s,s),t.rotation.set(0,Math.PI,0),i.animation=new D1,i.animation.isMoving=!1,i}updateEntityEquipment(e,t){if(!e||!t.equipment)return;let r=t.type==="player";if(this.addItemModel(e,r?"right":"left",t.equipment[0],r),this.addItemModel(e,r?"left":"right",t.equipment[1],r),D5(this.worldRenderer,e,"feet",t.equipment[2]),D5(this.worldRenderer,e,"legs",t.equipment[3],2),D5(this.worldRenderer,e,"chest",t.equipment[4]),D5(this.worldRenderer,e,"head",t.equipment[5]),r&&e.playerObject){let{playerObject:i}=e;i.backEquipment=t.equipment.some(s=>s?.name==="elytra")?"elytra":"cape",i.backEquipment==="elytra"&&this.loadAndApplyCape(t.id,h3),i.cape.map===null&&(i.cape.visible=!1)}}};function w3(n,e){let t=e?.entitiesByName[n.name];return new Proxy({},{get(r,i,s){if(typeof i!="string"||!t)return;let o=t.metadataKeys?.indexOf(i);return n.metadata?.[o??-1]}})}function L1(n,e,t){if(e.name===n)return w3(e,t)}function D5(n,e,t,r,i=1,s=!1){if(!r){Bi(e,t);return}let o=r.name.split("_"),a,v=t==="head"&&r.name==="player_head";if(v)if(Bi(e,t),r.nbt){let g=Pi.simplify(r.nbt);try{let b;if(g.SkullOwner?b=g.SkullOwner.Properties.textures[0]?.Value:b=g["minecraft:profile"]?.Properties?.find(w=>w.name==="textures")?.value,b){a=JSON.parse(z.from(b,"base64").toString()).textures?.SKIN?.url;let{skinTexturesProxy:y}=n.worldRendererConfig;y&&(a=a?.replace("http://textures.minecraft.net/",y).replace("https://textures.minecraft.net/",y))}}catch{}}else a=ge;let l=o[0];if(!a){let g=`${l}_layer_${i}${s?"_overlay":""}`;a=n.resourcesManager.currentResources.customTextures.armor?.textures[g]?.src??f3[g]}if(!a||!ze[t]){Bi(e,t);return}let c=`geometry_armor_${t}${s?"_overlay":""}`,d=e.children.findLast(g=>g.name===c),f;if(d?(f=d.material,l1(a,g=>{g.magFilter=W.NearestFilter,g.minFilter=W.NearestFilter,g.flipY=!1,g.wrapS=W.MirroredRepeatWrapping,g.wrapT=W.MirroredRepeatWrapping,f.map=g})):(d=De(n,a,ze[t]),t==="head"&&(d.children[0].position.y+=.01),d.name=c,f=d.material,v||(f.side=W.DoubleSide)),l==="leather"&&!s){let g=r.nbt?.value?.display?.value?.color?.value;if(g){let b=g>>16&255,w=g>>8&255,y=g&255;f.color.setRGB(b/255,w/255,y/255)}else f.color.setHex(11890001);D5(n,e,t,r,i,!0)}else f.color.setHex(16777215);let m=new W.Object3D;m.name=`armor_${t}${s?"_overlay":""}`,m.add(d),e.add(d)}function Bi(n,e){for(let t of n.children)(t.name===`geometry_armor_${e}`||t.name===`geometry_armor_${e}_overlay`)&&t.removeFromParent()}var I5=async(n,e)=>{let t;if(!n&&!e)t=await z5;else{if(n||(n=await He(e,"skin")),!n)return;let{canvas:l}=await ot(n);t=new N0.CanvasTexture(l)}t.magFilter=N0.NearestFilter,t.minFilter=N0.NearestFilter;let r=!1,s=K4(40,16,r?-2:-3,-2,-2,r?3:4,12,4,64,64),o=new N0.MeshStandardMaterial;o.map=t,o.needsUpdate=!0;let a=new N0.Mesh(s,o),v=new N0.Group;return v.add(a),v};function K4(n,e,t,r,i,s,o,a,v,l,c=!1){let d=t/16,f=r/16,m=i/16,g=(t+s)/16,b=(r+o)/16,w=(i+a)/16;c&&([d,g]=[g,d]);let y=[[d,f,m],[g,f,m],[g,b,m],[d,b,m],[d,f,w],[g,f,w],[g,b,w],[d,b,w]],A=n,C=n+a,M=n+a+s,S=n+a+s+s,H=n+a+s+a,B=n+a+s+a+s,I=e,G=e+a,O=e+a+o,j=[{vi:[5,4,0,1],uv:[C,I,M,G],n:[0,-1,0]},{vi:[2,3,7,6],uv:[M,G,S,I],n:[0,1,0]},{vi:[0,4,7,3],uv:[A,G,C,O],n:[-1,0,0]},{vi:[1,0,3,2],uv:[C,G,M,O],n:[0,0,-1]},{vi:[5,1,2,6],uv:[M,G,H,O],n:[1,0,0]},{vi:[4,5,6,7],uv:[H,G,B,O],n:[0,0,1]}],J=[],X=[],t0=[],d0=[];for(let m0=0;m0<j.length;m0++){let p0=j[m0],A0=m0*4,[n0,Y,o0,g0]=p0.uv,U0=[[o0/v,1-Y/l],[n0/v,1-Y/l],[n0/v,1-g0/l],[o0/v,1-g0/l]],O0=c?[3,2,1,0]:[0,1,2,3],$0=c?-p0.n[0]:p0.n[0];for(let u0=0;u0<4;u0++){let fe=y[p0.vi[O0[u0]]];J.push(fe[0],fe[1],fe[2]),X.push(U0[u0][0],U0[u0][1]),t0.push($0,p0.n[1],p0.n[2])}d0.push(A0,A0+1,A0+2,A0,A0+2,A0+3)}let l0=new N0.BufferGeometry;return l0.setAttribute("position",new N0.Float32BufferAttribute(J,3)),l0.setAttribute("uv",new N0.Float32BufferAttribute(X,2)),l0.setAttribute("normal",new N0.Float32BufferAttribute(t0,3)),l0.setIndex(d0),l0}E();x();k();R();E();x();k();R();import*as v0 from"three";import{subscribeKey as A3}from"valtio/utils";E();x();k();R();import*as z0 from"three";var Ii=async(n,e)=>{let t;if(!n&&!e)t=await z5;else{if(n||(n=await He(e,"skin")),!n)return;let{canvas:v}=await ot(n);t=new z0.CanvasTexture(v)}t.magFilter=z0.NearestFilter,t.minFilter=z0.NearestFilter;let r=new z0.BoxGeometry,i=new z0.MeshStandardMaterial,s=!1,o=new z0.Mesh(r,i);o.scale.x=s?3:4,o.scale.y=12,o.scale.z=4,q4(r,40,16,s?3:4,12,4),i.map=t,i.needsUpdate=!0;let a=new z0.Group;return a.add(o),a.scale.set(.1,.1,.1),o.rotation.z=Math.PI,a};function J4(n,e,t,r,i,s,o,a){let v=(B,I,G,O)=>[new z0.Vector2(B/o,1-O/a),new z0.Vector2(G/o,1-O/a),new z0.Vector2(G/o,1-I/a),new z0.Vector2(B/o,1-I/a)],l=v(e+s,t,e+r+s,t+s),c=v(e+r+s,t,e+r*2+s,t+s),d=v(e,t+s,e+s,t+s+i),f=v(e+s,t+s,e+r+s,t+s+i),m=v(e+r+s,t+s,e+r+s*2,t+i+s),g=v(e+r+s*2,t+s,e+r*2+s*2,t+i+s),b=n.attributes.uv,w=[m[3],m[2],m[0],m[1]],y=[d[3],d[2],d[0],d[1]],A=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],M=[f[3],f[2],f[0],f[1]],S=[g[3],g[2],g[0],g[1]],H=[];for(let B of[w,y,A,C,M,S])for(let I of B)H.push(I.x,I.y);b.set(new Float32Array(H)),b.needsUpdate=!0}function q4(n,e,t,r,i,s){J4(n,e,t,r,i,s,64,64)}var E3={itemRight:{rotation:[0,-90,25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},itemLeft:{rotation:[0,90,-25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},blockRight:{rotation:[0,45,0],translation:[0,0,0],scale:[.4,.4,.4]},blockLeft:{rotation:[0,225,0],translation:[0,0,0],scale:[.4,.4,.4]}},L5=class{constructor(e,t=!1){this.worldRenderer=e;this.offHand=t;u(this,"holdingBlock");u(this,"blockSwapAnimation");u(this,"cameraGroup",new v0.Mesh);u(this,"objectOuterGroup",new v0.Group);u(this,"objectInnerGroup",new v0.Group);u(this,"holdingBlockInnerGroup",new v0.Group);u(this,"camera",new v0.PerspectiveCamera(75,1,.1,100));u(this,"stopUpdate",!1);u(this,"lastHeldItem");u(this,"lastHeldItemRenderKey");u(this,"isSwinging",!1);u(this,"nextIterStopCallbacks");u(this,"idleAnimator");u(this,"ready",!1);u(this,"lastUpdate",0);u(this,"playerHand");u(this,"offHandDisplay",!1);u(this,"offHandModeLegacy",!1);u(this,"swingAnimator");u(this,"config");u(this,"disposed",!1);u(this,"unsubs",[]);u(this,"lastItemModelName");u(this,"switchRequest",0);this.initCameraGroup(),this.unsubs.push(A3(this.worldRenderer.playerStateReactive,"heldItemMain",()=>{this.offHand||this.updateItem()})),this.unsubs.push(A3(this.worldRenderer.playerStateReactive,"heldItemOff",()=>{this.offHand&&this.updateItem()})),this.config=e.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||Ii().then(r=>{this.disposed||(this.playerHand=r,this.updateItem())}).then(()=>{if(this.disposed)return;let r=C1(async()=>Ii(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",i=>{i&&(this.playerHand=i,this.updateItem())},i=>{R0(i,!0)});this.unsubs.push(r)})}updateItem(){if(!this.ready)return;let e=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;e?this.setNewItem(e):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new v0.Mesh}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(e,t,r,i){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage?this.swingAnimator?.update():this.idleAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new v0.Scene;o.add(this.cameraGroup),this.updateCameraGroup(),o.add(r.clone()),o.add(i.clone());let a=t.getSize(new v0.Vector2),v=Math.min(a.width,a.height),l=a.width-v,{offHandDisplay:c}=this;if(c&&(this.cameraGroup.scale.x=-1),t.autoClear=!1,t.clearDepth(),this.offHandDisplay)t.setViewport(0,0,v,v);else{let d=a.width-v;t.setViewport(d,0,v,v)}t.render(o,this.camera),t.setViewport(0,0,a.width,a.height),c&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(e){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new lt(()=>({y:this.objectInnerGroup.position.y}),(s,o)=>{s==="y"&&(this.objectInnerGroup.position.y=o)},{y:16})});let t=e,r=this.objectInnerGroup.position.y+this.objectInnerGroup.scale.y*1.5*(t==="appeared"?1:-1),i=!1;return new Promise(s=>{this.blockSwapAnimation.switcher.transitionTo({y:r},t,()=>{i||s(!0)},()=>{i=!0,s(!1)})})}isDifferentItem(e){return this.lastHeldItemRenderKey!==zt(this.worldRenderer,e)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:e}=this;this.cameraGroup.position.copy(e.position),this.cameraGroup.rotation.copy(e.rotation);let t=1,{position:r,scale:i}=this.getHandHeld3d(),s=-r.z,o=this.offHandModeLegacy?-1:1;this.objectOuterGroup.position.set(s*r.x*t*o,s*r.y,-s);let a=i*2.22*.2;this.objectOuterGroup.scale.set(a,a,a)}async createItemModel(e){if(this.lastUpdate=performance.now(),!e||e.type==="hand"&&!this.playerHand)return;let t;if(e.type==="item"||e.type==="block"){let i=this.worldRenderer.entities.getItemMesh({...e.fullItem,itemId:e.id},P1(this.worldRenderer),!1,this.lastItemModelName);if(i){let{mesh:s,isBlock:o,modelName:a}=i;o?(t=s,e.type="block"):(s.position.set(.5,.5,.5),t=s,e.type="item"),this.lastItemModelName=a}}else t=this.playerHand;if(!t)return;t.name="holdingBlock";let r=this.getHandHeld3d().rotation;return t.rotation.x=v0.MathUtils.degToRad(r.x),t.rotation.y=v0.MathUtils.degToRad(r.y),t.rotation.z=v0.MathUtils.degToRad(r.z),{model:t,type:e.type}}async replaceItemModel(e){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!e){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0;return}let t=await this.createItemModel(e);t&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=t.model,this.holdingBlockInnerGroup.add(t.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(e){let t=zt(this.worldRenderer,e),r=this.lastHeldItemRenderKey!==t;if(this.lastHeldItem=e,!r)return;this.lastHeldItemRenderKey=t,this.lastItemModelName=void 0;let i=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0}if(!e){this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(i!==this.switchRequest)return;let o=await this.createItemModel(e);if(!o||i!==this.switchRequest)return;let a=new v0.Group;this.holdingBlockInnerGroup.removeFromParent(),this.holdingBlockInnerGroup=new v0.Group,this.holdingBlockInnerGroup.add(o.model),a.add(this.holdingBlockInnerGroup),this.holdingBlock=o.model,this.objectInnerGroup=new v0.Group,this.objectInnerGroup.add(a),this.objectInnerGroup.position.set(-.5,-.5,-.5),s&&(this.objectInnerGroup.position.y-=this.objectInnerGroup.scale.y*1.5),Object.assign(a.position,{x:.5,y:.5,z:.5}),this.objectOuterGroup=new v0.Group,this.objectOuterGroup.add(this.objectInnerGroup),this.cameraGroup.add(this.objectOuterGroup);let v=this.getHandHeld3d().rotation;this.objectOuterGroup.rotation.y=v0.MathUtils.degToRad(v.yOuter),s&&await this.playBlockSwapAnimation("appeared"),this.swingAnimator??(this.swingAnimator=new Oi(this.holdingBlockInnerGroup)),this.swingAnimator.setHandMesh(this.holdingBlockInnerGroup),this.swingAnimator.type=o.type,this.config.viewBobbing&&(this.idleAnimator=new Hi(this.holdingBlockInnerGroup,this.worldRenderer.playerStateReactive))}getHandHeld3d(){let e=this.lastHeldItem?.type??"hand",t=this.offHandModeLegacy?"Left":"Right",r=.8*1.15,i={x:.4,y:-.7,z:-.45},s={x:-32.4,y:42.8,z:-41.3,yOuter:0};if(e==="item"){let o=E3[`item${t}`];i={x:-.05,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},r=o.scale[0]*1.15}else if(e==="block"){let o=E3[`block${t}`];i={x:.4,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},r=o.scale[0]*1.15}return{rotation:s,position:i,scale:r}}dispose(){this.disposed=!0,this.ready=!1,this.unsubs.forEach(e=>e()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,R0(this.cameraGroup,!0),R0(this.objectOuterGroup,!0),R0(this.objectInnerGroup,!0),R0(this.holdingBlockInnerGroup,!0),this.holdingBlock=void 0,this.playerHand&&(R0(this.playerHand,!0),this.playerHand=void 0)}},Hi=class{constructor(e,t){this.handMesh=e;this.playerState=t;u(this,"globalTime",0);u(this,"lastTime",0);u(this,"currentState");u(this,"targetState");u(this,"defaultPosition");u(this,"idleOffset",{y:0,rotationZ:0});u(this,"tween",new St);u(this,"idleTween",null);u(this,"stateSwitcher");u(this,"debugParams",{walkingSpeed:8,sprintingSpeed:16,walkingAmplitude:{x:1/30,y:1/10,rotationZ:.25},sprintingAmplitude:{x:1/30,y:1/10,rotationZ:.4}});u(this,"debugGui");u(this,"updated",!1);this.handMesh=e,this.globalTime=0,this.currentState="NOT_MOVING",this.targetState="NOT_MOVING",this.defaultPosition={x:e.position.x,y:e.position.y,z:e.position.z,rotationX:e.rotation.x,rotationY:e.rotation.y,rotationZ:e.rotation.z},this.stateSwitcher=new lt(()=>({x:this.handMesh.position.x,y:this.handMesh.position.y,z:this.handMesh.position.z,rotationX:this.handMesh.rotation.x,rotationY:this.handMesh.rotation.y,rotationZ:this.handMesh.rotation.z}),(r,i)=>{switch(r){case"x":this.handMesh.position.x=i;break;case"y":this.handMesh.position.y=i;break;case"z":this.handMesh.position.z=i;break;case"rotationX":this.handMesh.rotation.x=i;break;case"rotationY":this.handMesh.rotation.y=i;break;case"rotationZ":this.handMesh.rotation.z=i;break}},{x:2,y:2,z:2,rotation:Math.PI}),this.debugGui=new Te("idle_animator",this.debugParams)}startIdleAnimation(){this.idleTween&&this.idleTween.stop(),this.idleOffset.y=this.handMesh.position.y-this.defaultPosition.y,this.idleOffset.rotationZ=this.handMesh.rotation.z-this.defaultPosition.rotationZ,this.idleTween=new F0(this.idleOffset,this.tween).to({y:.05,rotationZ:.05},3e3).easing(H0.Sinusoidal.InOut).yoyo(!0).repeat(1/0).start()}stopIdleAnimation(){this.idleTween&&(this.idleTween.stop(),this.idleOffset.y=0,this.idleOffset.rotationZ=0)}getStateTransform(e,t){switch(e){case"NOT_MOVING":case"SNEAKING":return{x:this.defaultPosition.x,y:this.defaultPosition.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ};case"WALKING":case"SPRINTING":{let r=e==="SPRINTING"?this.debugParams.sprintingSpeed:this.debugParams.walkingSpeed,i=e==="SPRINTING"?this.debugParams.sprintingAmplitude:this.debugParams.walkingAmplitude;return{x:this.defaultPosition.x+Math.sin(t*r)*i.x,y:this.defaultPosition.y-Math.abs(Math.cos(t*r))*i.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ}}}}setState(e){if(e===this.targetState)return;this.targetState=e;let t=!1;if(this.currentState!==e){if(this.stopIdleAnimation(),!t){let r=this.getStateTransform(e,this.globalTime);this.stateSwitcher.transitionTo(r,e)}this.currentState=e}}update(){this.stateSwitcher.update();let e=performance.now(),t=(e-this.lastTime)/1e3;if(this.lastTime=e,!this.stateSwitcher.isTransitioning)switch(this.currentState){case"NOT_MOVING":case"SNEAKING":this.globalTime=Math.PI/4;break;case"SPRINTING":case"WALKING":this.globalTime+=t;break}if(this.playerState){let r=this.playerState.movementState;r!==this.targetState&&this.setState(r)}if(!this.stateSwitcher.isTransitioning&&(this.currentState==="NOT_MOVING"||this.currentState==="SNEAKING")&&(this.idleTween?.isPlaying()||this.startIdleAnimation(),this.tween.update(),this.handMesh.position.y=this.defaultPosition.y+this.idleOffset.y,this.handMesh.rotation.z=this.defaultPosition.rotationZ+this.idleOffset.rotationZ),!this.stateSwitcher.isTransitioning&&(this.currentState==="WALKING"||this.currentState==="SPRINTING")){let r=this.getStateTransform(this.currentState,this.globalTime);Object.assign(this.handMesh.position,r),Object.assign(this.handMesh.rotation,{x:r.rotationX,y:r.rotationY,z:r.rotationZ})}}getCurrentState(){return this.currentState}destroy(){this.stopIdleAnimation(),this.stateSwitcher.forceFinish()}},Oi=class{constructor(e){this.handMesh=e;u(this,"PI",Math.PI);u(this,"animationTimer",0);u(this,"lastTime",0);u(this,"isAnimating",!1);u(this,"stopRequested",!1);u(this,"originalRotation");u(this,"originalPosition");u(this,"originalScale");u(this,"debugParams",{animationTime:250,animationStage:0,useClassicSwing:!0,itemSwingXPosScale:-.8,itemSwingYPosScale:.2,itemSwingZPosScale:-.2,itemHeightScale:-.6,itemPreswingRotY:45,itemSwingXRotAmount:-30,itemSwingYRotAmount:-35,itemSwingZRotAmount:-5,armSwingXPosScale:-.3,armSwingYPosScale:.4,armSwingZPosScale:-.4,armSwingYRotAmount:70,armSwingZRotAmount:-20,armHeightScale:-.6});u(this,"debugGui");u(this,"type","hand");this.handMesh=e,this.originalRotation=e.rotation.clone(),this.originalPosition=e.position.clone(),this.originalScale=e.scale.clone(),this.debugGui=new Te("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01},itemSwingXPosScale:{min:-2,max:2,step:.1},itemSwingYPosScale:{min:-2,max:2,step:.1},itemSwingZPosScale:{min:-2,max:2,step:.1},itemHeightScale:{min:-2,max:2,step:.1},itemPreswingRotY:{min:-180,max:180,step:5},itemSwingXRotAmount:{min:-180,max:180,step:5},itemSwingYRotAmount:{min:-180,max:180,step:5},itemSwingZRotAmount:{min:-180,max:180,step:5},armSwingXPosScale:{min:-2,max:2,step:.1},armSwingYPosScale:{min:-2,max:2,step:.1},armSwingZPosScale:{min:-2,max:2,step:.1},armSwingYRotAmount:{min:-180,max:180,step:5},armSwingZRotAmount:{min:-180,max:180,step:5},armHeightScale:{min:-2,max:2,step:.1}})}setHandMesh(e){this.handMesh=e,this.originalRotation.copy(e.rotation),this.originalPosition.copy(e.position),this.originalScale.copy(e.scale)}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}let e=performance.now(),t=(e-this.lastTime)/1e3;this.lastTime=e,this.animationTimer+=t*1e3;let r=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(r>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}this.animationTimer=0;return}this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);let i=r,s=Math.sqrt(i),o=Math.sin(i*this.PI),a=Math.sin(s*this.PI);if(this.type==="hand"){let v=this.debugParams.armSwingXPosScale*a,l=this.debugParams.armSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.armSwingZPosScale*o;this.handMesh.position.x+=v,this.handMesh.position.y+=l+this.debugParams.armHeightScale*i,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.armSwingYRotAmount*a),this.handMesh.rotation.z+=v0.MathUtils.degToRad(this.debugParams.armSwingZRotAmount*o)}else{let v=this.debugParams.itemSwingXPosScale*a,l=this.debugParams.itemSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.itemSwingZPosScale*o;this.handMesh.position.x+=v,this.handMesh.position.y+=l+this.debugParams.itemHeightScale*i,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemPreswingRotY),this.handMesh.rotation.x+=v0.MathUtils.degToRad(this.debugParams.itemSwingXRotAmount*o),this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemSwingYRotAmount*a),this.handMesh.rotation.z+=v0.MathUtils.degToRad(this.debugParams.itemSwingZRotAmount*o)}}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}};function U5(n,e=!1){return n.displayOptions.inWorldRenderingConfig.handRenderer==="legacy"?new L5(n,e):new P5(n,e)}E();x();k();R();import*as Q0 from"three";import{Vec3 as Fi}from"vec3";var x3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALUlEQVR42mP4//8/IyWYYdSAwW6Ara3tf4oMmD179n9ChhD0AsiQ0Wgc7AYAAOqH+zNQ3r9kAAAAAElFTkSuQmCC";var R3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAOklEQVR42mP4//8/IyWYYdQA3AbY2tr+H1gDZs+e/R9mCD7D8IYBzBAQTXYgEvIKQQPw2T6aEqlkAADEA/W3ycLXvwAAAABJRU5ErkJggg==";var k3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVR42mP4//8/IyWYYRgbYGtr+39wGQDiYzMUpwGzZ8+GawDRID4IkxSIMEOwaSQ6FgiFBW0NIOR8osJgBOQFALo37sVTOo/LAAAAAElFTkSuQmCC";var T3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR42mP4//8/IyWYYXAbYGtr+59sA0CaZ8+eTZkBhNg4DQApQlYIcglMDN1VWA0AKYJpQvYONi/hDUSYIfjCgmA0EooJ2hmAK9CINgBXoA2xvEAMBgBGPud3dYZtOQAAAABJRU5ErkJggg==";var M3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVR42r1TQQrAMAxyD8tL89iMHgQJoQxHewi0UsWYFFX1/CkcF4iIsgUWOTM9ASV3F3rHF+v9rK4wEVnEFoFYbwmTbRZFFN9m0B9QZBfk2THaAhqktQdTkHYL9iZe+40vs7nda+BuVOMAAAAASUVORK5CYII=";var S3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAcElEQVR42rWTWwpAIQhEbWGu1MUaXRgQcXpyP8SIPI1jibu3l5DfAKrqyFgfAczsKxx5xJUCFGYFUZXMpOe9CAa8BOS+0U5UVbYQ6Siqbi0BFT0auTSRHZqNkE6BGXgEYKYtAczIbQAz8ukzXT3l3egz49IXvXQCVAAAAABJRU5ErkJggg==";var C3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeElEQVQ4jaWSQQ4AIQgD9WG8tI/tnkgaUgmuBw8YHcqERXK/nOUuI4JPAABMSESwA1qAQgAQwBygnfNjTaCpWoBzUlNZQJ07x9FUdgSlV5FaW4Cjq8isW8BJ2GgPtEuVdr0HKvLXHjiRI0An8jTKqo9dF000cnBzPgKuxXtbq/m1AAAAAElFTkSuQmCC";var B3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42qWTSRKAMAgE8WF5KY/FygEL2yEp9cAhCz0wJBYRx58wbowxYsZngLvHjITsgNYpJySBrPIBUMqZSHhdSw+oQlgVa01U7VRQ7huTk67aUWZaVyaNZFsSQBCTVBW3KahLyo/lQ6KR1Y+2BTUyGqke1AXoxsSzpYlU3FW0/Exv1ie0hq53Bf15aAAAAABJRU5ErkJggg==";var P3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVR42o2SYQ6FMAiDeQfbSXdYXjSpqd869QeZQiilpbr7l2KM0cc75+xUV77YpGCjAPUqitMU3uCAXrsAlPSCcgJMbG4M0mQ1Etz/i0KlXQnmwyqpv1uH4h7fiws7ISneTYNEk0ImCxcAArGJrE4AXhypPtl7AqTdeJG8k3gHb0L6QfmK9WQTa59cSFdHRssKFHHngteV/wPDepaHIu0QVAAAAABJRU5ErkJggg==";var I3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAoUlEQVR42n2Tyw3AIAxD3cGYlGFTUSmV+2o4IEEAf2JQVV1rjDGq576ec5avWVdfWIW12aMPEJBEImoPv+CAvvcCODsVNWBS8wA4A5ndv1/ytciQvBLMyeTSHD3ZYXPXXH7Y0ZMdJvCxQJls5O6tKHlPPWGEfU58WZR6ive1kKSleFNC2kXGRnrcDqhTTOmPeP3pAZnTq6Oin4X0oXbfnNZu626Io6lqGCwAAAAASUVORK5CYII=";var N1=class{constructor(e){this.worldRenderer=e;u(this,"_cursorLinesHidden",!1);u(this,"cursorLineMaterial");u(this,"interactionLines",null);u(this,"prevColor");u(this,"blockBreakMesh");u(this,"breakTextures",[]);let t=[x3,R3,k3,T3,M3,S3,C3,B3,P3,I3];for(let i=0;i<10;i++)Ie(t[i]).then(s=>{s.magFilter=Q0.NearestFilter,s.minFilter=Q0.NearestFilter,this.breakTextures.push(s)});let r=new Q0.MeshBasicMaterial({transparent:!0,blending:Q0.MultiplyBlending,alphaTest:.5});this.blockBreakMesh=new Q0.Mesh(new Q0.BoxGeometry(1,1,1),r),this.blockBreakMesh.visible=!1,this.blockBreakMesh.renderOrder=999,this.blockBreakMesh.name="blockBreakMesh",this.worldRenderer.sceneOrigin.addAndTrack(this.blockBreakMesh),this.worldRenderer.onReactivePlayerStateUpdated("gameMode",()=>{this.updateLineMaterial()}),setTimeout(()=>{this.updateLineMaterial(),this.interactionLines&&this.setHighlightCursorBlock(this.interactionLines.blockPos,this.interactionLines.shapePositions,!0)})}get cursorLinesHidden(){return this._cursorLinesHidden}set cursorLinesHidden(e){this.interactionLines&&(this.interactionLines.mesh.visible=!e),this._cursorLinesHidden=e}updateLineMaterial(){let e=this.worldRenderer.playerStateReactive.gameMode==="creative",t=this.worldRenderer.renderer.getPixelRatio();this.cursorLineMaterial&&this.cursorLineMaterial.dispose(),this.cursorLineMaterial=new dt({color:(()=>{switch(this.worldRenderer.worldRendererConfig.highlightBlockColor){case"blue":return 4227327;case"classic":return 0;default:return e?4227327:0}})(),linewidth:Math.max(t*.7,1)*2}),this.prevColor=this.worldRenderer.worldRendererConfig.highlightBlockColor}updateBreakAnimation(e,t,r){if(this.hideBreakAnimation(),t===null||!e||!r)return;let{position:i,width:s,height:o,depth:a}=r,v=new Fi(i.x,i.y,i.z);this.blockBreakMesh.scale.set(s*1.001,o*1.001,a*1.001),v.add(new Fi(e.x,e.y,e.z)),this.blockBreakMesh.position.set(v.x,v.y,v.z),this.blockBreakMesh.visible=!0,this.blockBreakMesh.material.map=this.breakTextures[t]??this.breakTextures.at(-1),this.blockBreakMesh.material.needsUpdate=!0}hideBreakAnimation(){this.blockBreakMesh&&(this.blockBreakMesh.visible=!1)}updateDisplay(){if(this.cursorLineMaterial){let{renderer:e}=this.worldRenderer;this.cursorLineMaterial.resolution.set(e.domElement.width,e.domElement.height),this.cursorLineMaterial.dashOffset=performance.now()/750}}setHighlightCursorBlock(e,t,r=!1){if(e&&this.interactionLines&&e.equals(this.interactionLines.blockPos)&&av(t??[],this.interactionLines.shapePositions??[])&&!r||(this.interactionLines!==null&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.interactionLines.mesh),this.interactionLines=null),e===null))return;let i=new Q0.Group;for(let{position:s,width:o,height:a,depth:v}of t??[]){let l=new Fi(s.x,s.y,s.z),c=[1.0001*o,1.0001*a,1.0001*v],d=new Q0.BoxGeometry(...c),f=new ct().fromEdgesGeometry(new Q0.EdgesGeometry(d)),m=new O5(f,this.cursorLineMaterial);m.position.set(l.x,l.y,l.z),m.computeLineDistances(),i.add(m)}this.worldRenderer.sceneOrigin.addAndTrack(i),i.position.set(e.x,e.y,e.z),i.visible=!this.cursorLinesHidden,this.interactionLines={blockPos:e,mesh:i,shapePositions:t}}render(){this.prevColor!==this.worldRenderer.worldRendererConfig.highlightBlockColor&&this.updateLineMaterial(),this.updateDisplay()}},av=(n,e)=>{if(n.length!==e.length)return!1;for(let[t,r]of n.entries())if(r!==e[t])return!1;return!0};E();x();k();R();E();x();k();R();var vv=s5(vi(),1);import H3 from"prismarine-nbt";import{getItemDefinition as lv}from"mc-assets/dist/itemDefinitions";var cv=(n,e)=>{let t,r,i=n.name;i.includes(":")||(i=`minecraft:${i}`);let s=e.currentResources?.customItemModelNames[i];if(n.components){let o=new Map;for(let c of n.components)o.set(c.type,c);let a=o.get("custom_name")||o.get("item_name");a&&(t=typeof a.data=="string"?a.data:H3.simplify(a.data));let v=o.get("item_model");if(v&&(r=v.data),s){let c=o.get("custom_model_data");if(c?.data){let d;typeof c.data=="number"?d=c.data:typeof c.data=="object"&&"floats"in c.data&&Array.isArray(c.data.floats)&&c.data.floats.length>0&&(d=c.data.floats[0]),d&&s[d]&&(r=s[d])}}let l=o.get("lore");l&&(t??(t=n.displayName??n.name),t+=`
21459
- ${JSON.stringify(l.data)}`)}if(n.nbt){let o=H3.simplify(n.nbt),a=o.display?.Name;a&&(t=a),s&&o.CustomModelData&&s[o.CustomModelData]&&(r=s[o.CustomModelData])}return{customText:t,customModel:r}};var O3=(n,e,t,r)=>{let i=n.name,{customModel:s}=cv(n,t);s&&(i=s);let o=ns(r,{...e}),a=lv(t.currentResources.itemsDefinitionsStore,{name:i,version:t.currentResources.version,properties:o})?.model;return(a==="minecraft:special"?void 0:a)??i};E();x();k();R();var G3=s5(L3(),1);import{versionToNumber as U3}from"mc-assets/dist/utils";var N3=(n,e,t=!1,r=!1)=>{let i=n.modelName,s=globalThis.loadedData.itemsByName[i];U3(e.currentResources.version)<U3("1.13")&&(i=(0,G3.getRenamedData)(s?"items":"blocks",i,e.currentResources.version,"1.13.1"));let o;if(!r){let v=e.currentResources?.guiAtlas?.json,l=d=>d&&v?.textures[d.replace("minecraft:","").replace("block/","").replace("blocks/","").replace("item/","").replace("items/","").replace("_inventory","")],c=l(i)??l(n.originalItemName);if(c){let d=c.u*v.width,f=c.v*v.height;return{texture:"gui",slice:[d,f,v.tileSize,v.tileSize],scale:.25,blockData:null,modelName:null}}}let a=v=>v.top??v;try{if(!e.currentResources?.itemsRenderer)throw new Error("Items renderer is not available");o=e.currentResources.itemsRenderer.getItemTexture(i,{},!1,r)??(n.originalItemName?e.currentResources.itemsRenderer.getItemTexture(n.originalItemName,{},!1,r):void 0)??e.currentResources.itemsRenderer.getItemTexture("item/missing_texture")}catch(v){reportError?.(`Failed to render item ${i} (original: ${n.originalItemName}) on ${e.currentResources.version} (resourcepack: TODO!): ${v.stack}`),o=a(e.currentResources.itemsRenderer.getItemTexture("errored"))}return o??(o=a(e.currentResources.itemsRenderer.getItemTexture("unknown"))),"type"in o?{texture:o.type,slice:o.slice,modelName:i,blockData:null,scale:null}:{texture:"blocks",blockData:o,modelName:i,slice:null,scale:null}};var W3=(n,e,t,r)=>{let i=t.currentResources;if(!i)throw new Error("Resources not loaded");let s=n.itemId??n.blockId??n.name,{blockState:o}=n;try{let a=o?globalThis.loadedData.blocksByStateId[o]?.name:typeof s=="number"?globalThis.loadedData.items[s]?.name:s;if(!a)throw new Error(`Item not found: ${s}`);let v=O3({...n,name:a},e,t,r),l=N3({modelName:v},t,!1,!0);if(!l)throw new Error(`Failed to get render info for item ${a}`);let c=l.texture==="blocks"?i.blocksAtlasImage:i.itemsAtlasImage;if(l.blockData)return{resolvedModel:l.blockData.resolvedModel,modelName:l.modelName};if(l.slice){let[d,f,m,g]=l.slice,[b,w,y,A]=[d/c.width,f/c.height,m/c.width,g/c.height];return{u:b,v:w,su:y,sv:A,renderInfo:l,modelName:l.modelName}}throw new Error(`Invalid render info for item ${a}`)}catch(a){return reportError?.(a),{u:0,v:0,su:16/i.blocksAtlasImage.width,sv:16/i.blocksAtlasImage.width,modelName:"missing"}}};E();x();k();R();import*as jt from"three";var V1=class{constructor(e){this.worldRenderer=e;u(this,"audioListener");u(this,"activeSounds",new Set);u(this,"audioContext");u(this,"soundVolumes",new Map);u(this,"baseVolume",1);e.onWorldSwitched.push(()=>{this.stopAll()}),e.onReactiveConfigUpdated("volume",t=>{this.changeVolume(t)})}initAudioListener(){this.audioListener||(this.audioListener=new jt.AudioListener,this.worldRenderer.camera.add(this.audioListener))}playSound(e,t,r=1,i=1,s=500){this.initAudioListener();let o=new jt.PositionalAudio(this.audioListener);this.activeSounds.add(o),this.soundVolumes.set(o,r);let a=new jt.AudioLoader,v=Date.now();a.loadAsync(t).then(l=>{Date.now()-v>s||(o.setBuffer(l),o.setRefDistance(20),o.setVolume(r*this.baseVolume),o.setPlaybackRate(i),this.worldRenderer.sceneOrigin.addAndTrack(o),o.position.set(e.x,e.y,e.z),o.onEnded=()=>{this.worldRenderer.sceneOrigin.removeAndUntrack(o),o.source&&o.disconnect(),this.activeSounds.delete(o),this.soundVolumes.delete(o),a.manager.itemEnd(t)},o.play())})}stopAll(){for(let e of this.activeSounds)e&&(e.stop(),e.source&&e.disconnect(),this.worldRenderer.sceneOrigin.removeAndUntrack(e));this.activeSounds.clear(),this.soundVolumes.clear()}changeVolume(e){this.baseVolume=e;for(let[t,r]of this.soundVolumes)t.setVolume(r*this.baseVolume)}destroy(){this.stopAll(),this.audioListener&&(this.audioListener.removeFromParent(),this.audioListener=void 0)}playTestSound(){this.playSound(this.worldRenderer.camera.position,"/sound.mp3")}};E();x();k();R();import*as L0 from"three";var j1=class{constructor(e,t){this.worldRenderer=e;this.onRenderCallbacks=t;u(this,"rollAngle",0);u(this,"rollAnimation");u(this,"basePitch",0);u(this,"baseYaw",0);u(this,"cameraBobInput",null);t.push(()=>{this.update()})}get damageRollAmount(){return 5}get damageAnimDuration(){return 200}setCameraBobInput(e){this.cameraBobInput=e}setBaseRotation(e,t){this.basePitch=e,this.baseYaw=t,this.update()}getBaseRotation(){return{pitch:this.basePitch,yaw:this.baseYaw}}shakeFromDamage(e){let t=this.rollAngle,r=t+(e??(Math.random()<.5?-1:1))*this.damageRollAmount;this.rollAnimation={startTime:performance.now(),startRoll:t,targetRoll:r,duration:this.damageAnimDuration/2}}update(){if(this.worldRenderer.playerStateUtils.isSpectatingEntity()&&(this.rollAngle=0,this.rollAnimation=void 0),this.rollAnimation){let t=performance.now(),r=t-this.rollAnimation.startTime,i=Math.min(r/this.rollAnimation.duration,1);this.rollAnimation.returnToZero?(this.rollAngle=this.rollAnimation.startRoll*(1-this.easeInOut(i)),i===1&&(this.rollAnimation=void 0)):(this.rollAngle=this.rollAnimation.startRoll+(this.rollAnimation.targetRoll-this.rollAnimation.startRoll)*this.easeOut(i),i===1&&(this.rollAnimation={startTime:t,startRoll:this.rollAngle,targetRoll:0,duration:this.damageAnimDuration/2,returnToZero:!0}))}let e=this.worldRenderer.cameraObject;if(this.worldRenderer.cameraGroupVr){let t=new L0.Quaternion().setFromAxisAngle(new L0.Vector3(0,1,0),this.baseYaw);e.setRotationFromQuaternion(t)}else{let t=this.addAntiZfightingOffset(this.basePitch),r=this.addAntiZfightingOffset(this.baseYaw),i=new L0.Quaternion().setFromAxisAngle(new L0.Vector3(1,0,0),t),s=new L0.Quaternion().setFromAxisAngle(new L0.Vector3(0,1,0),r),o=new L0.Quaternion().setFromAxisAngle(new L0.Vector3(0,0,1),L0.MathUtils.degToRad(this.rollAngle)),a=new L0.Quaternion,v=new L0.Quaternion,l=this.worldRenderer.playerStateReactive.perspective;if(this.cameraBobInput){let d=B1(this.cameraBobInput);a=new L0.Quaternion().setFromAxisAngle(new L0.Vector3(0,0,1),d.rotation.z),v=new L0.Quaternion().setFromAxisAngle(new L0.Vector3(1,0,0),d.rotation.x),l==="first_person"&&this.worldRenderer.camera.position.set(d.position.x,d.position.y,0)}else l==="first_person"&&this.worldRenderer.camera.position.set(0,0,0);let c=s.multiply(i).multiply(o).multiply(a).multiply(v);e.setRotationFromQuaternion(c)}}easeOut(e){return 1-(1-e)*(1-e)}easeInOut(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}addAntiZfightingOffset(e){let r=(e%(Math.PI*2)+Math.PI*2)%(Math.PI*2),i=.01;return Math.abs(r)<i||Math.abs(r-Math.PI/2)<i||Math.abs(r-Math.PI)<i||Math.abs(r-3*Math.PI/2)<i?e+.001:e}};E();x();k();R();import*as K from"three";var Y1=class{constructor(e){this.worldRenderer=e;u(this,"customMedia",new Map);u(this,"lastCheck",0);u(this,"THROTTLE_TIME",100);this.worldRenderer.onWorldSwitched.push(()=>{this.onWorldGone()}),this.worldRenderer.onRender.push(()=>{this.render()}),this.worldRenderer.onReactiveConfigUpdated("volume",()=>{let{volume:t}=this.worldRenderer.worldRendererConfig;for(let[r,i]of this.customMedia.entries())i.positionalAudio&&i.positionalAudio.setVolume((i.props.volume??1)*t)})}onWorldGone(){for(let[e,t]of this.customMedia.entries())this.destroyMedia(e)}onWorldStop(){for(let[e,t]of this.customMedia.entries())this.setVideoPlaying(e,!1)}createErrorTexture(e,t,r=16777215,i="Failed to load"){let s=new OffscreenCanvas(100,100),o=100;s.width=o,s.height=o;let a=s.getContext("2d");if(!a)return new K.CanvasTexture(s);a.clearRect(0,0,s.width,s.height),a.fillStyle=`rgba(${r>>16&255}, ${r>>8&255}, ${r&255}, 1)`,a.fillRect(0,0,s.width,s.height),a.fillStyle="#ff0000",a.font="bold 10px sans-serif",a.textAlign="center",a.textBaseline="middle",a.fillText(i,s.width/2,s.height/2,s.width);let v=new K.CanvasTexture(s);return v.minFilter=K.LinearFilter,v.magFilter=K.LinearFilter,v}createBackgroundTexture(e,t,r=0,i=1){let s=new OffscreenCanvas(1,1);s.width=1,s.height=1;let o=s.getContext("2d");if(!o)return new K.CanvasTexture(s);let a=r>>16&255,v=r>>8&255,l=r&255;o.fillStyle=`rgba(${a}, ${v}, ${l}, ${i})`,o.fillRect(0,0,1,1);let c=new K.CanvasTexture(s);return c.minFilter=K.NearestFilter,c.magFilter=K.NearestFilter,c}validateOrigin(e,t){if(t===!0)return!0;if(t===!1)return!1;let r=new URL(e);return t.some(i=>r.origin.endsWith(i))}onPageInteraction(){for(let[e,t]of this.customMedia.entries())t.hadAutoPlayError&&(t.hadAutoPlayError=!1,this.playVideo(e))}addMedia(e,t){let r=structuredClone(t);this.destroyMedia(e);let i=!1;t.src.startsWith("https://disk.yandex.ru/i/")&&(i=!0,t.src=`/ya-image?url=${t.src}`);let{scene:s}=this.worldRenderer;t.allowOrigins!==void 0&&!this.validateOrigin(t.src,t.allowOrigins)&&(t.src="");let a=t.src.endsWith(".png")||t.src.endsWith(".jpg")||t.src.endsWith(".jpeg")||t.imageOverride;i&&!t.imageOverride&&fetch(t.src,{method:"HEAD"}).then(M=>{M.headers.get("content-type")?.startsWith("image/")&&(this.destroyMedia(e),this.addMedia(e,{...r,src:t.src,imageOverride:!0}))}).catch(console.error);let v,l;if(!a){v=document.createElement("video"),v.src=t.src.endsWith(".gif")?t.src.replace(".gif",".mp4"):t.src,v.loop=t.loop??!0;let M=(t.volume??1)*this.worldRenderer.worldRendererConfig.volume;v.volume=Math.min(M,1),v.playsInline=!0,v.crossOrigin="anonymous";let S=this.worldRenderer.soundSystem;if(S.initAudioListener(),!S.audioListener)throw new Error("Audio listener not initialized");l=new K.PositionalAudio(S.audioListener),l.setRefDistance(6),l.setVolume(M),this.worldRenderer.sceneOrigin.addAndTrack(l),l.position.set(t.position.x,t.position.y,t.position.z),l.setMediaElementSource(v),l.connect(),v.addEventListener("pause",()=>{l?.pause(),globalThis.tempSendVideoStop?.(e,"paused",v.currentTime)}),v.addEventListener("play",()=>{l?.play(),globalThis.tempSendVideoPlay?.(e)}),v.addEventListener("seeked",()=>{l&&v&&(l.offset=v.currentTime)}),v.addEventListener("stalled",()=>{globalThis.tempSendVideoStop?.(e,"stalled",v.currentTime)}),v.addEventListener("waiting",()=>{globalThis.tempSendVideoStop?.(e,"waiting",v.currentTime)}),v.addEventListener("error",({error:H})=>{globalThis.tempSendVideoStop?.(e,`error: ${H}`,v.currentTime)}),v.addEventListener("ended",()=>{globalThis.tempSendVideoStop?.(e,"ended",v.currentTime),t.loop||(v.currentTime=0,C.ended=!0)})}let c=this.createBackgroundTexture(t.size.width,t.size.height,t.background),d=M=>{let S=this.createErrorTexture(t.size.width,t.size.height,t.background,M);g.map=S,g.needsUpdate=!0},f=new K.PlaneGeometry(1,1),m=t.allowLighting?K.MeshLambertMaterial:K.MeshBasicMaterial,g=new m({map:c,transparent:!0,side:t.doubleSide?K.DoubleSide:K.FrontSide,alphaTest:.1}),b=v?new K.VideoTexture(v):new K.TextureLoader().load(t.src,()=>{this.customMedia.get(e)?.texture===b&&(g.map=b,g.needsUpdate=!0)},void 0,()=>d());b.minFilter=K.NearestFilter,b.magFilter=K.NearestFilter,b.generateMipmaps=!1;let w=new K.Mesh(f,g),{mesh:y}=this.positionMeshExact(w,K.MathUtils.degToRad((t.rotation??0)*90),t.position,t.size.width,t.size.height);s.add(y),v&&(w.onBeforeRender=()=>{v.readyState===v.HAVE_ENOUGH_DATA&&(!v.paused||!C?.hadAutoPlayError)&&(g.map!==b&&(g.map=b,g.needsUpdate=!0),b.needsUpdate=!0,l&&(l.position.copy(y.position),l.rotation.copy(y.rotation)))});let A=M=>{let S=f.attributes.uv.array;S[0]=M.startU,S[1]=M.startV,S[2]=M.endU,S[3]=M.startV,S[4]=M.endU,S[5]=M.endV,S[6]=M.startU,S[7]=M.endV,f.attributes.uv.needsUpdate=!0};t.uvMapping&&A(t.uvMapping);let C={mesh:y,video:v,texture:b,updateUVMapping:A,positionalAudio:l,props:r,hadAutoPlayError:!1,pausedBecuaseHidden:!1,ended:!1,handleError(M){if(C.destroyed)return;let S=H=>H;d(M.name==="NotAllowedError"||M.name==="AbortError"?S("Waiting for user interaction"):S("Failed to auto play"))}};return this.customMedia.set(e,C),v&&t.autoPlay&&this.playVideo(e,!0),e}playVideo(e,t=!1){let r=this.customMedia.get(e);if(r?.video){if(!t&&r.positionalAudio&&r.video.currentTime<1){let i=r.video.currentTime;this.addMedia(e,r.props),r.video.currentTime=i,r.props.autoPlay||this.playVideo(e,!0);return}r.video.play().then(()=>{r.hadAutoPlayError=!1}).catch(i=>{r.pausedBecuaseHidden||((i.name==="NotAllowedError"||i.name==="AbortError"||i.message?.includes("not allowed")&&!r.pausedBecuaseHidden)&&(r.hadAutoPlayError=!0),r.handleError(i))})}}render(){for(let[e,t]of this.customMedia.entries()){let r=t.mesh.visible;t.mesh.visible=this.worldRenderer.shouldObjectVisible(t.mesh)&&!t.mesh.forceHide,r!==t.mesh.visible&&t.video&&(t.mesh.visible?t.pausedBecuaseHidden&&(this.playVideo(e),t.pausedBecuaseHidden=!1):t.video.paused||(t.video.pause(),t.pausedBecuaseHidden=!0))}}setVideoPlaying(e,t){let r=this.customMedia.get(e);r?.video&&(t?this.playVideo(e):r.video.pause())}setVideoSeeking(e,t){let r=this.customMedia.get(e);r?.video&&(r.video.currentTime=t)}setVideoVolume(e,t){let r=this.customMedia.get(e);r?.video&&(r.video.volume=t)}setVideoSpeed(e,t){let r=this.customMedia.get(e);r?.video&&(r.video.playbackRate=t)}setControlMode(e,t,r){let i=this.customMedia.get(e);i?.video&&(i.props.controlMode={mouseButton:t,controlMode:r})}destroyMedia(e){let{scene:t}=this.worldRenderer,r=this.customMedia.get(e);if(r){r.destroyed=!0,r.video&&(r.video.pause(),r.video.src="",r.video.remove()),r.positionalAudio&&this.worldRenderer.sceneOrigin.removeAndUntrack(r.positionalAudio),this.worldRenderer.sceneOrigin.removeAndUntrack(r.mesh),r.texture.dispose();let i=r.mesh.children[0];i&&(i.geometry.dispose(),i.material instanceof K.Material&&i.material.dispose()),this.customMedia.delete(e)}}positionMeshExact(e,t,r,i,s,o=1){t===0&&(r.z+=.001),t===Math.PI/2&&(r.x-=.001),t===Math.PI&&(r.z-=.001),t===3*Math.PI/2&&(r.x+=.001),t===0&&(r.z+=1),t===Math.PI&&(r.x+=1),t===3*Math.PI/2&&(r.z+=1,r.x+=1),e.matrix.identity(),e.position.set(0,0,0),e.rotation.set(0,0,0),e.scale.set(1,1,1),e.rotateY(t),(t===Math.PI/2||t===3*Math.PI/2)&&(e.rotateZ(-Math.PI),e.rotateX(-Math.PI)),e.scale.set(i,s,o),e.geometry.translate(.5,.5,0),e.geometry.attributes.position.needsUpdate=!0,this.worldRenderer.sceneOrigin.track(e),e.position.set(r.x,r.y,r.z);let a=new K.Group;a.add(e);let v=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:16711680}));v.position.set(r.x,r.y,r.z),a.add(v);let l=r.x+Math.cos(t)*i,c=r.z+Math.sin(t)*i,d=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:255}));d.position.set(r.x,r.y+s,r.z),a.add(d);let f=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:16776960}));f.position.set(l,r.y,c),a.add(f);let m=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:16711935}));m.position.set(l,r.y+s,c),a.add(m);let g=new K.Vector3(this.worldRenderer.sceneOrigin.toSceneX(r.x),this.worldRenderer.sceneOrigin.toSceneY(r.y),this.worldRenderer.sceneOrigin.toSceneZ(r.z)),b=new K.ArrowHelper(new K.Vector3(Math.cos(t),0,Math.sin(t)),g,1,16711680);return a.add(b),{mesh:e,debugGroup:a}}createTestCanvasTexture(){let e=new OffscreenCanvas(100,100);e.width=100,e.height=100;let t=e.getContext("2d");return t?(t.font="10px Arial",t.fillStyle="red",t.fillText("Hello World",0,10),new K.CanvasTexture(e)):null}tryIntersectMedia(){if(Date.now()-this.lastCheck<this.THROTTLE_TIME)return;if(this.customMedia.size===0){this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1;return}this.lastCheck=Date.now();let{camera:e,scene:t}=this.worldRenderer,r=new K.Raycaster,i=new K.Vector2(0,0);r.setFromCamera(i,e);let s=r.intersectObjects(t.children,!0);if(s.length>0){let o=s[0],a=o.object;for(let[v,l]of this.customMedia.entries())if(a===l.mesh||l.mesh.children.includes(a)){let{uv:c}=o;if(c){let d={id:v,x:c.x,y:c.y};this.worldRenderer.reactiveState.world.intersectMedia=d,this.worldRenderer.debugVideo=l,this.worldRenderer.cursorBlock.cursorLinesHidden=!0;return}}}this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1}handleUserClick(e){let t=this.worldRenderer.reactiveState.world.intersectMedia;if(t){let{id:r,x:i,y:s}=t,o=this.customMedia.get(r),a=o?.props.controlMode;if(o?.video&&(a?.mouseButton==="both"||a?.mouseButton===e))switch(a?.controlMode){case"play_pause":{this.setVideoPlaying(r,o.video.paused);break}case"play_if_ended":{o.ended&&this.setVideoPlaying(r,!0);break}case"toggle_mute":{o.video.muted=!o.video.muted;break}}}}};E();x();k();R();import*as Ue from"three";E();x();k();R();import*as T0 from"three";var mv=1,V3=10,me={TARGET_SCREEN_PX:150,CANVAS_SIZE:256,LAYOUT:{DOT_Y:.3,NAME_Y:.45,DISTANCE_Y:.55},CANVAS_SCALE:2,ARROW:{enabledDefault:!1,pixelSize:50,paddingPx:50},DEFAULT_VISUAL_SCALE:1,DEFAULT_OPACITY:1};function Y3(n){let e=n.color??16711680,t=n.depthTest??!1,r=n.visualScale??n.metadata?.visualScale??(typeof window>"u"?void 0:window.serverMetadata?.waypointVisualScale)??me.DEFAULT_VISUAL_SCALE,i=n.opacity??n.metadata?.opacity??(typeof window>"u"?void 0:window.serverMetadata?.waypointOpacity)??me.DEFAULT_OPACITY,s=V0(j3(),j3());Q1(s,e,n.label??"","0m",r);let o=new T0.CanvasTexture(s);o.anisotropy=1,o.magFilter=T0.LinearFilter,o.minFilter=T0.LinearFilter;let a=new T0.SpriteMaterial({map:o,transparent:!0,opacity:1,depthTest:t,depthWrite:!1}),v=new T0.Sprite(a);v.position.set(0,0,0),v.renderOrder=10,v.material.opacity=i;let l=n.label??"",c="0m",d=Number.NaN,f,m,g,b,w=null,y=me.ARROW.enabledDefault,A=new T0.Group;A.add(v);let{x:C,y:M,z:S}=n.position;A.position.set(C,M,S);function H(){o.needsUpdate=!0}function B(){if(!m||!g)return;let Y=m.width;g.clearRect(0,0,Y,Y),g.beginPath(),g.moveTo(Y*.15,Y*.5),g.lineTo(Y*.85,Y*.5),g.lineTo(Y*.5,Y*.15),g.closePath();let o0=`#${e.toString(16).padStart(6,"0")}`;g.lineWidth=6,g.strokeStyle="black",g.stroke(),g.fillStyle=o0,g.fill(),b&&(b.needsUpdate=!0)}function I(Y){e=Y,c="0m",d=0,Q1(s,e,l,"0m",r),H(),f&&B()}function G(Y){l=Y??"",Q1(s,e,l,c,r),H()}function O(Y,o0){o0!==c&&(c=o0,Q1(s,e,Y,o0,r),H())}function j(Y){v.visible=Y}function J(Y,o0,g0){A.position.set(Y,o0,g0)}function X(Y,o0,g0,U0){let O0=o0*Math.PI/180,u0=Math.tan(O0/2)*2*g0*(me.TARGET_SCREEN_PX*r/U0);v.scale.set(u0,u0,1)}function t0(){if(f)return;let Y=128;m=V0(Y,Y),g=m.getContext("2d"),B(),b=new T0.CanvasTexture(m),b.anisotropy=1,b.magFilter=T0.LinearFilter,b.minFilter=T0.LinearFilter;let o0=new T0.SpriteMaterial({map:b,transparent:!0,depthTest:!1,depthWrite:!1,opacity:i});f=new T0.Sprite(o0),f.renderOrder=12,f.visible=!1,w&&w.add(f)}function d0(Y){y=Y,!Y&&f&&(f.visible=!1)}function l0(Y){f?.parent&&f.parent.remove(f),w=Y,f&&Y&&Y.add(f)}function m0(Y,o0,g0){if(!y||(t0(),!f))return!0;let U0=n.metadata?.onlyLeftRight===!0,O0=new T0.Vector3;Y.getWorldDirection(O0);let $0=Y.up.clone().normalize(),u0=new T0.Vector3().copy(O0).cross($0).normalize(),fe=new T0.Vector3().copy(u0).cross(O0).normalize(),t5=new T0.Vector3().setFromMatrixPosition(Y.matrixWorld),r5=new T0.Vector3(A.position.x,A.position.y,A.position.z).sub(t5),je=r5.dot(O0),Ce=r5.dot(u0),Ye=r5.dot(fe),K5=o0/g0,Qe=Y.fov*Math.PI/180,At=2*Math.atan(Math.tan(Qe/2)*K5),J5=Math.atan2(Ce,je),q5=Math.atan2(Ye,je);if(je>0&&Math.abs(J5)<=At/2&&Math.abs(q5)<=Qe/2)return f.visible=!1,!0;let Z0=J5/(At/2),S0=q5/(Qe/2);je<=0&&(Math.abs(Z0)>Math.abs(S0)?(Z0=Math.sign(Z0),S0=0):(Z0=0,S0=Math.sign(S0))),U0&&(Math.abs(Z0)>Math.abs(S0)||(Z0=Z0>=0?1:-1),S0=0);let Et=Math.max(Math.abs(Z0),Math.abs(S0))||1,i5=Z0/Et,oe=S0/Et,xt=me.ARROW.paddingPx,_=(i5+1)*.5*o0,h=(1-oe)*.5*g0,p=Math.min(Math.max(_,xt),o0-xt),T=Math.min(Math.max(h,xt),g0-xt);i5=p/o0*2-1,oe=-(T/g0)*2+1;let P=Math.max(2,Y.near*4),D=Math.tan(Qe/2)*P,N=D*K5,i0=t5.clone().add(O0.clone().multiplyScalar(P)).add(u0.clone().multiplyScalar(i5*N)).add(fe.clone().multiplyScalar(oe*D));f.visible=!0,f.position.copy(i0);let b0=Math.atan2(S0,Z0);f.material.rotation=b0-Math.PI/2;let h0=Math.tan(Qe/2)*2*P*(me.ARROW.pixelSize*r/g0);return f.scale.set(h0,h0,1),!1}function p0(Y){return Y.distanceTo(A.position)}function A0(Y,o0,g0,U0){let O0=p0(Y);X(Y,o0.fov,O0,U0);let $0=Math.round(O0/V3)*V3;$0!==d&&(d=$0,O(l,`${Math.max(0,$0)}m`));let u0=m0(o0,g0,U0);return j(u0),u0}function n0(){let Y=v.material;if(Y.map?.dispose(),Y.dispose(),f){f.parent&&f.parent.remove(f);let o0=f.material;o0.map?.dispose(),o0.dispose()}f=void 0,m=void 0,g=void 0,b=void 0}return{group:A,sprite:v,enableOffscreenArrow:d0,setArrowParent:l0,updateForCamera:A0,setColor:I,setLabel:G,updateDistanceText:O,setVisible:j,setPosition:J,dispose:n0}}function Q3(){let n=globalThis.devicePixelRatio||1,e=Math.min(n,mv);return me.CANVAS_SCALE*e}function j3(){return Math.round(me.CANVAS_SIZE*Q3())}function Q1(n,e,t,r,i){let s=n.width,o=Q3(),a=n.getContext("2d");a.clearRect(0,0,s,s);let v=s/2,l=Math.round(s*me.LAYOUT.DOT_Y),c=Math.round(s*.05*i),d=Math.max(2,Math.round(4*o*i)),f=c+d;a.beginPath(),a.arc(v,l,f,0,Math.PI*2),a.fillStyle=`#${e.toString(16).padStart(6,"0")}`,a.fill(),a.textAlign="center",a.textBaseline="middle";let m=Math.round(s*.08*i),g=Math.round(s*.06*i);a.font=`800 ${m}px mojangles`,a.lineWidth=Math.max(2,Math.round(3*o*i));let b=Math.round(s*me.LAYOUT.NAME_Y);a.strokeStyle="black",a.strokeText(t,v,b),a.fillStyle="white",a.fillText(t,v,b),a.font=`800 ${g}px mojangles`,a.lineWidth=Math.max(2,Math.round(2*o*i));let w=Math.round(s*me.LAYOUT.DISTANCE_Y);a.strokeStyle="black",a.strokeText(r,v,w),a.fillStyle="#CCCCCC",a.fillText(r,v,w)}var K1=class{constructor(e){this.worldRenderer=e;u(this,"waypoints",new Map);u(this,"waypointScene",new Ue.Scene);u(this,"lastCameraPosition",new Ue.Vector3);u(this,"lastUpdateTime",0);u(this,"UPDATE_THROTTLE_MS",16)}updateWaypoints(){let e=performance.now(),t=this.worldRenderer.getCameraPosition(),r=this.lastCameraPosition.distanceTo(t)>.5,i=e-this.lastUpdateTime>this.UPDATE_THROTTLE_MS;if(!r&&!i)return;this.lastCameraPosition.copy(t),this.lastUpdateTime=e;let s=this.worldRenderer.renderer.getSize(new Ue.Vector2);for(let o of this.waypoints.values()){let a=new Ue.Vector3(o.x,o.y,o.z),v=t.distanceTo(a),l=(!o.minDistance||v>=o.minDistance)&&(o.maxDistance===1/0||v<=o.maxDistance);o.sprite.setVisible(l),l&&(o.sprite.setPosition(this.worldRenderer.sceneOrigin.toSceneX(o.x),this.worldRenderer.sceneOrigin.toSceneY(o.y),this.worldRenderer.sceneOrigin.toSceneZ(o.z)),o.sprite.updateForCamera(this.worldRenderer.getCameraPosition(),this.worldRenderer.camera,s.width,s.height))}}render(){this.waypoints.size!==0&&(this.updateWaypoints(),this.worldRenderer.renderer.render(this.waypointScene,this.worldRenderer.camera))}addWaypoint(e,t,r,i,s={}){this.removeWaypoint(e);let o=s.color??16711680,{label:a,metadata:v}=s,l=s.minDistance??0,c=s.maxDistance??1/0,d=Y3({position:new Ue.Vector3(t,r,i),color:o,label:a||e,metadata:v});d.enableOffscreenArrow(!0),d.setArrowParent(this.waypointScene),this.waypointScene.add(d.group),this.waypoints.set(e,{id:e,x:t+.5,y:r+.5,z:i+.5,minDistance:l,maxDistance:c,color:o,label:a,sprite:d})}removeWaypoint(e){let t=this.waypoints.get(e);t&&(this.waypointScene.remove(t.sprite.group),t.sprite.dispose(),this.waypoints.delete(e))}clear(){for(let e of this.waypoints.keys())this.removeWaypoint(e)}testWaypoint(){this.addWaypoint("Test Point",0,70,0,{color:65280,label:"Test Point"}),this.addWaypoint("Spawn",0,64,0,{color:16776960,label:"Spawn"}),this.addWaypoint("Far Point",100,70,100,{color:255,label:"Far Point"}),this.addWaypoint("Far Point 2",180,170,100,{color:255,label:"Far Point 2"}),this.addWaypoint("Far Point 3",1e3,100,1e3,{color:255,label:"Far Point 3"})}getWaypoint(e){return this.waypoints.get(e)}getAllWaypoints(){return[...this.waypoints.values()]}setWaypointColor(e,t){let r=this.waypoints.get(e);r&&(r.sprite.setColor(t),r.color=t)}setWaypointLabel(e,t){let r=this.waypoints.get(e);r&&(r.label=t,r.sprite.setLabel(t))}};E();x();k();R();import*as x0 from"three";import{Vec3 as G5}from"vec3";var E0=class E0{constructor(e){this.worldRenderer=e;u(this,"explosions",new Map);u(this,"particleGeometry");u(this,"particleMaterials",[]);u(this,"testModeTimer");u(this,"explosionCounter",0);this.particleGeometry=new x0.BoxGeometry(E0.DEFAULT_PARTICLE_SIZE,E0.DEFAULT_PARTICLE_SIZE,E0.DEFAULT_PARTICLE_SIZE),this.createParticleMaterials()}createParticleMaterials(){let e=[16711680,65280,255,16776960,16711935,65535,16753920,8388736,16761035,16777215];for(let t of e){let r=new x0.MeshBasicMaterial({color:t,transparent:!0,opacity:1});this.particleMaterials.push(r)}}getRandomMaterial(){return this.particleMaterials[Math.floor(Math.random()*this.particleMaterials.length)]}createExplosion(e,t=1,r,i=E0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],a=Math.floor(E0.DEFAULT_PARTICLE_COUNT*t),v;if(E0.DEBUG_SHOW_EXPLOSION_CENTER){let c=.5*t,d=new x0.SphereGeometry(c,8,8),f=new x0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});v=new x0.Mesh(d,f),v.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(v),v.position.set(e.x,e.y,e.z)}for(let c=0;c<a;c++){let d=Math.random()*Math.PI*2,f=Math.sqrt(Math.random())*E0.VELOCITY_FACTOR*t,m=new G5(f*Math.cos(d),Math.random()*.5-.25,f*Math.sin(d));c<5;let g=r===void 0?this.getRandomMaterial().clone():new x0.MeshBasicMaterial({color:r,transparent:!0,opacity:1}),b=new x0.Mesh(this.particleGeometry,g);b.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(b),b.position.set(e.x,e.y,e.z),c<5;let w={position:e.clone(),velocity:m,color:new x0.Color(g.color),life:1,maxLife:1,mesh:b};o.push(w)}let l={id:s,position:e.clone(),particles:o,startTime:Date.now(),duration:i,size:t,debugSphere:v};return this.explosions.set(s,l),l}createExplosionFacingCamera(e,t=1,r,i=E0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],a=Math.floor(E0.DEFAULT_PARTICLE_COUNT*t),v;if(E0.DEBUG_SHOW_EXPLOSION_CENTER){let f=.5*t,m=new x0.SphereGeometry(f,8,8),g=new x0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});v=new x0.Mesh(m,g),v.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(v),v.position.set(e.x,e.y,e.z)}let l=this.worldRenderer.getCameraPosition(),c=new G5(l.x-e.x,l.y-e.y,l.z-e.z).normalize();for(let f=0;f<a;f++){let m=Math.random()*Math.PI*2,g=Math.sqrt(Math.random())*E0.VELOCITY_FACTOR*t,b=new G5(g*Math.cos(m),g*Math.sin(m),0),w=new G5(b.x*c.x-b.z*c.z,b.y,b.x*c.z+b.z*c.x);f<5;let y=r===void 0?this.getRandomMaterial().clone():new x0.MeshBasicMaterial({color:r,transparent:!0,opacity:1}),A=new x0.Mesh(this.particleGeometry,y);A.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(A),A.position.set(e.x,e.y,e.z);let C={position:e.clone(),velocity:w,color:new x0.Color(y.color),life:1,maxLife:1,mesh:A};o.push(C)}let d={id:s,position:e.clone(),particles:o,startTime:Date.now(),duration:i,size:t,debugSphere:v};return this.explosions.set(s,d),d}explode(e,t=1,r,i){return this.createExplosion(e,t,r,i).id}explodeFacingCamera(e,t=1,r,i){return this.createExplosionFacingCamera(e,t,r,i).id}startTestMode(){let e=this.worldRenderer.getCameraPosition(),t=new G5(e.x,e.y+10,e.z);this.testModeTimer=setInterval(()=>{let r=.8+Math.random()*.4,i=[16711680,65280,255,16776960,16711935,65535,16753920],s=i[Math.floor(Math.random()*i.length)];this.explodeFacingCamera(t,r,s)},E0.TEST_INTERVAL)}updateParticle(e,t,r){let i=e.mesh.position.x===e.position.x&&e.mesh.position.y===e.position.y&&e.mesh.position.z===e.position.z;i&&e.life>.95,e.velocity.y+=E0.GRAVITY;let s=e.position.clone(),o=t/1e3;e.position.add(e.velocity.scaled(o)),e.mesh.position.set(e.position.x,e.position.y,e.position.z);let a=e.life;e.life-=t/r;let v=Math.max(0,e.life);if(e.mesh.material instanceof x0.MeshBasicMaterial&&(e.mesh.material.opacity=v),i&&a>.95){let l=e.position.distanceTo(s)}return e.life>0}render(){let e=Date.now(),t=16.67;this.explosions.size>0&&Math.random()<.01;for(let[r,i]of this.explosions.entries()){let s=e-i.startTime;if(s>=i.duration){this.removeExplosion(r);continue}s%2e3<16,i.particles=i.particles.filter(o=>this.updateParticle(o,t,i.duration)),i.particles.length===0&&this.removeExplosion(r)}}removeExplosion(e){let t=this.explosions.get(e);if(t){for(let r of t.particles)this.worldRenderer.sceneOrigin.removeAndUntrack(r.mesh),r.mesh.material instanceof x0.Material&&r.mesh.material.dispose();t.debugSphere&&(this.worldRenderer.sceneOrigin.removeAndUntrack(t.debugSphere),t.debugSphere.geometry.dispose(),t.debugSphere.material instanceof x0.Material&&t.debugSphere.material.dispose()),this.explosions.delete(e)}}stopTestMode(){this.testModeTimer&&(clearInterval(this.testModeTimer),this.testModeTimer=void 0)}destroy(){this.stopTestMode();for(let e of this.explosions.keys())this.removeExplosion(e);for(let e of this.particleMaterials)e.dispose();this.particleGeometry.dispose()}};u(E0,"DEFAULT_PARTICLE_COUNT",50),u(E0,"DEFAULT_PARTICLE_SIZE",.05),u(E0,"DEFAULT_EXPLOSION_DURATION",6e3),u(E0,"GRAVITY",-.005),u(E0,"VELOCITY_FACTOR",1.5),u(E0,"TEST_INTERVAL",1e3),u(E0,"DEBUG_SHOW_EXPLOSION_CENTER",!0),u(E0,"DEBUG_SHOW_PARTICLE_TRAILS",!1);var J1=E0;E();x();k();R();import*as ut from"three";import{Vec3 as Di}from"vec3";var q1=class n{constructor(e,t,r,i){this.worldRenderer=e;this.updateCamera=t;this.updateFov=r;this.getInitialState=i;u(this,"isRunning",!1);u(this,"currentScript",null);u(this,"currentPointIndex",0);u(this,"currentTweens",[]);u(this,"startTime",0);u(this,"totalDuration",0);u(this,"currentPosition",{x:0,y:0,z:0});u(this,"currentRotation",{yaw:0,pitch:0});u(this,"currentFov",75)}startScript(e){if(this.isRunning||!e.points||e.points.length===0)return!1;this.currentScript=e,this.isRunning=!0,this.currentPointIndex=0,this.startTime=performance.now(),this.totalDuration=e.points.reduce((r,i)=>r+i.duration,0);let t=this.getInitialState();return this.currentPosition={x:t.position.x,y:t.position.y,z:t.position.z},this.currentRotation={yaw:t.yaw,pitch:t.pitch},this.currentFov=t.fov,this.moveToPoint(0),!0}stopScript(){if(this.isRunning){for(let e of this.currentTweens)e.stop();this.currentTweens=[],this.isRunning=!1,this.currentScript=null,this.currentPointIndex=0}}runExampleScripts(e){let t=this.worldRenderer.getCameraPosition(),r=new Di(t.x,t.y,t.z),i=n.createCircularFlyby(r,30,20,15e3),s=n.createSpiralDescent(r.offset(0,50,0),r,3,12e3),o=n.createBuildingTour([{pos:r.offset(-20,10,-20),lookAt:r,duration:3e3},{pos:r.offset(20,15,-20),lookAt:r,duration:3e3},{pos:r.offset(20,20,20),lookAt:r,duration:3e3},{pos:r.offset(-20,25,20),lookAt:r,duration:3e3}]),a=[i,s,o];return this.startScript(a[e]),{circular:i,spiral:s,buildingTour:o}}moveToPoint(e){if(!this.currentScript||e>=this.currentScript.points.length){this.handleScriptComplete();return}let t=this.currentScript.points[e],{duration:r}=t,i={x:t.x,y:t.y,z:t.z},s={yaw:t.yaw,pitch:t.pitch},o=t.fov??this.currentFov;if(t.lookAt){let d=new ut.Vector3(t.lookAt.x,t.lookAt.y,t.lookAt.z),f=new ut.Vector3(t.x,t.y,t.z),m=d.sub(f).normalize();s.yaw=Math.atan2(-m.x,-m.z),s.pitch=Math.asin(m.y)}let a=this.getEasingFunction(t.easing||"easeInOut"),v=new F0(this.currentPosition).to(i,r).easing(a).onUpdate(()=>{this.updateCamera(new Di(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),l=new F0(this.currentRotation).to(this.wrapRotation(s),r).easing(a).onUpdate(()=>{this.updateCamera(new Di(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),c=null;if(Math.abs(o-this.currentFov)>.1){let d={fov:this.currentFov};c=new F0(d).to({fov:o},r).easing(a).onUpdate(()=>{this.currentFov=d.fov,this.updateFov(this.currentFov)})}this.currentTweens=[v,l],c&&this.currentTweens.push(c),v.start(),l.start(),c?.start(),v.onComplete(()=>{this.currentPointIndex++,this.currentScript?.onPointReached?.(e,t),this.isRunning&&this.moveToPoint(this.currentPointIndex)})}wrapRotation(e){let t=e.yaw,r=t-this.currentRotation.yaw;r>Math.PI?t-=2*Math.PI:r<-Math.PI&&(t+=2*Math.PI);let i=Math.max(-Math.PI/2+.01,Math.min(Math.PI/2-.01,e.pitch));return{yaw:t,pitch:i}}getEasingFunction(e){switch(e){case"linear":return H0.Linear.None;case"easeIn":return H0.Quadratic.In;case"easeOut":return H0.Quadratic.Out;case"easeInOut":return H0.Quadratic.InOut;case"smoothstep":return H0.Cubic.InOut;case"bounce":return H0.Bounce.Out;default:return H0.Quadratic.InOut}}handleScriptComplete(){if(!this.currentScript)return;let e=this.currentScript;e.loop?(this.currentPointIndex=0,this.moveToPoint(0)):(e.onComplete?.(),this.stopScript())}get running(){return this.isRunning}get progress(){if(!this.isRunning||this.totalDuration===0)return 0;let e=performance.now()-this.startTime;return Math.min(e/this.totalDuration,1)}get currentScriptName(){return this.currentScript?.name}static createCircularFlyby(e,t,r,i){let s=[];for(let a=0;a<=8;a++){let v=a/8*Math.PI*2,l=e.x+Math.cos(v)*t,c=e.z+Math.sin(v)*t,d=e.y+r;s.push({x:l,y:d,z:c,yaw:v+Math.PI/2,pitch:-.2,duration:i/8,easing:"smoothstep",lookAt:{x:e.x,y:e.y,z:e.z}})}return{name:"Circular Flyby",points:s,loop:!1}}static createSpiralDescent(e,t,r,i){let s=[],o=r*8,a=20;for(let v=0;v<=o;v++){let l=v/o,c=l*r*Math.PI*2,d=ut.MathUtils.lerp(e.x,t.x,l)+Math.cos(c)*a*(1-l),f=ut.MathUtils.lerp(e.z,t.z,l)+Math.sin(c)*a*(1-l),m=ut.MathUtils.lerp(e.y,t.y,l);s.push({x:d,y:m,z:f,yaw:c+Math.PI/2,pitch:-.3*l,duration:i/o,easing:"easeInOut"})}return{name:"Spiral Descent",points:s,loop:!1}}static createBuildingTour(e){return{name:"Building Tour",points:e.map((r,i)=>({x:r.pos.x,y:r.pos.y,z:r.pos.z,yaw:0,pitch:0,duration:r.duration||3e3,easing:"smoothstep",lookAt:r.lookAt?{x:r.lookAt.x,y:r.lookAt.y,z:r.lookAt.z}:void 0})),loop:!1}}};E();x();k();R();import*as e0 from"three";var zi=.75,Z1=class{constructor(e,t,r){this.scene=e;this.defaultSkybox=t;this.initialImage=r;u(this,"texture",null);u(this,"mesh",null);u(this,"skyMesh",null);u(this,"voidMesh",null);u(this,"worldTime",0);u(this,"partialTicks",0);u(this,"viewDistance",4);u(this,"temperature",zi);u(this,"inWater",!1);u(this,"waterBreathing",!1);u(this,"fogBrightness",0);u(this,"prevFogBrightness",0);u(this,"fogOrangeness",0);u(this,"distanceFactor",2.7);u(this,"brightnessAtPosition",1);u(this,"debugGui");this.debugGui=new Te("skybox_renderer",this,["temperature","worldTime","inWater","waterBreathing","fogOrangeness","brightnessAtPosition","distanceFactor"],{brightnessAtPosition:{min:0,max:1,step:.01},temperature:{min:0,max:1,step:.01},worldTime:{min:0,max:24e3,step:1},fogOrangeness:{min:-1,max:1,step:.01},distanceFactor:{min:0,max:5,step:.01}}),r||this.createGradientSky()}async init(){this.initialImage&&await this.setSkyboxImage(this.initialImage)}async setSkyboxImage(e){this.texture&&this.texture.dispose();let t=new e0.TextureLoader;if(this.texture=await new Promise(r=>{t.load(e,i=>{i.mapping=e0.EquirectangularReflectionMapping,i.encoding=e0.sRGBEncoding,i.minFilter=e0.NearestFilter,i.magFilter=e0.NearestFilter,i.needsUpdate=!0,r(i)})}),this.mesh)this.mesh.material.map=this.texture,this.mesh.material.needsUpdate=!0;else{let r=new e0.SphereGeometry(500,60,40);r.scale(-1,1,1);let i=new e0.MeshBasicMaterial({map:this.texture,side:e0.FrontSide});this.mesh=new e0.Mesh(r,i),this.scene.add(this.mesh)}}update(e,t){t!==this.viewDistance&&(this.viewDistance=t,this.updateSkyColors()),this.mesh?this.mesh.position.set(0,0,0):this.skyMesh&&(this.skyMesh.position.set(0,0,0),this.voidMesh?.position.set(0,0,0),this.updateSkyColors())}updateTime(e,t=0){this.debugGui.visible||(this.worldTime=e,this.partialTicks=t,this.updateSkyColors())}updateViewDistance(e){this.viewDistance=e,this.updateSkyColors()}updateTemperature(e){this.debugGui.visible||(this.temperature=e,this.updateSkyColors())}updateWaterState(e,t){this.debugGui.visible||(this.inWater=e,this.waterBreathing=t,this.updateSkyColors())}updateDefaultSkybox(e){this.debugGui.visible||(this.defaultSkybox=e,this.updateSkyColors())}createGradientSky(){{let r=new e0.PlaneGeometry(768,768);r.rotateX(-Math.PI/2),r.translate(0,16,0);let i=new e0.MeshBasicMaterial({color:16777215,side:e0.DoubleSide,depthTest:!1});this.skyMesh=new e0.Mesh(r,i),this.scene.add(this.skyMesh)}{let r=new e0.PlaneGeometry(768,768);r.rotateX(-Math.PI/2),r.translate(0,-16,0);let i=new e0.MeshBasicMaterial({color:16777215,side:e0.DoubleSide,depthTest:!1});this.voidMesh=new e0.Mesh(r,i),this.scene.add(this.voidMesh)}this.updateSkyColors()}getFogColor(e=0){let t=this.getCelestialAngle(e),r=Math.cos(t*Math.PI*2)*2+.5;r=Math.max(0,Math.min(1,r));let i=.7529412,s=.84705883,o=1;return i*=r*.94+.06,s*=r*.94+.06,o*=r*.91+.09,new e0.Vector3(i,s,o)}getSkyColor(e=0,t=0,r=0){let i=this.getCelestialAngle(r),s=Math.cos(i*3.141593*2)*2+.5;s<0&&(s=0),s>1&&(s=1);let o=this.getTemperature(e,t),a=this.getSkyColorByTemp(o),v=(a>>16&255)/255,l=(a>>8&255)/255,c=(a&255)/255;return new e0.Vector3(v*s,l*s,c*s)}calculateCelestialAngle(e,t){let i=(e%24e3+t)/24e3-.25;return i<0&&i++,i>1&&i--,i=1-(Math.cos(i*Math.PI)+1)/2,i+=(i-i)/3,i}getCelestialAngle(e){return this.calculateCelestialAngle(this.worldTime,e)}getTemperature(e,t){return this.temperature}getSkyColorByTemp(e){e/=3,e<-1&&(e=-1),e>1&&(e=1);let t=.6222222-e*.05,i=this.fogOrangeness>0?t+(.12-t)*this.fogOrangeness*.8:t+this.fogOrangeness*.1,s=.5+e*.1+Math.abs(this.fogOrangeness)*.3;return this.hsbToRgb(i,s,1)}hsbToRgb(e,t,r){let i=0,s=0,o=0;if(t===0)i=s=o=Math.floor(r*255+.5);else{let a=(e-Math.floor(e))*6,v=a-Math.floor(a),l=r*(1-t),c=r*(1-t*v),d=r*(1-t*(1-v));switch(Math.floor(a)){case 0:i=Math.floor(r*255+.5),s=Math.floor(d*255+.5),o=Math.floor(l*255+.5);break;case 1:i=Math.floor(c*255+.5),s=Math.floor(r*255+.5),o=Math.floor(l*255+.5);break;case 2:i=Math.floor(l*255+.5),s=Math.floor(r*255+.5),o=Math.floor(d*255+.5);break;case 3:i=Math.floor(l*255+.5),s=Math.floor(c*255+.5),o=Math.floor(r*255+.5);break;case 4:i=Math.floor(d*255+.5),s=Math.floor(l*255+.5),o=Math.floor(r*255+.5);break;case 5:i=Math.floor(r*255+.5),s=Math.floor(l*255+.5),o=Math.floor(c*255+.5);break}}return 4278190080|i<<16|s<<8|Math.trunc(o)}updateSkyColors(){if(!this.skyMesh||!this.voidMesh)return;if(!this.defaultSkybox){this.skyMesh.visible=!1,this.voidMesh.visible=!1,this.mesh&&(this.mesh.visible=!1);return}this.skyMesh.visible=!0,this.voidMesh.visible=!0,this.mesh&&(this.mesh.visible=!0),this.prevFogBrightness=this.fogBrightness;let e=this.viewDistance/32,t=this.brightnessAtPosition*(1-e)+e;if(this.fogBrightness+=(t-this.fogBrightness)*.1,this.inWater){let g=this.waterBreathing?100:5;this.scene.fog=new e0.Fog(new e0.Color(0,0,1),.0025,g),this.scene.background=new e0.Color(0,0,1),this.skyMesh.material.color.set(new e0.Color(0,0,1)),this.voidMesh.material.color.set(new e0.Color(0,0,.6));return}let r=this.viewDistance*16,i=1-(.25+.75*this.viewDistance/32)**.25,s=this.getCelestialAngle(this.partialTicks),o=this.getSkyColor(0,0,this.partialTicks),a=this.getFogColor(this.partialTicks),v=Math.cos(s*Math.PI*2)*2+.5,l=Math.max(0,Math.min(1,v)),c=this.prevFogBrightness+(this.fogBrightness-this.prevFogBrightness)*this.partialTicks,d=(a.x+(o.x-a.x)*i)*l*c,f=(a.y+(o.y-a.y)*i)*l*c,m=(a.z+(o.z-a.z)*i)*l*c;this.scene.background=new e0.Color(d,f,m),this.scene.fog=new e0.Fog(new e0.Color(d,f,m),.0025,r*this.distanceFactor),this.skyMesh.material.color.set(new e0.Color(o.x,o.y,o.z)),this.voidMesh.material.color.set(new e0.Color(o.x*.2+.04,o.y*.2+.04,o.z*.6+.1))}dispose(){this.texture&&this.texture.dispose(),this.mesh&&(this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.scene.remove(this.mesh)),this.skyMesh&&(this.skyMesh.geometry.dispose(),this.skyMesh.material.dispose(),this.scene.remove(this.skyMesh)),this.voidMesh&&(this.voidMesh.geometry.dispose(),this.voidMesh.material.dispose(),this.scene.remove(this.voidMesh))}};E();x();k();R();import*as r0 from"three";var pv=`
21457
+ f 71/216/54 68/215/54 67/214/54 72/213/54`;var pi={allay:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAV1BMVEUAAAA4jNkuh9Ypg9FBnNpCm9r///+c/P+A/P9k+/9N8/hM6f9Q2f8+5eo94PdG0P821+4s1ewiz/8syf8ox/8bxPNNq+wQwf8os+hCnNpCm9oep9s0h8D7j8AOAAAABnRSTlMAoKCg3PODq/XXAAAA60lEQVR42tWP0W7DIAxFb9OtwdA6xQ3rzZL//84BD0nRljzsZdqxZCx8hLio3Lz4GwtYMWLDi4jnPM+vwogNKTTC43Elr6vgRMQ1wvM5ktsbvRPXN38wGxKHMmnI9M65vgxavwsg2WCpCvlSg6iqlCF4ceKbFEGZVC+5NFFXYUtxZzILl1xmiffoxUcA5DUHKULZp6iqsQzU6KNWYcxBUMnp8A2mwWxAhTPR0qRYFs6sDT+zTMZpWj5pO8L0wamexJ9xXvm10J27rrQ94dSdOqC0PSFXPV4JRuwRzIxGHMB38O14j4N9Wf4/vgDzpRGDwkNeQQAAAABJRU5ErkJggg==",axolotl:"data:image/png;base64,iVBOR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lQoyvcJAJwPE3zmry79zIbTlcuHCEbVdpE2tb62iTSZM8ttBJdCkZ4UZG3lRKZHRh+OItgQYebSGj0t7Fzb5RAhmIRBcM464xPvTf20BsqVGtbw5/2P95vN8NoPEamiQP4TCsAAIMUe97oXmo/d7rQCzijITq2QYiSkwAAFilWim9LT6+vrchwRBd7BUKAvBQZM/itIBhyi8CyCoUGV4lwA7okXE1IZ71NKCRFn6fnuBCrRUFpbISSTUnUTKoA363Uv8KKUkluFApOqKBcVMhbUpCykKpVdCCnL4sAQJKF8K9hJXZbleSEW87K059OcRIQ+GYR8mkxre14sjua2TqakF7R+txVwYELK6fz4GDseJwhRNApbEjIlx8tlMhwlREIU9sDYyX4B2Jsd4eGGjPnk79eF7v1N/+oaQnpuvrm5ITPnvD9be8Uov+DATXMLKem5++nujiSZ83W+/oqDMJVm9LP3t1yMJySLrC5z/wUHjjD6aeX5gvQ8/vb4SMjbk18u4mdhBLLQzjmddZ9dTvBTuCekyZOWtHi+MsY4pLWOEGqEJJuHzYaQszyZkbZFpaNt16EhhLuFIhuEoDF78ZP9A0Obf2KBegjhAAAAAElFTkSuQmCC",guardian:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAhFBMVEX///+rjEZQjnQtWUcAAADX1c/Y1cvX1czX1MzX08vW083X08rW08vX0snW0snV0crAuq7Auq3Auaq+ua3dkET/gi+DpZy5k2Syk0/wdyjecipqlYPsZCqFhmBmiYDLZSNdf3XeSSh4dVCmXCxOeWbUQSDKPBxBcVpkW1BgVko5ZVJ5CxKoxgN0AAAABXRSTlMAAAAAAMJrBrEAAAOASURBVHjapZaJcttIDAW5lvfIHtnLYiLDee4kzwsL+///F45I66AkW467akSoIHRhhjOkuq5bLper4fL/wHAhiscBItiMIYSgm+j76GOga1xdXXWD4PNy2epHQ9q1HrAz0+mneCswfeB+K/i8Wi6HsZoEA4vFojtP4E1vO8GmvvWw5QUBEd4TrFabBj53F9LbEfZOcLt8WN2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kJKFiYt1g4ludXlsdHhham5SVVZNUVI/QkMaGx04QmSDAAAAAXRSTlMAQObYZgAAATFJREFUeNrtk9FuwyAMRVMa7jWzwf3/rx3QLmsiOlpV2lOPk+BYypFRzLIs53A6hXA617sSzsurEABTSkRPsLxGAIEYI0ACiCAC4tqp5fbARGApJavRsLoggLHGyrWvmAoOIPSWtiamgmw7MgIhcQuAM0G+U+TcBERcY+wNgJwJPO9wBAq3Blo+E+wM7ghSIRqkVGaCPV3w9RsTQUVAMRMC+MlkUHusISVfLlkoW8ZRbRmTRFXNTG9YZ1wdCoTqXsy8dNysuJtQ7Z6JoBTV0rlmrk3gB0zHW2gCU7XS6ZlrugrKxp+Ccuyg3ATljscC0eLtM/d+aX+tVfOy46GAQwGfFsiwA5HnBRwK+O4W/k/w/m+U4SDJ84MkMhxlmY7y8TCVGy8fpsR+WnXDGuPq8mHIN8fuL8tkDiT4AAAAAElFTkSuQmCC",parrot:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAP1BMVEUAAAD/////7nn/6j3/5TPGxsa7u7vZra23t7ewsLCoqKienp6ZmZmWlpaRkZGQkJD3cwmGhoYlJSUPDw8AAAD7udxiAAAAAXRSTlMAQObYZgAAANJJREFUeNrN0tEKwjAMBdDGxpnbZqtx/v+32jYMN9QKPnkhYdBDk0EDHSIQ0CGBDkEV/pFgahtgBhxEZu7nSGj1Ajg6SAmpVQe4M98hgHCMVUAgqklbObgyXwGhXczUWlXg10Z+bj/4i3X19gra1KJrDfVGakcARdFyqyEHS353w35J2oGiBRO8++miqrU2MJdZIN6pJy+Lz3Cgs04yeaees6qeByMypZQo548jLDdl9mnE8D18B+EyBiG4+AGMduBwCi2/g+BiAAJ/BTwEW/4XPABsMA1LwNN2rAAAAABJRU5ErkJggg==",piglin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAWlBMVEUAAAD/gID/////7aj/5bX12iryuobMzIPC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LqmGwhjS1Bh4scAMiQPgCZnse2zdmqbiHkS2Qm2URG11iEict47T6gAbRObaNvYNjhpbIyxzIsw42War8a4U/M8Nod5vQdibNs4DC0MGzNgpzGlJEiTLfMQUIwYNo68I3WexO2BdgCgQ3awNVlJuzrcGpP5FVkhckCIRLGLuwVaTaopJLyBGuK9gPmptRbfNFMc1qozZfFCglQKoIgDOeagA7Ym3zEOXa7MN1gASBBRlQwZQ96JOBwF4MCeidg5puQ4YMELPNgO5UeXsWVEgAYVJlMALkIBKIAAwHnH0SI8FE2xybddYr5tmzZFJAwAeWYIorcACzE5KC4wBwDLYVgu24gwPeR57KlFHpN1XRsiZgehACKz2wUJ+xnOF7uu/1pcL77Kq6caZUD2/0ZFAk9zM9XrfYvrb1L1TPXvNbFnhwqQEPOKZbVKaZW0aWIpvy+bZVOypUYT7vFx9tGz9zOcFuDN/+gIHIEjcASOwBH44cB/1lQM4ZNhKecAAAAASUVORK5CYII="};E();x();k();R();import*as z0 from"three";var gi=class{constructor(e,t){this.object=e;this.animations=t;d(this,"clock",new z0.Clock);d(this,"animatedObjects",new Set);d(this,"state")}createAnimationState(){let e=new z0.AnimationMixer(this.object),t=new Map;for(let r of this.animations)t.set(r.name,e.clipAction(r));return this.state={mixer:e,animations:this.animations,actions:t,speed:1,loop:!0},this.object.traverse(r=>{if(r instanceof z0.Mesh||r instanceof z0.Line||r instanceof z0.Points||r instanceof z0.Sprite){let i=r.onBeforeRender;r.onBeforeRender=(s,o,v,a,l,c)=>{let u=this.clock.getDelta();e.update(u),i?.(s,o,v,a,l,c)}}}),this.animatedObjects.add(this.object),this.state}playAnimation(e,t,r){let i=this.state.actions.get(e);if(!i)return!1;this.state.mixer.stopAllAction();let s=t??this.state.loop;return i.setLoop(s?z0.LoopRepeat:z0.LoopOnce,1/0),i.clampWhenFinished=!s,r===void 0?i.timeScale=this.state.speed:i.timeScale=r,i.reset().fadeIn(.1).play(),!0}updateAnimationParams(e,t){e!==void 0&&(this.state.speed=e),t!==void 0&&(this.state.loop=t);for(let r of this.state.actions.values())e!==void 0&&(r.timeScale=e),t!==void 0&&(r.setLoop(t?z0.LoopRepeat:z0.LoopOnce,1/0),r.clampWhenFinished=!t)}stopAnimations(){this.state.mixer.stopAllAction()}getDelta(){return this.clock.getDelta()}};function Zo(n,e){let t=new gi(n,e);return t.createAnimationState(),t}function a4(n){return"parts"in n&&Array.isArray(n.parts)?n.parts:[n]}var v4={up:{dir:[0,1,0],u0:[0,0,1],v0:[0,0,0],u1:[1,0,1],v1:[0,0,1],corners:[[0,1,1,0,0],[1,1,1,1,0],[0,1,0,0,1],[1,1,0,1,1]]},down:{dir:[0,-1,0],u0:[1,0,1],v0:[0,0,0],u1:[2,0,1],v1:[0,0,1],corners:[[1,0,1,0,0],[0,0,1,1,0],[1,0,0,0,1],[0,0,0,1,1]]},east:{dir:[1,0,0],u0:[0,0,0],v0:[0,0,1],u1:[0,0,1],v1:[0,1,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],u0:[1,0,1],v0:[0,0,1],u1:[1,0,2],v1:[0,1,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],u0:[0,0,1],v0:[0,0,1],u1:[1,0,1],v1:[0,1,1],corners:[[1,0,0,0,1],[0,0,0,1,1],[1,1,0,0,0],[0,1,0,1,0]]},south:{dir:[0,0,1],u0:[1,0,2],v0:[0,0,1],u1:[2,0,2],v1:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};function Xo(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function l4(n,e,t,r,i=!1,s=64,o=64,v=!1,a=[]){let l=new q.Euler(0,0,0);r.rotation&&(l.x=-r.rotation[0]*Math.PI/180,l.y=-r.rotation[1]*Math.PI/180,l.z=-r.rotation[2]*Math.PI/180);for(let{dir:c,corners:u,u0:f,v0:m,u1:g,v1:y}of Object.values(v4)){let w=Math.floor(n.positions.length/3),b=c[0]!==0,A=[];for(let C of u){let M,S;i?(M=(r.uv[0]+C[3]*r.size[0])/s,S=(r.uv[1]+C[4]*r.size[1])/o):(M=(r.uv[0]+Xo(C[3]?g:f,r.size))/s,S=(r.uv[1]+Xo(C[4]?y:m,r.size))/o);let H=b&&v?C[0]^1:C[0],B=C[1],I=b&&v?C[2]^1:C[2],G=r.inflate??0,O=new q.Vector3(r.origin[0]+H*r.size[0]+(H?G:-G),r.origin[1]+B*r.size[1]+(B?G:-G),r.origin[2]+I*r.size[2]+(I?G:-G));O=O.applyEuler(l),O=O.sub(t.position),O=O.applyEuler(t.rotation),O=O.add(t.position),n.positions.push(O.x,O.y,O.z),n.normals.push(c[0],c[1],c[2]),A.push(M,S),n.skinIndices.push(e,0,0,0),n.skinWeights.push(1,0,0,0)}if(v)for(let C=0;C+1<u.length;C+=2){let M=C*2,S=A.slice(M,M+4);A[M]=S[2],A[M+1]=S[b?1:3],A[M+2]=S[0],A[M+3]=S[b?3:1]}n.uvs.push(...A),n.indices.push(w,w+1,w+2,w+2,w+1,w+3)}}function Oe(n,e,t,r={},i={}){let s=t.texturewidth??64,o=t.textureheight??64,v,a=e.startsWith("block:"),l=n?.material.map;if(a){if(!n)throw new Error("worldRenderer is required for block textures");let A=e.slice(6),C=n.resourcesManager.currentResources.blocksAtlasJson.textures[A];C&&(s=l?.image.width??s,o=l?.image.height??o,v=[C.u,C.v])}let c={},u={positions:[],normals:[],uvs:[],indices:[],skinIndices:[],skinWeights:[]},f=0;for(let A of t.bones){let C=new q.Bone;if(A.pivot&&(C.position.x=A.pivot[0],C.position.y=A.pivot[1],C.position.z=A.pivot[2]),A.bind_pose_rotation?(C.rotation.x=-A.bind_pose_rotation[0]*Math.PI/180,C.rotation.y=-A.bind_pose_rotation[1]*Math.PI/180,C.rotation.z=-A.bind_pose_rotation[2]*Math.PI/180):A.rotation&&(C.rotation.x=-A.rotation[0]*Math.PI/180,C.rotation.y=-A.rotation[1]*Math.PI/180,C.rotation.z=-A.rotation[2]*Math.PI/180),r.rotation?.[A.name]&&(C.rotation.x-=(r.rotation[A.name].x??0)*Math.PI/180,C.rotation.y-=(r.rotation[A.name].y??0)*Math.PI/180,C.rotation.z-=(r.rotation[A.name].z??0)*Math.PI/180),C.name=`bone_${A.name}`,c[A.name]=C,A.cubes)for(let M of A.cubes){let S=[];l4(u,f,C,M,a,s,o,A.mirror,S),S.length&&(i.errors??(i.errors=[]),i.errors.push(...S.map(H=>`Bone ${A.name}: ${H}`)))}f++}let m=[];for(let A of t.bones)A.parent&&c[A.parent]?c[A.parent].add(c[A.name]):m.push(c[A.name]);let g=new q.Skeleton(Object.values(c)),y=new q.BufferGeometry;y.setAttribute("position",new q.Float32BufferAttribute(u.positions,3)),y.setAttribute("normal",new q.Float32BufferAttribute(u.normals,3)),y.setAttribute("uv",new q.Float32BufferAttribute(u.uvs,2)),y.setAttribute("skinIndex",new q.Uint16BufferAttribute(u.skinIndices,4)),y.setAttribute("skinWeight",new q.Float32BufferAttribute(u.skinWeights,4)),y.setIndex(u.indices);let w=new q.MeshLambertMaterial({transparent:!0,alphaTest:.1,side:q.DoubleSide}),b=new q.SkinnedMesh(y,w);if(b.add(...m),b.bind(g),b.scale.set(1/16,1/16,1/16),v){let A=l.clone();A.offset.set(v[0],v[1]),A.needsUpdate=!0,w.map=A}else n1(e,A=>{w.map||(A.magFilter=q.NearestFilter,A.minFilter=q.NearestFilter,A.flipY=!1,A.wrapS=q.RepeatWrapping,A.wrapT=q.RepeatWrapping,w.map=A)},()=>{let A=w.map.image.width;A&&s!==A&&(w.map.repeat.x=s/A);let C=w.map.image.height;C&&o!==C&&(w.map.repeat.y=o/C),w.needsUpdate=!0});return b}var c4=[{pattern:"furnace_minecart",target:"minecart"},{pattern:"spawner_minecart",target:"minecart"},{pattern:"chest_minecart",target:"minecart"},{pattern:"hopper_minecart",target:"minecart"},{pattern:"command_block_minecart",target:"minecart"},{pattern:"tnt_minecart",target:"minecart"},{pattern:"glow_item_frame",target:"item_frame"},{pattern:"glow_squid",target:"squid"},{pattern:"trader_llama",target:"llama"},{pattern:"chest_boat",target:"boat"},{pattern:"spectral_arrow",target:"arrow"},{pattern:"husk",target:"zombie"},{pattern:"zombie_horse",target:"horse"},{pattern:"donkey",target:"horse"},{pattern:"skeleton_horse",target:"horse"},{pattern:"mule",target:"horse"},{pattern:"ocelot",target:"cat"},{pattern:/_minecraft$/,target:"minecraft"},{pattern:/_boat$/,target:"boat"},{pattern:/_raft$/,target:"boat"},{pattern:/_horse$/,target:"horse"},{pattern:/_zombie$/,target:"zombie"},{pattern:/_arrow$/,target:"zombie"}];function $o(n){for(let e of c4)if(typeof e.pattern=="string"){if(e.pattern===n)return e.target}else if(e.pattern.test(n))return e.target}var e3=n=>fo[n],t3={zombie:1.85,husk:1.85,arrow:.0025},d4={zombie:new T1(0,1,0),husk:new T1(0,1,0),boat:new T1(0,-1,0),arrow:new T1(0,-.9,0)},Te=class{constructor(e,t,r,i={},s={}){d(this,"mesh");d(this,"animations");d(this,"animationControllers",[]);let o=t,v=$o(t);if(v&&(t=v,s.tempMap=v),i.customModel){let l=a4(i.customModel);this.mesh=new q.Object3D;for(let c=0;c<l.length;c++){let{modelPath:u,modelType:f,metadata:m}=l[c],g=new q.Object3D;switch(g.name=`custom_part_${c}`,f){case"gltf":{new t4().parseAsync(u,"").then(w=>{if(g.add(w.scene),m?.scale){let b=m.scale;g.scale.set(b,b,b)}if(m?.offset){let{x:b=0,y:A=0,z:C=0}=m.offset;g.position.set(b,A,C)}if(m?.texture){let b=new q.TextureLoader().load(m.texture);b.minFilter=q.NearestFilter,b.magFilter=q.NearestFilter,g.traverse(A=>{A instanceof q.Mesh&&(A.material=new q.MeshBasicMaterial({map:b,transparent:!0,alphaTest:.1}))})}if(w.animations?.length){this.animations=[...this.animations??[],...w.animations];let b=Zo(g,w.animations);this.animationControllers.push(b);let A=m?.animation,C=m?.animationLoop??!0;A?b.playAnimation(A,C):b.playAnimation(w.animations[0].name,C)}}).catch(w=>{});break}case"obj":{let w=new Lt().parse(u);if(m?.scale){let{scale:b}=m;w.scale.set(b,b,b)}if(m?.offset){let{x:b=0,y:A=0,z:C=0}=m.offset;w.position.set(b,A,C)}if(m?.texture){let b=new q.TextureLoader().load(m.texture);b.minFilter=q.NearestFilter,b.magFilter=q.NearestFilter;let A=new q.MeshBasicMaterial({map:b,transparent:!0,alphaTest:.1});w.traverse(C=>{C instanceof q.Mesh&&(C.material=A)})}g.add(w);break}case"bedrock":{let y=JSON.parse(u);if(m?.scale&&g.scale.set(m.scale,m.scale,m.scale),m?.offset){let{x:w=0,y:b=0,z:A=0}=m.offset;g.position.set(w,b,A)}for(let[w,b]of Object.entries(y.geometry)){let A=m?.textures?.[w]??y.textures?.[w];if(!A)continue;let C=Oe(r,A.endsWith(".png")||A.startsWith("data:image/")||A.startsWith("block:")?A:A+".png",b,i,s);C.name=`geometry_${w}`,g.add(C)}break}}this.mesh.add(g)}s.type=l.length===1?l[0].modelType:"special";return}if(Ut[t]){let l=new Lt,c={zombie_horse:`textures/${e}/entity/horse/horse_zombie.png`,husk:r4,skeleton_horse:`textures/${e}/entity/horse/horse_skeleton.png`,donkey:`textures/${e}/entity/horse/donkey.png`,mule:`textures/${e}/entity/horse/mule.png`,ocelot:i4,arrow:n4,spectral_arrow:s4,tipped_arrow:o4},u=c[o]||c[t];u&&(s.textureMap=!0);let f=u||pi[t];if(pi[t]&&(s.isHardcodedTexture=!0),!f)throw new Error(`No texture for ${t}`);let m=new q.TextureLoader().load(f);m.minFilter=q.NearestFilter,m.magFilter=q.NearestFilter;let g=new q.MeshBasicMaterial({map:m,transparent:!0,alphaTest:.1}),y=l.parse(Ut[t]),w=t3[o]||t3[t];w&&y.scale.set(w,w,w);let b=d4[o];b&&y.position.set(b.x,b.y,b.z),y.traverse(A=>{A instanceof q.Mesh&&(A.material=g,A.name==="Head layer"&&(A.visible=!1),A.name==="Head"&&i.rotation?.head&&(A.rotation.x-=(i.rotation.head.x??0)*Math.PI/180,A.rotation.y-=(i.rotation.head.y??0)*Math.PI/180,A.rotation.z-=(i.rotation.head.z??0)*Math.PI/180))}),this.mesh=y,s.type="obj";return}let a=e3(t);if(a){this.mesh=new q.Object3D;for(let[l,c]of Object.entries(a.geometry)){let u=i.textures?.[l]??a.textures[l];if(!u)continue;let f=Oe(r,u.endsWith(".png")||u.startsWith("data:image/")||u.startsWith("block:")?u:u+".png",c,i,s);f.name=`geometry_${l}`,this.mesh.add(f)}s.type="bedrock"}}playAnimation(e,t=!1){if(!this.animationControllers.length)return;let r=!1;for(let i of this.animationControllers)i.playAnimation(e,t)&&(r=!0)}update(e){}static getStaticData(e){if(e=$o(e)||e,Ut[e])return{boneNames:[]};let t=e3(e);if(!t)throw new Error(`Unknown entity ${e}`);return{boneNames:Object.values(t.geometry).flatMap(r=>r.name)}}};globalThis.EntityMesh=Te;E();x();k();R();var Gt=n=>Math.max(0,Math.min(1,n)),r3=(n,e,t)=>Math.max(e,Math.min(t,n)),ee=(n,e,t)=>n+(e-n)*t,f4=n=>(n=(n+Math.PI)%(Math.PI*2),n<0&&(n+=Math.PI*2),n-Math.PI);function h4(n){let e=n?.elytra;if(!e)return;if(typeof e.updateRightWing=="function"){e.updateRightWing();return}if(typeof e.updateRightWingRotation=="function"){e.updateRightWingRotation();return}let t=e.leftWing,r=e.rightWing;!t?.rotation||!r?.rotation||typeof r.rotation.copy=="function"&&(r.rotation.copy(t.rotation),r.rotation.z*=-1)}var M1=class extends g1{constructor(){super(...arguments);d(this,"switchAnimationCallback");d(this,"isRunning",!1);d(this,"isMoving",!0);d(this,"isCrouched",!1);d(this,"moveAmount",0);d(this,"runAmount",0);d(this,"lookYaw",0);d(this,"lookPitch",0);d(this,"_dt",0);d(this,"_phase",0);d(this,"_idlePhase",0);d(this,"_moveBlend",0);d(this,"_runBlend",0);d(this,"_crouchBlend",0);d(this,"_lookYawBlend",0);d(this,"_lookPitchBlend",0);d(this,"_swingTime",null);d(this,"_swingDuration",.25);d(this,"_defaults",null)}update(t,r){this._dt=r,super.update(t,r)}swingArm(){this._swingTime=0}resetLocomotion(){this._moveBlend=0,this._runBlend=0,this._crouchBlend=0,this._phase=0}_captureDefaults(t){let r=t?.skin;this._defaults={playerRot:t?.rotation?.clone?.(),bodyPos:r?.body?.position?.clone?.(),bodyRot:r?.body?.rotation?.clone?.(),leftArmPos:r?.leftArm?.position?.clone?.(),leftArmRot:r?.leftArm?.rotation?.clone?.(),rightArmPos:r?.rightArm?.position?.clone?.(),rightArmRot:r?.rightArm?.rotation?.clone?.(),leftLegPos:r?.leftLeg?.position?.clone?.(),leftLegRot:r?.leftLeg?.rotation?.clone?.(),rightLegPos:r?.rightLeg?.position?.clone?.(),rightLegRot:r?.rightLeg?.rotation?.clone?.(),headPos:r?.head?.position?.clone?.(),headRot:r?.head?.rotation?.clone?.(),capePos:t?.cape?.position?.clone?.(),capeRot:t?.cape?.rotation?.clone?.(),elytraPos:t?.elytra?.position?.clone?.(),elytraRot:t?.elytra?.rotation?.clone?.()}}_applyDefaults(t){let r=this._defaults;if(!r)return;let i=t?.skin,s=t?.cape,o=t?.elytra;r.playerRot&&t?.rotation&&t.rotation.copy(r.playerRot),r.bodyPos&&i?.body?.position&&i.body.position.copy(r.bodyPos),r.bodyRot&&i?.body?.rotation&&i.body.rotation.copy(r.bodyRot),r.leftArmPos&&i?.leftArm?.position&&i.leftArm.position.copy(r.leftArmPos),r.leftArmRot&&i?.leftArm?.rotation&&i.leftArm.rotation.copy(r.leftArmRot),r.rightArmPos&&i?.rightArm?.position&&i.rightArm.position.copy(r.rightArmPos),r.rightArmRot&&i?.rightArm?.rotation&&i.rightArm.rotation.copy(r.rightArmRot),r.leftLegPos&&i?.leftLeg?.position&&i.leftLeg.position.copy(r.leftLegPos),r.leftLegRot&&i?.leftLeg?.rotation&&i.leftLeg.rotation.copy(r.leftLegRot),r.rightLegPos&&i?.rightLeg?.position&&i.rightLeg.position.copy(r.rightLegPos),r.rightLegRot&&i?.rightLeg?.rotation&&i.rightLeg.rotation.copy(r.rightLegRot),r.headPos&&i?.head?.position&&i.head.position.copy(r.headPos),r.headRot&&i?.head?.rotation&&i.head.rotation.copy(r.headRot),r.capePos&&s?.position&&s.position.copy(r.capePos),r.capeRot&&s?.rotation&&s.rotation.copy(r.capeRot),r.elytraPos&&o?.position&&o.position.copy(r.elytraPos),r.elytraRot&&o?.rotation&&o.rotation.copy(r.elytraRot)}animate(t){let r=this._dt||0;this._defaults||this._captureDefaults(t),this._applyDefaults(t);let i=typeof this.moveAmount=="number"?this.moveAmount:this.isMoving?1:0,s=typeof this.runAmount=="number"?this.runAmount:this.isRunning?1:0,o=Gt(i),v=Gt(s),a=this.isCrouched?1:0,l=Math.min(1,r*8),c=Math.min(1,r*6),u=Math.min(1,r*7);this._moveBlend+=(o-this._moveBlend)*l,this._runBlend+=(v-this._runBlend)*c,this._crouchBlend+=(a-this._crouchBlend)*u;let f=Gt(this._moveBlend),m=Gt(this._runBlend),g=Gt(this._crouchBlend),y=ee(8,10,m),w=ee(1,.55,g),b=y*w;this._phase+=r*b*f,this._phase+=r*b*f,this._idlePhase+=r*1.15;let A=this._phase+(m>.5?Math.PI*.5:0);if(this.switchAnimationCallback&&Math.abs(Math.sin(A))<.02){let O=this.switchAnimationCallback;this.switchAnimationCallback=null,O?.()}p4(t,g);let C=80*Math.PI/180,M=75*Math.PI/180,S=r3(f4(this.lookYaw||0),-C,C),H=r3(this.lookPitch||0,-M,M),B=Math.min(1,r*14);this._lookYawBlend+=(S-this._lookYawBlend)*B,this._lookPitchBlend+=(H-this._lookPitchBlend)*B,t?.skin?.head?.rotation&&(t.skin.head.rotation.y+=this._lookYawBlend,t.skin.head.rotation.x+=this._lookPitchBlend);let I=(1-f)*(1-.25*m);if(I>1e-4&&t?.skin){let G=Math.sin(this._idlePhase);t.skin.body.rotation.x+=G*.02*I,t.skin.head.rotation.x+=-G*.015*I,t.skin.leftArm.rotation.x+=G*.03*I,t.skin.rightArm.rotation.x+=-G*.03*I,t?.cape?.rotation&&(t.cape.rotation.x+=Math.sin(this._idlePhase*.7)*.03*I)}if(f>1e-4&&t?.skin){let G=ee(1,.85,g),O=ee(1,.7,g),j=Math.sin(A)*.5,J=Math.sin(A+Math.PI)*.5,X=Math.cos(A+Math.PI)*1.3,t0=Math.cos(A)*1.3;t.skin.leftLeg.rotation.x+=ee(j,X,m)*f*G,t.skin.rightLeg.rotation.x+=ee(J,t0,m)*f*G;let d0=Math.sin(A+Math.PI)*.5,l0=Math.sin(A)*.5,m0=Math.cos(A)*1.5,p0=Math.cos(A+Math.PI)*1.5;t.skin.leftArm.rotation.x+=ee(d0,m0,m)*f*O,t.skin.rightArm.rotation.x+=ee(l0,p0,m)*f*O;let E0=Math.PI*.02,n0=Math.PI*.1,Y=ee(E0,n0,m),o0=Math.cos(A)*.03+E0,g0=Math.cos(A+Math.PI)*.03-E0,G0=Math.cos(A)*.1+n0,O0=Math.cos(A+Math.PI)*.1-n0;t.skin.leftArm.rotation.z+=(ee(o0,G0,m)*f+Y*.15*f)*O,t.skin.rightArm.rotation.z+=(ee(g0,O0,m)*f-Y*.15*f)*O,this._defaults?.playerRot&&(t.rotation.z=this._defaults.playerRot.z+Math.cos(A+Math.PI)*.01*m*f);let Z0=ee(Math.PI*.06,Math.PI*.3,m),u0=ee(Math.sin(A/1.5)*.06,Math.sin(A*2)*.1,m);t?.cape?.rotation&&(t.cape.rotation.x+=(Z0+u0)*f)}if(this._swingTime!==null){this._swingTime+=r;let G=Math.min(this._swingTime/this._swingDuration,1);m4.animate(G,t,f>.2),G>=1&&(this._swingTime=null)}}},m4={animate(n,e,t){if(!e?.skin?.rightArm?.rotation)return;let r=n*18;if(e.skin.rightArm.rotation.x=-.4537860552*2+2*Math.sin(r+Math.PI)*.3,!t){let i=.01*Math.PI+.06;e.skin.rightArm.rotation.z=-Math.cos(r)*.403+i,e.skin.body.rotation.y=-Math.cos(r)*.06,e.skin.leftArm.rotation.x=Math.sin(r+Math.PI)*.077,e.skin.leftArm.rotation.z=-Math.cos(r)*.015+.13-.05,e.skin.leftArm.position.z=Math.cos(r)*.3,e.skin.leftArm.position.x=5-Math.cos(r)*.05}}};function p4(n,e){let t=n?.skin,r=n?.cape,i=n?.elytra;if(!t||!r)return;let s=Gt(e),o=Math.abs(Math.sin(s*Math.PI/2));if(o<=1e-6)return;t.body.rotation.x+=.4537860552*o,t.body.position.z+=(1.3256181-3.4500310377)*o,t.body.position.y+=-2.103677462*o,r.position.y+=-1.851236166577372*o,r.rotation.x+=.294220265771*o,r.position.z+=(3.786619432-3.4500310377)*o,i?.position&&i.position.copy(r.position),i?.rotation&&i.rotation.copy(r.rotation),i?.rotation&&(i.rotation.x-=10.8*Math.PI/180),i?.leftWing?.rotation&&(i.leftWing.rotation.z=ee(.72,.26179944+.4582006,o)),h4(n),t.head.position.y+=-3.618325234674*o;let v=.1*o,a=(3.618325234674-3.4500310377)*o,l=-2.53943318*o;t.leftArm.position.z+=a,t.rightArm.position.z+=a,t.leftArm.rotation.x+=.410367746202*o,t.rightArm.rotation.x+=.410367746202*o,t.leftArm.rotation.z+=v,t.rightArm.rotation.z+=-v,t.leftArm.position.y+=l,t.rightArm.position.y+=l,t.rightLeg.position.z+=-3.4500310377*o,t.leftLeg.position.z+=-3.4500310377*o}E();x();k();R();import{default as b4}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_1.png";import{default as y4}from"mc-assets/dist/other-textures/latest/models/armor/chainmail_layer_2.png";import{default as _4}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_1.png";import{default as w4}from"mc-assets/dist/other-textures/latest/models/armor/diamond_layer_2.png";import{default as A4}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_1.png";import{default as E4}from"mc-assets/dist/other-textures/latest/models/armor/gold_layer_2.png";import{default as x4}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_1.png";import{default as R4}from"mc-assets/dist/other-textures/latest/models/armor/iron_layer_2.png";import{default as k4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1.png";import{default as T4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_1_overlay.png";import{default as M4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2.png";import{default as S4}from"mc-assets/dist/other-textures/latest/models/armor/leather_layer_2_overlay.png";import{default as C4}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_1.png";import{default as B4}from"mc-assets/dist/other-textures/latest/models/armor/netherite_layer_2.png";import{default as P4}from"mc-assets/dist/other-textures/latest/models/armor/turtle_layer_1.png";import{default as n3}from"mc-assets/dist/other-textures/latest/entity/elytra.png";var Fe={skull:{bones:[{name:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,0,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},head:{bones:[{name:"armor",pivot:[0,12,0]},{name:"head",parent:"armor",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[0,0],inflate:1}]},{name:"overlay",parent:"head",pivot:[0,12,0],cubes:[{origin:[-4,23,-4],size:[8,8,8],uv:[32,0],inflate:1.2}]}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},chest:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:1}]},{name:"leftarm",parent:"armor",pivot:[5,10,0],cubes:[{origin:[4,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}]},{name:"rightarm",parent:"armor",pivot:[-5,10,0],cubes:[{origin:[-8,12,-2],size:[4,12,4],uv:[40,16],inflate:.85}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},legs:{bones:[{name:"armor",pivot:[0,12,0]},{name:"body",parent:"armor",pivot:[0,13,0],cubes:[{origin:[-4,12,-2],size:[8,12,4],uv:[16,16],inflate:.5}]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.5}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,0,-2.01],size:[4,12,4],uv:[0,16],inflate:.5}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32},feet:{bones:[{name:"armor",pivot:[0,12,0]},{name:"leftleg",parent:"armor",pivot:[1.9,1,0],cubes:[{origin:[-.1,0,-2],size:[4,12,4],uv:[0,16],inflate:.8}]},{name:"rightleg",parent:"armor",pivot:[-1.9,1,0],cubes:[{origin:[-3.9,.01,-2.01],size:[4,12,4],uv:[0,16],inflate:.8}],mirror:!0}],visible_bounds_width:1.5,visible_bounds_offset:[0,.5,0],texturewidth:64,textureheight:32}};var i3={leather_layer_1:k4,leather_layer_1_overlay:T4,leather_layer_2:M4,leather_layer_2_overlay:S4,chainmail_layer_1:b4,chainmail_layer_2:y4,iron_layer_1:x4,iron_layer_2:R4,diamond_layer_1:_4,diamond_layer_2:w4,golden_layer_1:A4,golden_layer_2:E4,netherite_layer_1:C4,netherite_layer_2:B4,turtle_layer_1:P4};var c3=Tt(re),I4=120,bi=n=>n*(Math.PI/180),yi=n=>Math.max(0,Math.min(1,n)),_i=(n,e,t)=>Math.max(e,Math.min(t,n)),Nt=n=>(n=(n+Math.PI)%(Math.PI*2),n<0&&(n+=Math.PI*2),n-Math.PI);function H4(n){return n<0&&(n=4294967295+n+1>>>0),n.toString(16)}function O4(n){if(n===void 0)return;if(parseInt(n,10)===0)return"rgba(0, 0, 0, 0)";let e=H4(parseInt(n,10));return e.length===8?`#${e.slice(2,8)}${e.slice(0,2)}`:`#${e}`}function s3(n,e){return n===void 0?e:n instanceof W.Quaternion?n:Array.isArray(n)?new W.Quaternion(n[0],n[1],n[2],n[3]):new W.Quaternion(n.x,n.y,n.z,n.w)}function ge(n,e){return n===void 0?e??new W.Euler:n instanceof W.Euler?n:n.yaw!==void 0&&n.pitch!==void 0&&n.roll!==void 0?new W.Euler(-bi(n.pitch),-bi(n.yaw),bi(n.roll),"ZYX"):n.x!==void 0&&n.y!==void 0&&n.z!==void 0?new W.Euler(n.z,n.y,n.x,"ZYX"):Array.isArray(n)?new W.Euler(n[0],n[1],n[2]):e??new W.Euler}var S1=Math.PI*2;function o3(n,e){let t=((e-n)%S1+S1)%S1;return t>Math.PI?t-S1:t}function d3({username:n,nameTagBackgroundColor:e="rgba(0, 0, 0, 0.3)",nameTagTextOpacity:t=255},{fontFamily:r="mojangles"},i){let s=V0(64,64),o=l3(i),v=s.getContext("2d");if(!v)throw new Error("Could not get 2d context");let a=48,l=5;v.font=`${a}px ${r}`;let c=String(typeof n=="string"?n:new o(n).toString()).split(`
21458
+ `),u=0;for(let m of c){let g=v.measureText(m).width+l*2;g>u&&(u=g)}if(s.width=u,s.height=(a+l)*c.length,v.fillStyle=e,v.fillRect(0,0,s.width,s.height),v.globalAlpha=t/255,!!Ir(n,o,s,a,"white",-l+a))return v.globalAlpha=1,s}globalThis.getUsernameTexture=d3;var B1=(n,e,t,r)=>{for(let a of t.children)a.name==="nametag"&&a.removeFromParent();if(n.username===void 0||n.username===null||(typeof n.username=="string"?n.username:new(l3(r))(n.username).toString()).startsWith("EMPTY"))return;let s=d3(n,e,r);if(!s)return;let o=new W.Texture(s);o.needsUpdate=!0;let v;if(n.nameTagFixed){let a=new W.PlaneGeometry,l=new W.MeshBasicMaterial({map:o});l.transparent=!0,v=new W.Mesh(a,l),v.rotation.set(n.pitch,W.MathUtils.degToRad(n.yaw+180),0),v.position.y+=n.height+.3}else{let a=new W.SpriteMaterial({map:o});v=new W.Sprite(a),v.position.y+=n.height+.6}return v.renderOrder=1e3,v.scale.set(s.width*.005,s.height*.005,1),n.nameTagRotationRight&&v.applyQuaternion(n.nameTagRotationRight),n.nameTagScale&&v.scale.multiply(n.nameTagScale),n.nameTagRotationLeft&&v.applyQuaternion(n.nameTagRotationLeft),n.nameTagTranslation&&v.position.add(n.nameTagTranslation),v.name="nametag",t.add(v),v},a3={},F4=n=>n.charAt(0)===n.charAt(0).toUpperCase();function D4(n,e,t,r,i){if(e.name)try{let l=(F4(e.name)?ci(e.name):e.name).toLowerCase(),c=new Te("1.16.4",l,t,i);if(c.mesh)return B1(e,r,c.mesh,t.version),c.mesh}catch(l){reportError?.(l)}if(!n||!(0,v3.isEntityAttackable)(n,e))return;let s=new W.BoxGeometry(e.width,e.height,e.width);s.translate(0,e.height/2,0);let o=new W.MeshBasicMaterial({color:16711935}),v=new W.Mesh(s,o);return(a3[e.name]=(a3[e.name]||0)+1)<6&&B1({username:e.name,height:e.height},r,v,t.version),v}var P1=class{constructor(e,t){this.worldRenderer=e;this.mcData=t;d(this,"entities",{});d(this,"playerEntity",null);d(this,"entitiesOptions",{fontFamily:"mojangles"});d(this,"debugMode");d(this,"onSkinUpdate");d(this,"clock",new W.Clock);d(this,"currentlyRendering",!0);d(this,"cachedMapsImages",{});d(this,"itemFrameMaps",{});d(this,"pendingModelOverrides",new Map);d(this,"motionCache",new Map);d(this,"_wasThirdPerson",!1);d(this,"_tpBodyYaw",0);d(this,"_tpHasBodyYaw",!1);d(this,"uuidPerSkinUrlsCache",{});d(this,"currentSkinUrls",{});d(this,"loadedSkinEntityIds",new Set);d(this,"playerPerAnimation",{});this.debugMode="none",this.onSkinUpdate=()=>{},this.watchResourcesUpdates()}updateAutoWalkFlags(e,t,r,i){if(!t.playerObject?.animation)return;let s=t.playerObject.animation;if(r<=0)return;let o=i??t.position,v=this.motionCache.get(e);if(!v){this.motionCache.set(e,{pos:o.clone(),speed:0}),s.isMoving=!1,s.isRunning=!1,s.moveAmount=0,s.runAmount=0;return}let a=o.x-v.pos.x,l=o.z-v.pos.z;v.pos.copy(o);let c=Math.hypot(a,l)/Math.max(r,1e-6),u=1-Math.exp(-r*12);v.speed+=(c-v.speed)*u;let f=v.speed,m=(M,S,H)=>{let B=yi((H-M)/(S-M));return B*B*(3-2*B)},g=.08,y=.6,w=4.3,b=5.6,A=m(g,y,f),C=m(w,b,f);s.moveAmount=A,s.runAmount=C,s.isMoving=A>.15,s.isRunning=C>.55}getLocalSneak(){let e=this.worldRenderer.playerStateReactive;return e?.movementState==="SNEAKING"||e?.movementState==="CROUCHING"||!!e?.isSneaking||!!e?.sneaking||!!e?.isCrouching||!!e?.crouching||!!e?.controls?.sneak||!!e?.controlState?.sneak}updateThirdPersonHeadAndBody(e,t){let r=e.playerObject?.animation,i=this.worldRenderer.cameraShake.getBaseRotation(),s=i.yaw,o=i.pitch,v=yi(r?.moveAmount??(r?.isMoving?1:0)),a=yi(r?.runAmount??(r?.isRunning?1:0)),l=v>.15;if(this._tpHasBodyYaw||(this._tpHasBodyYaw=!0,this._tpBodyYaw=s),l){let g=1-Math.exp(-t*(18+10*a));this._tpBodyYaw=this._tpBodyYaw+Nt(s-this._tpBodyYaw)*g,e.rotation.set(0,this._tpBodyYaw,0);let y=(25-8*a)*Math.PI/180,w=_i(Nt(s-this._tpBodyYaw),-y,y);r&&"lookYaw"in r&&(r.lookYaw=w),r&&"lookPitch"in r&&(r.lookPitch=-o);return}let c=85*Math.PI/180,u=55*Math.PI/180,f=Nt(s-this._tpBodyYaw);f=_i(f,-c,c);let m=Math.abs(f)-u;if(m>0){let g=m/(c-u),y=s-Math.sign(f)*u,w=1-Math.exp(-t*(6+10*g));this._tpBodyYaw=this._tpBodyYaw+Nt(y-this._tpBodyYaw)*w,f=Nt(s-this._tpBodyYaw),f=_i(f,-c,c)}else{let g=1-Math.exp(-t*5);this._tpBodyYaw=this._tpBodyYaw+Nt(s-this._tpBodyYaw)*(g*.15)}e.rotation.set(0,this._tpBodyYaw,0),r&&"lookYaw"in r&&(r.lookYaw=f),r&&"lookPitch"in r&&(r.lookPitch=-o)}get entitiesByName(){let e={};for(let t of Object.values(this.entities))t.realName&&(e[t.realName]=e[t.realName]||[],e[t.realName].push(t));return e}get entitiesRenderingCount(){return Object.values(this.entities).filter(e=>e.visible).length}getDebugString(){let e=Object.keys(this.entities).length,t=this.entitiesRenderingCount,r=Object.values(this.entities).filter(s=>s.playerObject),i=r.filter(s=>s.visible);return`${t}/${e} ${i.length}/${r.length}`}handlePlayerEntity(e){if(!this.playerEntity){let t=new W.Group;t.originalEntity={...e,name:"player"};let r=new W.Group,i=this.setupPlayerObject(e,r,{});t.playerObject=i,t.add(r),t.name="player_entity",this.playerEntity=t,this.worldRenderer.scene.add(t),this.updatePlayerSkin(e.id,e.username,e.uuid??void 0,re)}this.playerEntity.originalEntity={...e,name:"player"},e.position&&(this.worldRenderer.sceneOrigin.getWorldPosition(this.playerEntity)||this.worldRenderer.sceneOrigin.track(this.playerEntity),this.playerEntity.position.set(e.position.x,e.position.y,e.position.z)),e.yaw!==void 0&&(this.playerEntity.rotation.y=e.yaw),this.updateEntityEquipment(this.playerEntity,e)}clear(){for(let e of Object.values(this.entities))this.worldRenderer.sceneOrigin.removeAndUntrack(e),k0(e);this.entities={},this.currentSkinUrls={},this.motionCache.clear(),this._wasThirdPerson=!1,this._tpHasBodyYaw=!1,this.playerEntity&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.playerEntity),k0(this.playerEntity),this.playerEntity=null)}reloadEntities(){for(let e of Object.values(this.entities))this.update({...e.originalEntity,delete:!0},{}),this.update(e.originalEntity,{})}watchResourcesUpdates(){this.worldRenderer.resourcesManager.on("assetsTexturesUpdated",()=>this.reloadEntities()),this.worldRenderer.resourcesManager.on("assetsInventoryReady",()=>this.reloadEntities())}setDebugMode(e,t=null){this.debugMode=e;for(let r of t?[t]:Object.values(this.entities)){let i=r.children.find(s=>s.name==="debug");i.visible=!1,this.debugMode==="basic"&&(i.visible=!0)}}setRendering(e,t=null){this.currentlyRendering=e;for(let r of t?[t]:Object.values(this.entities))e?this.worldRenderer.scene.children.includes(r)||this.worldRenderer.scene.add(r):this.worldRenderer.scene.remove(r)}playEntityModelAnimation(e,t,r=!1){let i=this.entities[e];i&&i.traverse(s=>{s instanceof Te&&s.playAnimation(t,r)})}render(){let e=this.worldRenderer.worldRendererConfig.renderEntities;e!==this.currentlyRendering&&this.setRendering(e);let t=this.clock.getDelta(),r=Math.min(t,1/30),i=this.worldRenderer.viewerChunkPosition,s=10*10,o=this.worldRenderer.playerStateUtils.isThirdPerson();if(o!==this._wasThirdPerson){this._wasThirdPerson=o;let v=String(this.playerEntity?.originalEntity.id??"player_entity");this.motionCache.delete(v);let a=this.playerEntity?.playerObject?.animation;a?.resetLocomotion&&a.resetLocomotion(),this._tpHasBodyYaw=!1}for(let[v,a]of[...Object.entries(this.entities),["player_entity",this.playerEntity]]){if(!a)continue;let l=v==="player_entity",c=String(l?this.playerEntity?.originalEntity.id??"player_entity":v);if(l)if(a.visible=o,o){let f=this.worldRenderer.playerStateReactive.eyeHeight;a.position.set(this.worldRenderer.cameraWorldPos.x,this.worldRenderer.cameraWorldPos.y-f,this.worldRenderer.cameraWorldPos.z);let m=this.worldRenderer.playerStateReactive.position;if(m&&typeof m.x=="number")this.updateAutoWalkFlags(c,a,t,new W.Vector3(m.x,m.y,m.z));else{let g=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,t,g?new W.Vector3(g.x,g.y,g.z):a.position)}this.updateThirdPersonHeadAndBody(a,r)}else{let f=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,t,f?new W.Vector3(f.x,f.y,f.z):a.position)}else{let f=this.worldRenderer.sceneOrigin.getWorldPosition(a);this.updateAutoWalkFlags(c,a,t,f?new W.Vector3(f.x,f.y,f.z):a.position)}let{playerObject:u}=a;if(u?.animation){let f=u.animation,g=(Number(a.originalEntity?.metadata?.[0]??0)&2)!==0,y=this.getLocalSneak();"isCrouched"in f&&(f.isCrouched=l?y:g),u.animation.update(u,r)}if(a.traverse(f=>{f instanceof Te&&f.update(r)}),!l&&i&&a.position){let f=a.position.x-i.x,m=a.position.y-i.y,g=a.position.z-i.z,y=f*f+m*m+g*g;a.visible=!!(y<s||this.worldRenderer.shouldObjectVisible(a)),this.maybeRenderPlayerSkin(v)}a.visible&&this.syncArmorPositions(a)}}syncArmorPositions(e){e.playerObject&&e.traverse(t=>{if(!t.name.startsWith("geometry_armor_"))return;let{skin:r}=e.playerObject;switch(t.name){case"geometry_armor_head":t.children[0]?.children[0]&&t.children[0].children[0].rotation.set(-r.head.rotation.x,r.head.rotation.y,r.head.rotation.z,r.head.rotation.order);break;case"geometry_armor_legs":t.children[0]&&(t.children[0].children[2]&&t.children[0].children[2].rotation.set(-r.leftLeg.rotation.x,r.leftLeg.rotation.y,r.leftLeg.rotation.z,r.leftLeg.rotation.order),t.children[0].children[1]&&t.children[0].children[1].rotation.set(-r.rightLeg.rotation.x,r.rightLeg.rotation.y,r.rightLeg.rotation.z,r.rightLeg.rotation.order));break;case"geometry_armor_feet":t.children[0]&&(t.children[0].children[0]&&t.children[0].children[0].rotation.set(-r.rightLeg.rotation.x,r.rightLeg.rotation.y,r.rightLeg.rotation.z,r.rightLeg.rotation.order),t.children[0].children[1]&&t.children[0].children[1].rotation.set(-r.leftLeg.rotation.x,r.leftLeg.rotation.y,-r.leftLeg.rotation.z,r.leftLeg.rotation.order));break}})}getPlayerObject(e){return this.playerEntity?.originalEntity.id===e?this.playerEntity?.playerObject:this.entities[e]?.playerObject}isCanvasBlank(e){return!e.getContext("2d")?.getImageData(0,0,e.width,e.height).data.some(t=>t!==0)}async updatePlayerSkin(e,t,r,i,s=void 0){i!==re&&this.loadedSkinEntityIds.add(String(e)),r&&((typeof i=="string"||typeof s=="string")&&(this.uuidPerSkinUrlsCache[r]={}),typeof i=="string"&&(this.uuidPerSkinUrlsCache[r].skinUrl=i),typeof s=="string"&&(this.uuidPerSkinUrlsCache[r].capeUrl=s),i===!0&&(i=this.uuidPerSkinUrlsCache[r]?.skinUrl??i),s??(s=this.uuidPerSkinUrlsCache[r]?.capeUrl));let v=this.getPlayerObject(e);if(!v)return;if(i===!0){if(!t)return;let l=await Ie(t,"skin");if(!this.getPlayerObject(e)||!l)return;i=l}if(typeof i!="string")throw new Error("Invalid skin url");if(this.currentSkinUrls[String(e)]===i){if(s){if(s===!0&&t){let l=await Ie(t,"cape");if(!this.getPlayerObject(e)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(e,s)}return}i!==re&&(this.currentSkinUrls[String(e)]=i);let a=this.worldRenderer.worldRendererConfig.renderEars||t==="deadmau5";this.loadAndApplySkin(e,i,a).then(async()=>{if(s){if(s===!0&&t){let l=await Ie(t,"cape");if(!this.getPlayerObject(e)||!l)return;s=l}typeof s=="string"&&this.loadAndApplyCape(e,s)}}),v.cape.visible=!1,s||(v.backEquipment=null,v.elytra.map=null,v.cape.map&&v.cape.map.dispose(),v.cape.map=null)}async loadAndApplySkin(e,t,r){let i=this.getPlayerObject(e);if(i)try{let s;if(i=this.getPlayerObject(e),!i)return;let o,v;if(t===re){let l=await Ae(re);s=l.image,o=new W.CanvasTexture(l.canvas),v=l.canvas}else{let{canvas:l,image:c}=await Ae(t);s=c,o=new W.CanvasTexture(l),v=l}o.magFilter=W.NearestFilter,o.minFilter=W.NearestFilter,o.needsUpdate=!0,i.skin.map=o,i.skin.modelType=Cr(v),i.skin.isCustom=t!==re;let a;if(s?r&&(a=V0(64,64),Br(a,s),r=!this.isCanvasBlank(a)):r=!1,r){let l=new W.CanvasTexture(a);l.magFilter=W.NearestFilter,l.minFilter=W.NearestFilter,l.needsUpdate=!0,i.ears.map=l,i.ears.visible=!0}else i.ears.map=null,i.ears.visible=!1;this.onSkinUpdate?.()}catch{}}async loadAndApplyCape(e,t){let r=this.getPlayerObject(e);if(r)try{let{canvas:i,image:s}=await Ae(t);if(r=this.getPlayerObject(e),!r)return;Sr(i,s);let o=new W.CanvasTexture(i);o.magFilter=W.NearestFilter,o.minFilter=W.NearestFilter,o.needsUpdate=!0,r.cape.map=o,r.cape.visible=!0,r.elytra.map=o,this.onSkinUpdate?.(),r.backEquipment||(r.backEquipment="cape")}catch{}}debugSwingArm(){let e=Object.values(this.entities).find(r=>r.playerObject?.animation);if(!e||!e.playerObject?.animation)return;let t=e.playerObject.animation;t.swingArm&&t.swingArm()}playAnimation(e,t){let r=String(e);if(this.playerPerAnimation[r]===t)return;if(this.playerPerAnimation[r]=t,e==="player_entity"&&this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(t==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=t==="walking"||t==="running"||t==="crouchWalking",o.isRunning=t==="running",o.isCrouched=t==="crouch"||t==="crouchWalking")});return}let i=this.getPlayerObject(e);if(i){if(t==="oneSwing"){i.animation&&i.animation.swingArm&&i.animation.swingArm();return}i.animation&&i.animation.switchAnimationCallback!==void 0&&(i.animation.switchAnimationCallback=()=>{let s=i.animation;s&&(s.isMoving=t==="walking"||t==="running"||t==="crouchWalking",s.isRunning=t==="running",s.isCrouched=t==="crouch"||t==="crouchWalking")});return}if(this.playerEntity?.playerObject){let{playerObject:s}=this.playerEntity;if(t==="oneSwing"){s.animation&&s.animation.swingArm&&s.animation.swingArm();return}s.animation&&s.animation.switchAnimationCallback!==void 0&&(s.animation.switchAnimationCallback=()=>{let o=s.animation;o&&(o.isMoving=t==="walking"||t==="running"||t==="crouchWalking",o.isRunning=t==="running",o.isCrouched=t==="crouch"||t==="crouchWalking")})}}parseEntityLabel(e){if(e)try{if(e.type==="string")return e.value;let t=typeof e=="string"?B5.default.simplify(B5.default.parse(e)):Ai.simplify(e);return oi(t).map(this.textFromComponent).join("")}catch{return e}}textFromComponent(e){return typeof e=="string"?e:e.text??""}getItemMesh(e,t,r=!1,i){!e.nbt&&e.nbtData&&(e.nbt=e.nbtData);let s=this.worldRenderer.getItemRenderData(e,t);if(!(i&&i===s?.modelName)){if(s&&"resolvedModel"in s){let o=ys(this.worldRenderer.material,s.resolvedModel,s.modelName,this.worldRenderer.resourcesManager.currentResources.worldBlockProvider,this.worldRenderer.resourcesManager.currentResources.mcData),v=1;t["minecraft:display_context"]==="ground"?v=.5:t["minecraft:display_context"]==="thirdperson"&&(v=6),o.scale.set(v,v,v);let a=new W.Group;return a.add(o),{mesh:a,isBlock:!0,modelName:s.modelName}}if(s){let o=s.renderInfo?.texture==="blocks"?this.worldRenderer.material.map:this.worldRenderer.itemsTexture,{u:v,v:a,su:l,sv:c}=s,m=Qs(o,{u:v,v:a,sizeX:l??1,sizeY:c??1},{faceCamera:r,use3D:!r}),g=1;return t["minecraft:display_context"]==="ground"?g=.5:t["minecraft:display_context"]==="thirdperson"&&(g=6),m.mesh.scale.set(g,g,g),{mesh:m.mesh,isBlock:!1,modelName:s.modelName,cleanup:m.cleanup}}}}setVisible(e,t){t?e.scale.set(1,1,1):e.scale.set(0,0,0)}update(e,t){let r=e.name==="player";(e.name==="zombie_villager"||e.name==="husk")&&(t.texture=`textures/1.16.4/entity/${e.name==="zombie_villager"?"zombie_villager/zombie_villager.png":`zombie/${e.name}.png`}`),e.name==="glow_item_frame"&&(t.textures||(t.textures=[]),t.textures.background="block:glow_item_frame");let i=this.entities[e.id],s=!i;if(e.delete){if(!i)return;i.userData._posTween?.stop(),i.additionalCleanup&&i.additionalCleanup(),i.traverse(m=>{m.additionalCleanup&&m.additionalCleanup()}),this.onRemoveEntity(e),this.worldRenderer.sceneOrigin.removeAndUntrack(i),k0(i),delete this.entities[e.id];return}let o;if(i===void 0){this.beforeEntityAdded(e);let m=new W.Group;if(m.originalEntity=e,e.name==="item"||e.name==="tnt"||e.name==="falling_block"||e.name==="snowball"||e.name==="egg"||e.name==="ender_pearl"||e.name==="experience_bottle"||e.name==="splash_potion"||e.name==="lingering_potion"){let w=e.name==="tnt"||e.type==="projectile"?{name:e.name}:e.name==="falling_block"?{blockState:e.objectData}:e.metadata?.find(b=>typeof b=="object"&&b?.itemCount);if(w){let b=this.getItemMesh(w,{"minecraft:display_context":"ground"},e.type==="projectile");if(b){if(o=b.mesh,e.name==="item"||e.type==="projectile"?(o.scale.set(.5,.5,.5),o.position.set(0,e.name==="item"?.2:.1,0)):(o.scale.set(2,2,2),o.position.set(0,.5,0)),e.name==="item"){let A=new W.Clock;o.onBeforeRender=()=>{let C=A.getDelta();o.rotation.y+=C}}m.additionalCleanup=()=>{b.cleanup&&b.cleanup()}}}}else if(r){let w=new W.Group,b=this.setupPlayerObject(e,w,t);if(m.playerObject=b,o=w,e.username){let A=B1(e,{fontFamily:"mojangles"},w,this.worldRenderer.version);A&&(A.position.y=b.position.y+b.scale.y*16+3,A.scale.multiplyScalar(12))}}else o=D4(this.mcData,e,this.worldRenderer,this.entitiesOptions,{...t,customModel:e.customModel});if(!o)return;o.name="mesh";let g=e.pos??e.position;this.worldRenderer.sceneOrigin.track(m),m.position.set(g.x,g.y,g.z);let y=new W.BoxHelper(o,e.type==="hostile"?16711680:e.type==="mob"?65280:e.type==="player"?255:16753920);y.name="debug",m.add(o),m.add(y),y.visible=!1,this.worldRenderer.scene.add(m),i=m,i.name="entity",i.realName=e.name,this.entities[e.id]=i,r&&this.updatePlayerSkin(e.id,e.username,t?.texture?e.uuid:void 0,t?.texture||re),this.setDebugMode(this.debugMode,m),this.setRendering(this.currentlyRendering,m),this.afterAddEntity(e)}else o=i.children.find(m=>m.name==="mesh");this.updateEntityEquipment(i,e);let v=u3(e,this.mcData),a=(e.metadata?.[0]??0)&32||this.worldRenderer.playerStateReactive.cameraSpectatingEntity===e.id&&this.worldRenderer.playerStateUtils.isSpectator();for(let m of o.children??[])m.name!=="nametag"&&(m.visible=!a);v.baby?i.scale.set(.5,.5,.5):i.scale.set(1,1,1);let l=C1("text_display",e,this.mcData),c=l?.text||v.custom_name_visible&&v.custom_name;if(e.name!=="player"&&c){let m=l&&(l.billboard_render_constraints==="fixed"||!l.billboard_render_constraints),g=l&&!(parseInt(l.style_flags,10)&4)?O4(l.background_color):void 0,y;if(l?.text_opacity){let w=parseInt(l?.text_opacity,10);y=w>0?w:256-w}B1({...e,username:typeof c=="string"?B5.default.simplify(B5.default.parse(c)):Ai.simplify(c),nameTagBackgroundColor:g,nameTagTextOpacity:y,nameTagFixed:m,nameTagScale:l?.scale,nameTagTranslation:l&&(l.translation||new W.Vector3(0,0,0)),nameTagRotationLeft:s3(l?.left_rotation),nameTagRotationRight:s3(l?.right_rotation)},this.entitiesOptions,o,this.worldRenderer.version)}let u=C1("armor_stand",e,this.mcData);if(u){let m=(parseInt(u.client_flags,10)&1)!==0,g=(parseInt(u.client_flags,10)&4)!==0,y=(parseInt(u.client_flags,10)&8)===0,w=(parseInt(u.client_flags,10)&16)!==0;o.castShadow=!w,o.receiveShadow=!w,m?i.scale.set(.5,.5,.5):i.scale.set(1,1,1),i.traverse(b=>{switch(b.name){case"bone_baseplate":this.setVisible(b,y),b.rotation.y=-i.rotation.y;break;case"bone_head":u.head_pose&&b.setRotationFromEuler(ge(u.head_pose));break;case"bone_body":u.body_pose&&b.setRotationFromEuler(ge(u.body_pose));break;case"bone_rightarm":b.parent?.name!=="bone_armor"&&this.setVisible(b,g),u.left_arm_pose?b.setRotationFromEuler(ge(u.left_arm_pose)):b.setRotationFromEuler(ge({yaw:-10,pitch:-10,roll:0}));break;case"bone_leftarm":b.parent?.name!=="bone_armor"&&this.setVisible(b,g),u.right_arm_pose?b.setRotationFromEuler(ge(u.right_arm_pose)):b.setRotationFromEuler(ge({yaw:10,pitch:-10,roll:0}));break;case"bone_rightleg":u.left_leg_pose?b.setRotationFromEuler(ge(u.left_leg_pose)):b.setRotationFromEuler(ge({yaw:-1,pitch:-1,roll:0}));break;case"bone_leftleg":u.right_leg_pose?b.setRotationFromEuler(ge(u.right_leg_pose)):b.setRotationFromEuler(ge({yaw:1,pitch:1,roll:0}));break}})}let f=C1("item_frame",e,this.mcData);if(f||(f=C1("glow_item_frame",e,this.mcData)),f){let m=f?.item??e.metadata?.[8];if(o.scale.set(1,1,1),o.position.set(0,0,-.5),i.rotation.x=-e.pitch,i.children.find(g=>{if(g.name.startsWith("map_")){k0(g);let y=parseInt(g.name.split("_")[1],10);return this.itemFrameMaps[y]=this.itemFrameMaps[y]?.filter(w=>w!==g),g instanceof W.Mesh&&g.material?.map?.dispose(),!0}else if(g.name==="item")return k0(g),!0;return!1})?.removeFromParent(),m&&(m.itemId??m.blockId??0)!==0){let g=f.rotation??0,y=m.nbtData?.value?.map?.value??m.components?.find(w=>w.type==="map_id")?.data;if(y)o.scale.set(16/12,16/12,1),this.addMapModel(i,y,g);else{let w=this.getItemMesh(m,{"minecraft:display_context":"fixed"});w&&(w.mesh.position.set(0,0,-.05),w.isBlock?w.mesh.scale.set(.25,.25,.25):w.mesh.scale.set(.5,.5,.5),w.mesh.rotateY(Math.PI),w.mesh.rotateZ(-g*Math.PI/4),w.mesh.name="item",i.add(w.mesh))}}}e.username!==void 0&&(i.username=e.username),this.updateNameTagVisibility(i),this.updateEntityPosition(e,s,t)}updateEntityPosition(e,t,r){let i=this.entities[e.id];if(!i)return;let s=t?0:I4;if(e.position){let o=this.worldRenderer.sceneOrigin.getWorldPosition(i)??{x:e.position.x,y:e.position.y,z:e.position.z};i.userData._tweenTarget||(i.userData._tweenTarget={x:o.x,y:o.y,z:o.z}),i.userData._posTween?.stop(),i.userData._posTween=new F0(i.userData._tweenTarget).to({x:e.position.x,y:e.position.y,z:e.position.z},s).onUpdate(()=>{i.position.set(i.userData._tweenTarget.x,i.userData._tweenTarget.y,i.userData._tweenTarget.z)}).start()}if(typeof e.yaw=="number"&&Number.isFinite(e.yaw)){let o=o3(i.rotation.y,e.yaw);new F0(i.rotation).to({y:i.rotation.y+o},s).start()}if(i?.playerObject&&r?.rotation?.head){let{playerObject:o}=i,v=r.rotation.head.y,a=typeof v=="number"&&Number.isFinite(v)?v:e.yaw,l=typeof a=="number"&&typeof e.yaw=="number"&&Number.isFinite(a)&&Number.isFinite(e.yaw)?o3(e.yaw,a):0;o.skin.head.rotation.y=l;let c=r.rotation.head.x;o.skin.head.rotation.x=typeof c=="number"&&Number.isFinite(c)?-c:0}}afterAddEntity(e){}beforeEntityAdded(e){let t=this.pendingModelOverrides.get(e.id.toString());if(t){let{parts:r}=t;e.customModel=r.length===1?r[0]:{parts:r},this.pendingModelOverrides.delete(e.id.toString())}}maybeRenderPlayerSkin(e){let t=this.entities[e];if(e==="player_entity"&&(t=this.playerEntity,e=this.playerEntity?.originalEntity.id),!t||!t.playerObject||!t.visible)return;let r=128,i=this.worldRenderer.getCameraPosition(),s=this.worldRenderer.sceneOrigin.getWorldPosition(t),v=(s?new W.Vector3(s.x,s.y,s.z):t.position.clone().add(new W.Vector3(this.worldRenderer.sceneOrigin.x,this.worldRenderer.sceneOrigin.y,this.worldRenderer.sceneOrigin.z))).distanceTo(i);if(v<r&&v<this.worldRenderer.viewDistance*16){if(this.loadedSkinEntityIds.has(String(e)))return;this.updatePlayerSkin(e,t.playerObject.realUsername,t.playerObject.realPlayerUuid,!0,!0)}}onRemoveEntity(e){this.loadedSkinEntityIds.delete(e.id.toString()),delete this.currentSkinUrls[e.id.toString()],this.motionCache.delete(e.id.toString())}updateMap(e,t){this.cachedMapsImages[e]=t;let r=this.itemFrameMaps[e];if(r&&(r=r.filter(i=>i.parent),this.itemFrameMaps[e]=r,r))for(let i of r)i.material.map=this.loadMap(t),i.material.needsUpdate=!0,i.visible=!0}updateNameTagVisibility(e){let t=this.worldRenderer.playerStateReactive.team,r=e.originalEntity.team,i=r?.nameTagVisibility||"always",s=i==="always"||i==="hideForOwnTeam"&&r?.team!==t?.team||i==="hideForOtherTeams"&&(r?.team===t?.team||t===void 0);e.traverse(o=>{o.name==="nametag"&&(o.visible=s)})}addMapModel(e,t,r){let i=this.cachedMapsImages?.[t],s=null;i&&(s=this.loadMap(i));let o={transparent:!0,alphaTest:.1};s&&(o.map=s);let v=new W.MeshLambertMaterial(o),a=new W.Mesh(new W.PlaneGeometry(1,1),v);a.rotation.set(0,Math.PI,0),e.add(a);let l=!0;e.traverseVisible(c=>{c.name==="geometry_frame"&&(l=!1)}),l?a.position.set(0,0,.499):a.position.set(0,0,.437),a.rotateZ(Math.PI*2-r*Math.PI/2),a.name=`map_${t}`,s||(a.visible=!1),this.itemFrameMaps[t]||(this.itemFrameMaps[t]=[]),this.itemFrameMaps[t].push(a)}loadMap(e){let t=new W.TextureLoader().load(e);return t&&(t.magFilter=W.NearestFilter,t.minFilter=W.NearestFilter,t.needsUpdate=!0),t}addItemModel(e,t,r,i=!1){let s=`bone_${t}item`,o=`custom_item_${t}`;if(e.traverse(a=>{a.name===o&&(a.removeFromParent(),a.additionalCleanup&&a.additionalCleanup())}),!r)return;let v=this.getItemMesh(r,{"minecraft:display_context":"thirdperson"});v?.mesh&&e.traverse(a=>{if(a.name.toLowerCase()===s||a.name===`${t}Arm`){let l=new W.Object3D;l.additionalCleanup=()=>{v.cleanup&&v.cleanup()};let c=v.mesh;l.rotation.z=-Math.PI/16,v.isBlock?l.rotation.y=Math.PI/4:(c.rotation.z=-Math.PI/4,l.rotation.y=Math.PI/2,l.scale.multiplyScalar(2)),i&&(l.position.y=-8,l.position.z=5,l.position.x=t==="left"?1:-1,l.rotation.x=Math.PI),l.add(c),l.name=o,a.add(l)}})}handleDamageEvent(e,t){let r=this.entities[e]?.children.find(i=>i.name==="mesh");r&&r.traverse(i=>{if(i instanceof W.Mesh&&i.material.clone){i.material.clone().dispose(),i.material=i.material.clone();let o=i.material.color.clone();i.material.color.set(16711680),new F0(i.material.color).to(o,500).start()}})}raycastSceneDebug(){let e=new W.Raycaster;return e.setFromCamera(new W.Vector2(0,0),this.worldRenderer.camera),e.intersectObjects(this.worldRenderer.scene.children)[0]?.object}updateEntityModel(e,t,r,i){let s=Array.isArray(t)?t:[{modelPath:t,modelType:r,metadata:i}];this.pendingModelOverrides.set(e,{parts:s});let o=this.entities[e];o&&(this.update({...o.originalEntity,delete:!0},{}),this.update(o.originalEntity,{}))}setupPlayerObject(e,t,r){let i=new x5;i.realPlayerUuid=e.uuid??"",i.realUsername=e.username??"",i.position.set(0,16,0),i.traverse(o=>{o instanceof W.Mesh&&o.material instanceof W.MeshStandardMaterial&&(o.material.transparent=!0)}),t.add(i);let s=1/16;return t.scale.set(s,s,s),t.rotation.set(0,Math.PI,0),i.animation=new M1,i.animation.isMoving=!1,i}updateEntityEquipment(e,t){if(!e||!t.equipment)return;let r=t.type==="player";if(this.addItemModel(e,r?"right":"left",t.equipment[0],r),this.addItemModel(e,r?"left":"right",t.equipment[1],r),P5(this.worldRenderer,e,"feet",t.equipment[2]),P5(this.worldRenderer,e,"legs",t.equipment[3],2),P5(this.worldRenderer,e,"chest",t.equipment[4]),P5(this.worldRenderer,e,"head",t.equipment[5]),r&&e.playerObject){let{playerObject:i}=e;i.backEquipment=t.equipment.some(s=>s?.name==="elytra")?"elytra":"cape",i.backEquipment==="elytra"&&this.loadAndApplyCape(t.id,n3),i.cape.map===null&&(i.cape.visible=!1)}}};function u3(n,e){let t=e?.entitiesByName[n.name];return new Proxy({},{get(r,i,s){if(typeof i!="string"||!t)return;let o=t.metadataKeys?.indexOf(i);return n.metadata?.[o??-1]}})}function C1(n,e,t){if(e.name===n)return u3(e,t)}function P5(n,e,t,r,i=1,s=!1){if(!r){wi(e,t);return}let o=r.name.split("_"),v,a=t==="head"&&r.name==="player_head";if(a)if(wi(e,t),r.nbt){let g=Ai.simplify(r.nbt);try{let y;if(g.SkullOwner?y=g.SkullOwner.Properties.textures[0]?.Value:y=g["minecraft:profile"]?.Properties?.find(w=>w.name==="textures")?.value,y){v=JSON.parse(z.from(y,"base64").toString()).textures?.SKIN?.url;let{skinTexturesProxy:b}=n.worldRendererConfig;b&&(v=v?.replace("http://textures.minecraft.net/",b).replace("https://textures.minecraft.net/",b))}}catch{}}else v=re;let l=o[0];if(!v){let g=`${l}_layer_${i}${s?"_overlay":""}`;v=n.resourcesManager.currentResources.customTextures.armor?.textures[g]?.src??i3[g]}if(!v||!Fe[t]){wi(e,t);return}let c=`geometry_armor_${t}${s?"_overlay":""}`,u=e.children.findLast(g=>g.name===c),f;if(u?(f=u.material,n1(v,g=>{g.magFilter=W.NearestFilter,g.minFilter=W.NearestFilter,g.flipY=!1,g.wrapS=W.MirroredRepeatWrapping,g.wrapT=W.MirroredRepeatWrapping,f.map=g})):(u=Oe(n,v,Fe[t]),t==="head"&&(u.children[0].position.y+=.01),u.name=c,f=u.material,a||(f.side=W.DoubleSide)),l==="leather"&&!s){let g=r.nbt?.value?.display?.value?.color?.value;if(g){let y=g>>16&255,w=g>>8&255,b=g&255;f.color.setRGB(y/255,w/255,b/255)}else f.color.setHex(11890001);P5(n,e,t,r,i,!0)}else f.color.setHex(16777215);let m=new W.Object3D;m.name=`armor_${t}${s?"_overlay":""}`,m.add(u),e.add(u)}function wi(n,e){for(let t of n.children)(t.name===`geometry_armor_${e}`||t.name===`geometry_armor_${e}_overlay`)&&t.removeFromParent()}var Ei=async(n,e)=>{let t;if(!n&&!e)t=await c3;else{if(n||(n=await Ie(e,"skin")),!n)return;let{canvas:a}=await Ae(n);t=new L0.CanvasTexture(a)}t.magFilter=L0.NearestFilter,t.minFilter=L0.NearestFilter;let r=new L0.BoxGeometry,i=new L0.MeshStandardMaterial,s=!1,o=new L0.Mesh(r,i);o.scale.x=s?3:4,o.scale.y=12,o.scale.z=4,L4(r,40,16,s?3:4,12,4),i.map=t,i.needsUpdate=!0;let v=new L0.Group;return v.add(o),v.scale.set(.1,.1,.1),o.rotation.z=Math.PI,v};function z4(n,e,t,r,i,s,o,v){let a=(B,I,G,O)=>[new L0.Vector2(B/o,1-O/v),new L0.Vector2(G/o,1-O/v),new L0.Vector2(G/o,1-I/v),new L0.Vector2(B/o,1-I/v)],l=a(e+s,t,e+r+s,t+s),c=a(e+r+s,t,e+r*2+s,t+s),u=a(e,t+s,e+s,t+s+i),f=a(e+s,t+s,e+r+s,t+s+i),m=a(e+r+s,t+s,e+r+s*2,t+i+s),g=a(e+r+s*2,t+s,e+r*2+s*2,t+i+s),y=n.attributes.uv,w=[m[3],m[2],m[0],m[1]],b=[u[3],u[2],u[0],u[1]],A=[l[3],l[2],l[0],l[1]],C=[c[0],c[1],c[3],c[2]],M=[f[3],f[2],f[0],f[1]],S=[g[3],g[2],g[0],g[1]],H=[];for(let B of[w,b,A,C,M,S])for(let I of B)H.push(I.x,I.y);y.set(new Float32Array(H)),y.needsUpdate=!0}function L4(n,e,t,r,i,s){z4(n,e,t,r,i,s,64,64)}var h3={itemRight:{rotation:[0,-90,25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},itemLeft:{rotation:[0,90,-25],translation:[1.13,3.2,1.13],scale:[.68,.68,.68]},blockRight:{rotation:[0,45,0],translation:[0,0,0],scale:[.4,.4,.4]},blockLeft:{rotation:[0,225,0],translation:[0,0,0],scale:[.4,.4,.4]}},I5=class{constructor(e,t=!1){this.worldRenderer=e;this.offHand=t;d(this,"holdingBlock");d(this,"blockSwapAnimation");d(this,"cameraGroup",new v0.Mesh);d(this,"objectOuterGroup",new v0.Group);d(this,"objectInnerGroup",new v0.Group);d(this,"holdingBlockInnerGroup",new v0.Group);d(this,"camera",new v0.PerspectiveCamera(75,1,.1,100));d(this,"stopUpdate",!1);d(this,"lastHeldItem");d(this,"lastHeldItemRenderKey");d(this,"isSwinging",!1);d(this,"nextIterStopCallbacks");d(this,"idleAnimator");d(this,"ready",!1);d(this,"lastUpdate",0);d(this,"playerHand");d(this,"offHandDisplay",!1);d(this,"offHandModeLegacy",!1);d(this,"swingAnimator");d(this,"config");d(this,"disposed",!1);d(this,"unsubs",[]);d(this,"lastItemModelName");d(this,"switchRequest",0);this.initCameraGroup(),this.unsubs.push(f3(this.worldRenderer.playerStateReactive,"heldItemMain",()=>{this.offHand||this.updateItem()})),this.unsubs.push(f3(this.worldRenderer.playerStateReactive,"heldItemOff",()=>{this.offHand&&this.updateItem()})),this.config=e.displayOptions.inWorldRenderingConfig,this.offHandDisplay=this.offHand,this.offHand||Ei().then(r=>{this.disposed||(this.playerHand=r,this.updateItem())}).then(()=>{if(this.disposed)return;let r=f1(async()=>Ei(this.worldRenderer.playerStateReactive.playerSkin,this.worldRenderer.playerStateReactive.onlineMode?this.worldRenderer.playerStateReactive.username:void 0),this.worldRenderer.playerStateReactive,"playerSkin",i=>{i&&(this.playerHand=i,this.updateItem())},i=>{k0(i,!0)});this.unsubs.push(r)})}updateItem(){if(!this.ready)return;let e=this.offHand?this.worldRenderer.playerStateReactive.heldItemOff:this.worldRenderer.playerStateReactive.heldItemMain;e?this.setNewItem(e):this.offHand?this.setNewItem():this.setNewItem({type:"hand"})}initCameraGroup(){this.cameraGroup=new v0.Mesh}startSwing(){this.swingAnimator?.startSwing()}stopSwing(){this.swingAnimator?.stopSwing()}render(e,t,r,i){if(!this.lastHeldItem)return;let s=performance.now();this.lastUpdate&&s-this.lastUpdate>50&&this.replaceItemModel(this.lastHeldItem),this.swingAnimator?.isCurrentlySwinging()||this.swingAnimator?.debugParams.animationStage?this.swingAnimator?.update():this.idleAnimator?.update(),this.blockSwapAnimation?.switcher.update();let o=new v0.Scene;o.add(this.cameraGroup),this.updateCameraGroup(),o.add(r.clone()),o.add(i.clone());let v=t.getSize(new v0.Vector2),a=Math.min(v.width,v.height),l=v.width-a,{offHandDisplay:c}=this;if(c&&(this.cameraGroup.scale.x=-1),t.autoClear=!1,t.clearDepth(),this.offHandDisplay)t.setViewport(0,0,a,a);else{let u=v.width-a;t.setViewport(u,0,a,a)}t.render(o,this.camera),t.setViewport(0,0,v.width,v.height),c&&(this.cameraGroup.scale.x=1)}async playBlockSwapAnimation(e){this.blockSwapAnimation??(this.blockSwapAnimation={switcher:new st(()=>({y:this.objectInnerGroup.position.y}),(s,o)=>{s==="y"&&(this.objectInnerGroup.position.y=o)},{y:16})});let t=e,r=this.objectInnerGroup.position.y+this.objectInnerGroup.scale.y*1.5*(t==="appeared"?1:-1),i=!1;return new Promise(s=>{this.blockSwapAnimation.switcher.transitionTo({y:r},t,()=>{i||s(!0)},()=>{i=!0,s(!1)})})}isDifferentItem(e){return this.lastHeldItemRenderKey!==Pt(this.worldRenderer,e)}updateCameraGroup(){if(this.stopUpdate)return;let{camera:e}=this;this.cameraGroup.position.copy(e.position),this.cameraGroup.rotation.copy(e.rotation);let t=1,{position:r,scale:i}=this.getHandHeld3d(),s=-r.z,o=this.offHandModeLegacy?-1:1;this.objectOuterGroup.position.set(s*r.x*t*o,s*r.y,-s);let v=i*2.22*.2;this.objectOuterGroup.scale.set(v,v,v)}async createItemModel(e){if(this.lastUpdate=performance.now(),!e||e.type==="hand"&&!this.playerHand)return;let t;if(e.type==="item"||e.type==="block"){let i=this.worldRenderer.entities.getItemMesh({...e.fullItem,itemId:e.id},m1(this.worldRenderer),!1,this.lastItemModelName);if(i){let{mesh:s,isBlock:o,modelName:v}=i;o?(t=s,e.type="block"):(s.position.set(.5,.5,.5),t=s,e.type="item"),this.lastItemModelName=v}}else t=this.playerHand;if(!t)return;t.name="holdingBlock";let r=this.getHandHeld3d().rotation;return t.rotation.x=v0.MathUtils.degToRad(r.x),t.rotation.y=v0.MathUtils.degToRad(r.y),t.rotation.z=v0.MathUtils.degToRad(r.z),{model:t,type:e.type}}async replaceItemModel(e){if(this.blockSwapAnimation?.switcher.isTransitioning)return;if(!e){this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0;return}let t=await this.createItemModel(e);t&&(this.holdingBlock?.removeFromParent(),this.holdingBlock=t.model,this.holdingBlockInnerGroup.add(t.model))}testUnknownBlockSwitch(){this.setNewItem({type:"item",name:"minecraft:some-unknown-block",id:0,fullItem:{}})}async setNewItem(e){let t=Pt(this.worldRenderer,e),r=this.lastHeldItemRenderKey!==t;if(this.lastHeldItem=e,!r)return;this.lastHeldItemRenderKey=t,this.lastItemModelName=void 0;let i=++this.switchRequest,s=!1;if(this.holdingBlock){if(s=!0,!await this.playBlockSwapAnimation("disappeared"))return;this.holdingBlock?.removeFromParent(),this.holdingBlock=void 0}if(!e){this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.idleAnimator=void 0,this.blockSwapAnimation=void 0;return}if(i!==this.switchRequest)return;let o=await this.createItemModel(e);if(!o||i!==this.switchRequest)return;let v=new v0.Group;this.holdingBlockInnerGroup.removeFromParent(),this.holdingBlockInnerGroup=new v0.Group,this.holdingBlockInnerGroup.add(o.model),v.add(this.holdingBlockInnerGroup),this.holdingBlock=o.model,this.objectInnerGroup=new v0.Group,this.objectInnerGroup.add(v),this.objectInnerGroup.position.set(-.5,-.5,-.5),s&&(this.objectInnerGroup.position.y-=this.objectInnerGroup.scale.y*1.5),Object.assign(v.position,{x:.5,y:.5,z:.5}),this.objectOuterGroup=new v0.Group,this.objectOuterGroup.add(this.objectInnerGroup),this.cameraGroup.add(this.objectOuterGroup);let a=this.getHandHeld3d().rotation;this.objectOuterGroup.rotation.y=v0.MathUtils.degToRad(a.yOuter),s&&await this.playBlockSwapAnimation("appeared"),this.swingAnimator??(this.swingAnimator=new Ri(this.holdingBlockInnerGroup)),this.swingAnimator.setHandMesh(this.holdingBlockInnerGroup),this.swingAnimator.type=o.type,this.config.viewBobbing&&(this.idleAnimator=new xi(this.holdingBlockInnerGroup,this.worldRenderer.playerStateReactive))}getHandHeld3d(){let e=this.lastHeldItem?.type??"hand",t=this.offHandModeLegacy?"Left":"Right",r=.8*1.15,i={x:.4,y:-.7,z:-.45},s={x:-32.4,y:42.8,z:-41.3,yOuter:0};if(e==="item"){let o=h3[`item${t}`];i={x:-.05,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},r=o.scale[0]*1.15}else if(e==="block"){let o=h3[`block${t}`];i={x:.4,y:-.7,z:-.45},s={x:o.rotation[0],y:o.rotation[1],z:o.rotation[2],yOuter:0},r=o.scale[0]*1.15}return{rotation:s,position:i,scale:r}}dispose(){this.disposed=!0,this.ready=!1,this.unsubs.forEach(e=>e()),this.unsubs=[],this.idleAnimator?.destroy(),this.idleAnimator=void 0,this.swingAnimator?.stopSwing(),this.swingAnimator=void 0,this.blockSwapAnimation?.switcher.forceFinish(),this.blockSwapAnimation=void 0,k0(this.cameraGroup,!0),k0(this.objectOuterGroup,!0),k0(this.objectInnerGroup,!0),k0(this.holdingBlockInnerGroup,!0),this.holdingBlock=void 0,this.playerHand&&(k0(this.playerHand,!0),this.playerHand=void 0)}},xi=class{constructor(e,t){this.handMesh=e;this.playerState=t;d(this,"globalTime",0);d(this,"lastTime",0);d(this,"currentState");d(this,"targetState");d(this,"defaultPosition");d(this,"idleOffset",{y:0,rotationZ:0});d(this,"tween",new Rt);d(this,"idleTween",null);d(this,"stateSwitcher");d(this,"debugParams",{walkingSpeed:8,sprintingSpeed:16,walkingAmplitude:{x:1/30,y:1/10,rotationZ:.25},sprintingAmplitude:{x:1/30,y:1/10,rotationZ:.4}});d(this,"debugGui");d(this,"updated",!1);this.handMesh=e,this.globalTime=0,this.currentState="NOT_MOVING",this.targetState="NOT_MOVING",this.defaultPosition={x:e.position.x,y:e.position.y,z:e.position.z,rotationX:e.rotation.x,rotationY:e.rotation.y,rotationZ:e.rotation.z},this.stateSwitcher=new st(()=>({x:this.handMesh.position.x,y:this.handMesh.position.y,z:this.handMesh.position.z,rotationX:this.handMesh.rotation.x,rotationY:this.handMesh.rotation.y,rotationZ:this.handMesh.rotation.z}),(r,i)=>{switch(r){case"x":this.handMesh.position.x=i;break;case"y":this.handMesh.position.y=i;break;case"z":this.handMesh.position.z=i;break;case"rotationX":this.handMesh.rotation.x=i;break;case"rotationY":this.handMesh.rotation.y=i;break;case"rotationZ":this.handMesh.rotation.z=i;break}},{x:2,y:2,z:2,rotation:Math.PI}),this.debugGui=new Re("idle_animator",this.debugParams)}startIdleAnimation(){this.idleTween&&this.idleTween.stop(),this.idleOffset.y=this.handMesh.position.y-this.defaultPosition.y,this.idleOffset.rotationZ=this.handMesh.rotation.z-this.defaultPosition.rotationZ,this.idleTween=new F0(this.idleOffset,this.tween).to({y:.05,rotationZ:.05},3e3).easing(H0.Sinusoidal.InOut).yoyo(!0).repeat(1/0).start()}stopIdleAnimation(){this.idleTween&&(this.idleTween.stop(),this.idleOffset.y=0,this.idleOffset.rotationZ=0)}getStateTransform(e,t){switch(e){case"NOT_MOVING":case"SNEAKING":return{x:this.defaultPosition.x,y:this.defaultPosition.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ};case"WALKING":case"SPRINTING":{let r=e==="SPRINTING"?this.debugParams.sprintingSpeed:this.debugParams.walkingSpeed,i=e==="SPRINTING"?this.debugParams.sprintingAmplitude:this.debugParams.walkingAmplitude;return{x:this.defaultPosition.x+Math.sin(t*r)*i.x,y:this.defaultPosition.y-Math.abs(Math.cos(t*r))*i.y,z:this.defaultPosition.z,rotationX:this.defaultPosition.rotationX,rotationY:this.defaultPosition.rotationY,rotationZ:this.defaultPosition.rotationZ}}}}setState(e){if(e===this.targetState)return;this.targetState=e;let t=!1;if(this.currentState!==e){if(this.stopIdleAnimation(),!t){let r=this.getStateTransform(e,this.globalTime);this.stateSwitcher.transitionTo(r,e)}this.currentState=e}}update(){this.stateSwitcher.update();let e=performance.now(),t=(e-this.lastTime)/1e3;if(this.lastTime=e,!this.stateSwitcher.isTransitioning)switch(this.currentState){case"NOT_MOVING":case"SNEAKING":this.globalTime=Math.PI/4;break;case"SPRINTING":case"WALKING":this.globalTime+=t;break}if(this.playerState){let r=this.playerState.movementState;r!==this.targetState&&this.setState(r)}if(!this.stateSwitcher.isTransitioning&&(this.currentState==="NOT_MOVING"||this.currentState==="SNEAKING")&&(this.idleTween?.isPlaying()||this.startIdleAnimation(),this.tween.update(),this.handMesh.position.y=this.defaultPosition.y+this.idleOffset.y,this.handMesh.rotation.z=this.defaultPosition.rotationZ+this.idleOffset.rotationZ),!this.stateSwitcher.isTransitioning&&(this.currentState==="WALKING"||this.currentState==="SPRINTING")){let r=this.getStateTransform(this.currentState,this.globalTime);Object.assign(this.handMesh.position,r),Object.assign(this.handMesh.rotation,{x:r.rotationX,y:r.rotationY,z:r.rotationZ})}}getCurrentState(){return this.currentState}destroy(){this.stopIdleAnimation(),this.stateSwitcher.forceFinish()}},Ri=class{constructor(e){this.handMesh=e;d(this,"PI",Math.PI);d(this,"animationTimer",0);d(this,"lastTime",0);d(this,"isAnimating",!1);d(this,"stopRequested",!1);d(this,"originalRotation");d(this,"originalPosition");d(this,"originalScale");d(this,"debugParams",{animationTime:250,animationStage:0,useClassicSwing:!0,itemSwingXPosScale:-.8,itemSwingYPosScale:.2,itemSwingZPosScale:-.2,itemHeightScale:-.6,itemPreswingRotY:45,itemSwingXRotAmount:-30,itemSwingYRotAmount:-35,itemSwingZRotAmount:-5,armSwingXPosScale:-.3,armSwingYPosScale:.4,armSwingZPosScale:-.4,armSwingYRotAmount:70,armSwingZRotAmount:-20,armHeightScale:-.6});d(this,"debugGui");d(this,"type","hand");this.handMesh=e,this.originalRotation=e.rotation.clone(),this.originalPosition=e.position.clone(),this.originalScale=e.scale.clone(),this.debugGui=new Re("hand_animator",this.debugParams,void 0,{animationStage:{min:0,max:1,step:.01},itemSwingXPosScale:{min:-2,max:2,step:.1},itemSwingYPosScale:{min:-2,max:2,step:.1},itemSwingZPosScale:{min:-2,max:2,step:.1},itemHeightScale:{min:-2,max:2,step:.1},itemPreswingRotY:{min:-180,max:180,step:5},itemSwingXRotAmount:{min:-180,max:180,step:5},itemSwingYRotAmount:{min:-180,max:180,step:5},itemSwingZRotAmount:{min:-180,max:180,step:5},armSwingXPosScale:{min:-2,max:2,step:.1},armSwingYPosScale:{min:-2,max:2,step:.1},armSwingZPosScale:{min:-2,max:2,step:.1},armSwingYRotAmount:{min:-180,max:180,step:5},armSwingZRotAmount:{min:-180,max:180,step:5},armHeightScale:{min:-2,max:2,step:.1}})}setHandMesh(e){this.handMesh=e,this.originalRotation.copy(e.rotation),this.originalPosition.copy(e.position),this.originalScale.copy(e.scale)}update(){if(!this.isAnimating&&!this.debugParams.animationStage){this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}let e=performance.now(),t=(e-this.lastTime)/1e3;this.lastTime=e,this.animationTimer+=t*1e3;let r=this.debugParams.animationStage||Math.min(this.animationTimer/this.debugParams.animationTime,1);if(r>=1){if(this.stopRequested){this.isAnimating=!1,this.stopRequested=!1,this.animationTimer=0,this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);return}this.animationTimer=0;return}this.handMesh.rotation.copy(this.originalRotation),this.handMesh.position.copy(this.originalPosition),this.handMesh.scale.copy(this.originalScale);let i=r,s=Math.sqrt(i),o=Math.sin(i*this.PI),v=Math.sin(s*this.PI);if(this.type==="hand"){let a=this.debugParams.armSwingXPosScale*v,l=this.debugParams.armSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.armSwingZPosScale*o;this.handMesh.position.x+=a,this.handMesh.position.y+=l+this.debugParams.armHeightScale*i,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.armSwingYRotAmount*v),this.handMesh.rotation.z+=v0.MathUtils.degToRad(this.debugParams.armSwingZRotAmount*o)}else{let a=this.debugParams.itemSwingXPosScale*v,l=this.debugParams.itemSwingYPosScale*Math.sin(s*this.PI*2),c=this.debugParams.itemSwingZPosScale*o;this.handMesh.position.x+=a,this.handMesh.position.y+=l+this.debugParams.itemHeightScale*i,this.handMesh.position.z+=c,this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemPreswingRotY),this.handMesh.rotation.x+=v0.MathUtils.degToRad(this.debugParams.itemSwingXRotAmount*o),this.handMesh.rotation.y+=v0.MathUtils.degToRad(this.debugParams.itemSwingYRotAmount*v),this.handMesh.rotation.z+=v0.MathUtils.degToRad(this.debugParams.itemSwingZRotAmount*o)}}startSwing(){this.stopRequested=!1,!this.isAnimating&&(this.isAnimating=!0,this.animationTimer=0,this.lastTime=performance.now())}stopSwing(){this.isAnimating&&(this.stopRequested=!0)}isCurrentlySwinging(){return this.isAnimating}};function H5(n,e=!1){return n.displayOptions.inWorldRenderingConfig.handRenderer==="legacy"?new I5(n,e):new A5(n,e)}E();x();k();R();import*as Q0 from"three";import{Vec3 as ki}from"vec3";var m3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALUlEQVR42mP4//8/IyWYYdSAwW6Ara3tf4oMmD179n9ChhD0AsiQ0Wgc7AYAAOqH+zNQ3r9kAAAAAElFTkSuQmCC";var p3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAOklEQVR42mP4//8/IyWYYdQA3AbY2tr+H1gDZs+e/R9mCD7D8IYBzBAQTXYgEvIKQQPw2T6aEqlkAADEA/W3ycLXvwAAAABJRU5ErkJggg==";var g3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQklEQVR42mP4//8/IyWYYRgbYGtr+39wGQDiYzMUpwGzZ8+GawDRID4IkxSIMEOwaSQ6FgiFBW0NIOR8osJgBOQFALo37sVTOo/LAAAAAElFTkSuQmCC";var b3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWElEQVR42mP4//8/IyWYYXAbYGtr+59sA0CaZ8+eTZkBhNg4DQApQlYIcglMDN1VWA0AKYJpQvYONi/hDUSYIfjCgmA0EooJ2hmAK9CINgBXoA2xvEAMBgBGPud3dYZtOQAAAABJRU5ErkJggg==";var y3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVR42r1TQQrAMAxyD8tL89iMHgQJoQxHewi0UsWYFFX1/CkcF4iIsgUWOTM9ASV3F3rHF+v9rK4wEVnEFoFYbwmTbRZFFN9m0B9QZBfk2THaAhqktQdTkHYL9iZe+40vs7nda+BuVOMAAAAASUVORK5CYII=";var _3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAcElEQVR42rWTWwpAIQhEbWGu1MUaXRgQcXpyP8SIPI1jibu3l5DfAKrqyFgfAczsKxx5xJUCFGYFUZXMpOe9CAa8BOS+0U5UVbYQ6Siqbi0BFT0auTSRHZqNkE6BGXgEYKYtAczIbQAz8ukzXT3l3egz49IXvXQCVAAAAABJRU5ErkJggg==";var w3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAeElEQVQ4jaWSQQ4AIQgD9WG8tI/tnkgaUgmuBw8YHcqERXK/nOUuI4JPAABMSESwA1qAQgAQwBygnfNjTaCpWoBzUlNZQJ07x9FUdgSlV5FaW4Cjq8isW8BJ2GgPtEuVdr0HKvLXHjiRI0An8jTKqo9dF000cnBzPgKuxXtbq/m1AAAAAElFTkSuQmCC";var A3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42qWTSRKAMAgE8WF5KY/FygEL2yEp9cAhCz0wJBYRx58wbowxYsZngLvHjITsgNYpJySBrPIBUMqZSHhdSw+oQlgVa01U7VRQ7huTk67aUWZaVyaNZFsSQBCTVBW3KahLyo/lQ6KR1Y+2BTUyGqke1AXoxsSzpYlU3FW0/Exv1ie0hq53Bf15aAAAAABJRU5ErkJggg==";var E3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmklEQVR42o2SYQ6FMAiDeQfbSXdYXjSpqd869QeZQiilpbr7l2KM0cc75+xUV77YpGCjAPUqitMU3uCAXrsAlPSCcgJMbG4M0mQ1Etz/i0KlXQnmwyqpv1uH4h7fiws7ISneTYNEk0ImCxcAArGJrE4AXhypPtl7AqTdeJG8k3gHb0L6QfmK9WQTa59cSFdHRssKFHHngteV/wPDepaHIu0QVAAAAABJRU5ErkJggg==";var x3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAoUlEQVR42n2Tyw3AIAxD3cGYlGFTUSmV+2o4IEEAf2JQVV1rjDGq576ec5avWVdfWIW12aMPEJBEImoPv+CAvvcCODsVNWBS8wA4A5ndv1/ytciQvBLMyeTSHD3ZYXPXXH7Y0ZMdJvCxQJls5O6tKHlPPWGEfU58WZR6ive1kKSleFNC2kXGRnrcDqhTTOmPeP3pAZnTq6Oin4X0oXbfnNZu626Io6lqGCwAAAAASUVORK5CYII=";var I1=class{constructor(e){this.worldRenderer=e;d(this,"_cursorLinesHidden",!1);d(this,"cursorLineMaterial");d(this,"interactionLines",null);d(this,"prevColor");d(this,"blockBreakMesh");d(this,"breakTextures",[]);let t=[m3,p3,g3,b3,y3,_3,w3,A3,E3,x3];for(let i=0;i<10;i++)Tt(t[i]).then(s=>{s.magFilter=Q0.NearestFilter,s.minFilter=Q0.NearestFilter,this.breakTextures.push(s)});let r=new Q0.MeshBasicMaterial({transparent:!0,blending:Q0.MultiplyBlending,alphaTest:.5});this.blockBreakMesh=new Q0.Mesh(new Q0.BoxGeometry(1,1,1),r),this.blockBreakMesh.visible=!1,this.blockBreakMesh.renderOrder=999,this.blockBreakMesh.name="blockBreakMesh",this.worldRenderer.sceneOrigin.addAndTrack(this.blockBreakMesh),this.worldRenderer.onReactivePlayerStateUpdated("gameMode",()=>{this.updateLineMaterial()}),setTimeout(()=>{this.updateLineMaterial(),this.interactionLines&&this.setHighlightCursorBlock(this.interactionLines.blockPos,this.interactionLines.shapePositions,!0)})}get cursorLinesHidden(){return this._cursorLinesHidden}set cursorLinesHidden(e){this.interactionLines&&(this.interactionLines.mesh.visible=!e),this._cursorLinesHidden=e}updateLineMaterial(){let e=this.worldRenderer.playerStateReactive.gameMode==="creative",t=this.worldRenderer.renderer.getPixelRatio();this.cursorLineMaterial&&this.cursorLineMaterial.dispose(),this.cursorLineMaterial=new lt({color:(()=>{switch(this.worldRenderer.worldRendererConfig.highlightBlockColor){case"blue":return 4227327;case"classic":return 0;default:return e?4227327:0}})(),linewidth:Math.max(t*.7,1)*2}),this.prevColor=this.worldRenderer.worldRendererConfig.highlightBlockColor}updateBreakAnimation(e,t,r){if(this.hideBreakAnimation(),t===null||!e||!r)return;let{position:i,width:s,height:o,depth:v}=r,a=new ki(i.x,i.y,i.z);this.blockBreakMesh.scale.set(s*1.001,o*1.001,v*1.001),a.add(new ki(e.x,e.y,e.z)),this.blockBreakMesh.position.set(a.x,a.y,a.z),this.blockBreakMesh.visible=!0,this.blockBreakMesh.material.map=this.breakTextures[t]??this.breakTextures.at(-1),this.blockBreakMesh.material.needsUpdate=!0}hideBreakAnimation(){this.blockBreakMesh&&(this.blockBreakMesh.visible=!1)}updateDisplay(){if(this.cursorLineMaterial){let{renderer:e}=this.worldRenderer;this.cursorLineMaterial.resolution.set(e.domElement.width,e.domElement.height),this.cursorLineMaterial.dashOffset=performance.now()/750}}setHighlightCursorBlock(e,t,r=!1){if(e&&this.interactionLines&&e.equals(this.interactionLines.blockPos)&&q4(t??[],this.interactionLines.shapePositions??[])&&!r||(this.interactionLines!==null&&(this.worldRenderer.sceneOrigin.removeAndUntrack(this.interactionLines.mesh),this.interactionLines=null),e===null))return;let i=new Q0.Group;for(let{position:s,width:o,height:v,depth:a}of t??[]){let l=new ki(s.x,s.y,s.z),c=[1.0001*o,1.0001*v,1.0001*a],u=new Q0.BoxGeometry(...c),f=new vt().fromEdgesGeometry(new Q0.EdgesGeometry(u)),m=new C5(f,this.cursorLineMaterial);m.position.set(l.x,l.y,l.z),m.computeLineDistances(),i.add(m)}this.worldRenderer.sceneOrigin.addAndTrack(i),i.position.set(e.x,e.y,e.z),i.visible=!this.cursorLinesHidden,this.interactionLines={blockPos:e,mesh:i,shapePositions:t}}render(){this.prevColor!==this.worldRenderer.worldRendererConfig.highlightBlockColor&&this.updateLineMaterial(),this.updateDisplay()}},q4=(n,e)=>{if(n.length!==e.length)return!1;for(let[t,r]of n.entries())if(r!==e[t])return!1;return!0};E();x();k();R();E();x();k();R();var Z4=r5(ai(),1);import R3 from"prismarine-nbt";import{getItemDefinition as X4}from"mc-assets/dist/itemDefinitions";var $4=(n,e)=>{let t,r,i=n.name;i.includes(":")||(i=`minecraft:${i}`);let s=e.currentResources?.customItemModelNames[i];if(n.components){let o=new Map;for(let c of n.components)o.set(c.type,c);let v=o.get("custom_name")||o.get("item_name");v&&(t=typeof v.data=="string"?v.data:R3.simplify(v.data));let a=o.get("item_model");if(a&&(r=a.data),s){let c=o.get("custom_model_data");if(c?.data){let u;typeof c.data=="number"?u=c.data:typeof c.data=="object"&&"floats"in c.data&&Array.isArray(c.data.floats)&&c.data.floats.length>0&&(u=c.data.floats[0]),u&&s[u]&&(r=s[u])}}let l=o.get("lore");l&&(t??(t=n.displayName??n.name),t+=`
21459
+ ${JSON.stringify(l.data)}`)}if(n.nbt){let o=R3.simplify(n.nbt),v=o.display?.Name;v&&(t=v),s&&o.CustomModelData&&s[o.CustomModelData]&&(r=s[o.CustomModelData])}return{customText:t,customModel:r}};var k3=(n,e,t,r)=>{let i=n.name,{customModel:s}=$4(n,t);s&&(i=s);let o=K2(r,{...e}),v=X4(t.currentResources.itemsDefinitionsStore,{name:i,version:t.currentResources.version,properties:o})?.model;return(v==="minecraft:special"?void 0:v)??i};E();x();k();R();var P3=r5(C3(),1);import{versionToNumber as B3}from"mc-assets/dist/utils";var I3=(n,e,t=!1,r=!1)=>{let i=n.modelName,s=globalThis.loadedData.itemsByName[i];B3(e.currentResources.version)<B3("1.13")&&(i=(0,P3.getRenamedData)(s?"items":"blocks",i,e.currentResources.version,"1.13.1"));let o;if(!r){let a=e.currentResources?.guiAtlas?.json,l=u=>u&&a?.textures[u.replace("minecraft:","").replace("block/","").replace("blocks/","").replace("item/","").replace("items/","").replace("_inventory","")],c=l(i)??l(n.originalItemName);if(c){let u=c.u*a.width,f=c.v*a.height;return{texture:"gui",slice:[u,f,a.tileSize,a.tileSize],scale:.25,blockData:null,modelName:null}}}let v=a=>a.top??a;try{if(!e.currentResources?.itemsRenderer)throw new Error("Items renderer is not available");o=e.currentResources.itemsRenderer.getItemTexture(i,{},!1,r)??(n.originalItemName?e.currentResources.itemsRenderer.getItemTexture(n.originalItemName,{},!1,r):void 0)??e.currentResources.itemsRenderer.getItemTexture("item/missing_texture")}catch(a){reportError?.(`Failed to render item ${i} (original: ${n.originalItemName}) on ${e.currentResources.version} (resourcepack: TODO!): ${a.stack}`),o=v(e.currentResources.itemsRenderer.getItemTexture("errored"))}return o??(o=v(e.currentResources.itemsRenderer.getItemTexture("unknown"))),"type"in o?{texture:o.type,slice:o.slice,modelName:i,blockData:null,scale:null}:{texture:"blocks",blockData:o,modelName:i,slice:null,scale:null}};var H3=(n,e,t,r)=>{let i=t.currentResources;if(!i)throw new Error("Resources not loaded");let s=n.itemId??n.blockId??n.name,{blockState:o}=n;try{let v=o?globalThis.loadedData.blocksByStateId[o]?.name:typeof s=="number"?globalThis.loadedData.items[s]?.name:s;if(!v)throw new Error(`Item not found: ${s}`);let a=k3({...n,name:v},e,t,r),l=I3({modelName:a},t,!1,!0);if(!l)throw new Error(`Failed to get render info for item ${v}`);let c=l.texture==="blocks"?i.blocksAtlasImage:i.itemsAtlasImage;if(l.blockData)return{resolvedModel:l.blockData.resolvedModel,modelName:l.modelName};if(l.slice){let[u,f,m,g]=l.slice,[y,w,b,A]=[u/c.width,f/c.height,m/c.width,g/c.height];return{u:y,v:w,su:b,sv:A,renderInfo:l,modelName:l.modelName}}throw new Error(`Invalid render info for item ${v}`)}catch(v){return reportError?.(v),{u:0,v:0,su:16/i.blocksAtlasImage.width,sv:16/i.blocksAtlasImage.width,modelName:"missing"}}};E();x();k();R();import*as Vt from"three";var O1=class{constructor(e){this.worldRenderer=e;d(this,"audioListener");d(this,"activeSounds",new Set);d(this,"audioContext");d(this,"soundVolumes",new Map);d(this,"baseVolume",1);e.onWorldSwitched.push(()=>{this.stopAll()}),e.onReactiveConfigUpdated("volume",t=>{this.changeVolume(t)})}initAudioListener(){this.audioListener||(this.audioListener=new Vt.AudioListener,this.worldRenderer.camera.add(this.audioListener))}playSound(e,t,r=1,i=1,s=500){this.initAudioListener();let o=new Vt.PositionalAudio(this.audioListener);this.activeSounds.add(o),this.soundVolumes.set(o,r);let v=new Vt.AudioLoader,a=Date.now();v.loadAsync(t).then(l=>{Date.now()-a>s||(o.setBuffer(l),o.setRefDistance(20),o.setVolume(r*this.baseVolume),o.setPlaybackRate(i),this.worldRenderer.sceneOrigin.addAndTrack(o),o.position.set(e.x,e.y,e.z),o.onEnded=()=>{this.worldRenderer.sceneOrigin.removeAndUntrack(o),o.source&&o.disconnect(),this.activeSounds.delete(o),this.soundVolumes.delete(o),v.manager.itemEnd(t)},o.play())})}stopAll(){for(let e of this.activeSounds)e&&(e.stop(),e.source&&e.disconnect(),this.worldRenderer.sceneOrigin.removeAndUntrack(e));this.activeSounds.clear(),this.soundVolumes.clear()}changeVolume(e){this.baseVolume=e;for(let[t,r]of this.soundVolumes)t.setVolume(r*this.baseVolume)}destroy(){this.stopAll(),this.audioListener&&(this.audioListener.removeFromParent(),this.audioListener=void 0)}playTestSound(){this.playSound(this.worldRenderer.camera.position,"/sound.mp3")}};E();x();k();R();import*as U0 from"three";var F1=class{constructor(e,t){this.worldRenderer=e;this.onRenderCallbacks=t;d(this,"rollAngle",0);d(this,"rollAnimation");d(this,"basePitch",0);d(this,"baseYaw",0);d(this,"cameraBobInput",null);t.push(()=>{this.update()})}get damageRollAmount(){return 5}get damageAnimDuration(){return 200}setCameraBobInput(e){this.cameraBobInput=e}setBaseRotation(e,t){this.basePitch=e,this.baseYaw=t,this.update()}getBaseRotation(){return{pitch:this.basePitch,yaw:this.baseYaw}}shakeFromDamage(e){let t=this.rollAngle,r=t+(e??(Math.random()<.5?-1:1))*this.damageRollAmount;this.rollAnimation={startTime:performance.now(),startRoll:t,targetRoll:r,duration:this.damageAnimDuration/2}}update(){if(this.worldRenderer.playerStateUtils.isSpectatingEntity()&&(this.rollAngle=0,this.rollAnimation=void 0),this.rollAnimation){let t=performance.now(),r=t-this.rollAnimation.startTime,i=Math.min(r/this.rollAnimation.duration,1);this.rollAnimation.returnToZero?(this.rollAngle=this.rollAnimation.startRoll*(1-this.easeInOut(i)),i===1&&(this.rollAnimation=void 0)):(this.rollAngle=this.rollAnimation.startRoll+(this.rollAnimation.targetRoll-this.rollAnimation.startRoll)*this.easeOut(i),i===1&&(this.rollAnimation={startTime:t,startRoll:this.rollAngle,targetRoll:0,duration:this.damageAnimDuration/2,returnToZero:!0}))}let e=this.worldRenderer.cameraObject;if(this.worldRenderer.cameraGroupVr){let t=new U0.Quaternion().setFromAxisAngle(new U0.Vector3(0,1,0),this.baseYaw);e.setRotationFromQuaternion(t)}else{let t=this.addAntiZfightingOffset(this.basePitch),r=this.addAntiZfightingOffset(this.baseYaw),i=new U0.Quaternion().setFromAxisAngle(new U0.Vector3(1,0,0),t),s=new U0.Quaternion().setFromAxisAngle(new U0.Vector3(0,1,0),r),o=new U0.Quaternion().setFromAxisAngle(new U0.Vector3(0,0,1),U0.MathUtils.degToRad(this.rollAngle)),v=new U0.Quaternion,a=new U0.Quaternion,l=this.worldRenderer.playerStateReactive.perspective;if(this.cameraBobInput){let u=h1(this.cameraBobInput);v=new U0.Quaternion().setFromAxisAngle(new U0.Vector3(0,0,1),u.rotation.z),a=new U0.Quaternion().setFromAxisAngle(new U0.Vector3(1,0,0),u.rotation.x),l==="first_person"&&this.worldRenderer.camera.position.set(u.position.x,u.position.y,0)}else l==="first_person"&&this.worldRenderer.camera.position.set(0,0,0);let c=s.multiply(i).multiply(o).multiply(v).multiply(a);e.setRotationFromQuaternion(c)}}easeOut(e){return 1-(1-e)*(1-e)}easeInOut(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}addAntiZfightingOffset(e){let r=(e%(Math.PI*2)+Math.PI*2)%(Math.PI*2),i=.01;return Math.abs(r)<i||Math.abs(r-Math.PI/2)<i||Math.abs(r-Math.PI)<i||Math.abs(r-3*Math.PI/2)<i?e+.001:e}};E();x();k();R();import*as K from"three";var D1=class{constructor(e){this.worldRenderer=e;d(this,"customMedia",new Map);d(this,"lastCheck",0);d(this,"THROTTLE_TIME",100);this.worldRenderer.onWorldSwitched.push(()=>{this.onWorldGone()}),this.worldRenderer.onRender.push(()=>{this.render()}),this.worldRenderer.onReactiveConfigUpdated("volume",()=>{let{volume:t}=this.worldRenderer.worldRendererConfig;for(let[r,i]of this.customMedia.entries())i.positionalAudio&&i.positionalAudio.setVolume((i.props.volume??1)*t)})}onWorldGone(){for(let[e,t]of this.customMedia.entries())this.destroyMedia(e)}onWorldStop(){for(let[e,t]of this.customMedia.entries())this.setVideoPlaying(e,!1)}createErrorTexture(e,t,r=16777215,i="Failed to load"){let s=new OffscreenCanvas(100,100),o=100;s.width=o,s.height=o;let v=s.getContext("2d");if(!v)return new K.CanvasTexture(s);v.clearRect(0,0,s.width,s.height),v.fillStyle=`rgba(${r>>16&255}, ${r>>8&255}, ${r&255}, 1)`,v.fillRect(0,0,s.width,s.height),v.fillStyle="#ff0000",v.font="bold 10px sans-serif",v.textAlign="center",v.textBaseline="middle",v.fillText(i,s.width/2,s.height/2,s.width);let a=new K.CanvasTexture(s);return a.minFilter=K.LinearFilter,a.magFilter=K.LinearFilter,a}createBackgroundTexture(e,t,r=0,i=1){let s=new OffscreenCanvas(1,1);s.width=1,s.height=1;let o=s.getContext("2d");if(!o)return new K.CanvasTexture(s);let v=r>>16&255,a=r>>8&255,l=r&255;o.fillStyle=`rgba(${v}, ${a}, ${l}, ${i})`,o.fillRect(0,0,1,1);let c=new K.CanvasTexture(s);return c.minFilter=K.NearestFilter,c.magFilter=K.NearestFilter,c}validateOrigin(e,t){if(t===!0)return!0;if(t===!1)return!1;let r=new URL(e);return t.some(i=>r.origin.endsWith(i))}onPageInteraction(){for(let[e,t]of this.customMedia.entries())t.hadAutoPlayError&&(t.hadAutoPlayError=!1,this.playVideo(e))}addMedia(e,t){let r=structuredClone(t);this.destroyMedia(e);let i=!1;t.src.startsWith("https://disk.yandex.ru/i/")&&(i=!0,t.src=`/ya-image?url=${t.src}`);let{scene:s}=this.worldRenderer;t.allowOrigins!==void 0&&!this.validateOrigin(t.src,t.allowOrigins)&&(t.src="");let v=t.src.endsWith(".png")||t.src.endsWith(".jpg")||t.src.endsWith(".jpeg")||t.imageOverride;i&&!t.imageOverride&&fetch(t.src,{method:"HEAD"}).then(M=>{M.headers.get("content-type")?.startsWith("image/")&&(this.destroyMedia(e),this.addMedia(e,{...r,src:t.src,imageOverride:!0}))}).catch(console.error);let a,l;if(!v){a=document.createElement("video"),a.src=t.src.endsWith(".gif")?t.src.replace(".gif",".mp4"):t.src,a.loop=t.loop??!0;let M=(t.volume??1)*this.worldRenderer.worldRendererConfig.volume;a.volume=Math.min(M,1),a.playsInline=!0,a.crossOrigin="anonymous";let S=this.worldRenderer.soundSystem;if(S.initAudioListener(),!S.audioListener)throw new Error("Audio listener not initialized");l=new K.PositionalAudio(S.audioListener),l.setRefDistance(6),l.setVolume(M),this.worldRenderer.sceneOrigin.addAndTrack(l),l.position.set(t.position.x,t.position.y,t.position.z),l.setMediaElementSource(a),l.connect(),a.addEventListener("pause",()=>{l?.pause(),globalThis.tempSendVideoStop?.(e,"paused",a.currentTime)}),a.addEventListener("play",()=>{l?.play(),globalThis.tempSendVideoPlay?.(e)}),a.addEventListener("seeked",()=>{l&&a&&(l.offset=a.currentTime)}),a.addEventListener("stalled",()=>{globalThis.tempSendVideoStop?.(e,"stalled",a.currentTime)}),a.addEventListener("waiting",()=>{globalThis.tempSendVideoStop?.(e,"waiting",a.currentTime)}),a.addEventListener("error",({error:H})=>{globalThis.tempSendVideoStop?.(e,`error: ${H}`,a.currentTime)}),a.addEventListener("ended",()=>{globalThis.tempSendVideoStop?.(e,"ended",a.currentTime),t.loop||(a.currentTime=0,C.ended=!0)})}let c=this.createBackgroundTexture(t.size.width,t.size.height,t.background),u=M=>{let S=this.createErrorTexture(t.size.width,t.size.height,t.background,M);g.map=S,g.needsUpdate=!0},f=new K.PlaneGeometry(1,1),m=t.allowLighting?K.MeshLambertMaterial:K.MeshBasicMaterial,g=new m({map:c,transparent:!0,side:t.doubleSide?K.DoubleSide:K.FrontSide,alphaTest:.1}),y=a?new K.VideoTexture(a):new K.TextureLoader().load(t.src,()=>{this.customMedia.get(e)?.texture===y&&(g.map=y,g.needsUpdate=!0)},void 0,()=>u());y.minFilter=K.NearestFilter,y.magFilter=K.NearestFilter,y.generateMipmaps=!1;let w=new K.Mesh(f,g),{mesh:b}=this.positionMeshExact(w,K.MathUtils.degToRad((t.rotation??0)*90),t.position,t.size.width,t.size.height);s.add(b),a&&(w.onBeforeRender=()=>{a.readyState===a.HAVE_ENOUGH_DATA&&(!a.paused||!C?.hadAutoPlayError)&&(g.map!==y&&(g.map=y,g.needsUpdate=!0),y.needsUpdate=!0,l&&(l.position.copy(b.position),l.rotation.copy(b.rotation)))});let A=M=>{let S=f.attributes.uv.array;S[0]=M.startU,S[1]=M.startV,S[2]=M.endU,S[3]=M.startV,S[4]=M.endU,S[5]=M.endV,S[6]=M.startU,S[7]=M.endV,f.attributes.uv.needsUpdate=!0};t.uvMapping&&A(t.uvMapping);let C={mesh:b,video:a,texture:y,updateUVMapping:A,positionalAudio:l,props:r,hadAutoPlayError:!1,pausedBecuaseHidden:!1,ended:!1,handleError(M){if(C.destroyed)return;let S=H=>H;u(M.name==="NotAllowedError"||M.name==="AbortError"?S("Waiting for user interaction"):S("Failed to auto play"))}};return this.customMedia.set(e,C),a&&t.autoPlay&&this.playVideo(e,!0),e}playVideo(e,t=!1){let r=this.customMedia.get(e);if(r?.video){if(!t&&r.positionalAudio&&r.video.currentTime<1){let i=r.video.currentTime;this.addMedia(e,r.props),r.video.currentTime=i,r.props.autoPlay||this.playVideo(e,!0);return}r.video.play().then(()=>{r.hadAutoPlayError=!1}).catch(i=>{r.pausedBecuaseHidden||((i.name==="NotAllowedError"||i.name==="AbortError"||i.message?.includes("not allowed")&&!r.pausedBecuaseHidden)&&(r.hadAutoPlayError=!0),r.handleError(i))})}}render(){for(let[e,t]of this.customMedia.entries()){let r=t.mesh.visible;t.mesh.visible=this.worldRenderer.shouldObjectVisible(t.mesh)&&!t.mesh.forceHide,r!==t.mesh.visible&&t.video&&(t.mesh.visible?t.pausedBecuaseHidden&&(this.playVideo(e),t.pausedBecuaseHidden=!1):t.video.paused||(t.video.pause(),t.pausedBecuaseHidden=!0))}}setVideoPlaying(e,t){let r=this.customMedia.get(e);r?.video&&(t?this.playVideo(e):r.video.pause())}setVideoSeeking(e,t){let r=this.customMedia.get(e);r?.video&&(r.video.currentTime=t)}setVideoVolume(e,t){let r=this.customMedia.get(e);r?.video&&(r.video.volume=t)}setVideoSpeed(e,t){let r=this.customMedia.get(e);r?.video&&(r.video.playbackRate=t)}setControlMode(e,t,r){let i=this.customMedia.get(e);i?.video&&(i.props.controlMode={mouseButton:t,controlMode:r})}destroyMedia(e){let{scene:t}=this.worldRenderer,r=this.customMedia.get(e);if(r){r.destroyed=!0,r.video&&(r.video.pause(),r.video.src="",r.video.remove()),r.positionalAudio&&this.worldRenderer.sceneOrigin.removeAndUntrack(r.positionalAudio),this.worldRenderer.sceneOrigin.removeAndUntrack(r.mesh),r.texture.dispose();let i=r.mesh.children[0];i&&(i.geometry.dispose(),i.material instanceof K.Material&&i.material.dispose()),this.customMedia.delete(e)}}positionMeshExact(e,t,r,i,s,o=1){t===0&&(r.z+=.001),t===Math.PI/2&&(r.x-=.001),t===Math.PI&&(r.z-=.001),t===3*Math.PI/2&&(r.x+=.001),t===0&&(r.z+=1),t===Math.PI&&(r.x+=1),t===3*Math.PI/2&&(r.z+=1,r.x+=1),e.matrix.identity(),e.position.set(0,0,0),e.rotation.set(0,0,0),e.scale.set(1,1,1),e.rotateY(t),(t===Math.PI/2||t===3*Math.PI/2)&&(e.rotateZ(-Math.PI),e.rotateX(-Math.PI)),e.scale.set(i,s,o),e.geometry.translate(.5,.5,0),e.geometry.attributes.position.needsUpdate=!0,this.worldRenderer.sceneOrigin.track(e),e.position.set(r.x,r.y,r.z);let v=new K.Group;v.add(e);let a=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:16711680}));a.position.set(r.x,r.y,r.z),v.add(a);let l=r.x+Math.cos(t)*i,c=r.z+Math.sin(t)*i,u=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:255}));u.position.set(r.x,r.y+s,r.z),v.add(u);let f=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:16776960}));f.position.set(l,r.y,c),v.add(f);let m=new K.Mesh(new K.BoxGeometry(.1,.1,.1),new K.MeshBasicMaterial({color:16711935}));m.position.set(l,r.y+s,c),v.add(m);let g=new K.Vector3(this.worldRenderer.sceneOrigin.toSceneX(r.x),this.worldRenderer.sceneOrigin.toSceneY(r.y),this.worldRenderer.sceneOrigin.toSceneZ(r.z)),y=new K.ArrowHelper(new K.Vector3(Math.cos(t),0,Math.sin(t)),g,1,16711680);return v.add(y),{mesh:e,debugGroup:v}}createTestCanvasTexture(){let e=new OffscreenCanvas(100,100);e.width=100,e.height=100;let t=e.getContext("2d");return t?(t.font="10px Arial",t.fillStyle="red",t.fillText("Hello World",0,10),new K.CanvasTexture(e)):null}tryIntersectMedia(){if(Date.now()-this.lastCheck<this.THROTTLE_TIME)return;if(this.customMedia.size===0){this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1;return}this.lastCheck=Date.now();let{camera:e,scene:t}=this.worldRenderer,r=new K.Raycaster,i=new K.Vector2(0,0);r.setFromCamera(i,e);let s=r.intersectObjects(t.children,!0);if(s.length>0){let o=s[0],v=o.object;for(let[a,l]of this.customMedia.entries())if(v===l.mesh||l.mesh.children.includes(v)){let{uv:c}=o;if(c){let u={id:a,x:c.x,y:c.y};this.worldRenderer.reactiveState.world.intersectMedia=u,this.worldRenderer.debugVideo=l,this.worldRenderer.cursorBlock.cursorLinesHidden=!0;return}}}this.worldRenderer.reactiveState.world.intersectMedia=null,this.worldRenderer.debugVideo=null,this.worldRenderer.cursorBlock.cursorLinesHidden=!1}handleUserClick(e){let t=this.worldRenderer.reactiveState.world.intersectMedia;if(t){let{id:r,x:i,y:s}=t,o=this.customMedia.get(r),v=o?.props.controlMode;if(o?.video&&(v?.mouseButton==="both"||v?.mouseButton===e))switch(v?.controlMode){case"play_pause":{this.setVideoPlaying(r,o.video.paused);break}case"play_if_ended":{o.ended&&this.setVideoPlaying(r,!0);break}case"toggle_mute":{o.video.muted=!o.video.muted;break}}}}};E();x();k();R();import*as ze from"three";E();x();k();R();import*as T0 from"three";var nv=1,O3=10,he={TARGET_SCREEN_PX:150,CANVAS_SIZE:256,LAYOUT:{DOT_Y:.3,NAME_Y:.45,DISTANCE_Y:.55},CANVAS_SCALE:2,ARROW:{enabledDefault:!1,pixelSize:50,paddingPx:50},DEFAULT_VISUAL_SCALE:1,DEFAULT_OPACITY:1};function D3(n){let e=n.color??16711680,t=n.depthTest??!1,r=n.visualScale??n.metadata?.visualScale??(typeof window>"u"?void 0:window.serverMetadata?.waypointVisualScale)??he.DEFAULT_VISUAL_SCALE,i=n.opacity??n.metadata?.opacity??(typeof window>"u"?void 0:window.serverMetadata?.waypointOpacity)??he.DEFAULT_OPACITY,s=V0(F3(),F3());z1(s,e,n.label??"","0m",r);let o=new T0.CanvasTexture(s);o.anisotropy=1,o.magFilter=T0.LinearFilter,o.minFilter=T0.LinearFilter;let v=new T0.SpriteMaterial({map:o,transparent:!0,opacity:1,depthTest:t,depthWrite:!1}),a=new T0.Sprite(v);a.position.set(0,0,0),a.renderOrder=10,a.material.opacity=i;let l=n.label??"",c="0m",u=Number.NaN,f,m,g,y,w=null,b=he.ARROW.enabledDefault,A=new T0.Group;A.add(a);let{x:C,y:M,z:S}=n.position;A.position.set(C,M,S);function H(){o.needsUpdate=!0}function B(){if(!m||!g)return;let Y=m.width;g.clearRect(0,0,Y,Y),g.beginPath(),g.moveTo(Y*.15,Y*.5),g.lineTo(Y*.85,Y*.5),g.lineTo(Y*.5,Y*.15),g.closePath();let o0=`#${e.toString(16).padStart(6,"0")}`;g.lineWidth=6,g.strokeStyle="black",g.stroke(),g.fillStyle=o0,g.fill(),y&&(y.needsUpdate=!0)}function I(Y){e=Y,c="0m",u=0,z1(s,e,l,"0m",r),H(),f&&B()}function G(Y){l=Y??"",z1(s,e,l,c,r),H()}function O(Y,o0){o0!==c&&(c=o0,z1(s,e,Y,o0,r),H())}function j(Y){a.visible=Y}function J(Y,o0,g0){A.position.set(Y,o0,g0)}function X(Y,o0,g0,G0){let O0=o0*Math.PI/180,u0=Math.tan(O0/2)*2*g0*(he.TARGET_SCREEN_PX*r/G0);a.scale.set(u0,u0,1)}function t0(){if(f)return;let Y=128;m=V0(Y,Y),g=m.getContext("2d"),B(),y=new T0.CanvasTexture(m),y.anisotropy=1,y.magFilter=T0.LinearFilter,y.minFilter=T0.LinearFilter;let o0=new T0.SpriteMaterial({map:y,transparent:!0,depthTest:!1,depthWrite:!1,opacity:i});f=new T0.Sprite(o0),f.renderOrder=12,f.visible=!1,w&&w.add(f)}function d0(Y){b=Y,!Y&&f&&(f.visible=!1)}function l0(Y){f?.parent&&f.parent.remove(f),w=Y,f&&Y&&Y.add(f)}function m0(Y,o0,g0){if(!b||(t0(),!f))return!0;let G0=n.metadata?.onlyLeftRight===!0,O0=new T0.Vector3;Y.getWorldDirection(O0);let Z0=Y.up.clone().normalize(),u0=new T0.Vector3().copy(O0).cross(Z0).normalize(),ue=new T0.Vector3().copy(u0).cross(O0).normalize(),Xt=new T0.Vector3().setFromMatrixPosition(Y.matrixWorld),$t=new T0.Vector3(A.position.x,A.position.y,A.position.z).sub(Xt),Ne=$t.dot(O0),Me=$t.dot(u0),We=$t.dot(ue),N5=o0/g0,Ve=Y.fov*Math.PI/180,yt=2*Math.atan(Math.tan(Ve/2)*N5),W5=Math.atan2(Me,Ne),V5=Math.atan2(We,Ne);if(Ne>0&&Math.abs(W5)<=yt/2&&Math.abs(V5)<=Ve/2)return f.visible=!1,!0;let J0=W5/(yt/2),S0=V5/(Ve/2);Ne<=0&&(Math.abs(J0)>Math.abs(S0)?(J0=Math.sign(J0),S0=0):(J0=0,S0=Math.sign(S0))),G0&&(Math.abs(J0)>Math.abs(S0)||(J0=J0>=0?1:-1),S0=0);let _t=Math.max(Math.abs(J0),Math.abs(S0))||1,e5=J0/_t,se=S0/_t,wt=he.ARROW.paddingPx,_=(e5+1)*.5*o0,h=(1-se)*.5*g0,p=Math.min(Math.max(_,wt),o0-wt),T=Math.min(Math.max(h,wt),g0-wt);e5=p/o0*2-1,se=-(T/g0)*2+1;let P=Math.max(2,Y.near*4),D=Math.tan(Ve/2)*P,N=D*N5,i0=Xt.clone().add(O0.clone().multiplyScalar(P)).add(u0.clone().multiplyScalar(e5*N)).add(ue.clone().multiplyScalar(se*D));f.visible=!0,f.position.copy(i0);let b0=Math.atan2(S0,J0);f.material.rotation=b0-Math.PI/2;let h0=Math.tan(Ve/2)*2*P*(he.ARROW.pixelSize*r/g0);return f.scale.set(h0,h0,1),!1}function p0(Y){return Y.distanceTo(A.position)}function E0(Y,o0,g0,G0){let O0=p0(Y);X(Y,o0.fov,O0,G0);let Z0=Math.round(O0/O3)*O3;Z0!==u&&(u=Z0,O(l,`${Math.max(0,Z0)}m`));let u0=m0(o0,g0,G0);return j(u0),u0}function n0(){let Y=a.material;if(Y.map?.dispose(),Y.dispose(),f){f.parent&&f.parent.remove(f);let o0=f.material;o0.map?.dispose(),o0.dispose()}f=void 0,m=void 0,g=void 0,y=void 0}return{group:A,sprite:a,enableOffscreenArrow:d0,setArrowParent:l0,updateForCamera:E0,setColor:I,setLabel:G,updateDistanceText:O,setVisible:j,setPosition:J,dispose:n0}}function z3(){let n=globalThis.devicePixelRatio||1,e=Math.min(n,nv);return he.CANVAS_SCALE*e}function F3(){return Math.round(he.CANVAS_SIZE*z3())}function z1(n,e,t,r,i){let s=n.width,o=z3(),v=n.getContext("2d");v.clearRect(0,0,s,s);let a=s/2,l=Math.round(s*he.LAYOUT.DOT_Y),c=Math.round(s*.05*i),u=Math.max(2,Math.round(4*o*i)),f=c+u;v.beginPath(),v.arc(a,l,f,0,Math.PI*2),v.fillStyle=`#${e.toString(16).padStart(6,"0")}`,v.fill(),v.textAlign="center",v.textBaseline="middle";let m=Math.round(s*.08*i),g=Math.round(s*.06*i);v.font=`800 ${m}px mojangles`,v.lineWidth=Math.max(2,Math.round(3*o*i));let y=Math.round(s*he.LAYOUT.NAME_Y);v.strokeStyle="black",v.strokeText(t,a,y),v.fillStyle="white",v.fillText(t,a,y),v.font=`800 ${g}px mojangles`,v.lineWidth=Math.max(2,Math.round(2*o*i));let w=Math.round(s*he.LAYOUT.DISTANCE_Y);v.strokeStyle="black",v.strokeText(r,a,w),v.fillStyle="#CCCCCC",v.fillText(r,a,w)}var L1=class{constructor(e){this.worldRenderer=e;d(this,"waypoints",new Map);d(this,"waypointScene",new ze.Scene);d(this,"lastCameraPosition",new ze.Vector3);d(this,"lastUpdateTime",0);d(this,"UPDATE_THROTTLE_MS",16)}updateWaypoints(){let e=performance.now(),t=this.worldRenderer.getCameraPosition(),r=this.lastCameraPosition.distanceTo(t)>.5,i=e-this.lastUpdateTime>this.UPDATE_THROTTLE_MS;if(!r&&!i)return;this.lastCameraPosition.copy(t),this.lastUpdateTime=e;let s=this.worldRenderer.renderer.getSize(new ze.Vector2);for(let o of this.waypoints.values()){let v=new ze.Vector3(o.x,o.y,o.z),a=t.distanceTo(v),l=(!o.minDistance||a>=o.minDistance)&&(o.maxDistance===1/0||a<=o.maxDistance);o.sprite.setVisible(l),l&&(o.sprite.setPosition(this.worldRenderer.sceneOrigin.toSceneX(o.x),this.worldRenderer.sceneOrigin.toSceneY(o.y),this.worldRenderer.sceneOrigin.toSceneZ(o.z)),o.sprite.updateForCamera(this.worldRenderer.getCameraPosition(),this.worldRenderer.camera,s.width,s.height))}}render(){this.waypoints.size!==0&&(this.updateWaypoints(),this.worldRenderer.renderer.render(this.waypointScene,this.worldRenderer.camera))}addWaypoint(e,t,r,i,s={}){this.removeWaypoint(e);let o=s.color??16711680,{label:v,metadata:a}=s,l=s.minDistance??0,c=s.maxDistance??1/0,u=D3({position:new ze.Vector3(t,r,i),color:o,label:v||e,metadata:a});u.enableOffscreenArrow(!0),u.setArrowParent(this.waypointScene),this.waypointScene.add(u.group),this.waypoints.set(e,{id:e,x:t+.5,y:r+.5,z:i+.5,minDistance:l,maxDistance:c,color:o,label:v,sprite:u})}removeWaypoint(e){let t=this.waypoints.get(e);t&&(this.waypointScene.remove(t.sprite.group),t.sprite.dispose(),this.waypoints.delete(e))}clear(){for(let e of this.waypoints.keys())this.removeWaypoint(e)}testWaypoint(){this.addWaypoint("Test Point",0,70,0,{color:65280,label:"Test Point"}),this.addWaypoint("Spawn",0,64,0,{color:16776960,label:"Spawn"}),this.addWaypoint("Far Point",100,70,100,{color:255,label:"Far Point"}),this.addWaypoint("Far Point 2",180,170,100,{color:255,label:"Far Point 2"}),this.addWaypoint("Far Point 3",1e3,100,1e3,{color:255,label:"Far Point 3"})}getWaypoint(e){return this.waypoints.get(e)}getAllWaypoints(){return[...this.waypoints.values()]}setWaypointColor(e,t){let r=this.waypoints.get(e);r&&(r.sprite.setColor(t),r.color=t)}setWaypointLabel(e,t){let r=this.waypoints.get(e);r&&(r.label=t,r.sprite.setLabel(t))}};E();x();k();R();import*as R0 from"three";import{Vec3 as O5}from"vec3";var x0=class x0{constructor(e){this.worldRenderer=e;d(this,"explosions",new Map);d(this,"particleGeometry");d(this,"particleMaterials",[]);d(this,"testModeTimer");d(this,"explosionCounter",0);this.particleGeometry=new R0.BoxGeometry(x0.DEFAULT_PARTICLE_SIZE,x0.DEFAULT_PARTICLE_SIZE,x0.DEFAULT_PARTICLE_SIZE),this.createParticleMaterials()}createParticleMaterials(){let e=[16711680,65280,255,16776960,16711935,65535,16753920,8388736,16761035,16777215];for(let t of e){let r=new R0.MeshBasicMaterial({color:t,transparent:!0,opacity:1});this.particleMaterials.push(r)}}getRandomMaterial(){return this.particleMaterials[Math.floor(Math.random()*this.particleMaterials.length)]}createExplosion(e,t=1,r,i=x0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],v=Math.floor(x0.DEFAULT_PARTICLE_COUNT*t),a;if(x0.DEBUG_SHOW_EXPLOSION_CENTER){let c=.5*t,u=new R0.SphereGeometry(c,8,8),f=new R0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});a=new R0.Mesh(u,f),a.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(a),a.position.set(e.x,e.y,e.z)}for(let c=0;c<v;c++){let u=Math.random()*Math.PI*2,f=Math.sqrt(Math.random())*x0.VELOCITY_FACTOR*t,m=new O5(f*Math.cos(u),Math.random()*.5-.25,f*Math.sin(u));c<5;let g=r===void 0?this.getRandomMaterial().clone():new R0.MeshBasicMaterial({color:r,transparent:!0,opacity:1}),y=new R0.Mesh(this.particleGeometry,g);y.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(y),y.position.set(e.x,e.y,e.z),c<5;let w={position:e.clone(),velocity:m,color:new R0.Color(g.color),life:1,maxLife:1,mesh:y};o.push(w)}let l={id:s,position:e.clone(),particles:o,startTime:Date.now(),duration:i,size:t,debugSphere:a};return this.explosions.set(s,l),l}createExplosionFacingCamera(e,t=1,r,i=x0.DEFAULT_EXPLOSION_DURATION){let s=`firework_${this.explosionCounter++}_${Date.now()}`,o=[],v=Math.floor(x0.DEFAULT_PARTICLE_COUNT*t),a;if(x0.DEBUG_SHOW_EXPLOSION_CENTER){let f=.5*t,m=new R0.SphereGeometry(f,8,8),g=new R0.MeshBasicMaterial({color:16711680,wireframe:!0,transparent:!0,opacity:.8});a=new R0.Mesh(m,g),a.renderOrder=999,this.worldRenderer.sceneOrigin.addAndTrack(a),a.position.set(e.x,e.y,e.z)}let l=this.worldRenderer.getCameraPosition(),c=new O5(l.x-e.x,l.y-e.y,l.z-e.z).normalize();for(let f=0;f<v;f++){let m=Math.random()*Math.PI*2,g=Math.sqrt(Math.random())*x0.VELOCITY_FACTOR*t,y=new O5(g*Math.cos(m),g*Math.sin(m),0),w=new O5(y.x*c.x-y.z*c.z,y.y,y.x*c.z+y.z*c.x);f<5;let b=r===void 0?this.getRandomMaterial().clone():new R0.MeshBasicMaterial({color:r,transparent:!0,opacity:1}),A=new R0.Mesh(this.particleGeometry,b);A.renderOrder=1e3,this.worldRenderer.sceneOrigin.addAndTrack(A),A.position.set(e.x,e.y,e.z);let C={position:e.clone(),velocity:w,color:new R0.Color(b.color),life:1,maxLife:1,mesh:A};o.push(C)}let u={id:s,position:e.clone(),particles:o,startTime:Date.now(),duration:i,size:t,debugSphere:a};return this.explosions.set(s,u),u}explode(e,t=1,r,i){return this.createExplosion(e,t,r,i).id}explodeFacingCamera(e,t=1,r,i){return this.createExplosionFacingCamera(e,t,r,i).id}startTestMode(){let e=this.worldRenderer.getCameraPosition(),t=new O5(e.x,e.y+10,e.z);this.testModeTimer=setInterval(()=>{let r=.8+Math.random()*.4,i=[16711680,65280,255,16776960,16711935,65535,16753920],s=i[Math.floor(Math.random()*i.length)];this.explodeFacingCamera(t,r,s)},x0.TEST_INTERVAL)}updateParticle(e,t,r){let i=e.mesh.position.x===e.position.x&&e.mesh.position.y===e.position.y&&e.mesh.position.z===e.position.z;i&&e.life>.95,e.velocity.y+=x0.GRAVITY;let s=e.position.clone(),o=t/1e3;e.position.add(e.velocity.scaled(o)),e.mesh.position.set(e.position.x,e.position.y,e.position.z);let v=e.life;e.life-=t/r;let a=Math.max(0,e.life);if(e.mesh.material instanceof R0.MeshBasicMaterial&&(e.mesh.material.opacity=a),i&&v>.95){let l=e.position.distanceTo(s)}return e.life>0}render(){let e=Date.now(),t=16.67;this.explosions.size>0&&Math.random()<.01;for(let[r,i]of this.explosions.entries()){let s=e-i.startTime;if(s>=i.duration){this.removeExplosion(r);continue}s%2e3<16,i.particles=i.particles.filter(o=>this.updateParticle(o,t,i.duration)),i.particles.length===0&&this.removeExplosion(r)}}removeExplosion(e){let t=this.explosions.get(e);if(t){for(let r of t.particles)this.worldRenderer.sceneOrigin.removeAndUntrack(r.mesh),r.mesh.material instanceof R0.Material&&r.mesh.material.dispose();t.debugSphere&&(this.worldRenderer.sceneOrigin.removeAndUntrack(t.debugSphere),t.debugSphere.geometry.dispose(),t.debugSphere.material instanceof R0.Material&&t.debugSphere.material.dispose()),this.explosions.delete(e)}}stopTestMode(){this.testModeTimer&&(clearInterval(this.testModeTimer),this.testModeTimer=void 0)}destroy(){this.stopTestMode();for(let e of this.explosions.keys())this.removeExplosion(e);for(let e of this.particleMaterials)e.dispose();this.particleGeometry.dispose()}};d(x0,"DEFAULT_PARTICLE_COUNT",50),d(x0,"DEFAULT_PARTICLE_SIZE",.05),d(x0,"DEFAULT_EXPLOSION_DURATION",6e3),d(x0,"GRAVITY",-.005),d(x0,"VELOCITY_FACTOR",1.5),d(x0,"TEST_INTERVAL",1e3),d(x0,"DEBUG_SHOW_EXPLOSION_CENTER",!0),d(x0,"DEBUG_SHOW_PARTICLE_TRAILS",!1);var U1=x0;E();x();k();R();import*as ct from"three";import{Vec3 as Ti}from"vec3";var G1=class n{constructor(e,t,r,i){this.worldRenderer=e;this.updateCamera=t;this.updateFov=r;this.getInitialState=i;d(this,"isRunning",!1);d(this,"currentScript",null);d(this,"currentPointIndex",0);d(this,"currentTweens",[]);d(this,"startTime",0);d(this,"totalDuration",0);d(this,"currentPosition",{x:0,y:0,z:0});d(this,"currentRotation",{yaw:0,pitch:0});d(this,"currentFov",75)}startScript(e){if(this.isRunning||!e.points||e.points.length===0)return!1;this.currentScript=e,this.isRunning=!0,this.currentPointIndex=0,this.startTime=performance.now(),this.totalDuration=e.points.reduce((r,i)=>r+i.duration,0);let t=this.getInitialState();return this.currentPosition={x:t.position.x,y:t.position.y,z:t.position.z},this.currentRotation={yaw:t.yaw,pitch:t.pitch},this.currentFov=t.fov,this.moveToPoint(0),!0}stopScript(){if(this.isRunning){for(let e of this.currentTweens)e.stop();this.currentTweens=[],this.isRunning=!1,this.currentScript=null,this.currentPointIndex=0}}runExampleScripts(e){let t=this.worldRenderer.getCameraPosition(),r=new Ti(t.x,t.y,t.z),i=n.createCircularFlyby(r,30,20,15e3),s=n.createSpiralDescent(r.offset(0,50,0),r,3,12e3),o=n.createBuildingTour([{pos:r.offset(-20,10,-20),lookAt:r,duration:3e3},{pos:r.offset(20,15,-20),lookAt:r,duration:3e3},{pos:r.offset(20,20,20),lookAt:r,duration:3e3},{pos:r.offset(-20,25,20),lookAt:r,duration:3e3}]),v=[i,s,o];return this.startScript(v[e]),{circular:i,spiral:s,buildingTour:o}}moveToPoint(e){if(!this.currentScript||e>=this.currentScript.points.length){this.handleScriptComplete();return}let t=this.currentScript.points[e],{duration:r}=t,i={x:t.x,y:t.y,z:t.z},s={yaw:t.yaw,pitch:t.pitch},o=t.fov??this.currentFov;if(t.lookAt){let u=new ct.Vector3(t.lookAt.x,t.lookAt.y,t.lookAt.z),f=new ct.Vector3(t.x,t.y,t.z),m=u.sub(f).normalize();s.yaw=Math.atan2(-m.x,-m.z),s.pitch=Math.asin(m.y)}let v=this.getEasingFunction(t.easing||"easeInOut"),a=new F0(this.currentPosition).to(i,r).easing(v).onUpdate(()=>{this.updateCamera(new Ti(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),l=new F0(this.currentRotation).to(this.wrapRotation(s),r).easing(v).onUpdate(()=>{this.updateCamera(new Ti(this.currentPosition.x,this.currentPosition.y,this.currentPosition.z),this.currentRotation.yaw,this.currentRotation.pitch)}),c=null;if(Math.abs(o-this.currentFov)>.1){let u={fov:this.currentFov};c=new F0(u).to({fov:o},r).easing(v).onUpdate(()=>{this.currentFov=u.fov,this.updateFov(this.currentFov)})}this.currentTweens=[a,l],c&&this.currentTweens.push(c),a.start(),l.start(),c?.start(),a.onComplete(()=>{this.currentPointIndex++,this.currentScript?.onPointReached?.(e,t),this.isRunning&&this.moveToPoint(this.currentPointIndex)})}wrapRotation(e){let t=e.yaw,r=t-this.currentRotation.yaw;r>Math.PI?t-=2*Math.PI:r<-Math.PI&&(t+=2*Math.PI);let i=Math.max(-Math.PI/2+.01,Math.min(Math.PI/2-.01,e.pitch));return{yaw:t,pitch:i}}getEasingFunction(e){switch(e){case"linear":return H0.Linear.None;case"easeIn":return H0.Quadratic.In;case"easeOut":return H0.Quadratic.Out;case"easeInOut":return H0.Quadratic.InOut;case"smoothstep":return H0.Cubic.InOut;case"bounce":return H0.Bounce.Out;default:return H0.Quadratic.InOut}}handleScriptComplete(){if(!this.currentScript)return;let e=this.currentScript;e.loop?(this.currentPointIndex=0,this.moveToPoint(0)):(e.onComplete?.(),this.stopScript())}get running(){return this.isRunning}get progress(){if(!this.isRunning||this.totalDuration===0)return 0;let e=performance.now()-this.startTime;return Math.min(e/this.totalDuration,1)}get currentScriptName(){return this.currentScript?.name}static createCircularFlyby(e,t,r,i){let s=[];for(let v=0;v<=8;v++){let a=v/8*Math.PI*2,l=e.x+Math.cos(a)*t,c=e.z+Math.sin(a)*t,u=e.y+r;s.push({x:l,y:u,z:c,yaw:a+Math.PI/2,pitch:-.2,duration:i/8,easing:"smoothstep",lookAt:{x:e.x,y:e.y,z:e.z}})}return{name:"Circular Flyby",points:s,loop:!1}}static createSpiralDescent(e,t,r,i){let s=[],o=r*8,v=20;for(let a=0;a<=o;a++){let l=a/o,c=l*r*Math.PI*2,u=ct.MathUtils.lerp(e.x,t.x,l)+Math.cos(c)*v*(1-l),f=ct.MathUtils.lerp(e.z,t.z,l)+Math.sin(c)*v*(1-l),m=ct.MathUtils.lerp(e.y,t.y,l);s.push({x:u,y:m,z:f,yaw:c+Math.PI/2,pitch:-.3*l,duration:i/o,easing:"easeInOut"})}return{name:"Spiral Descent",points:s,loop:!1}}static createBuildingTour(e){return{name:"Building Tour",points:e.map((r,i)=>({x:r.pos.x,y:r.pos.y,z:r.pos.z,yaw:0,pitch:0,duration:r.duration||3e3,easing:"smoothstep",lookAt:r.lookAt?{x:r.lookAt.x,y:r.lookAt.y,z:r.lookAt.z}:void 0})),loop:!1}}};E();x();k();R();import*as e0 from"three";var Mi=.75,N1=class{constructor(e,t,r){this.scene=e;this.defaultSkybox=t;this.initialImage=r;d(this,"texture",null);d(this,"mesh",null);d(this,"skyMesh",null);d(this,"voidMesh",null);d(this,"worldTime",0);d(this,"partialTicks",0);d(this,"viewDistance",4);d(this,"temperature",Mi);d(this,"inWater",!1);d(this,"waterBreathing",!1);d(this,"fogBrightness",0);d(this,"prevFogBrightness",0);d(this,"fogOrangeness",0);d(this,"distanceFactor",2.7);d(this,"brightnessAtPosition",1);d(this,"debugGui");this.debugGui=new Re("skybox_renderer",this,["temperature","worldTime","inWater","waterBreathing","fogOrangeness","brightnessAtPosition","distanceFactor"],{brightnessAtPosition:{min:0,max:1,step:.01},temperature:{min:0,max:1,step:.01},worldTime:{min:0,max:24e3,step:1},fogOrangeness:{min:-1,max:1,step:.01},distanceFactor:{min:0,max:5,step:.01}}),r||this.createGradientSky()}async init(){this.initialImage&&await this.setSkyboxImage(this.initialImage)}async setSkyboxImage(e){this.texture&&this.texture.dispose();let t=new e0.TextureLoader;if(this.texture=await new Promise(r=>{t.load(e,i=>{i.mapping=e0.EquirectangularReflectionMapping,i.encoding=e0.sRGBEncoding,i.minFilter=e0.NearestFilter,i.magFilter=e0.NearestFilter,i.needsUpdate=!0,r(i)})}),this.mesh)this.mesh.material.map=this.texture,this.mesh.material.needsUpdate=!0;else{let r=new e0.SphereGeometry(500,60,40);r.scale(-1,1,1);let i=new e0.MeshBasicMaterial({map:this.texture,side:e0.FrontSide});this.mesh=new e0.Mesh(r,i),this.scene.add(this.mesh)}}update(e,t){t!==this.viewDistance&&(this.viewDistance=t,this.updateSkyColors()),this.mesh?this.mesh.position.set(0,0,0):this.skyMesh&&(this.skyMesh.position.set(0,0,0),this.voidMesh?.position.set(0,0,0),this.updateSkyColors())}updateTime(e,t=0){this.debugGui.visible||(this.worldTime=e,this.partialTicks=t,this.updateSkyColors())}updateViewDistance(e){this.viewDistance=e,this.updateSkyColors()}updateTemperature(e){this.debugGui.visible||(this.temperature=e,this.updateSkyColors())}updateWaterState(e,t){this.debugGui.visible||(this.inWater=e,this.waterBreathing=t,this.updateSkyColors())}updateDefaultSkybox(e){this.debugGui.visible||(this.defaultSkybox=e,this.updateSkyColors())}createGradientSky(){{let r=new e0.PlaneGeometry(768,768);r.rotateX(-Math.PI/2),r.translate(0,16,0);let i=new e0.MeshBasicMaterial({color:16777215,side:e0.DoubleSide,depthTest:!1});this.skyMesh=new e0.Mesh(r,i),this.scene.add(this.skyMesh)}{let r=new e0.PlaneGeometry(768,768);r.rotateX(-Math.PI/2),r.translate(0,-16,0);let i=new e0.MeshBasicMaterial({color:16777215,side:e0.DoubleSide,depthTest:!1});this.voidMesh=new e0.Mesh(r,i),this.scene.add(this.voidMesh)}this.updateSkyColors()}getFogColor(e=0){let t=this.getCelestialAngle(e),r=Math.cos(t*Math.PI*2)*2+.5;r=Math.max(0,Math.min(1,r));let i=.7529412,s=.84705883,o=1;return i*=r*.94+.06,s*=r*.94+.06,o*=r*.91+.09,new e0.Vector3(i,s,o)}getSkyColor(e=0,t=0,r=0){let i=this.getCelestialAngle(r),s=Math.cos(i*3.141593*2)*2+.5;s<0&&(s=0),s>1&&(s=1);let o=this.getTemperature(e,t),v=this.getSkyColorByTemp(o),a=(v>>16&255)/255,l=(v>>8&255)/255,c=(v&255)/255;return new e0.Vector3(a*s,l*s,c*s)}calculateCelestialAngle(e,t){let i=(e%24e3+t)/24e3-.25;return i<0&&i++,i>1&&i--,i=1-(Math.cos(i*Math.PI)+1)/2,i+=(i-i)/3,i}getCelestialAngle(e){return this.calculateCelestialAngle(this.worldTime,e)}getTemperature(e,t){return this.temperature}getSkyColorByTemp(e){e/=3,e<-1&&(e=-1),e>1&&(e=1);let t=.6222222-e*.05,i=this.fogOrangeness>0?t+(.12-t)*this.fogOrangeness*.8:t+this.fogOrangeness*.1,s=.5+e*.1+Math.abs(this.fogOrangeness)*.3;return this.hsbToRgb(i,s,1)}hsbToRgb(e,t,r){let i=0,s=0,o=0;if(t===0)i=s=o=Math.floor(r*255+.5);else{let v=(e-Math.floor(e))*6,a=v-Math.floor(v),l=r*(1-t),c=r*(1-t*a),u=r*(1-t*(1-a));switch(Math.floor(v)){case 0:i=Math.floor(r*255+.5),s=Math.floor(u*255+.5),o=Math.floor(l*255+.5);break;case 1:i=Math.floor(c*255+.5),s=Math.floor(r*255+.5),o=Math.floor(l*255+.5);break;case 2:i=Math.floor(l*255+.5),s=Math.floor(r*255+.5),o=Math.floor(u*255+.5);break;case 3:i=Math.floor(l*255+.5),s=Math.floor(c*255+.5),o=Math.floor(r*255+.5);break;case 4:i=Math.floor(u*255+.5),s=Math.floor(l*255+.5),o=Math.floor(r*255+.5);break;case 5:i=Math.floor(r*255+.5),s=Math.floor(l*255+.5),o=Math.floor(c*255+.5);break}}return 4278190080|i<<16|s<<8|Math.trunc(o)}updateSkyColors(){if(!this.skyMesh||!this.voidMesh)return;if(!this.defaultSkybox){this.skyMesh.visible=!1,this.voidMesh.visible=!1,this.mesh&&(this.mesh.visible=!1);return}this.skyMesh.visible=!0,this.voidMesh.visible=!0,this.mesh&&(this.mesh.visible=!0),this.prevFogBrightness=this.fogBrightness;let e=this.viewDistance/32,t=this.brightnessAtPosition*(1-e)+e;if(this.fogBrightness+=(t-this.fogBrightness)*.1,this.inWater){let g=this.waterBreathing?100:5;this.scene.fog=new e0.Fog(new e0.Color(0,0,1),.0025,g),this.scene.background=new e0.Color(0,0,1),this.skyMesh.material.color.set(new e0.Color(0,0,1)),this.voidMesh.material.color.set(new e0.Color(0,0,.6));return}let r=this.viewDistance*16,i=1-(.25+.75*this.viewDistance/32)**.25,s=this.getCelestialAngle(this.partialTicks),o=this.getSkyColor(0,0,this.partialTicks),v=this.getFogColor(this.partialTicks),a=Math.cos(s*Math.PI*2)*2+.5,l=Math.max(0,Math.min(1,a)),c=this.prevFogBrightness+(this.fogBrightness-this.prevFogBrightness)*this.partialTicks,u=(v.x+(o.x-v.x)*i)*l*c,f=(v.y+(o.y-v.y)*i)*l*c,m=(v.z+(o.z-v.z)*i)*l*c;this.scene.background=new e0.Color(u,f,m),this.scene.fog=new e0.Fog(new e0.Color(u,f,m),.0025,r*this.distanceFactor),this.skyMesh.material.color.set(new e0.Color(o.x,o.y,o.z)),this.voidMesh.material.color.set(new e0.Color(o.x*.2+.04,o.y*.2+.04,o.z*.6+.1))}dispose(){this.texture&&this.texture.dispose(),this.mesh&&(this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.scene.remove(this.mesh)),this.skyMesh&&(this.skyMesh.geometry.dispose(),this.skyMesh.material.dispose(),this.scene.remove(this.skyMesh)),this.voidMesh&&(this.voidMesh.geometry.dispose(),this.voidMesh.material.dispose(),this.scene.remove(this.voidMesh))}};E();x();k();R();import*as r0 from"three";var sv=`
21460
21460
  precision highp float;
21461
21461
  attribute vec3 position;
21462
21462
  attribute vec4 color;
@@ -21476,7 +21476,7 @@ void main() {
21476
21476
  gl_PointSize = size * adjustSize * (300.0 / length(mvPosition.xyz));
21477
21477
  gl_Position = projectionMatrix * mvPosition;
21478
21478
  }
21479
- `,gv=`
21479
+ `,ov=`
21480
21480
  precision highp float;
21481
21481
  uniform sampler2D texture;
21482
21482
  varying vec4 vColor;
@@ -21485,7 +21485,7 @@ void main() {
21485
21485
  vec4 texColor = texture2D(texture, gl_PointCoord);
21486
21486
  gl_FragColor = vColor * texColor;
21487
21487
  }
21488
- `,K0={textureSize:128,gravity:new r0.Vector3(0,-.005,0),friction:.998,defaultParticleSize:300,maxActiveFireworks:5},N5=n=>{let t=n*3;return{x:t,y:t+1,z:t+2}},W5=n=>{let t=n*4;return{r:t,g:t+1,b:t+2,a:t+3}},ft=(n=0,e=0)=>Math.floor(Math.random()*(n+1-e))+e,bv=(n,e,t,r)=>{n.save();let i=n.createRadialGradient(e,e,0,e,e,e);i.addColorStop(0,"rgba(255,255,255,1.0)"),i.addColorStop(.5,"rgba(255,255,255,0.5)"),i.addColorStop(1,"rgba(255,255,255,0)"),n.fillStyle=i,n.fillRect(0,0,t,r),n.restore()},yv=()=>{let n=K0.textureSize,e=V0(n,n),t=e.getContext("2d"),r=n/2;bv(t,r,e.width,e.height);let i=new r0.Texture(e);return i.needsUpdate=!0,i},_v=(n,e,t,r,i=K0.defaultParticleSize)=>{let s=new r0.BufferGeometry,o=[],a=[],v=[],l=[],c=[],d=Math.random()>.3?"single":"multiple",f=ft(100,20)*.01,m=()=>ft(100,1)*.01,g="red",b=Math.random();b>.66?g="red":b>.33?g="green":g="blue";for(let y=0;y<n;y++){let A=new r0.Vector3(0,0,0);if(o.push(A.x,A.y,A.z),a.push(e[y].x,e[y].y,e[y].z),t==="seed"){let C=e[y].y**2*.04;y===0&&(C*=1.1),l.push(C),c.push(C*.017),v.push(1,1,1,1)}else if(t==="trail"){let C=Math.random()*.1+.1;l.push(C),c.push(C*.017),v.push(1,1,1,1)}else{let C=ft(i,10)*.001;if(l.push(C),c.push(C*.017),d==="multiple")v.push(m(),m(),m(),1);else switch(g){case"red":v.push(f,.1,.1,1);break;case"green":v.push(.1,f,.1,1);break;case"blue":v.push(.1,.1,f,1);break}}}s.setAttribute("position",new r0.Float32BufferAttribute(o,3)),s.setAttribute("velocity",new r0.Float32BufferAttribute(a,3)),s.setAttribute("color",new r0.Float32BufferAttribute(v,4)),s.setAttribute("adjustSize",new r0.Float32BufferAttribute(l,1)),s.setAttribute("mass",new r0.Float32BufferAttribute(c,1));let w=new r0.RawShaderMaterial({uniforms:{size:{value:K0.textureSize},texture:{value:r}},transparent:!0,depthWrite:!1,blending:r0.AdditiveBlending,vertexShader:pv,fragmentShader:gv});return new r0.Points(s,w)},V5=class{constructor(e,t,r,i,s){u(this,"particleNum");u(this,"timerStartFading");u(this,"mesh");this.particleNum=e,this.timerStartFading=10,this.mesh=_v(e,t,r,i,s)}update(e){this.timerStartFading>0&&(this.timerStartFading-=.3);let t=this.mesh.geometry.attributes.position,r=this.mesh.geometry.attributes.velocity,i=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.5?.98:.96,a=v=>Math.random()>.5?0:(1-v)*.1;for(let v=0;v<this.particleNum;v++){let{x:l,y:c,z:d}=N5(v);r.array[c]+=e.y-s.array[v],r.array[l]*=K0.friction,r.array[d]*=K0.friction,r.array[c]*=K0.friction,t.array[l]+=r.array[l],t.array[c]+=r.array[c],t.array[d]+=r.array[d];let{a:f}=W5(v);this.timerStartFading<=0&&(i.array[f]*=o()-a(i.array[f]),i.array[f]<.001&&(i.array[f]=0))}t.needsUpdate=!0,r.needsUpdate=!0,i.needsUpdate=!0}disposeAll(){this.mesh.geometry.dispose(),this.mesh.material.dispose()}},Li=class extends V5{constructor(e,t,r){super(e,t,"seed",r)}update(e){let t=this.mesh.geometry.attributes.position,r=this.mesh.geometry.attributes.velocity,i=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.99:.96,a=d=>Math.random()>.3?0:(1-d)*.1,v=()=>Math.random()>.5?.05:-.05,l=()=>Math.random()>.1,c=K0.friction*.98;for(let d=0;d<this.particleNum;d++){let{x:f,y:m,z:g}=N5(d);r.array[m]+=e.y-s.array[d],r.array[f]*=c,r.array[g]*=c,r.array[m]*=c,t.array[f]+=r.array[f],t.array[m]+=r.array[m],t.array[g]+=r.array[g],l()&&(t.array[f]+=v()),l()&&(t.array[g]+=v());let{a:b}=W5(d);i.array[b]*=o()-a(i.array[b]),i.array[b]<.001&&(i.array[b]=0)}t.needsUpdate=!0,r.needsUpdate=!0,i.needsUpdate=!0}},Ui=class extends V5{constructor(e,t,r){super(e,t,"trail",r)}update(e){let t=this.mesh.geometry.attributes.position,r=this.mesh.geometry.attributes.velocity,i=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.98:.95,a=()=>Math.random()>.5?.05:-.05,v=()=>Math.random()>.2;for(let l=0;l<this.particleNum;l++){let{x:c,y:d,z:f}=N5(l);r.array[d]+=e.y-s.array[l],r.array[c]*=K0.friction,r.array[f]*=K0.friction,r.array[d]*=K0.friction,t.array[c]+=r.array[c],t.array[d]+=r.array[d],t.array[f]+=r.array[f],v()&&(t.array[c]+=a()),v()&&(t.array[f]+=a());let{a:m}=W5(l);i.array[m]*=o(),i.array[m]<.001&&(i.array[m]=0)}t.needsUpdate=!0,r.needsUpdate=!0,i.needsUpdate=!0}},j5=class{constructor(e,t=K0.defaultParticleSize,r){u(this,"meshGroup");u(this,"isExplode");u(this,"petalsNum");u(this,"life");u(this,"seed");u(this,"flowerSizeRate");u(this,"flower");u(this,"texture");u(this,"particleSize");this.meshGroup=new r0.Group,this.isExplode=!1,this.texture=e,this.particleSize=t;let i=400,s=150;this.petalsNum=ft(i,s),this.life=150,this.seed=this.getSeed(r),this.meshGroup.add(this.seed.mesh),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,s,i,.4,.7)}getSeed(e){let r=[];for(let s=0;s<40;s++){let a=s===0?Math.random()*2.5+.9:Math.random()*2+.4,v=0;r.push(new r0.Vector3(0,a,v))}let i=new Li(40,r,this.texture);if(e)i.mesh.position.set(0,0,0);else{let s=Math.random()*80-40,o=-50,a=Math.random()*80-40;i.mesh.position.set(s,o,a)}return i}explode(e){this.isExplode=!0,this.flower=this.getFlower(e),this.meshGroup.add(this.flower.mesh),this.meshGroup.remove(this.seed.mesh),this.seed.disposeAll()}getFlower(e){let t=this.petalsNum,r=[],i;if(Math.random()>.5)for(let a=0;a<t;a++){i=ft(120,60)*.01;let v=r0.MathUtils.degToRad(Math.random()*180),l=r0.MathUtils.degToRad(Math.random()*360),c=Math.sin(v)*Math.cos(l)*i,d=Math.sin(v)*Math.sin(l)*i,f=Math.cos(v)*i,m=new r0.Vector3(c,d,f);m.multiplyScalar(this.flowerSizeRate),r.push(m)}else{let a=180/t,v=360*(Math.random()*20+1)/t,l=v,c=v;i=ft(120,60)*.01;for(let d=0;d<t;d++){let f=Math.sin(r0.MathUtils.degToRad(a*d)),m=Math.cos(r0.MathUtils.degToRad(a*d))*i,g=Math.cos(r0.MathUtils.degToRad(l*d))*f*i,b=Math.sin(r0.MathUtils.degToRad(c*d))*f*i,w=new r0.Vector3(g,b,m);w.multiplyScalar(this.flowerSizeRate),r.push(w)}}let o=new V5(t,r,"default",this.texture,this.particleSize);return o.mesh.position.set(e.x,e.y,e.z),o}update(e){this.isExplode?(this.flower.update(e),this.life>0&&(this.life-=1)):this.drawTail()}drawTail(){this.seed.update(K0.gravity);let e=this.seed.mesh.geometry.attributes.position,t=this.seed.mesh.geometry.attributes.velocity,r=0;for(let d=0,f=t.array.length;d<f;d++){let m=t.array[d];d%3===1&&m>0&&r++}if(!(r===0))return;let{x:s,y:o,z:a}=this.seed.mesh.position,v=new r0.Vector3(s,o,a),l=0,c;for(let d=0,f=e.array.length;d<f;d++){let m=e.array[d];d%3===1&&m>l&&(l=m,c=new r0.Vector3(e.array[d-1],m,e.array[d+2]))}c&&(v.add(c),this.explode(v))}},Yt=class extends j5{constructor(t,r=K0.defaultParticleSize,i){super(t,r,i);u(this,"tailMeshGroup");u(this,"tails");let s=150,o=100;this.petalsNum=ft(s,o),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,o,s,.4,.7),this.tailMeshGroup=new r0.Group,this.tails=[]}explode(t){this.isExplode=!0,this.flower=this.getFlower(t),this.tails=this.getTail(),this.meshGroup.add(this.flower.mesh),this.meshGroup.add(this.tailMeshGroup)}getTail(){let t=[],i=this.flower.mesh.geometry.attributes.color;for(let s=0;s<this.petalsNum;s++){let o=[];for(let S=0;S<20;S++)o.push(new r0.Vector3(0,0,0));let a=new Ui(20,o,this.texture),{r:v,g:l,b:c,a:d}=W5(s),f=i.array[v],m=i.array[l],g=i.array[c],b=i.array[d],w=a.mesh.geometry.attributes.position,y=a.mesh.geometry.attributes.color;for(let S=0;S<w.count;S++){let H=W5(S);y.array[H.r]=f,y.array[H.g]=m,y.array[H.b]=g,y.array[H.a]=b}let{x:A,y:C,z:M}=this.flower.mesh.position;a.mesh.position.set(A,C,M),t.push(a),this.tailMeshGroup.add(a.mesh)}return t}update(t){if(this.isExplode){this.flower.update(t);let r=this.flower.mesh.geometry.attributes.position;for(let i=0,s=this.tails.length;i<s;i++){let o=this.tails[i];o.update(t);let{x:a,y:v,z:l}=N5(i),c=new r0.Vector3(r.array[a],r.array[v],r.array[l]),d=o.mesh.geometry.attributes.position,f=o.mesh.geometry.attributes.velocity;for(let m=0;m<d.count;m++){let g=N5(m),b=new r0.Vector3,w=new r0.Vector3(d.array[g.x],d.array[g.y],d.array[g.z]),y=new r0.Vector3(f.array[g.x],f.array[g.y],f.array[g.z]);b.subVectors(c,w);let A=b.sub(y);A.normalize(),A.multiplyScalar(Math.random()*3e-4*this.life),f.array[g.x]+=A.x,f.array[g.y]+=A.y,f.array[g.z]+=A.z}f.needsUpdate=!0}this.life>0&&(this.life-=1.2)}else this.drawTail()}},X1=class{constructor(e,t,r){u(this,"fireworksInstances");u(this,"scene");u(this,"sceneOrigin");u(this,"texture");u(this,"particleSize");u(this,"maxFireworks");this.fireworksInstances=[],this.scene=e,this.sceneOrigin=t,this.texture=yv(),this.particleSize=r?.defaultParticleSize??K0.defaultParticleSize,this.maxFireworks=r?.maxActiveFireworks??K0.maxActiveFireworks}launchFirework(e){if(this.fireworksInstances.length>=this.maxFireworks)return;let t=e?.particleSize??this.particleSize,r=e?.position,i;e?.forceRich?i=new Yt(this.texture,t,r):e?.forceBasic?i=new j5(this.texture,t,r):i=Math.random()>.5?new j5(this.texture,t,r):new Yt(this.texture,t,r),this.fireworksInstances.push(i),r?(this.sceneOrigin.addAndTrack(i.meshGroup),i.meshGroup.position.set(r.x,r.y,r.z)):this.scene.add(i.meshGroup)}repositionAll(){}update(){let e=[];for(let t=this.fireworksInstances.length-1;t>=0;t--){let r=this.fireworksInstances[t];r.update(K0.gravity),r.isExplode&&e.push(t)}for(let t=0,r=e.length;t<r;t++){let i=e[t],s=this.fireworksInstances[i];if(s&&(s.meshGroup.remove(s.seed.mesh),s.seed.disposeAll(),s.life<=0)){if(this.sceneOrigin.removeAndUntrack(s.meshGroup),s instanceof Yt&&s.tailMeshGroup)for(let o of s.tails)o.disposeAll();s.flower?.disposeAll(),this.fireworksInstances.splice(i,1)}}}clear(){for(let e of this.fireworksInstances)if(this.sceneOrigin.removeAndUntrack(e.meshGroup),e.seed.disposeAll(),e.flower&&e.flower.disposeAll(),e instanceof Yt)for(let t of e.tails)t.disposeAll();this.fireworksInstances=[]}dispose(){this.clear(),this.texture.dispose()}};E();x();k();R();var K3=Symbol("tracked-proxy"),wv=new Set(["add","addScalar","addScaledVector","addVectors","sub","subScalar","subVectors","multiply","multiplyScalar","multiplyVectors","divide","divideScalar","applyEuler","applyAxisAngle","applyMatrix3","applyMatrix4","applyNormalMatrix","applyQuaternion","negate","floor","ceil","round","roundToZero","min","max","clamp","clampLength","clampScalar","project","unproject","reflect","lerp","lerpVectors","cross","crossVectors","setFromMatrixPosition","setFromMatrixColumn","setFromMatrix3Column","setFromEuler","setFromSpherical","setFromSphericalCoords","setFromCylindrical","fromArray","fromBufferAttribute","setComponent","randomDirection","random"]),$1=class{constructor(e){u(this,"scene");u(this,"_x",0);u(this,"_y",0);u(this,"_z",0);u(this,"_tracked",new Set);u(this,"_worldCoords",new WeakMap);u(this,"_originalPositions",new WeakMap);u(this,"_trackOptions",new WeakMap);this.scene=e}get x(){return this._x}get y(){return this._y}get z(){return this._z}update(e,t,r){this._x=e,this._y=t,this._z=r;for(let i of this._tracked){let s=this._worldCoords.get(i);this._originalPositions.get(i).set(s.x-e,s.y-t,s.z-r),this._trackOptions.get(i)?.updateMatrix&&i.updateMatrix()}}track(e,t){let r=this._originalPositions.get(e)??e.position,i={x:0,y:0,z:0};this._originalPositions.set(e,r),this._worldCoords.set(e,i),t?this._trackOptions.set(e,t):this._trackOptions.delete(e);let s=this,o=t,a=new Proxy(r,{get(v,l,c){if(l===K3)return i;if(l==="set")return(f,m,g)=>(i.x=f,i.y=m,i.z=g,v.set(f-s._x,m-s._y,g-s._z),o?.updateMatrix&&e.updateMatrix(),c);if(l==="copy")return f=>{let m=f[K3],g=m?m.x:f.x,b=m?m.y:f.y,w=m?m.z:f.z;return i.x=g,i.y=b,i.z=w,v.set(g-s._x,b-s._y,w-s._z),o?.updateMatrix&&e.updateMatrix(),c};if(l==="setX")return f=>(i.x=f,v.x=f-s._x,o?.updateMatrix&&e.updateMatrix(),c);if(l==="setY")return f=>(i.y=f,v.y=f-s._y,o?.updateMatrix&&e.updateMatrix(),c);if(l==="setZ")return f=>(i.z=f,v.z=f-s._z,o?.updateMatrix&&e.updateMatrix(),c);if(typeof l=="string"&&wv.has(l))return()=>{throw new Error(`Cannot call position.${l}() on a tracked object. Use position.set(x, y, z) instead.`)};let d=v[l];return typeof d=="function"?d.bind(v):d},set(v,l,c){return l==="x"?(i.x=c,v.x=c-s._x,o?.updateMatrix&&e.updateMatrix(),!0):l==="y"?(i.y=c,v.y=c-s._y,o?.updateMatrix&&e.updateMatrix(),!0):l==="z"?(i.z=c,v.z=c-s._z,o?.updateMatrix&&e.updateMatrix(),!0):(v[l]=c,!0)}});Object.defineProperty(e,"position",{value:a,configurable:!0,enumerable:!0}),this._tracked.add(e)}untrack(e){let t=this._originalPositions.get(e);t&&(Object.defineProperty(e,"position",{value:t,configurable:!0,enumerable:!0}),this._tracked.delete(e),this._worldCoords.delete(e),this._originalPositions.delete(e),this._trackOptions.delete(e))}addAndTrack(e,t){this.track(e,t),this.scene.add(e)}removeAndUntrack(e){this.untrack(e),e.removeFromParent()}removeAndUntrackAll(e){e.traverse(t=>{this.untrack(t)}),e.removeFromParent()}getWorldPosition(e){let t=this._worldCoords.get(e);return t?{x:t.x,y:t.y,z:t.z}:void 0}clear(){for(let e of this._tracked)this.untrack(e)}get trackedCount(){return this._tracked.size}toSceneX(e){return e-this._x}toSceneY(e){return e-this._y}toSceneZ(e){return e-this._z}toWorldX(e){return e+this._x}toWorldY(e){return e+this._y}toWorldZ(e){return e+this._z}};Yi();E();x();k();R();Qt();mt();Vi();import Dv from"prismarine-chat";import*as $ from"three";import*as cr from"prismarine-nbt";import{Vec3 as Ki}from"vec3";E();x();k();R();mt();Qt();import*as ue from"three";var Cv=2e6,Qi=ea(),vr=class{constructor(e,t){u(this,"mesh");u(this,"capacityFaces");u(this,"w0");u(this,"w1");u(this,"w2");u(this,"w3");u(this,"sectionSlots",new Map);u(this,"freeList",[]);u(this,"highWatermark",0);u(this,"dirtyMin",1/0);u(this,"dirtyMax",-1);this.capacityFaces=Cv,this.w0=new Uint32Array(this.capacityFaces),this.w1=new Uint32Array(this.capacityFaces),this.w2=new Uint32Array(this.capacityFaces),this.w3=new Uint32Array(this.capacityFaces);let r=new ue.InstancedBufferGeometry,i=new Float32Array(tr*3);r.setAttribute("position",new ue.BufferAttribute(i,3));let s=o=>{let a=new ue.InstancedBufferAttribute(o,1);return a.setUsage(ue.DynamicDrawUsage),a};r.setAttribute("a_w0",s(this.w0)),r.setAttribute("a_w1",s(this.w1)),r.setAttribute("a_w2",s(this.w2)),r.setAttribute("a_w3",s(this.w3)),r.instanceCount=0,this.mesh=new ue.Mesh(r,e),this.mesh.name="globalShaderCubes",this.mesh.frustumCulled=!1,this.mesh.matrixAutoUpdate=!1,this.mesh.matrix.identity(),this.mesh.position.set(0,0,0),t.add(this.mesh)}addSection(e,t,r){if(r<=0){this.removeSection(e);return}this.sectionSlots.has(e)&&this.removeSection(e),r>this.capacityFaces&&this.growCapacity(r);let i=this.takeFreeSlot(r);i||(this.highWatermark+r>this.capacityFaces&&this.growCapacity(this.highWatermark+r),i={start:this.highWatermark,count:r},this.highWatermark+=r);let s=4;for(let o=0;o<r;o++){let a=i.start+o,v=o*s;this.w0[a]=t[v],this.w1[a]=t[v+1],this.w2[a]=t[v+2],this.w3[a]=t[v+3]}this.sectionSlots.set(e,i),this.markDirty(i.start,i.start+r-1),this.mesh.geometry.instanceCount=this.highWatermark}hasSection(e){return this.sectionSlots.has(e)}takeSectionData(e){let t=this.sectionSlots.get(e);if(!t)return;let r=4,i=new Uint32Array(t.count*r);for(let s=0;s<t.count;s++){let o=t.start+s,a=s*r;i[a]=this.w0[o],i[a+1]=this.w1[o],i[a+2]=this.w2[o],i[a+3]=this.w3[o]}return this.removeSection(e),{words:i,count:t.count}}removeSection(e){let t=this.sectionSlots.get(e);if(t){for(let r=t.start;r<t.start+t.count;r++)this.w0[r]=0,this.w1[r]=0,this.w2[r]=Qi,this.w3[r]=0;this.markDirty(t.start,t.start+t.count-1),this.sectionSlots.delete(e),this.insertFreeSlot(t),this.shrinkHighWatermark(),this.mesh.geometry.instanceCount=this.highWatermark}}uploadDirtyRange(){if(this.dirtyMin>this.dirtyMax)return;let e=this.dirtyMin,t=this.dirtyMax-this.dirtyMin+1,r=this.mesh.geometry;for(let i of["a_w0","a_w1","a_w2","a_w3"]){let s=r.getAttribute(i);s.updateRange.offset=e,s.updateRange.count=t,s.needsUpdate=!0}this.dirtyMin=1/0,this.dirtyMax=-1}setCameraOrigin(e,t,r){let i=Math.floor(e),s=Math.floor(t),o=Math.floor(r),a=this.mesh.material.uniforms.u_cameraOrigin;a?.value?.set&&a.value.set(i,s,o);let v=this.mesh.material.uniforms.u_cameraOriginFrac;v?.value?.set&&v.value.set(e-i,t-s,r-o)}reset(){this.sectionSlots.clear(),this.freeList.length=0,this.highWatermark=0,this.dirtyMin=1/0,this.dirtyMax=-1,this.w0.fill(0),this.w1.fill(0),this.w2.fill(Qi),this.w3.fill(0),this.mesh.geometry.instanceCount=0}dispose(){this.mesh.parent?.remove(this.mesh),this.mesh.geometry.dispose(),this.reset()}markDirty(e,t){e<this.dirtyMin&&(this.dirtyMin=e),t>this.dirtyMax&&(this.dirtyMax=t)}takeFreeSlot(e){for(let t=0;t<this.freeList.length;t++){let r=this.freeList[t];if(r.count>=e){if(this.freeList.splice(t,1),r.count===e)return r;let i={start:r.start,count:e};return this.insertFreeSlot({start:r.start+e,count:r.count-e}),i}}}insertFreeSlot(e){this.freeList.push(e),this.freeList.sort((t,r)=>t.start-r.start),this.mergeFreeList()}mergeFreeList(){if(this.freeList.length<2)return;let e=[],t=this.freeList[0];for(let r=1;r<this.freeList.length;r++){let i=this.freeList[r];t.start+t.count===i.start?t={start:t.start,count:t.count+i.count}:(e.push(t),t=i)}e.push(t),this.freeList=e}shrinkHighWatermark(){for(;this.highWatermark>0;){let e=this.highWatermark-1,t=this.freeList.find(i=>i.start<=e&&i.start+i.count>e);if(!t||t.start+t.count!==this.highWatermark)break;this.highWatermark=t.start;let r=this.freeList.indexOf(t);this.freeList.splice(r,1)}}growCapacity(e){let t=this.capacityFaces;for(;t<e;)t*=2;let r=new Uint32Array(t),i=new Uint32Array(t),s=new Uint32Array(t),o=new Uint32Array(t);r.set(this.w0),i.set(this.w1),s.set(this.w2),o.set(this.w3),s.fill(Qi,this.w0.length),this.w0=r,this.w1=i,this.w2=s,this.w3=o,this.capacityFaces=t;let a=this.mesh.geometry,v=(l,c)=>{let d=a.getAttribute(c);d&&(a.deleteAttribute(c),"dispose"in d&&typeof d.dispose=="function"&&d.dispose());let f=new ue.InstancedBufferAttribute(l,1);f.setUsage(ue.DynamicDrawUsage),a.setAttribute(c,f)};v(this.w0,"a_w0"),v(this.w1,"a_w1"),v(this.w2,"a_w2"),v(this.w3,"a_w3"),this.dirtyMin=0,this.dirtyMax=this.highWatermark-1}};E();x();k();R();Qt();mt();function va(n,e,t,r,i){if(e<=0)return;let s=t-8,o=r-8,a=i-8,v=sr,l=16,c=16,d=16,f=-1,m=-1,g=-1;for(let S=0;S<e;S++){let H=n[S*v],B=H&(1<<ht.LX_BITS)-1,I=H>>ht.LY_SHIFT&(1<<ht.LY_BITS)-1,G=H>>ht.LZ_SHIFT&(1<<ht.LZ_BITS)-1;B<l&&(l=B),I<c&&(c=I),G<d&&(d=G),B>f&&(f=B),I>m&&(m=I),G>g&&(g=G)}if(f<0)return;let b=s+l,w=o+c,y=a+d,A=s+f+1,C=o+m+1,M=a+g+1;return{minX:b,minY:w,minZ:y,maxX:A,maxY:C,maxZ:M,cx:(b+A)*.5,cy:(w+C)*.5,cz:(y+M)*.5}}function Bv(n,e,t,r,i,s,o,a,v){return n>=r&&n<=o&&e>=i&&e<=a&&t>=s&&t<=v}function la(n,e,t,r,i,s,o,a,v,l,c,d,f){if(Bv(n,e,t,o,a,v,l,c,d))return;let m=0,g=f;if(Math.abs(r)<1e-8){if(n<o||n>l)return}else{let b=1/r,w=(o-n)*b,y=(l-n)*b;if(w>y){let A=w;w=y,y=A}if(m=Math.max(m,w),g=Math.min(g,y),m>g)return}if(Math.abs(i)<1e-8){if(e<a||e>c)return}else{let b=1/i,w=(a-e)*b,y=(c-e)*b;if(w>y){let A=w;w=y,y=A}if(m=Math.max(m,w),g=Math.min(g,y),m>g)return}if(Math.abs(s)<1e-8){if(t<v||t>d)return}else{let b=1/s,w=(v-t)*b,y=(d-t)*b;if(w>y){let A=w;w=y,y=A}if(m=Math.max(m,w),g=Math.min(g,y),m>g)return}return m<=g&&m>=0?m:void 0}E();x();k();R();import*as X0 from"three";var ca=20,da=40,Pv={white_banner:15,orange_banner:14,magenta_banner:13,light_blue_banner:12,yellow_banner:11,lime_banner:10,pink_banner:9,gray_banner:8,light_gray_banner:7,cyan_banner:6,purple_banner:5,blue_banner:4,brown_banner:3,green_banner:2,red_banner:1,black_banner:0},ua={0:"#1d1d21",1:"#b02e26",2:"#5e7c16",3:"#835432",4:"#3c44aa",5:"#8932b8",6:"#169c9c",7:"#9d9d97",8:"#474f52",9:"#f38baa",10:"#80c71f",11:"#fed83d",12:"#3ab3da",13:"#c74ebd",14:"#f9801d",15:"#f9fffe"};function Iv(n){let e=n.replace("_wall_banner","_banner");return Pv[e]??15}var Hv=(n,e,t,r,i,s,o)=>{switch(n.fillStyle=t,e){case"bs":n.fillRect(r,i,s,o);break;case"ls":n.fillRect(r,i,s/3,o);break;case"rs":n.fillRect(r+s*2/3,i,s/3,o);break;case"ts":n.fillRect(r,i,s,o/3);break;case"ms":n.fillRect(r,i+o/3,s,o/3);break;case"drs":n.fillRect(r,i,s/2,o/2);break;case"dls":n.fillRect(r+s/2,i,s/2,o/2);break;case"ss":for(let a=0;a<s;a+=2)n.fillRect(r+a,i,1,o);break;case"cr":n.fillRect(r,i+o/3,s,o/3),n.fillRect(r+s/3,i,s/3,o);break;case"sc":n.fillRect(r,i+o/2-1,s,2),n.fillRect(r+s/2-1,i,2,o);break;default:n.fillRect(r,i,s,o)}};function Ov(n,e){if(!e||e.length===0)return`banner_${n}_empty`;let t=e.map(r=>`${r.Pattern??"bs"}_${r.Color??0}`).join(",");return`banner_${n}_${t}`}var Fv=(n,e,t=(r,i)=>V0(r,i))=>{let i=t(ca*1,da*1),s=i.getContext("2d");if(s){if(s.imageSmoothingEnabled=!1,e?.Patterns&&e.Patterns.length>0)for(let o of e.Patterns){let a=o.Color??0,v=o.Pattern??"bs",l=ua[a]||ua[0];Hv(s,v,l,0,0,ca*1,da*1)}return i}},lr=new Map;function fa(n,e,t){let r=Iv(e),i=Ov(r,t?.Patterns),s=lr.get(i);if(s)return s.refCount++,s.texture;let o=Fv(r,t);if(!o)return;let a=new X0.Texture(o);return a.magFilter=X0.NearestFilter,a.minFilter=X0.NearestFilter,a.needsUpdate=!0,lr.set(i,{texture:a,refCount:1}),a}function ha(n){for(let[e,t]of lr.entries())if(t.texture===n){t.refCount--,t.refCount<=0&&(t.texture.dispose(),lr.delete(e));return}}function ma(n,e,t,r){let a,v,l;t?(a=(-14.6+13.4)/2/16-.5,v=1-14.75/16-.5,l=1/2):(a=(1.4+29.4)/2/16,v=1-7.25/16-.5,l=0);let c=new X0.Mesh(new X0.PlaneGeometry(.85,1.75),new X0.MeshBasicMaterial({map:r,transparent:!0}));c.renderOrder=999;let d=.5/16,f=.25/16;t?c.position.set(0,a,v+f+.004):c.position.set(0,a,v+d/2+.004);let m=new X0.Group;return m.rotation.set(0,-X0.MathUtils.degToRad(e*(t?90:45/2)),0),m.add(c),m.bannerTexture=r,m.position.set(n.x+.5,n.y+l,n.z+.5),m}var pt=class pt{constructor(e,t,r,i,s=3){this.worldRenderer=e;this.scene=t;this.material=r;this.worldHeight=i;u(this,"meshPool",[]);u(this,"activeSections",new Map);u(this,"sectionObjects",{});u(this,"waitingChunksToDisplay",{});u(this,"pendingNearReveal",new Map);u(this,"nearRevealTimers",new Map);u(this,"nearRevealGraceTimers",new Map);u(this,"poolSize");u(this,"maxPoolSize");u(this,"minPoolSize");u(this,"signHeadsRenderer");u(this,"chunkBoxMaterial",new $.MeshBasicMaterial({color:0,transparent:!0,opacity:0}));u(this,"cubeShaderMaterial",null);u(this,"globalBlockBuffer",null);u(this,"shaderSectionRaycastBoxes",new Map);u(this,"hits",0);u(this,"misses",0);u(this,"bypassPooling",!1);u(this,"renderTimes",[]);u(this,"maxRenderTimeSamples",30);u(this,"_performanceOverrideDistance");u(this,"lastPerformanceCheck",0);u(this,"performanceCheckInterval",2e3);this.updateViewDistance(s),this.signHeadsRenderer=new Ji(e),this.initializePool()}get performanceOverrideDistance(){return this._performanceOverrideDistance??0}set performanceOverrideDistance(e){this._performanceOverrideDistance=e,this.updateSectionsVisibility()}initializePool(){for(let e=0;e<this.poolSize;e++){let t=new $.BufferGeometry,r=new $.Mesh(t,this.material);r.visible=!1,r.matrixAutoUpdate=!1,r.name="pooled-section-mesh";let i={mesh:r,inUse:!1,lastUsedTime:0};this.meshPool.push(i)}}sectionHasRenderableContent(e){return e.positions.length>0?!0:this.isShaderCubesGpuEnabled()?(e.shaderCubes?.count??0)>0:!1}isShaderCubesGpuEnabled(){return this.worldRenderer.shaderCubeBlocksEnabled()}syncCubeShaderUniforms(){if(!this.isShaderCubesGpuEnabled())return;let e=this.cubeShaderMaterial??this.getCubeShaderMaterial();if(!e)return;let t=this.material.map??null;e.uniforms.u_atlas.value=t;let r=or();if(!r)return;let{tintPalette:i}=r;i.isReady()||i.createTexture(),e.uniforms.u_tintPalette.value=i.getTexture(),e.uniforms.u_debugMode.value=this.worldRenderer.worldRendererConfig.shaderCubeDebugMode??0,e.needsUpdate=!0}getCubeShaderMaterial(){return this.isShaderCubesGpuEnabled()?(this.cubeShaderMaterial||(this.cubeShaderMaterial=er(),this.syncCubeShaderUniforms()),this.cubeShaderMaterial):null}getGlobalBlockBuffer(){let e=this.getCubeShaderMaterial();return e?(this.globalBlockBuffer||(this.globalBlockBuffer=new vr(e,this.scene)),this.globalBlockBuffer):null}shouldDeferShaderToPerSection(e){let t=this.worldRenderer.getModule("futuristicReveal");return t?t.isInInitialRevealCampaign?.()?!0:t.shouldUseRevealEffect?.(e)===!0:!1}migrateDeferredShaderToGlobal(e){let t=this.sectionObjects[e];if(!t?.deferredShaderCubes)return;let{words:r,count:i}=t.deferredShaderCubes,s=t.worldX,o=t.worldY,a=t.worldZ;s!==void 0&&o!==void 0&&a!==void 0&&this.registerShaderSectionRaycastBox(e,r,i,s,o,a),this.getGlobalBlockBuffer()?.addSection(e,r,i);let l=t.mesh===t.shaderMesh;t.shaderMesh&&(Wi(t.shaderMesh),t.remove(t.shaderMesh),t.shaderMesh=void 0),delete t.deferredShaderCubes,l&&(t.mesh=void 0)}registerShaderSectionRaycastBox(e,t,r,i,s,o){let a=va(t,r,i,s,o);a?this.shaderSectionRaycastBoxes.set(e,a):this.shaderSectionRaycastBoxes.delete(e)}unregisterShaderSectionRaycastBox(e){this.shaderSectionRaycastBoxes.delete(e)}raycastShaderSectionAABBs(e,t,r,i=80){let s=e.x,o=e.y,a=e.z,v=t.x,l=t.y,c=t.z,d=i*i,f=r,m=!1;for(let[g,b]of this.shaderSectionRaycastBoxes){let w=this.sectionObjects[g];if(w&&!w.visible)continue;let y=b.cx-s,A=b.cy-o,C=b.cz-a;if(y*y+A*A+C*C>d)continue;let M=la(s,o,a,v,l,c,b.minX,b.minY,b.minZ,b.maxX,b.maxY,b.maxZ,f);M!==void 0&&M<f&&(f=M,m=!0)}return m?f:void 0}updateSection(e,t){let r=t.positions.length>0,i=t.shaderCubes,s=this.isShaderCubesGpuEnabled()&&(i?.count??0)>0;if(!r&&!s)return this.releaseSection(e),null;let o=this.sectionObjects[e];o&&this.cleanupSection(e),r||this.releasePooledMesh(e);let a;if(r){let w=this.activeSections.get(e);if(!w){if(w=this.acquireMesh(),!w)return null;this.activeSections.set(e,w),w.sectionKey=e}let{mesh:y}=w;this.updateGeometryAttribute(y.geometry,"position",t.positions,3),this.updateGeometryAttribute(y.geometry,"normal",t.normals,3),this.updateGeometryAttribute(y.geometry,"color",t.colors,3),this.updateGeometryAttribute(y.geometry,"uv",t.uvs,2),y.geometry.index=new $.BufferAttribute(t.indices,1),y.geometry.boundingBox=new $.Box3(new $.Vector3(-8,-8,-8),new $.Vector3(8,8,8)),y.geometry.boundingSphere=new $.Sphere(new $.Vector3(0,0,0),Math.sqrt(3*8**2)),this.worldRenderer.sceneOrigin.track(y,{updateMatrix:!0}),y.position.set(t.sx,t.sy,t.sz),y.updateMatrix(),y.visible=!0,y.name="mesh",w.lastUsedTime=performance.now(),a=y}let v=s?this.getCubeShaderMaterial():null,l,c=s&&this.shouldDeferShaderToPerSection(e);s&&i&&(c&&v?(l=ar(i,v),l.visible=!0):this.getGlobalBlockBuffer()?.addSection(e,i.words,i.count)),o=new $.Group,a&&(o.add(a),o.mesh=a),l&&(o.add(l),o.shaderMesh=l,i&&(o.deferredShaderCubes={words:i.words,count:i.count}),o.mesh||(o.mesh=l)),s&&i&&this.registerShaderSectionRaycastBox(e,i.words,i.count,t.sx,t.sy,t.sz);let d=0;r&&(d+=t.positions.length/3/4),s&&i&&(d+=i.count),o.tilesCount=d,o.blocksCount=t.blocksCount,o.worldX=t.sx,o.worldY=t.sy,o.worldZ=t.sz,o.sectionKey=e,o.name="chunk";try{if(Object.keys(t.signs).length>0){let w=new $.Group;w.name="signs";for(let[y,{isWall:A,isHanging:C,rotation:M}]of Object.entries(t.signs)){let S=this.worldRenderer.blockEntities[y];if(!S)continue;let[H,B,I]=y.split(","),G=this.signHeadsRenderer.renderSign(new Ki(+H,+B,+I),M,A,C,cr.simplify(S));G&&w.add(G)}o.add(w),o.signsContainer=w}if(Object.keys(t.heads).length>0){let w=new $.Group;w.name="heads";for(let[y,{isWall:A,rotation:C}]of Object.entries(t.heads)){let M=this.worldRenderer.blockEntities[y];if(!M)continue;let[S,H,B]=y.split(","),I=this.signHeadsRenderer.renderHead(new Ki(+S,+H,+B),C,A,cr.simplify(M));I&&w.add(I)}o.add(w),o.headsContainer=w}if(Object.keys(t.banners).length>0){let w=new $.Group;w.name="banners",o.bannersContainer=w,o.add(w);for(let[y,{isWall:A,rotation:C,blockName:M}]of Object.entries(t.banners)){let S=this.worldRenderer.blockEntities[y];if(!S)continue;let[H,B,I]=y.split(","),G=fa(this.worldRenderer,M,cr.simplify(S));if(!G)continue;let O=ma(new Ki(+H,+B,+I),C,A,G),{x:j,y:J,z:X}=O.position;this.worldRenderer.sceneOrigin.track(O),O.position.set(j,J,X),w.add(O)}}}catch{}this.sectionObjects[e]=o,this.scene.add(o),o.matrixAutoUpdate=!1,this.worldRenderer.displayOptions?.inWorldRenderingConfig?.showChunkBorders&&this.updateBoxHelper(e,!0);let f=e.split(","),m=`${f[0]},${f[2]}`,g=!!this.worldRenderer.displayOptions?.inWorldRenderingConfig?._renderByChunks,b=!!this.worldRenderer.worldRendererConfig?.wasmMesher;if((g||b)&&!this.worldRenderer.finishedChunks[m]){o.visible=!1,o._waitingForChunkDisplay=!0;let w=this.waitingChunksToDisplay[m]??(this.waitingChunksToDisplay[m]=[]);w.includes(e)||w.push(e)}return o}finishChunkDisplay(e){if(!this.waitingChunksToDisplay[e]){this.tryRevealPending();return}if(this.isWasmGateActive()&&this.isBlockedByNearer(e,0)){this.pendingNearReveal.set(e,Date.now()),this.armNearRevealTimer(e),this.armExpectedGraceTimer(e);return}this.flushChunkDisplay(e),this.tryRevealPending()}flushChunkDisplay(e){let t=this.waitingChunksToDisplay[e];if(this.pendingNearReveal.delete(e),this.clearNearRevealTimer(e),this.clearExpectedGraceTimer(e),!!t){for(let r of t){let i=this.sectionObjects[r];i&&(i._waitingForChunkDisplay=!1,i.visible=!0)}delete this.waitingChunksToDisplay[e]}}tryRevealPending(){if(this.pendingNearReveal.size===0)return;let e=Date.now();for(let[t,r]of[...this.pendingNearReveal])this.isBlockedByNearer(t,e-r)||this.flushChunkDisplay(t)}onChunkRemovedFromGate(e){this.pendingNearReveal.delete(e),this.clearNearRevealTimer(e),this.clearExpectedGraceTimer(e),delete this.waitingChunksToDisplay[e],this.tryRevealPending()}isWasmGateActive(){return!!this.worldRenderer.worldRendererConfig?.wasmMesher}isBlockedByNearer(e,t){let r=this.worldRenderer.viewerChunkPosition;if(!r)return!1;let i=e.split(",");if(i.length!==2)return!1;let s=Number(i[0]),o=Number(i[1]),a=Math.floor(r.x/16),v=Math.floor(r.z/16),l=(s>>4)-a,c=(o>>4)-v,d=l*l+c*c;if(d===0)return!1;let f=this.worldRenderer.finishedChunks,m=this.worldRenderer.loadedChunks,g=this.worldRenderer.viewDistance;if(t<pt.EXPECTED_NEAR_GRACE_MS&&g>0){let w=g*g,y=Math.min(g,Math.ceil(Math.sqrt(Math.max(0,d-1))));for(let A=-y;A<=y;A++)for(let C=-y;C<=y;C++){let M=A*A+C*C;if(M>=d||M>w)continue;let S=a+A<<4,H=v+C<<4,B=`${S},${H}`;if(B!==e&&!f[B])return!0}return!1}for(let w in m){if(w===e||f[w])continue;let y=w.split(",");if(y.length!==2)continue;let A=(Number(y[0])>>4)-a,C=(Number(y[1])>>4)-v;if(A*A+C*C<d)return!0}return!1}armNearRevealTimer(e){if(this.nearRevealTimers.has(e))return;let t=setTimeout(()=>{this.nearRevealTimers.delete(e),this.pendingNearReveal.has(e)&&(this.flushChunkDisplay(e),this.tryRevealPending())},pt.NEAR_REVEAL_TIMEOUT_MS);this.nearRevealTimers.set(e,t)}clearNearRevealTimer(e){let t=this.nearRevealTimers.get(e);t&&(clearTimeout(t),this.nearRevealTimers.delete(e))}armExpectedGraceTimer(e){if(this.nearRevealGraceTimers.has(e))return;let t=setTimeout(()=>{this.nearRevealGraceTimers.delete(e),this.pendingNearReveal.has(e)&&this.tryRevealPending()},pt.EXPECTED_NEAR_GRACE_MS+50);this.nearRevealGraceTimers.set(e,t)}clearExpectedGraceTimer(e){let t=this.nearRevealGraceTimers.get(e);t&&(clearTimeout(t),this.nearRevealGraceTimers.delete(e))}cleanupSection(e){let t=this.sectionObjects[e];if(t){if(t._waitingForChunkDisplay){let r=e.split(","),i=`${r[0]},${r[2]}`,s=this.waitingChunksToDisplay[i];if(s){let o=s.indexOf(e);o!==-1&&s.splice(o,1),s.length===0&&delete this.waitingChunksToDisplay[i]}}if(t.bannersContainer&&(t.bannersContainer.traverse(r=>{r.bannerTexture&&ha(r.bannerTexture)}),this.disposeContainer(t.bannersContainer)),this.globalBlockBuffer?.removeSection(e),this.unregisterShaderSectionRaycastBox(e),t.shaderMesh&&(Wi(t.shaderMesh),t.shaderMesh=void 0),delete t.deferredShaderCubes,t.signsContainer&&this.disposeContainer(t.signsContainer),t.headsContainer&&this.disposeContainer(t.headsContainer),this.worldRenderer.sceneOrigin.removeAndUntrackAll(t),this.scene.remove(t),t.boxHelper){this.worldRenderer.sceneOrigin.removeAndUntrack(t.boxHelper),this.scene.remove(t.boxHelper),t.boxHelper.geometry.dispose();let r=t.boxHelper.material;if(Array.isArray(r))for(let i of r)i.dispose();else r.dispose();t.boxHelper=void 0}delete this.sectionObjects[e]}}releasePooledMesh(e){let t=this.activeSections.get(e);t&&(t.mesh.visible=!1,t.inUse=!1,t.sectionKey=void 0,t.lastUsedTime=0,this.clearGeometry(t.mesh.geometry),this.activeSections.delete(e),this.cleanupExcessMeshes())}releaseSection(e){this.cleanupSection(e);let t=this.activeSections.get(e);return t?(t.mesh.visible=!1,t.inUse=!1,t.sectionKey=void 0,t.lastUsedTime=0,this.clearGeometry(t.mesh.geometry),this.activeSections.delete(e),this.cleanupExcessMeshes(),!0):!1}getSectionObject(e){return this.sectionObjects[e]}updateBoxHelper(e,t,r=this.chunkBoxMaterial){let i=this.sectionObjects[e];if(i?.mesh)if(t){if(!i.boxHelper){let s=new $.Mesh(new $.BoxGeometry(16,16,16),r),o=new $.BoxHelper(s,16776960);o.name="helper";let a=i.worldX??0,v=i.worldY??0,l=i.worldZ??0;this.worldRenderer.sceneOrigin.track(o,{updateMatrix:!0}),o.position.set(a,v,l),o.updateMatrix(),this.scene.add(o),i.boxHelper=o}i.boxHelper.visible=!0}else i.boxHelper&&(i.boxHelper.visible=!1)}updateAllBoxHelpers(e){for(let t of Object.keys(this.sectionObjects))this.updateBoxHelper(t,e)}cleanSignChunkTextures(e,t){this.signHeadsRenderer.cleanChunkTextures(e,t)}getSectionMesh(e){return this.activeSections.get(e)?.mesh}hasSection(e){return this.activeSections.has(e)}updateViewDistance(e){let t=(e*2+1)**2,r=this.worldHeight/16,i=5;if(this.minPoolSize=Math.floor(t*i),this.maxPoolSize=Math.floor(t*r)+1,this.poolSize??(this.poolSize=this.minPoolSize),this.minPoolSize>this.poolSize){let s=Math.min(this.minPoolSize,this.maxPoolSize);this.expandPool(s)}}getStats(){let e=this.meshPool.filter(i=>!i.inUse).length,t=this.hits+this.misses>0?(this.hits/(this.hits+this.misses)*100).toFixed(1):"0",r=this.getEstimatedMemoryUsage();return{poolSize:this.poolSize,activeCount:this.activeSections.size,freeCount:e,hitRate:`${t}%`,hits:this.hits,misses:this.misses,memoryUsage:r}}getTotalTiles(){return Object.values(this.sectionObjects).reduce((e,t)=>e+(t.tilesCount||0),0)}getTotalBlocks(){return Object.values(this.sectionObjects).reduce((e,t)=>e+(t.blocksCount||0),0)}getEstimatedMemoryUsage(){let e=0,t=0,r=0,i=0,s=0,o=0,a=0,v=this.globalBlockBuffer?.mesh.geometry;if(v)for(let c of["a_w0","a_w1","a_w2","a_w3"]){let d=v.getAttribute(c);if(d){let f=d.array.byteLength;a+=f,e+=f}}for(let c of Object.values(this.sectionObjects)){let d=c.shaderMesh?.geometry;if(d)for(let f of["a_w0","a_w1","a_w2","a_w3"]){let m=d.getAttribute(f);if(m){let g=m.array.byteLength;a+=g,e+=g}}}for(let c of this.meshPool)if(c.inUse&&c.mesh.geometry){let{geometry:d}=c.mesh,f=d.getAttribute("position");if(f){let w=f.array.byteLength;t+=w,e+=w}let m=d.getAttribute("normal");if(m){let w=m.array.byteLength;r+=w,e+=w}let g=d.getAttribute("color");if(g){let w=g.array.byteLength;i+=w,e+=w}let b=d.getAttribute("uv");if(b){let w=b.array.byteLength;s+=w,e+=w}if(d.index){let w=d.index.array.byteLength;o+=w,e+=w}}return{total:`${(e/(1024*1024)).toFixed(2)} MB`,breakdown:{position:`${(t/(1024*1024)).toFixed(2)} MB`,normal:`${(r/(1024*1024)).toFixed(2)} MB`,color:`${(i/(1024*1024)).toFixed(2)} MB`,uv:`${(s/(1024*1024)).toFixed(2)} MB`,index:`${(o/(1024*1024)).toFixed(2)} MB`,shaderInstances:`${(a/(1024*1024)).toFixed(2)} MB`}}}dispose(){let e=[...this.activeSections.keys()];for(let t of e)this.releaseSection(t);this.signHeadsRenderer.dispose();for(let t of this.meshPool)t.mesh.geometry.dispose();this.meshPool.length=0,this.activeSections.clear(),this.chunkBoxMaterial.dispose(),this.shaderSectionRaycastBoxes.clear(),this.globalBlockBuffer?.dispose(),this.globalBlockBuffer=null,this.cubeShaderMaterial?.dispose(),this.cubeShaderMaterial=null,this.pendingNearReveal.clear();for(let t of this.nearRevealTimers.values())clearTimeout(t);this.nearRevealTimers.clear();for(let t of this.nearRevealGraceTimers.values())clearTimeout(t);this.nearRevealGraceTimers.clear()}acquireMesh(){if(this.bypassPooling){let t={mesh:new $.Mesh(new $.BufferGeometry,this.material),inUse:!0,lastUsedTime:performance.now()};return this.meshPool.push(t),this.poolSize++,t}for(let t of this.meshPool)if(!t.inUse)return t.inUse=!0,t.lastUsedTime=performance.now(),this.hits++,t;this.misses++;let e=Math.min(this.poolSize+16,this.maxPoolSize);e<=this.meshPool.length&&(e=this.meshPool.length+8,this.maxPoolSize=e),this.expandPool(e);for(let t=this.meshPool.length-1;t>=0;t--){let r=this.meshPool[t];if(!r.inUse)return r.inUse=!0,r.lastUsedTime=performance.now(),r}throw new Error("ChunkMeshManager: Failed to acquire mesh after pool expansion")}expandPool(e){let t=this.meshPool.length;this.poolSize=e;for(let r=t;r<e;r++){let i=new $.BufferGeometry,s=new $.Mesh(i,this.material);s.visible=!1,s.matrixAutoUpdate=!1,s.name="pooled-section-mesh";let o={mesh:s,inUse:!1,lastUsedTime:0};this.meshPool.push(o)}}updateGeometryAttribute(e,t,r,i){let s=e.getAttribute(t);s&&s.count===r.length/i?(s.array.set(r),s.needsUpdate=!0):e.setAttribute(t,new $.BufferAttribute(r,i))}clearGeometry(e){let t=["position","normal","color","uv"];for(let r of t)e.hasAttribute(r)&&e.deleteAttribute(r);e.index&&e.setIndex(null),e.boundingBox=null,e.boundingSphere=null}cleanupExcessMeshes(){if(this.poolSize>this.maxPoolSize){let e=this.meshPool.filter(t=>!t.inUse).length;if(e>0){let t=Math.min(this.poolSize-this.maxPoolSize,e);for(let r=0;r<t;r++){let i=this.meshPool.findIndex(s=>!s.inUse);i!==-1&&(this.meshPool[i].mesh.geometry.dispose(),this.meshPool.splice(i,1),this.poolSize--)}}}}disposeContainer(e){R0(e,!0)}recordRenderTime(e){this.renderTimes.push(e),this.renderTimes.length>this.maxRenderTimeSamples&&this.renderTimes.shift();let t=performance.now();t-this.lastPerformanceCheck>this.performanceCheckInterval&&(this.checkPerformance(),this.lastPerformanceCheck=t)}getEffectiveRenderDistance(){return this.performanceOverrideDistance||this.worldRenderer.viewDistance}resetPerformanceOverride(){this.performanceOverrideDistance=void 0,this.renderTimes.length=0}getAverageRenderTime(){return this.renderTimes.length===0?0:this.renderTimes.reduce((e,t)=>e+t,0)/this.renderTimes.length}checkPerformance(){if(this.renderTimes.length<this.maxRenderTimeSamples)return;let e=this.getAverageRenderTime(),t=16.67,r=t*1.5;if(e>r){let i=this.worldRenderer.viewDistance,s=Math.max(1,Math.floor(i*.8));(!this.performanceOverrideDistance||s<this.performanceOverrideDistance)&&(this.performanceOverrideDistance=s)}else if(this.performanceOverrideDistance&&e<t*1.1){let i=this.worldRenderer.viewDistance,s=Math.min(i,this.performanceOverrideDistance+1);s!==this.performanceOverrideDistance&&(this.performanceOverrideDistance=s>=i?void 0:s)}}updateSectionsVisibility(){let e=this.worldRenderer.cameraSectionPos;for(let[t,r]of Object.entries(this.sectionObjects)){if(r._waitingForChunkDisplay){r.visible=!1;continue}if(!this.performanceOverrideDistance){r.visible=!0;continue}let[i,s,o]=t.split(",").map(Number),a={x:i/16,y:s/16,z:o/16},v=a.x-e.x,l=a.z-e.z,c=Math.floor(Math.hypot(v,l));r.visible=c<=this.performanceOverrideDistance}}};u(pt,"NEAR_REVEAL_TIMEOUT_MS",5e3),u(pt,"EXPECTED_NEAR_GRACE_MS",1500);var Y5=pt,Ji=class{constructor(e){this.worldRendererThree=e;u(this,"chunkTextures",new Map)}dispose(){for(let[,e]of this.chunkTextures)for(let t of Object.keys(e))e[t].dispose();this.chunkTextures.clear()}renderHead(e,t,r,i){let s;if(i.SkullOwner?s=i.SkullOwner.Properties?.textures?.[0]?.Value:s=i.profile?.properties?.find(o=>o.name==="textures")?.value,!!s)try{let a=JSON.parse(z.from(s,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:v}=this.worldRendererThree.worldRendererConfig;v&&(a=a?.replace("http://textures.minecraft.net/",v).replace("https://textures.minecraft.net/",v));let l=De(this.worldRendererThree,a,ze.head),c=new $.Group;return r&&l.position.set(0,.3125,.3125),l.position.y-=23/16,c.add(l),this.worldRendererThree.sceneOrigin.track(c),c.position.set(e.x+.5,e.y+.045,e.z+.5),c.rotation.set(0,-$.MathUtils.degToRad(t*(r?90:45/2)),0),c.scale.set(.8,.8,.8),c}catch{}}renderSign(e,t,r,i,s){let o=this.getSignTexture(e,s,i);if(!o)return;let a=new $.Mesh(new $.PlaneGeometry(1,1),new $.MeshBasicMaterial({map:o,transparent:!0}));a.renderOrder=999;let v=7/16,l=i?1.3:1;a.scale.set(1*l,v*l,1*l);let c=(i?2:1.5)/16,d=.25/16;r&&!i?a.position.set(0,0,-.5+c+d+1e-4):a.position.set(0,0,c/2+1e-4);let f=new $.Group;f.rotation.set(0,-$.MathUtils.degToRad(t*(r?90:45/2)),0),f.add(a);let m=(i?10:8)/16,g=(i?0:r?4.333:9.333)/16,b=m/2+g;return this.worldRendererThree.sceneOrigin.track(f),f.position.set(e.x+.5,e.y+b,e.z+.5),f}getSignTexture(e,t,r,i=!1){let s=Ct(e),o=this.chunkTextures.get(`${s[0]},${s[1]}`);o||(o={},this.chunkTextures.set(`${s[0]},${s[1]}`,o));let a=`${e.x},${e.y},${e.z}`;if(o[a])return o[a];let v=Dv(this.worldRendererThree.version),l=m1(t,r,v);if(!l)return;let c=new $.Texture(l);return c.magFilter=$.NearestFilter,c.minFilter=$.NearestFilter,c.needsUpdate=!0,o[a]=c,c}cleanChunkTextures(e,t){let r=`${Math.floor(e/16)},${Math.floor(t/16)}`,i=this.chunkTextures.get(r);if(i)for(let s of Object.keys(i))i[s].dispose(),delete i[s]}};E();x();k();R();E();x();k();R();import*as Ge from"three";var dr={},pa=!1;function zv(){if(pa)return;let n=globalThis.loadedData?.tints;if(n){for(let e of Object.keys(n))dr[e]=Lv(n[e]);pa=!0}}function Lv(n){let e={},t=ga(n.default??16777215);if(n.data)for(let r of n.data){let i=ga(r.color);for(let s of r.keys)e[s]=i}return new Proxy(e,{get(r,i){return r[i]??t}})}function ga(n){return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]}function ba(n,e){return zv(),n==="grass_block"?[1,1,1]:n==="redstone_wire"?[1,1,1]:n==="birch_leaves"||n==="spruce_leaves"||n==="lily_pad"?dr.constant?.[n]??[1,1,1]:n.includes("leaves")||n==="vine"?dr.foliage?.[e]??[1,1,1]:["short_grass","tall_grass","fern","large_fern","sugar_cane","grass"].includes(n)?dr.grass?.[e]??[1,1,1]:[1,1,1]}var Uv=512,qi=1/20,Zi=class{constructor(e){this.worldRenderer=e;u(this,"particles",[]);u(this,"sharedMaterial");u(this,"enabled",!1);u(this,"tickAccumulator",0);u(this,"nextParticleIndex",0);u(this,"render",e=>{if(!this.enabled)return;for(this.tickAccumulator+=e;this.tickAccumulator>=qi;)this.tickAccumulator-=qi,this.tickPhysics();let t=this.tickAccumulator/qi;this.updateVisuals(t)})}enable(){this.enabled||(this.enabled=!0,this.ensureMaterial())}disable(){this.enabled&&(this.enabled=!1)}dispose(){for(let e of this.particles)e.active&&this.worldRenderer.sceneOrigin.removeAndUntrack(e.mesh),e.mesh.geometry.dispose();this.particles=[],this.sharedMaterial?.dispose(),this.sharedMaterial=void 0,this.nextParticleIndex=0}spawnBlockBreakParticles(e,t,r,i,s,o="plains"){if(!this.enabled)return;let a=this.resolveBlockTexture(i);if(!a)return;let v=ba(i,o);for(let l=0;l<4;l++)for(let c=0;c<4;c++)for(let d=0;d<4;d++){let f=e+(l+.5)/4,m=t+(c+.5)/4,g=r+(d+.5)/4,b=f-e-.5,w=m-t-.5,y=g-r-.5;b+=(Math.random()*2-1)*.4,w+=(Math.random()*2-1)*.4,y+=(Math.random()*2-1)*.4;let A=(Math.random()+Math.random()+1)*.15,C=Math.sqrt(b*b+w*w+y*y),M=b/C*A*.4,S=w/C*A*.4+.1,H=y/C*A*.4,B=Math.floor(4/(Math.random()*.9+.1));this.createParticle(f,m,g,M,S,H,B,a,s,e,r,1,v)}}tickPhysics(){for(let e of this.particles){if(!e.active)continue;if(e.prevX=e.x,e.prevY=e.y,e.prevZ=e.z,e.age++,e.age>=e.maxAge){this.deactivateParticle(e);continue}e.yd-=.04,e.x+=e.xd,e.y+=e.yd,e.z+=e.zd;let t=this.getFloorY(e);e.y<=t?(e.y=t,e.yd=0,e.onGround=!0):e.onGround=!1,e.xd*=.98,e.yd*=.98,e.zd*=.98,e.onGround&&(e.xd*=.7,e.zd*=.7)}}updateVisuals(e){let t=this.worldRenderer.camera.position;for(let r of this.particles){if(!r.active)continue;let i=r.prevX+(r.x-r.prevX)*e,s=r.prevY+(r.y-r.prevY)*e,o=r.prevZ+(r.z-r.prevZ)*e;r.mesh.position.set(i,s,o),r.mesh.lookAt(t.x,t.y,t.z)}}spawnCrackParticle(e,t,r,i,s,o,a="plains"){if(!this.enabled)return;let v=this.resolveBlockTexture(s);if(!v)return;let l=ba(s,a),c=e+Math.random()*.8+.1,d=t+Math.random()*.8+.1,f=r+Math.random()*.8+.1;switch(i){case 0:d=t-.1;break;case 1:d=t+1+.1;break;case 2:f=r-.1;break;case 3:f=r+1+.1;break;case 4:c=e-.1;break;case 5:c=e+1+.1;break}let m=(Math.random()*2-1)*.4*.2,g=(Math.random()*2-1)*.4*.2+.1*.2,b=(Math.random()*2-1)*.4*.2,w=Math.floor(4/(Math.random()*.9+.1));this.createParticle(c,d,f,m,g,b,w,v,o,e,r,.6,l)}createParticle(e,t,r,i,s,o,a,v,l,c,d,f=1,m=[1,1,1]){this.ensureMaterial();let g=this.findInactiveParticle();g||(this.particles.length<Uv?g=this.allocateParticle():g=this.recycleOldest());let b=Math.floor(Math.random()*4),w=Math.floor(Math.random()*4),y=v.u+b/4*v.su,A=v.v+w/4*v.sv,C=v.su/4,M=v.sv/4;this.setGeometryUVs(g.mesh.geometry,y,A,C,M),g.active=!0,g.x=e,g.y=t,g.z=r,g.prevX=e,g.prevY=t,g.prevZ=r,g.xd=i,g.yd=s,g.zd=o,g.age=0,g.maxAge=a,g.onGround=!1,g.floorMap=l,g.blockX=Math.floor(c),g.blockZ=Math.floor(d);let S=.1*(.5+Math.random()*.5)*2*f;g.mesh.scale.set(S,S,S),g.mesh.position.set(e,t,r),g.mesh.visible=!0;let H=.6*m[0],B=.6*m[1],I=.6*m[2],G=new Float32Array([H,B,I,H,B,I,H,B,I,H,B,I]),O=g.mesh.geometry.getAttribute("color");O?(O.set(G),O.needsUpdate=!0):g.mesh.geometry.setAttribute("color",new Ge.Float32BufferAttribute(G,3)),this.worldRenderer.sceneOrigin.addAndTrack(g.mesh)}allocateParticle(){let e=new Ge.PlaneGeometry(1,1),t=new Ge.Mesh(e,this.sharedMaterial);t.visible=!1;let r={mesh:t,active:!1,x:0,y:0,z:0,prevX:0,prevY:0,prevZ:0,xd:0,yd:0,zd:0,age:0,maxAge:0,onGround:!1,floorMap:[],blockX:0,blockZ:0};return this.particles.push(r),r}findInactiveParticle(){for(let e=0;e<this.particles.length;e++){let t=(this.nextParticleIndex+e)%this.particles.length;if(!this.particles[t].active)return this.nextParticleIndex=(t+1)%this.particles.length,this.particles[t]}}recycleOldest(){let e=this.particles[0];for(let t of this.particles)t.age>e.age&&(e=t);return this.deactivateParticle(e),e}deactivateParticle(e){e.active&&(e.active=!1,e.mesh.visible=!1,this.worldRenderer.sceneOrigin.removeAndUntrack(e.mesh))}getFloorY(e){let t=Math.floor(e.x)-e.blockX,r=Math.floor(e.z)-e.blockZ;return t=Math.max(-2,Math.min(2,t)),r=Math.max(-2,Math.min(2,r)),e.floorMap[(r+2)*5+(t+2)]}resolveBlockTexture(e){let t=this.worldRenderer.resourcesManager.currentResources;if(!t)return null;let r=t.blocksAtlasJson,i=r.textures;if(i[e])return this.extractUV(i[e],r);for(let s of["_side","_top","_front","_0",""]){let o=e+s;if(i[o])return this.extractUV(i[o],r)}for(let s of Object.keys(i))if(s.startsWith(e))return this.extractUV(i[s],r);return null}extractUV(e,t){return{u:e.u,v:e.v,su:e.su??t.suSv,sv:e.sv??t.suSv}}setGeometryUVs(e,t,r,i,s){let o=e.getAttribute("uv");o.setXY(0,t,r),o.setXY(1,t+i,r),o.setXY(2,t,r+s),o.setXY(3,t+i,r+s),o.needsUpdate=!0}ensureMaterial(){if(this.sharedMaterial)return;let e=this.worldRenderer.material.map;e&&(this.sharedMaterial=new Ge.MeshBasicMaterial({map:e,vertexColors:!0,transparent:!0,alphaTest:.1}))}},ya={id:"blockBreakParticles",controller:Zi,enabledDefault:!0,cannotBeDisabled:!0,requiresHeightmap:!1};E();x();k();R();var Xi=class{constructor(e){this.worldRenderer=e;u(this,"enabled",!1);u(this,"lastBobWalkDist",0);u(this,"lastBobTickTime",0);u(this,"render",()=>{if(!this.enabled)return;let e=this.worldRenderer.displayOptions.inWorldRenderingConfig,{perspective:t}=this.worldRenderer.playerStateReactive;if(e.viewBobbing&&t==="first_person"&&!this.worldRenderer.playerStateUtils.isSpectator()){this.worldRenderer.playerStateReactive.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=performance.now(),this.lastBobWalkDist=this.worldRenderer.playerStateReactive.walkDist);let i=Math.min((performance.now()-this.lastBobTickTime)/50,1);this.worldRenderer.cameraShake.setCameraBobInput({walkDist:this.worldRenderer.playerStateReactive.walkDist,prevWalkDist:this.worldRenderer.playerStateReactive.prevWalkDist,bob:this.worldRenderer.playerStateReactive.bob,prevBob:this.worldRenderer.playerStateReactive.prevBob,partialTick:i})}else this.worldRenderer.cameraShake.setCameraBobInput(null)})}enable(){this.enabled=!0}disable(){this.enabled=!1,this.worldRenderer.cameraShake.setCameraBobInput(null);let{perspective:e}=this.worldRenderer.playerStateReactive;e==="first_person"&&this.worldRenderer.camera.position.set(0,0,0)}dispose(){this.disable()}},_a={id:"cameraBobbing",controller:Xi,enabledDefault:!0,cannotBeDisabled:!0};E();x();k();R();import*as I0 from"three";var $i=2e3,wa=32,Aa=32,ur=12,Ea=24,fr=1.2,Gv=-5;var en=class{constructor(e){this.worldRenderer=e;u(this,"instancedMesh");u(this,"geometry");u(this,"material");u(this,"particles",[]);u(this,"enabled",!1);u(this,"dummy",new I0.Matrix4);u(this,"tempPosition",new I0.Vector3);u(this,"tempQuaternion",new I0.Quaternion);u(this,"tempScale",new I0.Vector3);u(this,"render",e=>{if(!this.enabled||!this.instancedMesh||!this.material)return;this.syncMaterialToSceneFog();let t=this.worldRenderer.getCameraPosition();this.instancedMesh.position.set(0,0,0);let r=this.worldRenderer.reactiveState.world.heightmaps,{dummy:i,tempPosition:s,tempQuaternion:o,tempScale:a}=this,v=NaN,l=NaN,c;for(let d=0;d<$i;d++){let f=this.particles[d];this.instancedMesh.getMatrixAt(d,i),i.decompose(s,o,a),s.addScaledVector(f.velocity,e);let m=s.y,g=Math.sqrt(s.x*s.x+s.z*s.z),b=t.x+s.x,w=t.y+s.y,y=t.z+s.z,A=Math.floor(b/16),C=Math.floor(y/16);(A!==v||C!==l)&&(c=r.get(`${A},${C}`),v=A,l=C);let M=(Math.floor(b)%16+16)%16,S=(Math.floor(y)%16+16)%16,H=c?.[S*16+M];if(g>wa||H!==void 0&&H!==-32768&&w<=H+1+f.despawnOffset||m<Gv){this.respawnParticle(s);let I=ur+Math.random()*(Ea-ur);f.velocity.set((Math.random()-.5)*fr,-I,(Math.random()-.5)*fr),f.despawnOffset=Math.random()*.5}i.compose(s,o,a),this.instancedMesh.setMatrixAt(d,i)}this.instancedMesh.instanceMatrix.needsUpdate=!0})}enable(){this.enabled||(this.enabled=!0,this.instancedMesh?this.instancedMesh.visible=!0:this.createRain())}disable(){this.enabled&&(this.enabled=!1,this.instancedMesh&&(this.instancedMesh.visible=!1))}autoEnableCheck(){return this.worldRenderer.worldRendererConfig.isRaining===!0}dispose(){this.instancedMesh&&this.worldRenderer.scene.remove(this.instancedMesh),this.geometry?.dispose(),this.material?.dispose(),this.instancedMesh=void 0,this.geometry=void 0,this.material=void 0,this.particles=[]}syncMaterialToSceneFog(){if(!this.material)return;let e=this.worldRenderer.scene.fog;e instanceof I0.Fog||e instanceof I0.FogExp2?this.material.color.copy(e.color):this.material.color.set(13426158),this.material.fog=!0}createRain(){this.geometry=new I0.BoxGeometry(.03,.3,.03),this.material=new I0.MeshBasicMaterial({color:13426158,transparent:!0,opacity:.35,depthWrite:!0,fog:!0}),this.instancedMesh=new I0.InstancedMesh(this.geometry,this.material,$i),this.instancedMesh.name="rain-particles",this.instancedMesh.frustumCulled=!1,this.syncMaterialToSceneFog();let e=new I0.Matrix4,t=new I0.Vector3;for(let r=0;r<$i;r++){this.respawnParticle(t),t.y=Math.random()*Aa,e.setPosition(t),this.instancedMesh.setMatrixAt(r,e);let i=ur+Math.random()*(Ea-ur);this.particles.push({velocity:new I0.Vector3((Math.random()-.5)*fr,-i,(Math.random()-.5)*fr),age:0,despawnOffset:Math.random()*.5})}this.instancedMesh.instanceMatrix.needsUpdate=!0,this.worldRenderer.scene.add(this.instancedMesh)}respawnParticle(e){let t=Math.random()*Math.PI*2,r=Math.random()*wa;e.set(Math.cos(t)*r,Aa,Math.sin(t)*r)}},xa={id:"rain",controller:en,enabledDefault:!1,requiresHeightmap:!0};E();x();k();R();import*as w0 from"three";var Ra=new w0.Color(13/255,234/255,238/255),Nv=9;var Wv=350,Vv=650;var jv=120,Yv=280,tn=class{constructor(e){this.worldRenderer=e;u(this,"pendingGeometries",new Map);u(this,"revealingSections",new Map);u(this,"finishedChunkCount",0);u(this,"revealTriggered",!1);u(this,"revealStartTime",0);u(this,"enabled",!1);u(this,"onWorldSwitchedCb",null);u(this,"patched",!1);u(this,"initialWaveDone",!1);u(this,"initialRevealWaveSettled",!1);u(this,"wireframeMaterial");u(this,"wireframeGlowMaterial");u(this,"pulseTime",0);u(this,"revealedChunks",new Set);u(this,"originalFinishChunk",null);u(this,"originalDestroy",null);u(this,"originalSceneAdd",null);u(this,"originalHandleWorkerMessage",null);u(this,"render",e=>{this.enabled&&this.update(e*1e3)});this.wireframeMaterial=new w0.LineBasicMaterial({color:Ra,transparent:!0,opacity:1,blending:w0.AdditiveBlending,depthWrite:!1}),this.wireframeGlowMaterial=new w0.LineBasicMaterial({color:Ra,transparent:!0,opacity:.55,blending:w0.AdditiveBlending,depthWrite:!1})}isFuturisticRevealConfigured(){return this.worldRenderer.worldRendererConfig.futuristicReveal===!0}isInInitialRevealCampaign(){return this.enabled&&!this.initialRevealWaveSettled}autoEnableCheck(){return this.isFuturisticRevealConfigured()}enable(){if(this.isFuturisticRevealConfigured()&&!(this.enabled&&this.patched)){if(this.enabled&&!this.patched){this.patchWorldRenderer();return}this.enabled=!0,this.patchWorldRenderer()}}disable(){this.enabled&&(this.enabled=!1,this.unpatchWorldRenderer(),this.reset())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}dispose(){this.disable(),this.wireframeMaterial.dispose(),this.wireframeGlowMaterial.dispose()}patchWorldRenderer(){if(this.patched)return;this.patched=!0;let e=this.worldRenderer;this.onWorldSwitchedCb=()=>this.reset(),e.onWorldSwitched.push(this.onWorldSwitchedCb),this.originalFinishChunk=e.finishChunk.bind(e),e.finishChunk=t=>{this.originalFinishChunk(t),this.onChunkFinished(t)},this.originalDestroy=e.destroy.bind(e),e.destroy=()=>{this.dispose(),this.originalDestroy()},this.originalHandleWorkerMessage=e.handleWorkerMessage.bind(e),e.handleWorkerMessage=t=>{this.originalHandleWorkerMessage(t),this.enabled&&t?.type==="geometry"&&Promise.resolve().then(()=>{try{this.registerSection(t.key,t.geometry)}catch{}})},this.originalSceneAdd=e.scene.add.bind(e.scene),e.scene.add=(...t)=>{let r=this.originalSceneAdd(...t);for(let i of t)this.checkAndPatchMesh(i);return r}}unpatchWorldRenderer(){let e=this.worldRenderer;if(this.originalFinishChunk&&(e.finishChunk=this.originalFinishChunk,this.originalFinishChunk=null),this.originalDestroy&&(e.destroy=this.originalDestroy,this.originalDestroy=null),this.originalHandleWorkerMessage&&(e.handleWorkerMessage=this.originalHandleWorkerMessage,this.originalHandleWorkerMessage=null),this.originalSceneAdd&&(e.scene.add=this.originalSceneAdd,this.originalSceneAdd=null),this.onWorldSwitchedCb){let t=e.onWorldSwitched.indexOf(this.onWorldSwitchedCb);t!==-1&&e.onWorldSwitched.splice(t,1),this.onWorldSwitchedCb=null}this.patched=!1}checkAndPatchMesh(e){if(e instanceof w0.Mesh&&(e.name==="mesh"||e.name==="shaderMesh")){let t=this.findSectionKeyForMesh(e);t&&this.shouldUseRevealEffect(t)&&(e.visible=!1,e.hiddenByReveal=!0)}for(let t of e.children)this.checkAndPatchMesh(t)}findSectionKeyForMesh(e){let t=e;for(;t;){let{sectionKey:m}=t;if(m&&this.worldRenderer.chunkMeshManager.sectionObjects[m]===t)return m;t=t.parent}let r=this.worldRenderer.sceneOrigin.getWorldPosition(e),i=r?.x??this.worldRenderer.sceneOrigin.toWorldX(e.position.x),s=r?.y??this.worldRenderer.sceneOrigin.toWorldY(e.position.y),o=r?.z??this.worldRenderer.sceneOrigin.toWorldZ(e.position.z),a=16,v=this.worldRenderer.getSectionHeight(),l=Math.floor(i/a)*a,c=Math.floor(s/v)*v,d=Math.floor(o/a)*a,f=`${l},${c},${d}`;return this.worldRenderer.chunkMeshManager.sectionObjects[f]?f:null}get scene(){return this.worldRenderer.realScene}getCameraPosition(){return this.worldRenderer.getCameraPosition()}sectionHasRevealContent(e){return(e.wireframePositions?.length??0)>0||(e.positions?.length??0)>0?!0:(e.shaderCubes?.count??0)>0}getSectionRenderMeshes(e){let t=this.worldRenderer.chunkMeshManager.sectionObjects[e];if(!t)return[];let r=[];for(let i of["mesh","shaderMesh"]){let s=t.children.find(o=>o.name===i);s instanceof w0.Mesh&&r.push(s)}return r}hideSectionRenderMeshes(e){let t=this.getSectionRenderMeshes(e);for(let r of t)r.visible=!1,r.hiddenByReveal=!0;return t}setMeshFadeOpacity(e,t){if(e.name==="shaderMesh"){e.visible=t>.001;return}let r=e.material;if(!Array.isArray(r))if(r.originalMaterial)r.opacity=t,r.transparent=!0,r.needsUpdate=!0;else{r.originalMaterial=r;let i=r.clone();i.transparent=!0,i.opacity=t,i.needsUpdate=!0,e.material=i}}restoreMeshMaterial(e){let t=e.originalMaterial;if(!t)return;let r=e.material;e.material=t,r!==t&&r.dispose(),delete e.originalMaterial}onChunkFinished(e){this.finishedChunkCount++,!this.revealTriggered&&this.finishedChunkCount>=Nv&&this.triggerReveal()}registerSection(e,t){if(!(this.revealedChunks.has(e)||this.revealingSections.has(e))){if(this.revealTriggered&&this.initialWaveDone){this.revealedChunks.add(e);return}this.revealTriggered?this.startSectionReveal(e,t):this.pendingGeometries.set(e,t)}}shouldUseRevealEffect(e){return!this.enabled||this.revealTriggered&&this.initialWaveDone?!1:!this.revealedChunks.has(e)&&!this.revealingSections.has(e)}triggerReveal(){this.revealTriggered=!0,this.initialWaveDone=!0,this.revealStartTime=performance.now();let e=this.getCameraPosition(),t=[...this.pendingGeometries.entries()];this.pendingGeometries.clear();let r=t.map(([s,o])=>{let a=Math.hypot(o.sx-e.x,o.sy-e.y,o.sz-e.z);return{key:s,geometry:o,distance:a}}).sort((s,o)=>s.distance-o.distance),i=r.at(-1)?.distance||1;for(let{key:s,geometry:o,distance:a}of r){let v=a/i*1500;setTimeout(()=>{!this.revealedChunks.has(s)&&!this.revealingSections.has(s)&&this.startSectionReveal(s,o)},v)}}startSectionReveal(e,t){if(!this.sectionHasRevealContent(t)||this.revealingSections.has(e)||this.revealedChunks.has(e))return;let r=this.createWireframeGeometry(t),i=this.worldRenderer.chunkMeshManager.globalBlockBuffer,s=i?.hasSection(e)?i.takeSectionData(e):void 0,o=this.hideSectionRenderMeshes(e),a=new w0.LineSegments(r,this.wireframeMaterial.clone());this.worldRenderer.sceneOrigin.track(a),a.position.set(t.sx,t.sy,t.sz),a.name="scifi-wireframe",a.renderOrder=1e3;let v=new w0.LineSegments(r.clone(),this.wireframeGlowMaterial.clone());this.worldRenderer.sceneOrigin.track(v),v.position.set(t.sx,t.sy,t.sz),v.scale.set(1.02,1.02,1.02),v.name="scifi-glow",v.renderOrder=999;let l=new w0.Group;l.add(a),l.add(v),l.name="scifi-reveal-group",l.sectionKey=e,this.scene.add(l);let c=this.initialWaveDone?jv:Wv,d=this.initialWaveDone?Yv:Vv,f={key:e,wireframeGroup:l,revealStartTime:performance.now(),phase:"wireframe",renderMeshRefs:o,globalShaderRestore:s,wireframeMs:c,revealMs:d};setTimeout(()=>{for(let m of this.getSectionRenderMeshes(e))m.hiddenByReveal||this.hideSectionRenderMeshes(e)},0),this.revealingSections.set(e,f)}createSectionBoundsWireframe(){let r=[[-8,-8,-8],[8,-8,-8],[-8,8,-8],[8,8,-8],[-8,-8,8],[8,-8,8],[-8,8,8],[8,8,8]],i=[[0,1],[1,3],[3,2],[2,0],[4,5],[5,7],[7,6],[6,4],[0,4],[1,5],[2,6],[3,7]],s=[];for(let[a,v]of i)s.push(...r[a],...r[v]);let o=new w0.BufferGeometry;return o.setAttribute("position",new w0.Float32BufferAttribute(s,3)),o}createWireframeGeometry(e){if(e.wireframePositions&&e.wireframePositions.length>0){let a=new w0.BufferGeometry;return a.setAttribute("position",new w0.Float32BufferAttribute(e.wireframePositions,3)),a}let t=e.positions,r=e.indices;if(!t?.length||!r?.length)return this.createSectionBoundsWireframe();let i=[],s=new Set;for(let a=0;a<r.length;a+=3){let v=r[a],l=r[a+1],c=r[a+2];this.addEdge(t,v,l,i,s),this.addEdge(t,l,c,i,s),this.addEdge(t,c,v,i,s)}let o=new w0.BufferGeometry;return o.setAttribute("position",new w0.Float32BufferAttribute(i,3)),o}addEdge(e,t,r,i,s){let o=Math.min(t,r),a=Math.max(t,r),v=`${o}-${a}`;s.has(v)||(s.add(v),i.push(e[t*3],e[t*3+1],e[t*3+2],e[r*3],e[r*3+1],e[r*3+2]))}update(e){if(!this.enabled||this.revealingSections.size===0)return;this.pulseTime+=e*.001;let t=performance.now(),r=.6+.4*Math.sin(this.pulseTime*4),i=[];for(let[s,o]of this.revealingSections){let a=t-o.revealStartTime;if(o.phase==="wireframe"){let v=o.wireframeGroup.children[0],l=o.wireframeGroup.children[1];if(v?.material){let c=v.material;c.opacity=r;let d=.85+.15*Math.sin(this.pulseTime*6+a*.002);c.color.setRGB(13/255*d,234/255*d,238/255*d)}if(l?.material){let c=l.material;c.opacity=r*.4}if(a>o.wireframeMs){o.phase="transitioning",o.renderMeshRefs=this.getSectionRenderMeshes(s);for(let c of o.renderMeshRefs)c.visible=!0,this.setMeshFadeOpacity(c,0)}}else if(o.phase==="transitioning"){let v=a-o.wireframeMs,l=Math.min(1,v/o.revealMs),c=1-(1-l)**3,d=o.wireframeGroup.children[0],f=o.wireframeGroup.children[1];if(d?.material){let m=d.material;m.opacity=1-c}if(f?.material){let m=f.material;m.opacity=(1-c)*.55}for(let m of o.renderMeshRefs)this.setMeshFadeOpacity(m,c);l>=1&&(o.phase="complete",i.push(o))}}for(let s of i)this.completeReveal(s)}completeReveal(e){this.revealingSections.delete(e.key),this.revealedChunks.add(e.key),this.revealTriggered&&this.revealingSections.size===0&&(this.initialRevealWaveSettled=!0);for(let t of e.renderMeshRefs)this.restoreMeshMaterial(t),t.visible=!0,delete t.hiddenByReveal;this.worldRenderer.chunkMeshManager.migrateDeferredShaderToGlobal(e.key),e.globalShaderRestore&&this.worldRenderer.chunkMeshManager.globalBlockBuffer?.addSection(e.key,e.globalShaderRestore.words,e.globalShaderRestore.count),this.disposeWireframeGroup(e.wireframeGroup)}disposeWireframeGroup(e){this.worldRenderer.sceneOrigin.removeAndUntrackAll(e);let t=[];e.traverse(r=>{t.push(r)});for(let r of t){let i=r;if(i.geometry&&i.geometry.dispose(),i.material){let s=i.material;if(Array.isArray(s))for(let o of s)o.dispose();else s&&typeof s.dispose=="function"&&s.dispose()}}e.clear()}reset(){for(let e of this.revealingSections.values())this.disposeWireframeGroup(e.wireframeGroup);this.pendingGeometries.clear(),this.revealingSections.clear(),this.revealedChunks.clear(),this.finishedChunkCount=0,this.revealTriggered=!1,this.initialWaveDone=!1,this.initialRevealWaveSettled=!1,this.revealStartTime=0,this.pulseTime=0}forceCompleteAll(){let e=[...this.revealingSections.values()];for(let t of e){t.renderMeshRefs=this.getSectionRenderMeshes(t.key);for(let r of t.renderMeshRefs)this.restoreMeshMaterial(r),r.visible=!0,delete r.hiddenByReveal;this.completeReveal(t)}}debugGetWireframeGroups(){let e=[];return this.scene.traverse(t=>{t.name==="scifi-reveal-group"&&e.push(t)}),e}debugForceCleanup(){let e=this.debugGetWireframeGroups();for(let t of e)this.disposeWireframeGroup(t);for(let t of this.revealingSections.values())this.disposeWireframeGroup(t.wireframeGroup);this.revealingSections.clear()}debugStatus(){let e=this.debugGetWireframeGroups(),t=new Set(this.revealingSections.keys()),r=e.filter(i=>!t.has(i.sectionKey));return{revealTriggered:this.revealTriggered,finishedChunkCount:this.finishedChunkCount,pendingGeometries:this.pendingGeometries.size,revealingSections:this.revealingSections.size,revealedChunks:this.revealedChunks.size,wireframeGroupsInScene:e.length,orphanedWireframeGroups:r.length,orphanedKeys:r.map(i=>i.sectionKey),sections:[...this.revealingSections.entries()].map(([i,s])=>({key:i,phase:s.phase,renderMeshCount:s.renderMeshRefs.length,wireframeInScene:s.wireframeGroup.parent!==null}))}}debugLog(){}},ka={id:"futuristicReveal",controller:tn,enabledDefault:!0};E();x();k();R();import*as M0 from"three";var Qv=parseInt(M0.REVISION.replaceAll(/\D+/g,""),10),rn=class extends M0.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
21488
+ `,K0={textureSize:128,gravity:new r0.Vector3(0,-.005,0),friction:.998,defaultParticleSize:300,maxActiveFireworks:5},F5=n=>{let t=n*3;return{x:t,y:t+1,z:t+2}},D5=n=>{let t=n*4;return{r:t,g:t+1,b:t+2,a:t+3}},dt=(n=0,e=0)=>Math.floor(Math.random()*(n+1-e))+e,av=(n,e,t,r)=>{n.save();let i=n.createRadialGradient(e,e,0,e,e,e);i.addColorStop(0,"rgba(255,255,255,1.0)"),i.addColorStop(.5,"rgba(255,255,255,0.5)"),i.addColorStop(1,"rgba(255,255,255,0)"),n.fillStyle=i,n.fillRect(0,0,t,r),n.restore()},vv=()=>{let n=K0.textureSize,e=V0(n,n),t=e.getContext("2d"),r=n/2;av(t,r,e.width,e.height);let i=new r0.Texture(e);return i.needsUpdate=!0,i},lv=(n,e,t,r,i=K0.defaultParticleSize)=>{let s=new r0.BufferGeometry,o=[],v=[],a=[],l=[],c=[],u=Math.random()>.3?"single":"multiple",f=dt(100,20)*.01,m=()=>dt(100,1)*.01,g="red",y=Math.random();y>.66?g="red":y>.33?g="green":g="blue";for(let b=0;b<n;b++){let A=new r0.Vector3(0,0,0);if(o.push(A.x,A.y,A.z),v.push(e[b].x,e[b].y,e[b].z),t==="seed"){let C=e[b].y**2*.04;b===0&&(C*=1.1),l.push(C),c.push(C*.017),a.push(1,1,1,1)}else if(t==="trail"){let C=Math.random()*.1+.1;l.push(C),c.push(C*.017),a.push(1,1,1,1)}else{let C=dt(i,10)*.001;if(l.push(C),c.push(C*.017),u==="multiple")a.push(m(),m(),m(),1);else switch(g){case"red":a.push(f,.1,.1,1);break;case"green":a.push(.1,f,.1,1);break;case"blue":a.push(.1,.1,f,1);break}}}s.setAttribute("position",new r0.Float32BufferAttribute(o,3)),s.setAttribute("velocity",new r0.Float32BufferAttribute(v,3)),s.setAttribute("color",new r0.Float32BufferAttribute(a,4)),s.setAttribute("adjustSize",new r0.Float32BufferAttribute(l,1)),s.setAttribute("mass",new r0.Float32BufferAttribute(c,1));let w=new r0.RawShaderMaterial({uniforms:{size:{value:K0.textureSize},texture:{value:r}},transparent:!0,depthWrite:!1,blending:r0.AdditiveBlending,vertexShader:sv,fragmentShader:ov});return new r0.Points(s,w)},z5=class{constructor(e,t,r,i,s){d(this,"particleNum");d(this,"timerStartFading");d(this,"mesh");this.particleNum=e,this.timerStartFading=10,this.mesh=lv(e,t,r,i,s)}update(e){this.timerStartFading>0&&(this.timerStartFading-=.3);let t=this.mesh.geometry.attributes.position,r=this.mesh.geometry.attributes.velocity,i=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.5?.98:.96,v=a=>Math.random()>.5?0:(1-a)*.1;for(let a=0;a<this.particleNum;a++){let{x:l,y:c,z:u}=F5(a);r.array[c]+=e.y-s.array[a],r.array[l]*=K0.friction,r.array[u]*=K0.friction,r.array[c]*=K0.friction,t.array[l]+=r.array[l],t.array[c]+=r.array[c],t.array[u]+=r.array[u];let{a:f}=D5(a);this.timerStartFading<=0&&(i.array[f]*=o()-v(i.array[f]),i.array[f]<.001&&(i.array[f]=0))}t.needsUpdate=!0,r.needsUpdate=!0,i.needsUpdate=!0}disposeAll(){this.mesh.geometry.dispose(),this.mesh.material.dispose()}},Si=class extends z5{constructor(e,t,r){super(e,t,"seed",r)}update(e){let t=this.mesh.geometry.attributes.position,r=this.mesh.geometry.attributes.velocity,i=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.99:.96,v=u=>Math.random()>.3?0:(1-u)*.1,a=()=>Math.random()>.5?.05:-.05,l=()=>Math.random()>.1,c=K0.friction*.98;for(let u=0;u<this.particleNum;u++){let{x:f,y:m,z:g}=F5(u);r.array[m]+=e.y-s.array[u],r.array[f]*=c,r.array[g]*=c,r.array[m]*=c,t.array[f]+=r.array[f],t.array[m]+=r.array[m],t.array[g]+=r.array[g],l()&&(t.array[f]+=a()),l()&&(t.array[g]+=a());let{a:y}=D5(u);i.array[y]*=o()-v(i.array[y]),i.array[y]<.001&&(i.array[y]=0)}t.needsUpdate=!0,r.needsUpdate=!0,i.needsUpdate=!0}},Ci=class extends z5{constructor(e,t,r){super(e,t,"trail",r)}update(e){let t=this.mesh.geometry.attributes.position,r=this.mesh.geometry.attributes.velocity,i=this.mesh.geometry.attributes.color,s=this.mesh.geometry.attributes.mass,o=()=>Math.random()>.3?.98:.95,v=()=>Math.random()>.5?.05:-.05,a=()=>Math.random()>.2;for(let l=0;l<this.particleNum;l++){let{x:c,y:u,z:f}=F5(l);r.array[u]+=e.y-s.array[l],r.array[c]*=K0.friction,r.array[f]*=K0.friction,r.array[u]*=K0.friction,t.array[c]+=r.array[c],t.array[u]+=r.array[u],t.array[f]+=r.array[f],a()&&(t.array[c]+=v()),a()&&(t.array[f]+=v());let{a:m}=D5(l);i.array[m]*=o(),i.array[m]<.001&&(i.array[m]=0)}t.needsUpdate=!0,r.needsUpdate=!0,i.needsUpdate=!0}},L5=class{constructor(e,t=K0.defaultParticleSize,r){d(this,"meshGroup");d(this,"isExplode");d(this,"petalsNum");d(this,"life");d(this,"seed");d(this,"flowerSizeRate");d(this,"flower");d(this,"texture");d(this,"particleSize");this.meshGroup=new r0.Group,this.isExplode=!1,this.texture=e,this.particleSize=t;let i=400,s=150;this.petalsNum=dt(i,s),this.life=150,this.seed=this.getSeed(r),this.meshGroup.add(this.seed.mesh),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,s,i,.4,.7)}getSeed(e){let r=[];for(let s=0;s<40;s++){let v=s===0?Math.random()*2.5+.9:Math.random()*2+.4,a=0;r.push(new r0.Vector3(0,v,a))}let i=new Si(40,r,this.texture);if(e)i.mesh.position.set(0,0,0);else{let s=Math.random()*80-40,o=-50,v=Math.random()*80-40;i.mesh.position.set(s,o,v)}return i}explode(e){this.isExplode=!0,this.flower=this.getFlower(e),this.meshGroup.add(this.flower.mesh),this.meshGroup.remove(this.seed.mesh),this.seed.disposeAll()}getFlower(e){let t=this.petalsNum,r=[],i;if(Math.random()>.5)for(let v=0;v<t;v++){i=dt(120,60)*.01;let a=r0.MathUtils.degToRad(Math.random()*180),l=r0.MathUtils.degToRad(Math.random()*360),c=Math.sin(a)*Math.cos(l)*i,u=Math.sin(a)*Math.sin(l)*i,f=Math.cos(a)*i,m=new r0.Vector3(c,u,f);m.multiplyScalar(this.flowerSizeRate),r.push(m)}else{let v=180/t,a=360*(Math.random()*20+1)/t,l=a,c=a;i=dt(120,60)*.01;for(let u=0;u<t;u++){let f=Math.sin(r0.MathUtils.degToRad(v*u)),m=Math.cos(r0.MathUtils.degToRad(v*u))*i,g=Math.cos(r0.MathUtils.degToRad(l*u))*f*i,y=Math.sin(r0.MathUtils.degToRad(c*u))*f*i,w=new r0.Vector3(g,y,m);w.multiplyScalar(this.flowerSizeRate),r.push(w)}}let o=new z5(t,r,"default",this.texture,this.particleSize);return o.mesh.position.set(e.x,e.y,e.z),o}update(e){this.isExplode?(this.flower.update(e),this.life>0&&(this.life-=1)):this.drawTail()}drawTail(){this.seed.update(K0.gravity);let e=this.seed.mesh.geometry.attributes.position,t=this.seed.mesh.geometry.attributes.velocity,r=0;for(let u=0,f=t.array.length;u<f;u++){let m=t.array[u];u%3===1&&m>0&&r++}if(!(r===0))return;let{x:s,y:o,z:v}=this.seed.mesh.position,a=new r0.Vector3(s,o,v),l=0,c;for(let u=0,f=e.array.length;u<f;u++){let m=e.array[u];u%3===1&&m>l&&(l=m,c=new r0.Vector3(e.array[u-1],m,e.array[u+2]))}c&&(a.add(c),this.explode(a))}},jt=class extends L5{constructor(t,r=K0.defaultParticleSize,i){super(t,r,i);d(this,"tailMeshGroup");d(this,"tails");let s=150,o=100;this.petalsNum=dt(s,o),this.flowerSizeRate=r0.MathUtils.mapLinear(this.petalsNum,o,s,.4,.7),this.tailMeshGroup=new r0.Group,this.tails=[]}explode(t){this.isExplode=!0,this.flower=this.getFlower(t),this.tails=this.getTail(),this.meshGroup.add(this.flower.mesh),this.meshGroup.add(this.tailMeshGroup)}getTail(){let t=[],i=this.flower.mesh.geometry.attributes.color;for(let s=0;s<this.petalsNum;s++){let o=[];for(let S=0;S<20;S++)o.push(new r0.Vector3(0,0,0));let v=new Ci(20,o,this.texture),{r:a,g:l,b:c,a:u}=D5(s),f=i.array[a],m=i.array[l],g=i.array[c],y=i.array[u],w=v.mesh.geometry.attributes.position,b=v.mesh.geometry.attributes.color;for(let S=0;S<w.count;S++){let H=D5(S);b.array[H.r]=f,b.array[H.g]=m,b.array[H.b]=g,b.array[H.a]=y}let{x:A,y:C,z:M}=this.flower.mesh.position;v.mesh.position.set(A,C,M),t.push(v),this.tailMeshGroup.add(v.mesh)}return t}update(t){if(this.isExplode){this.flower.update(t);let r=this.flower.mesh.geometry.attributes.position;for(let i=0,s=this.tails.length;i<s;i++){let o=this.tails[i];o.update(t);let{x:v,y:a,z:l}=F5(i),c=new r0.Vector3(r.array[v],r.array[a],r.array[l]),u=o.mesh.geometry.attributes.position,f=o.mesh.geometry.attributes.velocity;for(let m=0;m<u.count;m++){let g=F5(m),y=new r0.Vector3,w=new r0.Vector3(u.array[g.x],u.array[g.y],u.array[g.z]),b=new r0.Vector3(f.array[g.x],f.array[g.y],f.array[g.z]);y.subVectors(c,w);let A=y.sub(b);A.normalize(),A.multiplyScalar(Math.random()*3e-4*this.life),f.array[g.x]+=A.x,f.array[g.y]+=A.y,f.array[g.z]+=A.z}f.needsUpdate=!0}this.life>0&&(this.life-=1.2)}else this.drawTail()}},W1=class{constructor(e,t,r){d(this,"fireworksInstances");d(this,"scene");d(this,"sceneOrigin");d(this,"texture");d(this,"particleSize");d(this,"maxFireworks");this.fireworksInstances=[],this.scene=e,this.sceneOrigin=t,this.texture=vv(),this.particleSize=r?.defaultParticleSize??K0.defaultParticleSize,this.maxFireworks=r?.maxActiveFireworks??K0.maxActiveFireworks}launchFirework(e){if(this.fireworksInstances.length>=this.maxFireworks)return;let t=e?.particleSize??this.particleSize,r=e?.position,i;e?.forceRich?i=new jt(this.texture,t,r):e?.forceBasic?i=new L5(this.texture,t,r):i=Math.random()>.5?new L5(this.texture,t,r):new jt(this.texture,t,r),this.fireworksInstances.push(i),r?(this.sceneOrigin.addAndTrack(i.meshGroup),i.meshGroup.position.set(r.x,r.y,r.z)):this.scene.add(i.meshGroup)}repositionAll(){}update(){let e=[];for(let t=this.fireworksInstances.length-1;t>=0;t--){let r=this.fireworksInstances[t];r.update(K0.gravity),r.isExplode&&e.push(t)}for(let t=0,r=e.length;t<r;t++){let i=e[t],s=this.fireworksInstances[i];if(s&&(s.meshGroup.remove(s.seed.mesh),s.seed.disposeAll(),s.life<=0)){if(this.sceneOrigin.removeAndUntrack(s.meshGroup),s instanceof jt&&s.tailMeshGroup)for(let o of s.tails)o.disposeAll();s.flower?.disposeAll(),this.fireworksInstances.splice(i,1)}}}clear(){for(let e of this.fireworksInstances)if(this.sceneOrigin.removeAndUntrack(e.meshGroup),e.seed.disposeAll(),e.flower&&e.flower.disposeAll(),e instanceof jt)for(let t of e.tails)t.disposeAll();this.fireworksInstances=[]}dispose(){this.clear(),this.texture.dispose()}};E();x();k();R();var L3=Symbol("tracked-proxy"),cv=new Set(["add","addScalar","addScaledVector","addVectors","sub","subScalar","subVectors","multiply","multiplyScalar","multiplyVectors","divide","divideScalar","applyEuler","applyAxisAngle","applyMatrix3","applyMatrix4","applyNormalMatrix","applyQuaternion","negate","floor","ceil","round","roundToZero","min","max","clamp","clampLength","clampScalar","project","unproject","reflect","lerp","lerpVectors","cross","crossVectors","setFromMatrixPosition","setFromMatrixColumn","setFromMatrix3Column","setFromEuler","setFromSpherical","setFromSphericalCoords","setFromCylindrical","fromArray","fromBufferAttribute","setComponent","randomDirection","random"]),V1=class{constructor(e){d(this,"scene");d(this,"_x",0);d(this,"_y",0);d(this,"_z",0);d(this,"_tracked",new Set);d(this,"_worldCoords",new WeakMap);d(this,"_originalPositions",new WeakMap);d(this,"_trackOptions",new WeakMap);this.scene=e}get x(){return this._x}get y(){return this._y}get z(){return this._z}update(e,t,r){this._x=e,this._y=t,this._z=r;for(let i of this._tracked){let s=this._worldCoords.get(i);this._originalPositions.get(i).set(s.x-e,s.y-t,s.z-r),this._trackOptions.get(i)?.updateMatrix&&i.updateMatrix()}}track(e,t){let r=this._originalPositions.get(e)??e.position,i={x:0,y:0,z:0};this._originalPositions.set(e,r),this._worldCoords.set(e,i),t?this._trackOptions.set(e,t):this._trackOptions.delete(e);let s=this,o=t,v=new Proxy(r,{get(a,l,c){if(l===L3)return i;if(l==="set")return(f,m,g)=>(i.x=f,i.y=m,i.z=g,a.set(f-s._x,m-s._y,g-s._z),o?.updateMatrix&&e.updateMatrix(),c);if(l==="copy")return f=>{let m=f[L3],g=m?m.x:f.x,y=m?m.y:f.y,w=m?m.z:f.z;return i.x=g,i.y=y,i.z=w,a.set(g-s._x,y-s._y,w-s._z),o?.updateMatrix&&e.updateMatrix(),c};if(l==="setX")return f=>(i.x=f,a.x=f-s._x,o?.updateMatrix&&e.updateMatrix(),c);if(l==="setY")return f=>(i.y=f,a.y=f-s._y,o?.updateMatrix&&e.updateMatrix(),c);if(l==="setZ")return f=>(i.z=f,a.z=f-s._z,o?.updateMatrix&&e.updateMatrix(),c);if(typeof l=="string"&&cv.has(l))return()=>{throw new Error(`Cannot call position.${l}() on a tracked object. Use position.set(x, y, z) instead.`)};let u=a[l];return typeof u=="function"?u.bind(a):u},set(a,l,c){return l==="x"?(i.x=c,a.x=c-s._x,o?.updateMatrix&&e.updateMatrix(),!0):l==="y"?(i.y=c,a.y=c-s._y,o?.updateMatrix&&e.updateMatrix(),!0):l==="z"?(i.z=c,a.z=c-s._z,o?.updateMatrix&&e.updateMatrix(),!0):(a[l]=c,!0)}});Object.defineProperty(e,"position",{value:v,configurable:!0,enumerable:!0}),this._tracked.add(e)}untrack(e){let t=this._originalPositions.get(e);t&&(Object.defineProperty(e,"position",{value:t,configurable:!0,enumerable:!0}),this._tracked.delete(e),this._worldCoords.delete(e),this._originalPositions.delete(e),this._trackOptions.delete(e))}addAndTrack(e,t){this.track(e,t),this.scene.add(e)}removeAndUntrack(e){this.untrack(e),e.removeFromParent()}removeAndUntrackAll(e){e.traverse(t=>{this.untrack(t)}),e.removeFromParent()}getWorldPosition(e){let t=this._worldCoords.get(e);return t?{x:t.x,y:t.y,z:t.z}:void 0}clear(){for(let e of this._tracked)this.untrack(e)}get trackedCount(){return this._tracked.size}toSceneX(e){return e-this._x}toSceneY(e){return e-this._y}toSceneZ(e){return e-this._z}toWorldX(e){return e+this._x}toWorldY(e){return e+this._y}toWorldZ(e){return e+this._z}};Fi();E();x();k();R();Yt();ft();Hi();import kv from"prismarine-chat";import*as $ from"three";import*as tr from"prismarine-nbt";import{Vec3 as zi}from"vec3";E();x();k();R();ft();Yt();import*as de from"three";var yv=2e6,Di=j3(),$1=class{constructor(e,t){d(this,"mesh");d(this,"capacityFaces");d(this,"w0");d(this,"w1");d(this,"w2");d(this,"w3");d(this,"sectionSlots",new Map);d(this,"freeList",[]);d(this,"highWatermark",0);d(this,"dirtyMin",1/0);d(this,"dirtyMax",-1);this.capacityFaces=yv,this.w0=new Uint32Array(this.capacityFaces),this.w1=new Uint32Array(this.capacityFaces),this.w2=new Uint32Array(this.capacityFaces),this.w3=new Uint32Array(this.capacityFaces);let r=new de.InstancedBufferGeometry,i=new Float32Array(Y1*3);r.setAttribute("position",new de.BufferAttribute(i,3));let s=o=>{let v=new de.InstancedBufferAttribute(o,1);return v.setUsage(de.DynamicDrawUsage),v};r.setAttribute("a_w0",s(this.w0)),r.setAttribute("a_w1",s(this.w1)),r.setAttribute("a_w2",s(this.w2)),r.setAttribute("a_w3",s(this.w3)),r.instanceCount=0,this.mesh=new de.Mesh(r,e),this.mesh.name="globalShaderCubes",this.mesh.frustumCulled=!1,this.mesh.matrixAutoUpdate=!1,this.mesh.matrix.identity(),this.mesh.position.set(0,0,0),t.add(this.mesh)}addSection(e,t,r){if(r<=0){this.removeSection(e);return}this.sectionSlots.has(e)&&this.removeSection(e),r>this.capacityFaces&&this.growCapacity(r);let i=this.takeFreeSlot(r);i||(this.highWatermark+r>this.capacityFaces&&this.growCapacity(this.highWatermark+r),i={start:this.highWatermark,count:r},this.highWatermark+=r);let s=4;for(let o=0;o<r;o++){let v=i.start+o,a=o*s;this.w0[v]=t[a],this.w1[v]=t[a+1],this.w2[v]=t[a+2],this.w3[v]=t[a+3]}this.sectionSlots.set(e,i),this.markDirty(i.start,i.start+r-1),this.mesh.geometry.instanceCount=this.highWatermark}hasSection(e){return this.sectionSlots.has(e)}takeSectionData(e){let t=this.sectionSlots.get(e);if(!t)return;let r=4,i=new Uint32Array(t.count*r);for(let s=0;s<t.count;s++){let o=t.start+s,v=s*r;i[v]=this.w0[o],i[v+1]=this.w1[o],i[v+2]=this.w2[o],i[v+3]=this.w3[o]}return this.removeSection(e),{words:i,count:t.count}}removeSection(e){let t=this.sectionSlots.get(e);if(t){for(let r=t.start;r<t.start+t.count;r++)this.w0[r]=0,this.w1[r]=0,this.w2[r]=Di,this.w3[r]=0;this.markDirty(t.start,t.start+t.count-1),this.sectionSlots.delete(e),this.insertFreeSlot(t),this.shrinkHighWatermark(),this.mesh.geometry.instanceCount=this.highWatermark}}uploadDirtyRange(){if(this.dirtyMin>this.dirtyMax)return;let e=this.dirtyMin,t=this.dirtyMax-this.dirtyMin+1,r=this.mesh.geometry;for(let i of["a_w0","a_w1","a_w2","a_w3"]){let s=r.getAttribute(i);s.updateRange.offset=e,s.updateRange.count=t,s.needsUpdate=!0}this.dirtyMin=1/0,this.dirtyMax=-1}setCameraOrigin(e,t,r){let i=Math.floor(e),s=Math.floor(t),o=Math.floor(r),v=this.mesh.material.uniforms.u_cameraOrigin;v?.value?.set&&v.value.set(i,s,o);let a=this.mesh.material.uniforms.u_cameraOriginFrac;a?.value?.set&&a.value.set(e-i,t-s,r-o)}reset(){this.sectionSlots.clear(),this.freeList.length=0,this.highWatermark=0,this.dirtyMin=1/0,this.dirtyMax=-1,this.w0.fill(0),this.w1.fill(0),this.w2.fill(Di),this.w3.fill(0),this.mesh.geometry.instanceCount=0}dispose(){this.mesh.parent?.remove(this.mesh),this.mesh.geometry.dispose(),this.reset()}markDirty(e,t){e<this.dirtyMin&&(this.dirtyMin=e),t>this.dirtyMax&&(this.dirtyMax=t)}takeFreeSlot(e){for(let t=0;t<this.freeList.length;t++){let r=this.freeList[t];if(r.count>=e){if(this.freeList.splice(t,1),r.count===e)return r;let i={start:r.start,count:e};return this.insertFreeSlot({start:r.start+e,count:r.count-e}),i}}}insertFreeSlot(e){this.freeList.push(e),this.freeList.sort((t,r)=>t.start-r.start),this.mergeFreeList()}mergeFreeList(){if(this.freeList.length<2)return;let e=[],t=this.freeList[0];for(let r=1;r<this.freeList.length;r++){let i=this.freeList[r];t.start+t.count===i.start?t={start:t.start,count:t.count+i.count}:(e.push(t),t=i)}e.push(t),this.freeList=e}shrinkHighWatermark(){for(;this.highWatermark>0;){let e=this.highWatermark-1,t=this.freeList.find(i=>i.start<=e&&i.start+i.count>e);if(!t||t.start+t.count!==this.highWatermark)break;this.highWatermark=t.start;let r=this.freeList.indexOf(t);this.freeList.splice(r,1)}}growCapacity(e){let t=this.capacityFaces;for(;t<e;)t*=2;let r=new Uint32Array(t),i=new Uint32Array(t),s=new Uint32Array(t),o=new Uint32Array(t);r.set(this.w0),i.set(this.w1),s.set(this.w2),o.set(this.w3),s.fill(Di,this.w0.length),this.w0=r,this.w1=i,this.w2=s,this.w3=o,this.capacityFaces=t;let v=this.mesh.geometry,a=(l,c)=>{let u=v.getAttribute(c);u&&(v.deleteAttribute(c),"dispose"in u&&typeof u.dispose=="function"&&u.dispose());let f=new de.InstancedBufferAttribute(l,1);f.setUsage(de.DynamicDrawUsage),v.setAttribute(c,f)};a(this.w0,"a_w0"),a(this.w1,"a_w1"),a(this.w2,"a_w2"),a(this.w3,"a_w3"),this.dirtyMin=0,this.dirtyMax=this.highWatermark-1}};E();x();k();R();Yt();ft();function $3(n,e,t,r,i){if(e<=0)return;let s=t-8,o=r-8,v=i-8,a=q1,l=16,c=16,u=16,f=-1,m=-1,g=-1;for(let S=0;S<e;S++){let H=n[S*a],B=H&(1<<ut.LX_BITS)-1,I=H>>ut.LY_SHIFT&(1<<ut.LY_BITS)-1,G=H>>ut.LZ_SHIFT&(1<<ut.LZ_BITS)-1;B<l&&(l=B),I<c&&(c=I),G<u&&(u=G),B>f&&(f=B),I>m&&(m=I),G>g&&(g=G)}if(f<0)return;let y=s+l,w=o+c,b=v+u,A=s+f+1,C=o+m+1,M=v+g+1;return{minX:y,minY:w,minZ:b,maxX:A,maxY:C,maxZ:M,cx:(y+A)*.5,cy:(w+C)*.5,cz:(b+M)*.5}}function _v(n,e,t,r,i,s,o,v,a){return n>=r&&n<=o&&e>=i&&e<=v&&t>=s&&t<=a}function ea(n,e,t,r,i,s,o,v,a,l,c,u,f){if(_v(n,e,t,o,v,a,l,c,u))return;let m=0,g=f;if(Math.abs(r)<1e-8){if(n<o||n>l)return}else{let y=1/r,w=(o-n)*y,b=(l-n)*y;if(w>b){let A=w;w=b,b=A}if(m=Math.max(m,w),g=Math.min(g,b),m>g)return}if(Math.abs(i)<1e-8){if(e<v||e>c)return}else{let y=1/i,w=(v-e)*y,b=(c-e)*y;if(w>b){let A=w;w=b,b=A}if(m=Math.max(m,w),g=Math.min(g,b),m>g)return}if(Math.abs(s)<1e-8){if(t<a||t>u)return}else{let y=1/s,w=(a-t)*y,b=(u-t)*y;if(w>b){let A=w;w=b,b=A}if(m=Math.max(m,w),g=Math.min(g,b),m>g)return}return m<=g&&m>=0?m:void 0}E();x();k();R();import*as q0 from"three";var ta=20,ra=40,wv={white_banner:15,orange_banner:14,magenta_banner:13,light_blue_banner:12,yellow_banner:11,lime_banner:10,pink_banner:9,gray_banner:8,light_gray_banner:7,cyan_banner:6,purple_banner:5,blue_banner:4,brown_banner:3,green_banner:2,red_banner:1,black_banner:0},ia={0:"#1d1d21",1:"#b02e26",2:"#5e7c16",3:"#835432",4:"#3c44aa",5:"#8932b8",6:"#169c9c",7:"#9d9d97",8:"#474f52",9:"#f38baa",10:"#80c71f",11:"#fed83d",12:"#3ab3da",13:"#c74ebd",14:"#f9801d",15:"#f9fffe"};function Av(n){let e=n.replace("_wall_banner","_banner");return wv[e]??15}var Ev=(n,e,t,r,i,s,o)=>{switch(n.fillStyle=t,e){case"bs":n.fillRect(r,i,s,o);break;case"ls":n.fillRect(r,i,s/3,o);break;case"rs":n.fillRect(r+s*2/3,i,s/3,o);break;case"ts":n.fillRect(r,i,s,o/3);break;case"ms":n.fillRect(r,i+o/3,s,o/3);break;case"drs":n.fillRect(r,i,s/2,o/2);break;case"dls":n.fillRect(r+s/2,i,s/2,o/2);break;case"ss":for(let v=0;v<s;v+=2)n.fillRect(r+v,i,1,o);break;case"cr":n.fillRect(r,i+o/3,s,o/3),n.fillRect(r+s/3,i,s/3,o);break;case"sc":n.fillRect(r,i+o/2-1,s,2),n.fillRect(r+s/2-1,i,2,o);break;default:n.fillRect(r,i,s,o)}};function xv(n,e){if(!e||e.length===0)return`banner_${n}_empty`;let t=e.map(r=>`${r.Pattern??"bs"}_${r.Color??0}`).join(",");return`banner_${n}_${t}`}var Rv=(n,e,t=(r,i)=>V0(r,i))=>{let i=t(ta*1,ra*1),s=i.getContext("2d");if(s){if(s.imageSmoothingEnabled=!1,e?.Patterns&&e.Patterns.length>0)for(let o of e.Patterns){let v=o.Color??0,a=o.Pattern??"bs",l=ia[v]||ia[0];Ev(s,a,l,0,0,ta*1,ra*1)}return i}},er=new Map;function na(n,e,t){let r=Av(e),i=xv(r,t?.Patterns),s=er.get(i);if(s)return s.refCount++,s.texture;let o=Rv(r,t);if(!o)return;let v=new q0.Texture(o);return v.magFilter=q0.NearestFilter,v.minFilter=q0.NearestFilter,v.needsUpdate=!0,er.set(i,{texture:v,refCount:1}),v}function sa(n){for(let[e,t]of er.entries())if(t.texture===n){t.refCount--,t.refCount<=0&&(t.texture.dispose(),er.delete(e));return}}function oa(n,e,t,r){let v,a,l;t?(v=(-14.6+13.4)/2/16-.5,a=1-14.75/16-.5,l=1/2):(v=(1.4+29.4)/2/16,a=1-7.25/16-.5,l=0);let c=new q0.Mesh(new q0.PlaneGeometry(.85,1.75),new q0.MeshBasicMaterial({map:r,transparent:!0}));c.renderOrder=999;let u=.5/16,f=.25/16;t?c.position.set(0,v,a+f+.004):c.position.set(0,v,a+u/2+.004);let m=new q0.Group;return m.rotation.set(0,-q0.MathUtils.degToRad(e*(t?90:45/2)),0),m.add(c),m.bannerTexture=r,m.position.set(n.x+.5,n.y+l,n.z+.5),m}var ht=class ht{constructor(e,t,r,i,s=3){this.worldRenderer=e;this.scene=t;this.material=r;this.worldHeight=i;d(this,"meshPool",[]);d(this,"activeSections",new Map);d(this,"sectionObjects",{});d(this,"waitingChunksToDisplay",{});d(this,"pendingNearReveal",new Map);d(this,"nearRevealTimers",new Map);d(this,"nearRevealGraceTimers",new Map);d(this,"poolSize");d(this,"maxPoolSize");d(this,"minPoolSize");d(this,"signHeadsRenderer");d(this,"chunkBoxMaterial",new $.MeshBasicMaterial({color:0,transparent:!0,opacity:0}));d(this,"cubeShaderMaterial",null);d(this,"globalBlockBuffer",null);d(this,"shaderSectionRaycastBoxes",new Map);d(this,"hits",0);d(this,"misses",0);d(this,"bypassPooling",!1);d(this,"renderTimes",[]);d(this,"maxRenderTimeSamples",30);d(this,"_performanceOverrideDistance");d(this,"lastPerformanceCheck",0);d(this,"performanceCheckInterval",2e3);this.updateViewDistance(s),this.signHeadsRenderer=new Li(e),this.initializePool()}get performanceOverrideDistance(){return this._performanceOverrideDistance??0}set performanceOverrideDistance(e){this._performanceOverrideDistance=e,this.updateSectionsVisibility()}initializePool(){for(let e=0;e<this.poolSize;e++){let t=new $.BufferGeometry,r=new $.Mesh(t,this.material);r.visible=!1,r.matrixAutoUpdate=!1,r.name="pooled-section-mesh";let i={mesh:r,inUse:!1,lastUsedTime:0};this.meshPool.push(i)}}sectionHasRenderableContent(e){return e.positions.length>0?!0:this.isShaderCubesGpuEnabled()?(e.shaderCubes?.count??0)>0:!1}isShaderCubesGpuEnabled(){return this.worldRenderer.shaderCubeBlocksEnabled()}syncCubeShaderUniforms(){if(!this.isShaderCubesGpuEnabled())return;let e=this.cubeShaderMaterial??this.getCubeShaderMaterial();if(!e)return;let t=this.material.map??null;e.uniforms.u_atlas.value=t;let r=Z1();if(!r)return;let{tintPalette:i}=r;i.isReady()||i.createTexture(),e.uniforms.u_tintPalette.value=i.getTexture(),e.uniforms.u_debugMode.value=this.worldRenderer.worldRendererConfig.shaderCubeDebugMode??0,e.needsUpdate=!0}getCubeShaderMaterial(){return this.isShaderCubesGpuEnabled()?(this.cubeShaderMaterial||(this.cubeShaderMaterial=j1(),this.syncCubeShaderUniforms()),this.cubeShaderMaterial):null}getGlobalBlockBuffer(){let e=this.getCubeShaderMaterial();return e?(this.globalBlockBuffer||(this.globalBlockBuffer=new $1(e,this.scene)),this.globalBlockBuffer):null}shouldDeferShaderToPerSection(e){let t=this.worldRenderer.getModule("futuristicReveal");return t?t.isInInitialRevealCampaign?.()?!0:t.shouldUseRevealEffect?.(e)===!0:!1}migrateDeferredShaderToGlobal(e){let t=this.sectionObjects[e];if(!t?.deferredShaderCubes)return;let{words:r,count:i}=t.deferredShaderCubes,s=t.worldX,o=t.worldY,v=t.worldZ;s!==void 0&&o!==void 0&&v!==void 0&&this.registerShaderSectionRaycastBox(e,r,i,s,o,v),this.getGlobalBlockBuffer()?.addSection(e,r,i);let l=t.mesh===t.shaderMesh;t.shaderMesh&&(Ii(t.shaderMesh),t.remove(t.shaderMesh),t.shaderMesh=void 0),delete t.deferredShaderCubes,l&&(t.mesh=void 0)}registerShaderSectionRaycastBox(e,t,r,i,s,o){let v=$3(t,r,i,s,o);v?this.shaderSectionRaycastBoxes.set(e,v):this.shaderSectionRaycastBoxes.delete(e)}unregisterShaderSectionRaycastBox(e){this.shaderSectionRaycastBoxes.delete(e)}raycastShaderSectionAABBs(e,t,r,i=80){let s=e.x,o=e.y,v=e.z,a=t.x,l=t.y,c=t.z,u=i*i,f=r,m=!1;for(let[g,y]of this.shaderSectionRaycastBoxes){let w=this.sectionObjects[g];if(w&&!w.visible)continue;let b=y.cx-s,A=y.cy-o,C=y.cz-v;if(b*b+A*A+C*C>u)continue;let M=ea(s,o,v,a,l,c,y.minX,y.minY,y.minZ,y.maxX,y.maxY,y.maxZ,f);M!==void 0&&M<f&&(f=M,m=!0)}return m?f:void 0}updateSection(e,t){let r=t.positions.length>0,i=t.shaderCubes,s=this.isShaderCubesGpuEnabled()&&(i?.count??0)>0;if(!r&&!s)return this.releaseSection(e),null;let o=this.sectionObjects[e];o&&this.cleanupSection(e),r||this.releasePooledMesh(e);let v;if(r){let w=this.activeSections.get(e);if(!w){if(w=this.acquireMesh(),!w)return null;this.activeSections.set(e,w),w.sectionKey=e}let{mesh:b}=w;this.updateGeometryAttribute(b.geometry,"position",t.positions,3),this.updateGeometryAttribute(b.geometry,"normal",t.normals,3),this.updateGeometryAttribute(b.geometry,"color",t.colors,3),this.updateGeometryAttribute(b.geometry,"uv",t.uvs,2),b.geometry.index=new $.BufferAttribute(t.indices,1),b.geometry.boundingBox=new $.Box3(new $.Vector3(-8,-8,-8),new $.Vector3(8,8,8)),b.geometry.boundingSphere=new $.Sphere(new $.Vector3(0,0,0),Math.sqrt(3*8**2)),this.worldRenderer.sceneOrigin.track(b,{updateMatrix:!0}),b.position.set(t.sx,t.sy,t.sz),b.updateMatrix(),b.visible=!0,b.name="mesh",w.lastUsedTime=performance.now(),v=b}let a=s?this.getCubeShaderMaterial():null,l,c=s&&this.shouldDeferShaderToPerSection(e);s&&i&&(c&&a?(l=X1(i,a),l.visible=!0):this.getGlobalBlockBuffer()?.addSection(e,i.words,i.count)),o=new $.Group,v&&(o.add(v),o.mesh=v),l&&(o.add(l),o.shaderMesh=l,i&&(o.deferredShaderCubes={words:i.words,count:i.count}),o.mesh||(o.mesh=l)),s&&i&&this.registerShaderSectionRaycastBox(e,i.words,i.count,t.sx,t.sy,t.sz);let u=0;r&&(u+=t.positions.length/3/4),s&&i&&(u+=i.count),o.tilesCount=u,o.blocksCount=t.blocksCount,o.worldX=t.sx,o.worldY=t.sy,o.worldZ=t.sz,o.sectionKey=e,o.name="chunk";try{if(Object.keys(t.signs).length>0){let w=new $.Group;w.name="signs";for(let[b,{isWall:A,isHanging:C,rotation:M}]of Object.entries(t.signs)){let S=this.worldRenderer.blockEntities[b];if(!S)continue;let[H,B,I]=b.split(","),G=this.signHeadsRenderer.renderSign(new zi(+H,+B,+I),M,A,C,tr.simplify(S));G&&w.add(G)}o.add(w),o.signsContainer=w}if(Object.keys(t.heads).length>0){let w=new $.Group;w.name="heads";for(let[b,{isWall:A,rotation:C}]of Object.entries(t.heads)){let M=this.worldRenderer.blockEntities[b];if(!M)continue;let[S,H,B]=b.split(","),I=this.signHeadsRenderer.renderHead(new zi(+S,+H,+B),C,A,tr.simplify(M));I&&w.add(I)}o.add(w),o.headsContainer=w}if(Object.keys(t.banners).length>0){let w=new $.Group;w.name="banners",o.bannersContainer=w,o.add(w);for(let[b,{isWall:A,rotation:C,blockName:M}]of Object.entries(t.banners)){let S=this.worldRenderer.blockEntities[b];if(!S)continue;let[H,B,I]=b.split(","),G=na(this.worldRenderer,M,tr.simplify(S));if(!G)continue;let O=oa(new zi(+H,+B,+I),C,A,G),{x:j,y:J,z:X}=O.position;this.worldRenderer.sceneOrigin.track(O),O.position.set(j,J,X),w.add(O)}}}catch{}this.sectionObjects[e]=o,this.scene.add(o),o.matrixAutoUpdate=!1,this.worldRenderer.displayOptions?.inWorldRenderingConfig?.showChunkBorders&&this.updateBoxHelper(e,!0);let f=e.split(","),m=`${f[0]},${f[2]}`,g=!!this.worldRenderer.displayOptions?.inWorldRenderingConfig?._renderByChunks,y=!!this.worldRenderer.worldRendererConfig?.wasmMesher;if((g||y)&&!this.worldRenderer.finishedChunks[m]){o.visible=!1,o._waitingForChunkDisplay=!0;let w=this.waitingChunksToDisplay[m]??(this.waitingChunksToDisplay[m]=[]);w.includes(e)||w.push(e)}return o}finishChunkDisplay(e){if(!this.waitingChunksToDisplay[e]){this.tryRevealPending();return}if(this.isWasmGateActive()&&this.isBlockedByNearer(e,0)){this.pendingNearReveal.set(e,Date.now()),this.armNearRevealTimer(e),this.armExpectedGraceTimer(e),this.tryRevealPending();return}this.flushChunkDisplay(e),this.tryRevealPending()}flushChunkDisplay(e){let t=this.waitingChunksToDisplay[e];if(this.pendingNearReveal.delete(e),this.clearNearRevealTimer(e),this.clearExpectedGraceTimer(e),!!t){for(let r of t){let i=this.sectionObjects[r];i&&(i._waitingForChunkDisplay=!1,i.visible=!0)}delete this.waitingChunksToDisplay[e]}}tryRevealPending(){if(this.pendingNearReveal.size===0)return;let e=Date.now();for(let[t,r]of[...this.pendingNearReveal])this.isBlockedByNearer(t,e-r)||this.flushChunkDisplay(t)}onChunkRemovedFromGate(e){this.pendingNearReveal.delete(e),this.clearNearRevealTimer(e),this.clearExpectedGraceTimer(e),delete this.waitingChunksToDisplay[e],this.tryRevealPending()}isWasmGateActive(){return!!this.worldRenderer.worldRendererConfig?.wasmMesher}isBlockedByNearer(e,t){let r=this.worldRenderer.viewerChunkPosition;if(!r)return!1;let i=e.split(",");if(i.length!==2)return!1;let s=Number(i[0]),o=Number(i[1]),v=Math.floor(r.x/16),a=Math.floor(r.z/16),l=(s>>4)-v,c=(o>>4)-a,u=l*l+c*c;if(u===0)return!1;let f=this.worldRenderer.finishedChunks,m=this.worldRenderer.loadedChunks,g=this.worldRenderer.viewDistance;if(t<ht.EXPECTED_NEAR_GRACE_MS&&g>0){let w=g*g,b=Math.min(g,Math.ceil(Math.sqrt(Math.max(0,u-1))));for(let A=-b;A<=b;A++)for(let C=-b;C<=b;C++){let M=A*A+C*C;if(M>=u||M>w)continue;let S=v+A<<4,H=a+C<<4,B=`${S},${H}`;if(B!==e&&m[B]&&!f[B])return!0}return!1}for(let w in m){if(w===e||f[w])continue;let b=w.split(",");if(b.length!==2)continue;let A=(Number(b[0])>>4)-v,C=(Number(b[1])>>4)-a;if(A*A+C*C<u)return!0}return!1}armNearRevealTimer(e){if(this.nearRevealTimers.has(e))return;let t=setTimeout(()=>{this.nearRevealTimers.delete(e),this.pendingNearReveal.has(e)&&(this.flushChunkDisplay(e),this.tryRevealPending())},ht.NEAR_REVEAL_TIMEOUT_MS);this.nearRevealTimers.set(e,t)}clearNearRevealTimer(e){let t=this.nearRevealTimers.get(e);t&&(clearTimeout(t),this.nearRevealTimers.delete(e))}armExpectedGraceTimer(e){if(this.nearRevealGraceTimers.has(e))return;let t=setTimeout(()=>{this.nearRevealGraceTimers.delete(e),this.pendingNearReveal.has(e)&&this.tryRevealPending()},ht.EXPECTED_NEAR_GRACE_MS+50);this.nearRevealGraceTimers.set(e,t)}clearExpectedGraceTimer(e){let t=this.nearRevealGraceTimers.get(e);t&&(clearTimeout(t),this.nearRevealGraceTimers.delete(e))}cleanupSection(e){let t=this.sectionObjects[e];if(t){if(t._waitingForChunkDisplay){let r=e.split(","),i=`${r[0]},${r[2]}`,s=this.waitingChunksToDisplay[i];if(s){let o=s.indexOf(e);o!==-1&&s.splice(o,1),s.length===0&&delete this.waitingChunksToDisplay[i]}}if(t.bannersContainer&&(t.bannersContainer.traverse(r=>{r.bannerTexture&&sa(r.bannerTexture)}),this.disposeContainer(t.bannersContainer)),this.globalBlockBuffer?.removeSection(e),this.unregisterShaderSectionRaycastBox(e),t.shaderMesh&&(Ii(t.shaderMesh),t.shaderMesh=void 0),delete t.deferredShaderCubes,t.signsContainer&&this.disposeContainer(t.signsContainer),t.headsContainer&&this.disposeContainer(t.headsContainer),this.worldRenderer.sceneOrigin.removeAndUntrackAll(t),this.scene.remove(t),t.boxHelper){this.worldRenderer.sceneOrigin.removeAndUntrack(t.boxHelper),this.scene.remove(t.boxHelper),t.boxHelper.geometry.dispose();let r=t.boxHelper.material;if(Array.isArray(r))for(let i of r)i.dispose();else r.dispose();t.boxHelper=void 0}delete this.sectionObjects[e]}}releasePooledMesh(e){let t=this.activeSections.get(e);t&&(t.mesh.visible=!1,t.inUse=!1,t.sectionKey=void 0,t.lastUsedTime=0,this.clearGeometry(t.mesh.geometry),this.activeSections.delete(e),this.cleanupExcessMeshes())}releaseSection(e){this.cleanupSection(e);let t=this.activeSections.get(e);return t?(t.mesh.visible=!1,t.inUse=!1,t.sectionKey=void 0,t.lastUsedTime=0,this.clearGeometry(t.mesh.geometry),this.activeSections.delete(e),this.cleanupExcessMeshes(),!0):!1}getSectionObject(e){return this.sectionObjects[e]}updateBoxHelper(e,t,r=this.chunkBoxMaterial){let i=this.sectionObjects[e];if(i?.mesh)if(t){if(!i.boxHelper){let s=new $.Mesh(new $.BoxGeometry(16,16,16),r),o=new $.BoxHelper(s,16776960);o.name="helper";let v=i.worldX??0,a=i.worldY??0,l=i.worldZ??0;this.worldRenderer.sceneOrigin.track(o,{updateMatrix:!0}),o.position.set(v,a,l),o.updateMatrix(),this.scene.add(o),i.boxHelper=o}i.boxHelper.visible=!0}else i.boxHelper&&(i.boxHelper.visible=!1)}updateAllBoxHelpers(e){for(let t of Object.keys(this.sectionObjects))this.updateBoxHelper(t,e)}cleanSignChunkTextures(e,t){this.signHeadsRenderer.cleanChunkTextures(e,t)}getSectionMesh(e){return this.activeSections.get(e)?.mesh}hasSection(e){return this.activeSections.has(e)}updateViewDistance(e){let t=(e*2+1)**2,r=this.worldHeight/16,i=5;if(this.minPoolSize=Math.floor(t*i),this.maxPoolSize=Math.floor(t*r)+1,this.poolSize??(this.poolSize=this.minPoolSize),this.minPoolSize>this.poolSize){let s=Math.min(this.minPoolSize,this.maxPoolSize);this.expandPool(s)}}getStats(){let e=this.meshPool.filter(i=>!i.inUse).length,t=this.hits+this.misses>0?(this.hits/(this.hits+this.misses)*100).toFixed(1):"0",r=this.getEstimatedMemoryUsage();return{poolSize:this.poolSize,activeCount:this.activeSections.size,freeCount:e,hitRate:`${t}%`,hits:this.hits,misses:this.misses,memoryUsage:r}}getTotalTiles(){return Object.values(this.sectionObjects).reduce((e,t)=>e+(t.tilesCount||0),0)}getTotalBlocks(){return Object.values(this.sectionObjects).reduce((e,t)=>e+(t.blocksCount||0),0)}getEstimatedMemoryUsage(){let e=0,t=0,r=0,i=0,s=0,o=0,v=0,a=this.globalBlockBuffer?.mesh.geometry;if(a)for(let c of["a_w0","a_w1","a_w2","a_w3"]){let u=a.getAttribute(c);if(u){let f=u.array.byteLength;v+=f,e+=f}}for(let c of Object.values(this.sectionObjects)){let u=c.shaderMesh?.geometry;if(u)for(let f of["a_w0","a_w1","a_w2","a_w3"]){let m=u.getAttribute(f);if(m){let g=m.array.byteLength;v+=g,e+=g}}}for(let c of this.meshPool)if(c.inUse&&c.mesh.geometry){let{geometry:u}=c.mesh,f=u.getAttribute("position");if(f){let w=f.array.byteLength;t+=w,e+=w}let m=u.getAttribute("normal");if(m){let w=m.array.byteLength;r+=w,e+=w}let g=u.getAttribute("color");if(g){let w=g.array.byteLength;i+=w,e+=w}let y=u.getAttribute("uv");if(y){let w=y.array.byteLength;s+=w,e+=w}if(u.index){let w=u.index.array.byteLength;o+=w,e+=w}}return{total:`${(e/(1024*1024)).toFixed(2)} MB`,breakdown:{position:`${(t/(1024*1024)).toFixed(2)} MB`,normal:`${(r/(1024*1024)).toFixed(2)} MB`,color:`${(i/(1024*1024)).toFixed(2)} MB`,uv:`${(s/(1024*1024)).toFixed(2)} MB`,index:`${(o/(1024*1024)).toFixed(2)} MB`,shaderInstances:`${(v/(1024*1024)).toFixed(2)} MB`}}}dispose(){let e=[...this.activeSections.keys()];for(let t of e)this.releaseSection(t);this.signHeadsRenderer.dispose();for(let t of this.meshPool)t.mesh.geometry.dispose();this.meshPool.length=0,this.activeSections.clear(),this.chunkBoxMaterial.dispose(),this.shaderSectionRaycastBoxes.clear(),this.globalBlockBuffer?.dispose(),this.globalBlockBuffer=null,this.cubeShaderMaterial?.dispose(),this.cubeShaderMaterial=null,this.pendingNearReveal.clear();for(let t of this.nearRevealTimers.values())clearTimeout(t);this.nearRevealTimers.clear();for(let t of this.nearRevealGraceTimers.values())clearTimeout(t);this.nearRevealGraceTimers.clear()}acquireMesh(){if(this.bypassPooling){let t={mesh:new $.Mesh(new $.BufferGeometry,this.material),inUse:!0,lastUsedTime:performance.now()};return this.meshPool.push(t),this.poolSize++,t}for(let t of this.meshPool)if(!t.inUse)return t.inUse=!0,t.lastUsedTime=performance.now(),this.hits++,t;this.misses++;let e=Math.min(this.poolSize+16,this.maxPoolSize);e<=this.meshPool.length&&(e=this.meshPool.length+8,this.maxPoolSize=e),this.expandPool(e);for(let t=this.meshPool.length-1;t>=0;t--){let r=this.meshPool[t];if(!r.inUse)return r.inUse=!0,r.lastUsedTime=performance.now(),r}throw new Error("ChunkMeshManager: Failed to acquire mesh after pool expansion")}expandPool(e){let t=this.meshPool.length;this.poolSize=e;for(let r=t;r<e;r++){let i=new $.BufferGeometry,s=new $.Mesh(i,this.material);s.visible=!1,s.matrixAutoUpdate=!1,s.name="pooled-section-mesh";let o={mesh:s,inUse:!1,lastUsedTime:0};this.meshPool.push(o)}}updateGeometryAttribute(e,t,r,i){let s=e.getAttribute(t);s&&s.count===r.length/i?(s.array.set(r),s.needsUpdate=!0):e.setAttribute(t,new $.BufferAttribute(r,i))}clearGeometry(e){let t=["position","normal","color","uv"];for(let r of t)e.hasAttribute(r)&&e.deleteAttribute(r);e.index&&e.setIndex(null),e.boundingBox=null,e.boundingSphere=null}cleanupExcessMeshes(){if(this.poolSize>this.maxPoolSize){let e=this.meshPool.filter(t=>!t.inUse).length;if(e>0){let t=Math.min(this.poolSize-this.maxPoolSize,e);for(let r=0;r<t;r++){let i=this.meshPool.findIndex(s=>!s.inUse);i!==-1&&(this.meshPool[i].mesh.geometry.dispose(),this.meshPool.splice(i,1),this.poolSize--)}}}}disposeContainer(e){k0(e,!0)}recordRenderTime(e){this.renderTimes.push(e),this.renderTimes.length>this.maxRenderTimeSamples&&this.renderTimes.shift();let t=performance.now();t-this.lastPerformanceCheck>this.performanceCheckInterval&&(this.checkPerformance(),this.lastPerformanceCheck=t)}getEffectiveRenderDistance(){return this.performanceOverrideDistance||this.worldRenderer.viewDistance}resetPerformanceOverride(){this.performanceOverrideDistance=void 0,this.renderTimes.length=0}getAverageRenderTime(){return this.renderTimes.length===0?0:this.renderTimes.reduce((e,t)=>e+t,0)/this.renderTimes.length}checkPerformance(){if(this.renderTimes.length<this.maxRenderTimeSamples)return;let e=this.getAverageRenderTime(),t=16.67,r=t*1.5;if(e>r){let i=this.worldRenderer.viewDistance,s=Math.max(1,Math.floor(i*.8));(!this.performanceOverrideDistance||s<this.performanceOverrideDistance)&&(this.performanceOverrideDistance=s)}else if(this.performanceOverrideDistance&&e<t*1.1){let i=this.worldRenderer.viewDistance,s=Math.min(i,this.performanceOverrideDistance+1);s!==this.performanceOverrideDistance&&(this.performanceOverrideDistance=s>=i?void 0:s)}}updateSectionsVisibility(){let e=this.worldRenderer.cameraSectionPos;for(let[t,r]of Object.entries(this.sectionObjects)){if(r._waitingForChunkDisplay){r.visible=!1;continue}if(!this.performanceOverrideDistance){r.visible=!0;continue}let[i,s,o]=t.split(",").map(Number),v={x:i/16,y:s/16,z:o/16},a=v.x-e.x,l=v.z-e.z,c=Math.floor(Math.hypot(a,l));r.visible=c<=this.performanceOverrideDistance}}};d(ht,"NEAR_REVEAL_TIMEOUT_MS",5e3),d(ht,"EXPECTED_NEAR_GRACE_MS",1500);var U5=ht,Li=class{constructor(e){this.worldRendererThree=e;d(this,"chunkTextures",new Map)}dispose(){for(let[,e]of this.chunkTextures)for(let t of Object.keys(e))e[t].dispose();this.chunkTextures.clear()}renderHead(e,t,r,i){let s;if(i.SkullOwner?s=i.SkullOwner.Properties?.textures?.[0]?.Value:s=i.profile?.properties?.find(o=>o.name==="textures")?.value,!!s)try{let v=JSON.parse(z.from(s,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:a}=this.worldRendererThree.worldRendererConfig;a&&(v=v?.replace("http://textures.minecraft.net/",a).replace("https://textures.minecraft.net/",a));let l=Oe(this.worldRendererThree,v,Fe.head),c=new $.Group;return r&&l.position.set(0,.3125,.3125),l.position.y-=23/16,c.add(l),this.worldRendererThree.sceneOrigin.track(c),c.position.set(e.x+.5,e.y+.045,e.z+.5),c.rotation.set(0,-$.MathUtils.degToRad(t*(r?90:45/2)),0),c.scale.set(.8,.8,.8),c}catch{}}renderSign(e,t,r,i,s){let o=this.getSignTexture(e,s,i);if(!o)return;let v=new $.Mesh(new $.PlaneGeometry(1,1),new $.MeshBasicMaterial({map:o,transparent:!0}));v.renderOrder=999;let a=7/16,l=i?1.3:1;v.scale.set(1*l,a*l,1*l);let c=(i?2:1.5)/16,u=.25/16;r&&!i?v.position.set(0,0,-.5+c+u+1e-4):v.position.set(0,0,c/2+1e-4);let f=new $.Group;f.rotation.set(0,-$.MathUtils.degToRad(t*(r?90:45/2)),0),f.add(v);let m=(i?10:8)/16,g=(i?0:r?4.333:9.333)/16,y=m/2+g;return this.worldRendererThree.sceneOrigin.track(f),f.position.set(e.x+.5,e.y+y,e.z+.5),f}getSignTexture(e,t,r,i=!1){let s=St(e),o=this.chunkTextures.get(`${s[0]},${s[1]}`);o||(o={},this.chunkTextures.set(`${s[0]},${s[1]}`,o));let v=`${e.x},${e.y},${e.z}`;if(o[v])return o[v];let a=kv(this.worldRendererThree.version),l=l1(t,r,a);if(!l)return;let c=new $.Texture(l);return c.magFilter=$.NearestFilter,c.minFilter=$.NearestFilter,c.needsUpdate=!0,o[v]=c,c}cleanChunkTextures(e,t){let r=`${Math.floor(e/16)},${Math.floor(t/16)}`,i=this.chunkTextures.get(r);if(i)for(let s of Object.keys(i))i[s].dispose(),delete i[s]}};E();x();k();R();E();x();k();R();import*as Le from"three";var rr={},aa=!1;function Tv(){if(aa)return;let n=globalThis.loadedData?.tints;if(n){for(let e of Object.keys(n))rr[e]=Mv(n[e]);aa=!0}}function Mv(n){let e={},t=va(n.default??16777215);if(n.data)for(let r of n.data){let i=va(r.color);for(let s of r.keys)e[s]=i}return new Proxy(e,{get(r,i){return r[i]??t}})}function va(n){return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]}function la(n,e){return Tv(),n==="grass_block"?[1,1,1]:n==="redstone_wire"?[1,1,1]:n==="birch_leaves"||n==="spruce_leaves"||n==="lily_pad"?rr.constant?.[n]??[1,1,1]:n.includes("leaves")||n==="vine"?rr.foliage?.[e]??[1,1,1]:["short_grass","tall_grass","fern","large_fern","sugar_cane","grass"].includes(n)?rr.grass?.[e]??[1,1,1]:[1,1,1]}var Sv=512,Ui=1/20,Gi=class{constructor(e){this.worldRenderer=e;d(this,"particles",[]);d(this,"sharedMaterial");d(this,"enabled",!1);d(this,"tickAccumulator",0);d(this,"nextParticleIndex",0);d(this,"render",e=>{if(!this.enabled)return;for(this.tickAccumulator+=e;this.tickAccumulator>=Ui;)this.tickAccumulator-=Ui,this.tickPhysics();let t=this.tickAccumulator/Ui;this.updateVisuals(t)})}enable(){this.enabled||(this.enabled=!0,this.ensureMaterial())}disable(){this.enabled&&(this.enabled=!1)}dispose(){for(let e of this.particles)e.active&&this.worldRenderer.sceneOrigin.removeAndUntrack(e.mesh),e.mesh.geometry.dispose();this.particles=[],this.sharedMaterial?.dispose(),this.sharedMaterial=void 0,this.nextParticleIndex=0}spawnBlockBreakParticles(e,t,r,i,s,o="plains"){if(!this.enabled)return;let v=this.resolveBlockTexture(i);if(!v)return;let a=la(i,o);for(let l=0;l<4;l++)for(let c=0;c<4;c++)for(let u=0;u<4;u++){let f=e+(l+.5)/4,m=t+(c+.5)/4,g=r+(u+.5)/4,y=f-e-.5,w=m-t-.5,b=g-r-.5;y+=(Math.random()*2-1)*.4,w+=(Math.random()*2-1)*.4,b+=(Math.random()*2-1)*.4;let A=(Math.random()+Math.random()+1)*.15,C=Math.sqrt(y*y+w*w+b*b),M=y/C*A*.4,S=w/C*A*.4+.1,H=b/C*A*.4,B=Math.floor(4/(Math.random()*.9+.1));this.createParticle(f,m,g,M,S,H,B,v,s,e,r,1,a)}}tickPhysics(){for(let e of this.particles){if(!e.active)continue;if(e.prevX=e.x,e.prevY=e.y,e.prevZ=e.z,e.age++,e.age>=e.maxAge){this.deactivateParticle(e);continue}e.yd-=.04,e.x+=e.xd,e.y+=e.yd,e.z+=e.zd;let t=this.getFloorY(e);e.y<=t?(e.y=t,e.yd=0,e.onGround=!0):e.onGround=!1,e.xd*=.98,e.yd*=.98,e.zd*=.98,e.onGround&&(e.xd*=.7,e.zd*=.7)}}updateVisuals(e){let t=this.worldRenderer.camera.position;for(let r of this.particles){if(!r.active)continue;let i=r.prevX+(r.x-r.prevX)*e,s=r.prevY+(r.y-r.prevY)*e,o=r.prevZ+(r.z-r.prevZ)*e;r.mesh.position.set(i,s,o),r.mesh.lookAt(t.x,t.y,t.z)}}spawnCrackParticle(e,t,r,i,s,o,v="plains"){if(!this.enabled)return;let a=this.resolveBlockTexture(s);if(!a)return;let l=la(s,v),c=e+Math.random()*.8+.1,u=t+Math.random()*.8+.1,f=r+Math.random()*.8+.1;switch(i){case 0:u=t-.1;break;case 1:u=t+1+.1;break;case 2:f=r-.1;break;case 3:f=r+1+.1;break;case 4:c=e-.1;break;case 5:c=e+1+.1;break}let m=(Math.random()*2-1)*.4*.2,g=(Math.random()*2-1)*.4*.2+.1*.2,y=(Math.random()*2-1)*.4*.2,w=Math.floor(4/(Math.random()*.9+.1));this.createParticle(c,u,f,m,g,y,w,a,o,e,r,.6,l)}createParticle(e,t,r,i,s,o,v,a,l,c,u,f=1,m=[1,1,1]){this.ensureMaterial();let g=this.findInactiveParticle();g||(this.particles.length<Sv?g=this.allocateParticle():g=this.recycleOldest());let y=Math.floor(Math.random()*4),w=Math.floor(Math.random()*4),b=a.u+y/4*a.su,A=a.v+w/4*a.sv,C=a.su/4,M=a.sv/4;this.setGeometryUVs(g.mesh.geometry,b,A,C,M),g.active=!0,g.x=e,g.y=t,g.z=r,g.prevX=e,g.prevY=t,g.prevZ=r,g.xd=i,g.yd=s,g.zd=o,g.age=0,g.maxAge=v,g.onGround=!1,g.floorMap=l,g.blockX=Math.floor(c),g.blockZ=Math.floor(u);let S=.1*(.5+Math.random()*.5)*2*f;g.mesh.scale.set(S,S,S),g.mesh.position.set(e,t,r),g.mesh.visible=!0;let H=.6*m[0],B=.6*m[1],I=.6*m[2],G=new Float32Array([H,B,I,H,B,I,H,B,I,H,B,I]),O=g.mesh.geometry.getAttribute("color");O?(O.set(G),O.needsUpdate=!0):g.mesh.geometry.setAttribute("color",new Le.Float32BufferAttribute(G,3)),this.worldRenderer.sceneOrigin.addAndTrack(g.mesh)}allocateParticle(){let e=new Le.PlaneGeometry(1,1),t=new Le.Mesh(e,this.sharedMaterial);t.visible=!1;let r={mesh:t,active:!1,x:0,y:0,z:0,prevX:0,prevY:0,prevZ:0,xd:0,yd:0,zd:0,age:0,maxAge:0,onGround:!1,floorMap:[],blockX:0,blockZ:0};return this.particles.push(r),r}findInactiveParticle(){for(let e=0;e<this.particles.length;e++){let t=(this.nextParticleIndex+e)%this.particles.length;if(!this.particles[t].active)return this.nextParticleIndex=(t+1)%this.particles.length,this.particles[t]}}recycleOldest(){let e=this.particles[0];for(let t of this.particles)t.age>e.age&&(e=t);return this.deactivateParticle(e),e}deactivateParticle(e){e.active&&(e.active=!1,e.mesh.visible=!1,this.worldRenderer.sceneOrigin.removeAndUntrack(e.mesh))}getFloorY(e){let t=Math.floor(e.x)-e.blockX,r=Math.floor(e.z)-e.blockZ;return t=Math.max(-2,Math.min(2,t)),r=Math.max(-2,Math.min(2,r)),e.floorMap[(r+2)*5+(t+2)]}resolveBlockTexture(e){let t=this.worldRenderer.resourcesManager.currentResources;if(!t)return null;let r=t.blocksAtlasJson,i=r.textures;if(i[e])return this.extractUV(i[e],r);for(let s of["_side","_top","_front","_0",""]){let o=e+s;if(i[o])return this.extractUV(i[o],r)}for(let s of Object.keys(i))if(s.startsWith(e))return this.extractUV(i[s],r);return null}extractUV(e,t){return{u:e.u,v:e.v,su:e.su??t.suSv,sv:e.sv??t.suSv}}setGeometryUVs(e,t,r,i,s){let o=e.getAttribute("uv");o.setXY(0,t,r),o.setXY(1,t+i,r),o.setXY(2,t,r+s),o.setXY(3,t+i,r+s),o.needsUpdate=!0}ensureMaterial(){if(this.sharedMaterial)return;let e=this.worldRenderer.material.map;e&&(this.sharedMaterial=new Le.MeshBasicMaterial({map:e,vertexColors:!0,transparent:!0,alphaTest:.1}))}},ca={id:"blockBreakParticles",controller:Gi,enabledDefault:!0,cannotBeDisabled:!0,requiresHeightmap:!1};E();x();k();R();var Ni=class{constructor(e){this.worldRenderer=e;d(this,"enabled",!1);d(this,"lastBobWalkDist",0);d(this,"lastBobTickTime",0);d(this,"render",()=>{if(!this.enabled)return;let e=this.worldRenderer.displayOptions.inWorldRenderingConfig,{perspective:t}=this.worldRenderer.playerStateReactive;if(e.viewBobbing&&t==="first_person"&&!this.worldRenderer.playerStateUtils.isSpectator()){this.worldRenderer.playerStateReactive.walkDist!==this.lastBobWalkDist&&(this.lastBobTickTime=performance.now(),this.lastBobWalkDist=this.worldRenderer.playerStateReactive.walkDist);let i=Math.min((performance.now()-this.lastBobTickTime)/50,1);this.worldRenderer.cameraShake.setCameraBobInput({walkDist:this.worldRenderer.playerStateReactive.walkDist,prevWalkDist:this.worldRenderer.playerStateReactive.prevWalkDist,bob:this.worldRenderer.playerStateReactive.bob,prevBob:this.worldRenderer.playerStateReactive.prevBob,partialTick:i})}else this.worldRenderer.cameraShake.setCameraBobInput(null)})}enable(){this.enabled=!0}disable(){this.enabled=!1,this.worldRenderer.cameraShake.setCameraBobInput(null);let{perspective:e}=this.worldRenderer.playerStateReactive;e==="first_person"&&this.worldRenderer.camera.position.set(0,0,0)}dispose(){this.disable()}},da={id:"cameraBobbing",controller:Ni,enabledDefault:!0,cannotBeDisabled:!0};E();x();k();R();import*as I0 from"three";var Wi=2e3,ua=32,fa=32,ir=12,ha=24,nr=1.2,Cv=-5;var Vi=class{constructor(e){this.worldRenderer=e;d(this,"instancedMesh");d(this,"geometry");d(this,"material");d(this,"particles",[]);d(this,"enabled",!1);d(this,"dummy",new I0.Matrix4);d(this,"tempPosition",new I0.Vector3);d(this,"tempQuaternion",new I0.Quaternion);d(this,"tempScale",new I0.Vector3);d(this,"render",e=>{if(!this.enabled||!this.instancedMesh||!this.material)return;this.syncMaterialToSceneFog();let t=this.worldRenderer.getCameraPosition();this.instancedMesh.position.set(0,0,0);let r=this.worldRenderer.reactiveState.world.heightmaps,{dummy:i,tempPosition:s,tempQuaternion:o,tempScale:v}=this,a=NaN,l=NaN,c;for(let u=0;u<Wi;u++){let f=this.particles[u];this.instancedMesh.getMatrixAt(u,i),i.decompose(s,o,v),s.addScaledVector(f.velocity,e);let m=s.y,g=Math.sqrt(s.x*s.x+s.z*s.z),y=t.x+s.x,w=t.y+s.y,b=t.z+s.z,A=Math.floor(y/16),C=Math.floor(b/16);(A!==a||C!==l)&&(c=r.get(`${A},${C}`),a=A,l=C);let M=(Math.floor(y)%16+16)%16,S=(Math.floor(b)%16+16)%16,H=c?.[S*16+M];if(g>ua||H!==void 0&&H!==-32768&&w<=H+1+f.despawnOffset||m<Cv){this.respawnParticle(s);let I=ir+Math.random()*(ha-ir);f.velocity.set((Math.random()-.5)*nr,-I,(Math.random()-.5)*nr),f.despawnOffset=Math.random()*.5}i.compose(s,o,v),this.instancedMesh.setMatrixAt(u,i)}this.instancedMesh.instanceMatrix.needsUpdate=!0})}enable(){this.enabled||(this.enabled=!0,this.instancedMesh?this.instancedMesh.visible=!0:this.createRain())}disable(){this.enabled&&(this.enabled=!1,this.instancedMesh&&(this.instancedMesh.visible=!1))}autoEnableCheck(){return this.worldRenderer.worldRendererConfig.isRaining===!0}dispose(){this.instancedMesh&&this.worldRenderer.scene.remove(this.instancedMesh),this.geometry?.dispose(),this.material?.dispose(),this.instancedMesh=void 0,this.geometry=void 0,this.material=void 0,this.particles=[]}syncMaterialToSceneFog(){if(!this.material)return;let e=this.worldRenderer.scene.fog;e instanceof I0.Fog||e instanceof I0.FogExp2?this.material.color.copy(e.color):this.material.color.set(13426158),this.material.fog=!0}createRain(){this.geometry=new I0.BoxGeometry(.03,.3,.03),this.material=new I0.MeshBasicMaterial({color:13426158,transparent:!0,opacity:.35,depthWrite:!0,fog:!0}),this.instancedMesh=new I0.InstancedMesh(this.geometry,this.material,Wi),this.instancedMesh.name="rain-particles",this.instancedMesh.frustumCulled=!1,this.syncMaterialToSceneFog();let e=new I0.Matrix4,t=new I0.Vector3;for(let r=0;r<Wi;r++){this.respawnParticle(t),t.y=Math.random()*fa,e.setPosition(t),this.instancedMesh.setMatrixAt(r,e);let i=ir+Math.random()*(ha-ir);this.particles.push({velocity:new I0.Vector3((Math.random()-.5)*nr,-i,(Math.random()-.5)*nr),age:0,despawnOffset:Math.random()*.5})}this.instancedMesh.instanceMatrix.needsUpdate=!0,this.worldRenderer.scene.add(this.instancedMesh)}respawnParticle(e){let t=Math.random()*Math.PI*2,r=Math.random()*ua;e.set(Math.cos(t)*r,fa,Math.sin(t)*r)}},ma={id:"rain",controller:Vi,enabledDefault:!1,requiresHeightmap:!0};E();x();k();R();import*as A0 from"three";var pa=new A0.Color(13/255,234/255,238/255),Bv=9;var Pv=350,Iv=650;var Hv=120,Ov=280,ji=class{constructor(e){this.worldRenderer=e;d(this,"pendingGeometries",new Map);d(this,"revealingSections",new Map);d(this,"finishedChunkCount",0);d(this,"revealTriggered",!1);d(this,"revealStartTime",0);d(this,"enabled",!1);d(this,"onWorldSwitchedCb",null);d(this,"patched",!1);d(this,"initialWaveDone",!1);d(this,"initialRevealWaveSettled",!1);d(this,"wireframeMaterial");d(this,"wireframeGlowMaterial");d(this,"pulseTime",0);d(this,"revealedChunks",new Set);d(this,"originalFinishChunk",null);d(this,"originalDestroy",null);d(this,"originalSceneAdd",null);d(this,"originalHandleWorkerMessage",null);d(this,"render",e=>{this.enabled&&this.update(e*1e3)});this.wireframeMaterial=new A0.LineBasicMaterial({color:pa,transparent:!0,opacity:1,blending:A0.AdditiveBlending,depthWrite:!1}),this.wireframeGlowMaterial=new A0.LineBasicMaterial({color:pa,transparent:!0,opacity:.55,blending:A0.AdditiveBlending,depthWrite:!1})}isFuturisticRevealConfigured(){return this.worldRenderer.worldRendererConfig.futuristicReveal===!0}isInInitialRevealCampaign(){return this.enabled&&!this.initialRevealWaveSettled}autoEnableCheck(){return this.isFuturisticRevealConfigured()}enable(){if(this.isFuturisticRevealConfigured()&&!(this.enabled&&this.patched)){if(this.enabled&&!this.patched){this.patchWorldRenderer();return}this.enabled=!0,this.patchWorldRenderer()}}disable(){this.enabled&&(this.enabled=!1,this.unpatchWorldRenderer(),this.reset())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}dispose(){this.disable(),this.wireframeMaterial.dispose(),this.wireframeGlowMaterial.dispose()}patchWorldRenderer(){if(this.patched)return;this.patched=!0;let e=this.worldRenderer;this.onWorldSwitchedCb=()=>this.reset(),e.onWorldSwitched.push(this.onWorldSwitchedCb),this.originalFinishChunk=e.finishChunk.bind(e),e.finishChunk=t=>{this.originalFinishChunk(t),this.onChunkFinished(t)},this.originalDestroy=e.destroy.bind(e),e.destroy=()=>{this.dispose(),this.originalDestroy()},this.originalHandleWorkerMessage=e.handleWorkerMessage.bind(e),e.handleWorkerMessage=t=>{this.originalHandleWorkerMessage(t),this.enabled&&t?.type==="geometry"&&Promise.resolve().then(()=>{try{this.registerSection(t.key,t.geometry)}catch{}})},this.originalSceneAdd=e.scene.add.bind(e.scene),e.scene.add=(...t)=>{let r=this.originalSceneAdd(...t);for(let i of t)this.checkAndPatchMesh(i);return r}}unpatchWorldRenderer(){let e=this.worldRenderer;if(this.originalFinishChunk&&(e.finishChunk=this.originalFinishChunk,this.originalFinishChunk=null),this.originalDestroy&&(e.destroy=this.originalDestroy,this.originalDestroy=null),this.originalHandleWorkerMessage&&(e.handleWorkerMessage=this.originalHandleWorkerMessage,this.originalHandleWorkerMessage=null),this.originalSceneAdd&&(e.scene.add=this.originalSceneAdd,this.originalSceneAdd=null),this.onWorldSwitchedCb){let t=e.onWorldSwitched.indexOf(this.onWorldSwitchedCb);t!==-1&&e.onWorldSwitched.splice(t,1),this.onWorldSwitchedCb=null}this.patched=!1}checkAndPatchMesh(e){if(e instanceof A0.Mesh&&(e.name==="mesh"||e.name==="shaderMesh")){let t=this.findSectionKeyForMesh(e);t&&this.shouldUseRevealEffect(t)&&(e.visible=!1,e.hiddenByReveal=!0)}for(let t of e.children)this.checkAndPatchMesh(t)}findSectionKeyForMesh(e){let t=e;for(;t;){let{sectionKey:m}=t;if(m&&this.worldRenderer.chunkMeshManager.sectionObjects[m]===t)return m;t=t.parent}let r=this.worldRenderer.sceneOrigin.getWorldPosition(e),i=r?.x??this.worldRenderer.sceneOrigin.toWorldX(e.position.x),s=r?.y??this.worldRenderer.sceneOrigin.toWorldY(e.position.y),o=r?.z??this.worldRenderer.sceneOrigin.toWorldZ(e.position.z),v=16,a=this.worldRenderer.getSectionHeight(),l=Math.floor(i/v)*v,c=Math.floor(s/a)*a,u=Math.floor(o/v)*v,f=`${l},${c},${u}`;return this.worldRenderer.chunkMeshManager.sectionObjects[f]?f:null}get scene(){return this.worldRenderer.realScene}getCameraPosition(){return this.worldRenderer.getCameraPosition()}sectionHasRevealContent(e){return(e.wireframePositions?.length??0)>0||(e.positions?.length??0)>0?!0:(e.shaderCubes?.count??0)>0}getSectionRenderMeshes(e){let t=this.worldRenderer.chunkMeshManager.sectionObjects[e];if(!t)return[];let r=[];for(let i of["mesh","shaderMesh"]){let s=t.children.find(o=>o.name===i);s instanceof A0.Mesh&&r.push(s)}return r}hideSectionRenderMeshes(e){let t=this.getSectionRenderMeshes(e);for(let r of t)r.visible=!1,r.hiddenByReveal=!0;return t}setMeshFadeOpacity(e,t){if(e.name==="shaderMesh"){e.visible=t>.001;return}let r=e.material;if(!Array.isArray(r))if(r.originalMaterial)r.opacity=t,r.transparent=!0,r.needsUpdate=!0;else{r.originalMaterial=r;let i=r.clone();i.transparent=!0,i.opacity=t,i.needsUpdate=!0,e.material=i}}restoreMeshMaterial(e){let t=e.originalMaterial;if(!t)return;let r=e.material;e.material=t,r!==t&&r.dispose(),delete e.originalMaterial}onChunkFinished(e){this.finishedChunkCount++,!this.revealTriggered&&this.finishedChunkCount>=Bv&&this.triggerReveal()}registerSection(e,t){if(!(this.revealedChunks.has(e)||this.revealingSections.has(e))){if(this.revealTriggered&&this.initialWaveDone){this.revealedChunks.add(e);return}this.revealTriggered?this.startSectionReveal(e,t):this.pendingGeometries.set(e,t)}}shouldUseRevealEffect(e){return!this.enabled||this.revealTriggered&&this.initialWaveDone?!1:!this.revealedChunks.has(e)&&!this.revealingSections.has(e)}triggerReveal(){this.revealTriggered=!0,this.initialWaveDone=!0,this.revealStartTime=performance.now();let e=this.getCameraPosition(),t=[...this.pendingGeometries.entries()];this.pendingGeometries.clear();let r=t.map(([s,o])=>{let v=Math.hypot(o.sx-e.x,o.sy-e.y,o.sz-e.z);return{key:s,geometry:o,distance:v}}).sort((s,o)=>s.distance-o.distance),i=r.at(-1)?.distance||1;for(let{key:s,geometry:o,distance:v}of r){let a=v/i*1500;setTimeout(()=>{!this.revealedChunks.has(s)&&!this.revealingSections.has(s)&&this.startSectionReveal(s,o)},a)}}startSectionReveal(e,t){if(!this.sectionHasRevealContent(t)||this.revealingSections.has(e)||this.revealedChunks.has(e))return;let r=this.createWireframeGeometry(t),i=this.worldRenderer.chunkMeshManager.globalBlockBuffer,s=i?.hasSection(e)?i.takeSectionData(e):void 0,o=this.hideSectionRenderMeshes(e),v=new A0.LineSegments(r,this.wireframeMaterial.clone());this.worldRenderer.sceneOrigin.track(v),v.position.set(t.sx,t.sy,t.sz),v.name="scifi-wireframe",v.renderOrder=1e3;let a=new A0.LineSegments(r.clone(),this.wireframeGlowMaterial.clone());this.worldRenderer.sceneOrigin.track(a),a.position.set(t.sx,t.sy,t.sz),a.scale.set(1.02,1.02,1.02),a.name="scifi-glow",a.renderOrder=999;let l=new A0.Group;l.add(v),l.add(a),l.name="scifi-reveal-group",l.sectionKey=e,this.scene.add(l);let c=this.initialWaveDone?Hv:Pv,u=this.initialWaveDone?Ov:Iv,f={key:e,wireframeGroup:l,revealStartTime:performance.now(),phase:"wireframe",renderMeshRefs:o,globalShaderRestore:s,wireframeMs:c,revealMs:u};setTimeout(()=>{for(let m of this.getSectionRenderMeshes(e))m.hiddenByReveal||this.hideSectionRenderMeshes(e)},0),this.revealingSections.set(e,f)}createSectionBoundsWireframe(){let r=[[-8,-8,-8],[8,-8,-8],[-8,8,-8],[8,8,-8],[-8,-8,8],[8,-8,8],[-8,8,8],[8,8,8]],i=[[0,1],[1,3],[3,2],[2,0],[4,5],[5,7],[7,6],[6,4],[0,4],[1,5],[2,6],[3,7]],s=[];for(let[v,a]of i)s.push(...r[v],...r[a]);let o=new A0.BufferGeometry;return o.setAttribute("position",new A0.Float32BufferAttribute(s,3)),o}createWireframeGeometry(e){if(e.wireframePositions&&e.wireframePositions.length>0){let v=new A0.BufferGeometry;return v.setAttribute("position",new A0.Float32BufferAttribute(e.wireframePositions,3)),v}let t=e.positions,r=e.indices;if(!t?.length||!r?.length)return this.createSectionBoundsWireframe();let i=[],s=new Set;for(let v=0;v<r.length;v+=3){let a=r[v],l=r[v+1],c=r[v+2];this.addEdge(t,a,l,i,s),this.addEdge(t,l,c,i,s),this.addEdge(t,c,a,i,s)}let o=new A0.BufferGeometry;return o.setAttribute("position",new A0.Float32BufferAttribute(i,3)),o}addEdge(e,t,r,i,s){let o=Math.min(t,r),v=Math.max(t,r),a=`${o}-${v}`;s.has(a)||(s.add(a),i.push(e[t*3],e[t*3+1],e[t*3+2],e[r*3],e[r*3+1],e[r*3+2]))}update(e){if(!this.enabled||this.revealingSections.size===0)return;this.pulseTime+=e*.001;let t=performance.now(),r=.6+.4*Math.sin(this.pulseTime*4),i=[];for(let[s,o]of this.revealingSections){let v=t-o.revealStartTime;if(o.phase==="wireframe"){let a=o.wireframeGroup.children[0],l=o.wireframeGroup.children[1];if(a?.material){let c=a.material;c.opacity=r;let u=.85+.15*Math.sin(this.pulseTime*6+v*.002);c.color.setRGB(13/255*u,234/255*u,238/255*u)}if(l?.material){let c=l.material;c.opacity=r*.4}if(v>o.wireframeMs){o.phase="transitioning",o.renderMeshRefs=this.getSectionRenderMeshes(s);for(let c of o.renderMeshRefs)c.visible=!0,this.setMeshFadeOpacity(c,0)}}else if(o.phase==="transitioning"){let a=v-o.wireframeMs,l=Math.min(1,a/o.revealMs),c=1-(1-l)**3,u=o.wireframeGroup.children[0],f=o.wireframeGroup.children[1];if(u?.material){let m=u.material;m.opacity=1-c}if(f?.material){let m=f.material;m.opacity=(1-c)*.55}for(let m of o.renderMeshRefs)this.setMeshFadeOpacity(m,c);l>=1&&(o.phase="complete",i.push(o))}}for(let s of i)this.completeReveal(s)}completeReveal(e){this.revealingSections.delete(e.key),this.revealedChunks.add(e.key),this.revealTriggered&&this.revealingSections.size===0&&(this.initialRevealWaveSettled=!0);for(let t of e.renderMeshRefs)this.restoreMeshMaterial(t),t.visible=!0,delete t.hiddenByReveal;this.worldRenderer.chunkMeshManager.migrateDeferredShaderToGlobal(e.key),e.globalShaderRestore&&this.worldRenderer.chunkMeshManager.globalBlockBuffer?.addSection(e.key,e.globalShaderRestore.words,e.globalShaderRestore.count),this.disposeWireframeGroup(e.wireframeGroup)}disposeWireframeGroup(e){this.worldRenderer.sceneOrigin.removeAndUntrackAll(e);let t=[];e.traverse(r=>{t.push(r)});for(let r of t){let i=r;if(i.geometry&&i.geometry.dispose(),i.material){let s=i.material;if(Array.isArray(s))for(let o of s)o.dispose();else s&&typeof s.dispose=="function"&&s.dispose()}}e.clear()}reset(){for(let e of this.revealingSections.values())this.disposeWireframeGroup(e.wireframeGroup);this.pendingGeometries.clear(),this.revealingSections.clear(),this.revealedChunks.clear(),this.finishedChunkCount=0,this.revealTriggered=!1,this.initialWaveDone=!1,this.initialRevealWaveSettled=!1,this.revealStartTime=0,this.pulseTime=0}forceCompleteAll(){let e=[...this.revealingSections.values()];for(let t of e){t.renderMeshRefs=this.getSectionRenderMeshes(t.key);for(let r of t.renderMeshRefs)this.restoreMeshMaterial(r),r.visible=!0,delete r.hiddenByReveal;this.completeReveal(t)}}debugGetWireframeGroups(){let e=[];return this.scene.traverse(t=>{t.name==="scifi-reveal-group"&&e.push(t)}),e}debugForceCleanup(){let e=this.debugGetWireframeGroups();for(let t of e)this.disposeWireframeGroup(t);for(let t of this.revealingSections.values())this.disposeWireframeGroup(t.wireframeGroup);this.revealingSections.clear()}debugStatus(){let e=this.debugGetWireframeGroups(),t=new Set(this.revealingSections.keys()),r=e.filter(i=>!t.has(i.sectionKey));return{revealTriggered:this.revealTriggered,finishedChunkCount:this.finishedChunkCount,pendingGeometries:this.pendingGeometries.size,revealingSections:this.revealingSections.size,revealedChunks:this.revealedChunks.size,wireframeGroupsInScene:e.length,orphanedWireframeGroups:r.length,orphanedKeys:r.map(i=>i.sectionKey),sections:[...this.revealingSections.entries()].map(([i,s])=>({key:i,phase:s.phase,renderMeshCount:s.renderMeshRefs.length,wireframeInScene:s.wireframeGroup.parent!==null}))}}debugLog(){}},ga={id:"futuristicReveal",controller:ji,enabledDefault:!0};E();x();k();R();import*as M0 from"three";var Fv=parseInt(M0.REVISION.replaceAll(/\D+/g,""),10),Yi=class extends M0.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
21489
21489
  uniform float time;
21490
21490
  attribute float size;
21491
21491
  varying vec3 vColor;
@@ -21504,8 +21504,8 @@ void main() {
21504
21504
  gl_FragColor = vec4(vColor, 1.0);
21505
21505
 
21506
21506
  #include <tonemapping_fragment>
21507
- #include <${Qv>=154?"colorspace_fragment":"encodings_fragment"}>
21508
- }`})}},nn=class{constructor(e){this.worldRenderer=e;u(this,"points");u(this,"clock",new M0.Clock);u(this,"enabled",!1);u(this,"currentTime");u(this,"enablementCheck",()=>this.currentTime?this.currentTime>13500&&this.currentTime<23e3:!1);u(this,"render",e=>{this.points&&(this.points.position.set(0,0,0),this.points.material.uniforms.time.value=this.clock.getElapsedTime()*.2)})}enable(){this.enabled||(this.enabled=!0,this.updateVisibility())}disable(){this.enabled&&(this.enabled=!1,this.removeStars())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}updateTimeOfDay(e){this.currentTime=e,this.enabled&&this.updateVisibility()}updateVisibility(){if(!this.enabled)return;let e=this.enablementCheck?.()??!1;e&&!this.points?this.createStars():!e&&this.points&&this.removeStars()}createStars(){if(this.points)return;let e=80,t=50,r=7e3,i=7,s=10,o=new M0.BufferGeometry,a=b=>new M0.Vector3().setFromSpherical(new M0.Spherical(b,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),v=[],l=[],c=Array.from({length:r},()=>(.5+.5*Math.random())*i),d=new M0.Color,f=e+t,m=t/r;for(let b=0;b<r;b++)f-=m*Math.random(),v.push(...a(f).toArray()),d.setHSL(b/r,s,.9),l.push(d.r,d.g,d.b);o.setAttribute("position",new M0.Float32BufferAttribute(v,3)),o.setAttribute("color",new M0.Float32BufferAttribute(l,3)),o.setAttribute("size",new M0.Float32BufferAttribute(c,1));let g=new rn;g.blending=M0.AdditiveBlending,g.depthTest=!0,g.depthWrite=!1,g.transparent=!0,this.points=new M0.Points(o,g),this.points.renderOrder=-1,this.worldRenderer.scene.add(this.points)}dispose(){this.removeStars()}removeStars(){this.points&&(this.points.geometry.dispose(),this.points.material.dispose(),this.worldRenderer.scene.remove(this.points),this.points=void 0)}},Ta={id:"starfield",controller:nn,enabledDefault:!0,cannotBeDisabled:!0};var Ma={starfield:Ta,futuristicReveal:ka,rain:xa,cameraBobbing:_a,blockBreakParticles:ya};var gt=class gt extends y1{constructor(t,r,i){if(!i.resourcesManager)throw new Error("resourcesManager is required in displayOptions");super(i.resourcesManager,i,r);this.renderer=t;this.initOptions=r;this.displayOptions=i;u(this,"outputFormat","threeJs");u(this,"chunkMeshManager");u(this,"chunkTextures",new Map);u(this,"signsCache",new Map);u(this,"cameraSectionPos",new Ne(0,0,0));u(this,"holdingBlock");u(this,"holdingBlockLeft");u(this,"scene",new Q.Scene);u(this,"ambientLight",new Q.AmbientLight(13421772));u(this,"directionalLight",new Q.DirectionalLight(16777215,.5));u(this,"entities",new G1(this,globalThis.mcData));u(this,"performanceMonitor");u(this,"cameraGroupVr");u(this,"material",new Q.MeshBasicMaterial({vertexColors:!0,transparent:!0,alphaTest:.1}));u(this,"itemsTexture");u(this,"cursorBlock");u(this,"onRender",[]);u(this,"lastRenderTime",0);u(this,"animatedFov",0);u(this,"lastFovAnimTime",0);u(this,"cameraShake");u(this,"cameraContainer");u(this,"media");u(this,"waypoints");u(this,"cinimaticScript");u(this,"camera");u(this,"renderTimeAvg",0);u(this,"pendingSectionUpdates",new Map);u(this,"pendingSectionBufferStartTimes",new Map);u(this,"modules",{});u(this,"sectionsOffsetsAnimations",{});u(this,"fountains",[]);u(this,"fireworksLegacy");u(this,"DEBUG_RAYCAST",!1);u(this,"skyboxRenderer");u(this,"fireworks");u(this,"sceneOrigin",new $1(this.scene));u(this,"cameraWorldPos",{x:0,y:0,z:0});u(this,"_cameraPositionAccessWarned",!1);u(this,"_tmpCameraPos",new Q.Vector3);u(this,"currentPosTween");u(this,"currentRotTween");u(this,"_tpDirection",new Q.Vector3);u(this,"_tpPitchQuat",new Q.Quaternion);u(this,"_tpYawQuat",new Q.Quaternion);u(this,"_tpFinalQuat",new Q.Quaternion);u(this,"_tpScenePos",new Q.Vector3);u(this,"_tpAxisX",new Q.Vector3(1,0,0));u(this,"_tpAxisY",new Q.Vector3(0,1,0));u(this,"_tpRaycaster",new Q.Raycaster);u(this,"_tpChunkWorldPos",new Q.Vector3);u(this,"debugOverlayAdded",!1);u(this,"debugRaycastHelper");u(this,"debugHitPoint");u(this,"prevFramePerspective",null);this.performanceMonitor=new a5(this.reactiveState.world.instabilityFactors),this.renderer=t,i.rendererState.renderer=gt.getRendererInfo(t)??"...",this.chunkMeshManager=new Y5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.onRenderDistanceChanged=s=>{this.chunkMeshManager.updateViewDistance(s)},this.cursorBlock=new N1(this),this.holdingBlock=U5(this),this.holdingBlockLeft=U5(this,!0);for(let s of Object.values(Ma))this.registerModule(s);this.skyboxRenderer=new Z1(this.realScene,!1,null),this.skyboxRenderer.init(),this.addDebugOverlay(),this.resetScene(),this.init(),this.soundSystem=new V1(this),this.cameraShake=new j1(this,this.onRender),this.media=new Y1(this),this.fireworksLegacy=new J1(this),this.waypoints=new K1(this),this.cinimaticScript=new q1(this,(s,o,a)=>this.setCinimaticCamera(s,o,a),s=>this.setCinimaticFov(s),()=>({position:new Ne(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),yaw:this.cameraShake.getBaseRotation().yaw,pitch:this.cameraShake.getBaseRotation().pitch,fov:this.camera.fov})),this.fireworks=new X1(this.realScene,this.sceneOrigin),this.renderUpdateEmitter.on("chunkFinished",s=>{this.finishChunk(s)}),this.worldSwitchActions(),this.initializeModules()}isShaderCubeBlocksEnabled(){return this.worldRendererConfig.shaderCubeBlocks===!0&&!!this.renderer?.capabilities?.isWebGL2}get sectionObjects(){return this.chunkMeshManager.sectionObjects}get realScene(){return this.scene}get waitingChunksToDisplay(){return this.chunkMeshManager.waitingChunksToDisplay}get estimatedMemoryUsage(){return this.chunkMeshManager.getEstimatedMemoryUsage().total}get tilesRendered(){return this.chunkMeshManager.getTotalTiles()}get blocksRendered(){return this.chunkMeshManager.getTotalBlocks()}registerModule(t){if(t.id in this.modules)return;let r=new t.controller(this),i={manifest:t,controller:r,enabled:!1,toggle:()=>this.toggleModule(t.id)};this.modules[t.id]=i,t.enabledDefault&&this.toggleModule(t.id,!0)}enableModule(t){let r=this.modules[t];r&&(r.enabled||(r.enabled=!0,r.controller.enable(),r.controller.render&&this.onRender.push(r.controller.render)))}disableModule(t){let r=this.modules[t];if(r&&!r.manifest.cannotBeDisabled&&r.enabled&&(r.enabled=!1,r.controller.disable(),r.controller.render)){let i=this.onRender.indexOf(r.controller.render);i>-1&&this.onRender.splice(i,1)}}toggleModule(t,r){let i=this.modules[t];if(!i)return!1;let s=r!==void 0?r:!i.enabled;if(s===i.enabled)return i.enabled;if(!s&&i.manifest.cannotBeDisabled)return!0;if(i.enabled=s,s)i.controller.enable(),i.controller.render&&!this.onRender.includes(i.controller.render)&&this.onRender.push(i.controller.render);else if(i.controller.disable(),i.controller.render){let o=this.onRender.indexOf(i.controller.render);o>-1&&this.onRender.splice(o,1)}return s}disposeModules(){for(let t of Object.values(this.modules))t.controller.dispose();this.modules={}}initializeModules(){this.updateModulesFromConfig()}getModule(t){return this.modules[t]?.controller}anyModuleRequiresHeightmap(){return Object.values(this.modules).some(t=>t.enabled&&t.manifest.requiresHeightmap)}get cameraObject(){return this.cameraGroupVr??this.cameraContainer}_wrapCameraPositionWithWarning(){let t=this.camera.position,r=this,i=20,s=(v,l,c)=>Math.abs(v)>i||Math.abs(l)>i||Math.abs(c)>i,o=()=>{!r._cameraPositionAccessWarned&&typeof F<"u"},a=new Proxy(t,{set(v,l,c){return(l==="x"||l==="y"||l==="z")&&typeof c=="number"&&Math.abs(c)>i&&o(),v[l]=c,!0},get(v,l,c){let d=v[l];return l==="set"?function(f,m,g){return s(f,m,g)&&o(),v.set(f,m,g)}:l==="setX"||l==="setY"||l==="setZ"?function(f){return Math.abs(f)>i&&o(),v[l](f)}:l==="copy"?function(f){return s(f.x,f.y,f.z)&&o(),v.copy(f)}:typeof d=="function"?d.bind(v):d}});Object.defineProperty(this.camera,"position",{value:a,configurable:!0,enumerable:!0})}worldSwitchActions(){this.onWorldSwitched.push(()=>{this.protocolCustomBlocks.clear(),this.sectionsOffsetsAnimations={},this.waypoints.clear(),this.cinimaticScript.stopScript(),this.fireworks.clear()})}downloadWorldGeometry(){ji(this,new Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraShake.getBaseRotation(),"world-geometry.json")}updateEntity(t,r=!1){let i={rotation:{head:{x:t.headPitch??t.pitch,y:t.headYaw,z:0}}};r?this.entities.updateEntityPosition(t,!1,i):this.entities.update(t,i)}updatePlayerEntity(t){this.entities.handlePlayerEntity(t)}resetScene(){this.sceneOrigin.update(0,0,0),this.cameraWorldPos.x=0,this.cameraWorldPos.y=0,this.cameraWorldPos.z=0,this.scene.matrixAutoUpdate=!1,this.scene.background=new Q.Color(this.initOptions.config.sceneBackground),this.scene.add(this.ambientLight),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight);let t=this.renderer.getSize(new Q.Vector2);this.camera=new Q.PerspectiveCamera(75,t.x/t.y,.1,1e3),this._wrapCameraPositionWithWarning(),this.cameraContainer=new Q.Object3D,this.cameraContainer.add(this.camera),this.scene.add(this.cameraContainer)}watchReactivePlayerState(){super.watchReactivePlayerState(),this.onReactivePlayerStateUpdated("inWater",t=>{this.skyboxRenderer.updateWaterState(t,this.playerStateReactive.waterBreathing)}),this.onReactivePlayerStateUpdated("waterBreathing",t=>{this.skyboxRenderer.updateWaterState(this.playerStateReactive.inWater,t)}),this.onReactivePlayerStateUpdated("ambientLight",t=>{t&&(this.ambientLight.intensity=t)}),this.onReactivePlayerStateUpdated("directionalLight",t=>{t&&(this.directionalLight.intensity=t)}),this.onReactivePlayerStateUpdated("lookingAtBlock",t=>{this.cursorBlock.setHighlightCursorBlock(t?new Ne(t.x,t.y,t.z):null,t?.shapes)}),this.onReactivePlayerStateUpdated("diggingBlock",t=>{this.cursorBlock.updateBreakAnimation(t?{x:t.x,y:t.y,z:t.z}:void 0,t?.stage??null,t?.mergedShape)}),this.onReactivePlayerStateUpdated("perspective",t=>{let r=new Ne(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z);this.updateCamera(r,this.cameraShake.getBaseRotation().yaw,this.cameraShake.getBaseRotation().pitch)})}watchReactiveConfig(){super.watchReactiveConfig(),this.onReactiveConfigUpdated("showChunkBorders",r=>{this.updateShowChunksBorder(r)}),this.onReactiveConfigUpdated("defaultSkybox",r=>{this.skyboxRenderer.updateDefaultSkybox(r)}),this.onReactiveConfigUpdated("shaderCubeDebugMode",()=>{this.chunkMeshManager.syncCubeShaderUniforms()}),this.onReactiveConfigUpdated("futuristicReveal",()=>{this.updateModulesFromConfig()});let t=this.displayOptions.inWorldRenderingConfig.handRenderer;this.onReactiveConfigUpdated("handRenderer",r=>{if(r===t)return;t=r;let i=this.holdingBlock.ready,s=this.holdingBlockLeft.ready;this.holdingBlock.dispose(),this.holdingBlockLeft.dispose(),this.holdingBlock=U5(this),this.holdingBlockLeft=U5(this,!0),i&&(this.holdingBlock.ready=!0,this.holdingBlock.updateItem()),s&&(this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem())}),this.onReactiveConfigUpdated("*",()=>{this.updateModulesFromConfig()}),this.updateModulesFromConfig()}updateModulesFromConfig(){let{moduleStates:t}=this.worldRendererConfig;for(let[r,i]of Object.entries(this.modules)){let s=t[r];if(s==="enabled"){i.enabled||this.toggleModule(r,!0);continue}if(s==="disabled"){i.enabled&&!i.manifest.cannotBeDisabled&&this.toggleModule(r,!1);continue}if(s==="auto"||s===void 0)if(i.controller.autoEnableCheck){let o=i.controller.autoEnableCheck();o&&!i.enabled?this.toggleModule(r,!0):!o&&i.enabled&&!i.manifest.cannotBeDisabled&&this.toggleModule(r,!1)}else{let o=i.manifest.enabledDefault??!1;o&&!i.enabled?this.toggleModule(r,!0):!o&&i.enabled&&!i.manifest.cannotBeDisabled&&this.toggleModule(r,!1)}}}changeHandSwingingState(t,r=!1){let i=r?this.holdingBlockLeft:this.holdingBlock;t?i.startSwing():i.stopSwing()}async updateAssetsData(){let t=this.resourcesManager.currentResources,r=this.material.map,i=this.itemsTexture,s=m5(t.blocksAtlasImage);s.needsUpdate=!0,s.flipY=!1,this.material.map=s,this.chunkMeshManager.syncCubeShaderUniforms();let o=m5(t.itemsAtlasImage);o.needsUpdate=!0,o.flipY=!1,this.itemsTexture=o,r&&r.dispose(),i&&i.dispose(),await super.updateAssetsData(),this.onAllTexturesLoaded(),Object.keys(this.loadedChunks).length>0&&this.rerenderAllChunks()}onAllTexturesLoaded(){this.holdingBlock.ready=!0,this.holdingBlock.updateItem(),this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem()}changeBackgroundColor(t){this.realScene.background=new Q.Color(t[0],t[1],t[2])}changeCardinalLight(t){this.worldRendererConfig.cardinalLight=t}timeUpdated(t){let r=this.getModule("starfield");r?.updateTimeOfDay&&r.updateTimeOfDay(t),this.skyboxRenderer.updateTime(t)}biomeUpdated(t){t?.temperature!==void 0&&this.skyboxRenderer.updateTemperature(t.temperature)}biomeReset(){this.skyboxRenderer.updateTemperature(zi)}getItemRenderData(t,r){return W3(t,r,this.resourcesManager,this.playerStateReactive)}async demoModel(){let t=cursorBlockRel(0,1,0).position,r=await I5();Rs(r,t);let i=new Q.BoxHelper(r,16776960);r.add(i),this.realScene.add(r)}demoItem(){let t=cursorBlockRel(0,1,0).position,{mesh:r}=this.entities.getItemMesh({itemId:541},{});r.position.set(t.x+.5,t.y+.5,t.z+.5);let i=new Q.BoxHelper(r,16776960);r.add(i),this.realScene.add(r)}addDebugOverlay(){if(this.debugOverlayAdded)return;this.debugOverlayAdded=!0;let t=Bt("debug-overlay",80,0,void 0,{className:w5});setInterval(()=>{if(t.setVisibility(this.displayAdvancedStats),this.displayAdvancedStats){let r=v=>new Intl.NumberFormat("en-US",{}).format(v),i=v=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(v),s="";s+=`TE: ${r(this.renderer.info.memory.textures)} `,s+=`F: ${i(this.tilesRendered)} `,s+=`B: ${i(this.blocksRendered)} `,s+=`MEM: ${this.chunkMeshManager.getEstimatedMemoryUsage().total} `;let o=this.chunkMeshManager.getStats();s+=`POOL: ${o.activeCount}/${o.poolSize} `;let a=Tr(this.reactiveState.world.instabilityFactors);a&&(s+=`PF: ${a} `),t.updateText(s),this.backendInfoReport=s}},200)}updatePosDataChunk(t){let r=this.sectionObjects[t];if(!r)return;let[i,s,o]=t.split(",").map(c=>Math.floor(+c/16)),v=500-(Math.abs(i-this.cameraSectionPos.x)+Math.abs(s-this.cameraSectionPos.y)+Math.abs(o-this.cameraSectionPos.z)),l=r.mesh??r.shaderMesh??r.children.find(c=>c.name==="mesh"||c.name==="shaderMesh");l&&(l.renderOrder=v)}updateViewerPosition(t){this.viewerChunkPosition=t}cameraSectionPositionUpdate(){for(let t in this.sectionObjects)this.sectionObjects[t]&&this.updatePosDataChunk(t)}getDir(t,r){return t===r?0:t<r?1:-1}finishChunk(t){this.chunkMeshManager.finishChunkDisplay(t)}applyPendingSectionUpdates(){if(this.pendingSectionUpdates.size===0)return;let t=performance.now(),r=this.getSectionHeight(),i=[];for(let s of this.pendingSectionUpdates.keys()){let o=this.pendingSectionBufferStartTimes.get(s)??t;if(t-o<gt.MAX_SECTION_UPDATE_BUFFER_MS){let[v,l,c]=s.split(",").map(Number),d=[`${v-16},${l},${c}`,`${v+16},${l},${c}`,`${v},${l-r},${c}`,`${v},${l+r},${c}`,`${v},${l},${c-16}`,`${v},${l},${c+16}`],f=!1;for(let m of d)if(this.sectionsWaiting.has(m)&&!this.pendingSectionUpdates.has(m)&&this.sectionObjects[m]){f=!0;break}if(f)continue}i.push(s)}if(i.length!==0)for(let s of i){let o=this.pendingSectionUpdates.get(s);this.pendingSectionUpdates.delete(s),this.pendingSectionBufferStartTimes.delete(s);let a=o.key.split(","),v=`${a[0]},${a[2]}`;if(!this.loadedChunks[v]||!this.active){this.chunkMeshManager.releaseSection(o.key);continue}if(!this.chunkMeshManager.sectionHasRenderableContent(o.geometry)){this.chunkMeshManager.releaseSection(o.key);continue}this.chunkMeshManager.updateSection(o.key,o.geometry),this.updatePosDataChunk(o.key)}}clearPendingSectionUpdatesForChunk(t,r){for(let i of[...this.pendingSectionUpdates.keys()])i.startsWith(`${t},`)&&i.endsWith(`,${r}`)&&(this.pendingSectionUpdates.delete(i),this.pendingSectionBufferStartTimes.delete(i))}handleWorkerMessage(t){if(t.type==="geometry"){let r=t.key.split(","),i=`${r[0]},${r[2]}`;if(!this.loadedChunks[i]||!this.active){this.pendingSectionUpdates.delete(t.key),this.pendingSectionBufferStartTimes.delete(t.key);return}if(this.sectionObjects[t.key]){this.pendingSectionUpdates.set(t.key,t),this.pendingSectionBufferStartTimes.has(t.key)||this.pendingSectionBufferStartTimes.set(t.key,performance.now());return}if(!this.chunkMeshManager.sectionHasRenderableContent(t.geometry)){this.chunkMeshManager.releaseSection(t.key);return}this.chunkMeshManager.updateSection(t.key,t.geometry),this.updatePosDataChunk(t.key)}}getSignTexture(t,r,i,s=!1){let o=Ct(t),a=this.chunkTextures.get(`${o[0]},${o[1]}`);a||(a={},this.chunkTextures.set(`${o[0]},${o[1]}`,a));let v=`${t.x},${t.y},${t.z}`;if(a[v])return a[v];let l=Kv(this.version),c=m1(r,i,l);if(!c)return;let d=new Q.Texture(c);return d.magFilter=Q.NearestFilter,d.minFilter=Q.NearestFilter,d.needsUpdate=!0,a[v]=d,d}getCameraPosition(t){return(t??this._tmpCameraPos).set(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z)}getSectionCameraPosition(){let t=this.getCameraPosition();return new Ne(Math.floor(t.x/16),Math.floor(t.y/16),Math.floor(t.z/16))}updateCameraSectionPos(){let t=this.getSectionCameraPosition();this.cameraSectionPos.equals(t)||(this.cameraSectionPos=t,this.cameraSectionPositionUpdate())}setFirstPersonCamera(t,r,i){let s=this.playerStateReactive.eyeHeight;this.updateCamera(t?.offset(0,s,0)??null,r,i),this.updateCameraSectionPos()}getThirdPersonCamera(t,r,i){t??(t=new Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z));let s=this.playerStateReactive.perspective==="third_person_back",o=4,a=this._tpDirection.set(0,0,-1),v=this._tpPitchQuat.setFromAxisAngle(this._tpAxisX,i),l=this._tpYawQuat.setFromAxisAngle(this._tpAxisY,r),c=this._tpFinalQuat.multiplyQuaternions(l,v);a.applyQuaternion(c),s&&a.multiplyScalar(-1),this.DEBUG_RAYCAST&&this.debugRaycast(t,a,o);let d=this._tpScenePos.set(this.sceneOrigin.toSceneX(t.x),this.sceneOrigin.toSceneY(t.y),this.sceneOrigin.toSceneZ(t.z)),f=this._tpRaycaster;f.set(d,a),f.far=o;let m=80,g=m*m,b=t.x,w=t.y,y=t.z,A=[];for(let B of Object.values(this.sectionObjects)){if(B.name!=="chunk"||!B.visible||B.worldX===void 0)continue;let I=B.worldX-b,G=B.worldY-w,O=B.worldZ-y;if(I*I+G*G+O*O>g)continue;let j=B.children.find(J=>J.name==="mesh"||J.name==="shaderMesh");j&&A.push(j)}let C=f.intersectObjects(A,!1),M=o;C.length>0&&(M=Math.max(.5,C[0].distance-.2));let S=this.chunkMeshManager.raycastShaderSectionAABBs(t,a,M,m);return S!==void 0&&(M=Math.max(.5,S-.2)),new Ne(t.x+a.x*M,t.y+a.y*M,t.z+a.z*M)}debugRaycast(t,r,i){this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0);let s=new Q.Vector3(this.sceneOrigin.toSceneX(t.x),this.sceneOrigin.toSceneY(t.y),this.sceneOrigin.toSceneZ(t.z));this.debugRaycastHelper=new Q.ArrowHelper(r.clone().normalize(),s,i,16711680,i*.1,i*.05),this.realScene.add(this.debugRaycastHelper);let o=new Q.SphereGeometry(.2,8,8),a=new Q.MeshBasicMaterial({color:65280});this.debugHitPoint=new Q.Mesh(o,a),this.debugHitPoint.position.copy(s).add(r.clone().multiplyScalar(i)),this.realScene.add(this.debugHitPoint)}setCinimaticCamera(t,r,i){this.cameraWorldPos.x=t.x,this.cameraWorldPos.y=t.y,this.cameraWorldPos.z=t.z,this.sceneOrigin.update(t.x,t.y,t.z),this.cameraObject.position.set(0,0,0),this.cameraShake.setBaseRotation(i,r),this.updateCameraSectionPos()}setCinimaticFov(t){this.animatedFov=t,this.camera.fov=t,this.camera.updateProjectionMatrix()}updateSmoothFov(){if(this.cinimaticScript.running)return;let t=this.displayOptions.inWorldRenderingConfig.fov,r=this.playerStateReactive.fovMultiplier,i=t*(Number.isFinite(r)?r:1),s=performance.now();if(this.animatedFov===0&&(this.animatedFov=i),Math.abs(this.animatedFov-i)>=.01){let o=s-this.lastFovAnimTime,a=Math.min(o/gt.FOV_TRANSITION_MS,1),v=l=>1-(1-l)**3;this.animatedFov+=(i-this.animatedFov)*v(a),Math.abs(this.animatedFov-i)<.01&&(this.animatedFov=i)}else this.animatedFov=i;this.lastFovAnimTime=s,this.camera.fov!==this.animatedFov&&(this.camera.fov=this.animatedFov,this.camera.updateProjectionMatrix())}updateCamera(t,r,i){if(!this.cinimaticScript.running){if(t){this.renderer.xr.isPresenting&&(t.y-=this.camera.position.y),this.currentPosTween?.stop();let s=this.displayOptions.inWorldRenderingConfig.instantCameraUpdate?0:this.playerStateUtils.isSpectatingEntity()?150:50;this.currentPosTween=new F0(this.cameraWorldPos).to({x:t.x,y:t.y,z:t.z},s).onUpdate(()=>{this.sceneOrigin.update(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraObject.position.set(0,0,0)}).start()}if(this.playerStateUtils.isSpectatingEntity()){let s=this.cameraShake.getBaseRotation(),o=0,a=Math.PI/2;s.yaw<a&&r>Math.PI+a?o=-Math.PI*2:r<a&&s.yaw>Math.PI+a&&(o=Math.PI*2),this.currentRotTween?.stop(),this.currentRotTween=new F0(s).to({pitch:i,yaw:r+o},100).onUpdate(v=>this.cameraShake.setBaseRotation(v.pitch,v.yaw-o)).start()}else{this.currentRotTween?.stop(),this.cameraShake.setBaseRotation(i,r);let{perspective:s}=this.playerStateReactive;if(s==="third_person_back"||s==="third_person_front"){let o=new Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),a=this.getThirdPersonCamera(o,r,i),v=o.distanceTo(new Q.Vector3(a.x,a.y,a.z)),l=s==="third_person_back"?v:-v;this.camera.position.set(0,0,l),s==="third_person_front"?this.camera.rotation.set(0,Math.PI,0):this.camera.rotation.set(0,0,0)}else this.camera.position.z=0,this.camera.rotation.set(0,0,0),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}this.updateCameraSectionPos()}}debugChunksVisibilityOverride(){let{chunksRenderAboveOverride:t,chunksRenderBelowOverride:r,chunksRenderDistanceOverride:i,chunksRenderAboveEnabled:s,chunksRenderBelowEnabled:o,chunksRenderDistanceEnabled:a}=this.reactiveDebugParams,v=this.getSectionHeight(),l=this.cameraSectionPos.y*v;if(this.displayOptions.inWorldRenderingConfig.enableDebugOverlay&&t!==void 0||r!==void 0||i!==void 0)for(let[c,d]of Object.entries(this.sectionObjects)){if(d._waitingForChunkDisplay)continue;let[f,m,g]=c.split(",").map(Number),b=s&&t!==void 0?m<=l+t:o&&r!==void 0?m>=l-r:a&&i!==void 0?Math.abs(m-l)<=i:!0;d.visible=b}else this.chunkMeshManager.updateSectionsVisibility()}render(t=!1){if(this.currentRenderedFrames++,this.reactiveDebugParams.stopRendering)return;this.debugChunksVisibilityOverride();let r=performance.now();this.lastRendered=performance.now();let i=this.lastRenderTime>0?Math.min(Math.max((r-this.lastRenderTime)/1e3,0),.1):1/60;this.lastRenderTime=r,this.cursorBlock.render(),this.updateSectionOffsets();let s=this.getCameraPosition();if(this.skyboxRenderer.update(s,this.viewDistance),this.updateSmoothFov(),t){let d=this.renderer.getSize(new Q.Vector2);this.camera.aspect=d.width/d.height,this.camera.updateProjectionMatrix()}let o=0;if(!this.reactiveDebugParams.disableEntities){let d=performance.now();this.entities.render(),o=performance.now()-d}let a=this.cameraGroupVr instanceof Q.Group?this.cameraGroupVr.children.find(d=>d instanceof Q.PerspectiveCamera):this.camera;this.applyPendingSectionUpdates();let v=this.chunkMeshManager.globalBlockBuffer;v&&(v.setCameraOrigin(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),v.uploadDirtyRange()),this.renderer.render(this.scene,a),this.displayOptions.inWorldRenderingConfig.showHand&&this.playerStateReactive.gameMode!=="spectator"&&this.playerStateReactive.perspective==="first_person"&&!this.renderer.xr.isPresenting&&(this.holdingBlock.render(this.camera,this.renderer,this.ambientLight,this.directionalLight),this.holdingBlockLeft.render(this.camera,this.renderer,this.ambientLight,this.directionalLight));for(let d of this.fountains)this.sectionObjects[d.sectionId]&&!this.sectionObjects[d.sectionId].foutain&&(d.createParticles(this.sectionObjects[d.sectionId]),this.sectionObjects[d.sectionId].foutain=!0),d.render();this.waypoints.render(),this.fireworks.update();for(let d of this.onRender)d(i);let c=performance.now()-r;this.worldRendererConfig.autoLowerRenderDistance&&this.chunkMeshManager.recordRenderTime(c),this.renderTimeAvgCount++,this.renderTimeAvg=(this.renderTimeAvg*(this.renderTimeAvgCount-1)+c)/this.renderTimeAvgCount,this.renderTimeMax=Math.max(this.renderTimeMax,c),this.performanceMonitor.onFrame({totalMs:c,entitiesMs:o,loadedTextureCount:this.renderer.info.memory.textures,fps:this.lastFps})}renderHead(t,r,i,s){let o;if(s.SkullOwner?o=s.SkullOwner.Properties?.textures?.[0]?.Value:o=s.profile?.properties?.find(a=>a.name==="textures")?.value,!!o)try{let v=JSON.parse(z.from(o,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:l}=this.worldRendererConfig;l&&(v=v?.replace("http://textures.minecraft.net/",l).replace("https://textures.minecraft.net/",l));let c=De(this,v,ze.head),d=new Q.Group;return i&&c.position.set(0,.3125,.3125),c.position.y-=23/16,d.add(c),this.sceneOrigin.track(d),d.position.set(t.x+.5,t.y+.045,t.z+.5),d.rotation.set(0,-Q.MathUtils.degToRad(r*(i?90:45/2)),0),d.scale.set(.8,.8,.8),d}catch{}}renderSign(t,r,i,s,o){let a=this.getSignTexture(t,o,s);if(!a)return;let v=new Q.Mesh(new Q.PlaneGeometry(1,1),new Q.MeshBasicMaterial({map:a,transparent:!0}));v.renderOrder=999;let l=7/16,c=s?1.3:1;v.scale.set(1*c,l*c,1*c);let d=(s?2:1.5)/16,f=.25/16;i&&!s?v.position.set(0,0,-.5+d+f+1e-4):v.position.set(0,0,d/2+1e-4);let m=new Q.Group;m.rotation.set(0,-Q.MathUtils.degToRad(r*(i?90:45/2)),0),m.add(v);let g=(s?10:8)/16,b=(s?0:i?4.333:9.333)/16,w=g/2+b;return this.sceneOrigin.track(m),m.position.set(t.x+.5,t.y+w,t.z+.5),m}lightUpdate(t,r){for(let i=this.worldSizeParams.minY;i<this.worldSizeParams.worldHeight;i+=16)this.setSectionDirty(new Ne(t,i,r))}rerenderAllChunks(){for(let t of Object.keys(this.sectionObjects)){let[r,i,s]=t.split(",").map(Number);this.setSectionDirty(new Ne(r,i,s))}}updateShowChunksBorder(t){this.chunkMeshManager.updateAllBoxHelpers(t)}resetWorld(){super.resetWorld(),this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.chunkMeshManager=new Y5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}getLoadedChunksRelative(t,r=!1){let[i,s,o]=zr(t);return Object.fromEntries(Object.entries(this.sectionObjects).map(([a,v])=>{let[l,c,d]=a.split(",").map(Number),[f,m,g]=zr({x:l,y:c,z:d});return[r?`${f-i},${m-s},${g-o}`:`${f-i},${g-o}`,v]}))}cleanChunkTextures(t,r){let i=this.chunkTextures.get(`${Math.floor(t/16)},${Math.floor(r/16)}`)??{};for(let s of Object.keys(i))i[s].dispose(),delete i[s];this.chunkMeshManager.cleanSignChunkTextures(t,r)}readdChunks(){for(let t of Object.keys(this.sectionObjects))this.scene.remove(this.sectionObjects[t]);setTimeout(()=>{for(let t of Object.keys(this.sectionObjects))this.scene.add(this.sectionObjects[t])},500)}disableUpdates(t=this.scene.children){for(let r of t)r.matrixWorldNeedsUpdate=!1,this.disableUpdates(r.children??[])}removeColumn(t,r){super.removeColumn(t,r),this.cleanChunkTextures(t,r),this.clearPendingSectionUpdatesForChunk(t,r);let i=this.getSectionHeight(),s=this.worldMinYRender;for(let o=s;o<this.worldSizeParams.worldHeight;o+=i){let a=`${t},${o},${r}`;this.chunkMeshManager.sectionObjects[a]&&this.chunkMeshManager.releaseSection(a)}this.chunkMeshManager.onChunkRemovedFromGate(`${t},${r}`)}onViewerChunkPositionChanged(){this.chunkMeshManager.tryRevealPending()}setSectionDirty(...t){let[r]=t;this.cleanChunkTextures(r.x,r.z),super.setSectionDirty(...t)}static getRendererInfo(t){try{let r=t.getContext();return`${r.getParameter(r.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)}`}catch{}}worldStop(){this.media.onWorldStop()}destroy(){this.performanceMonitor?.reset(),this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.disposeModules(),this.fireworksLegacy.destroy(),super.destroy(),this.skyboxRenderer.dispose(),this.fireworks.dispose()}shouldObjectVisible(t){let i=this.getSectionHeight(),s,o,a,v=this.sceneOrigin.getWorldPosition(t);v?(s=v.x,o=v.y,a=v.z):(s=this.sceneOrigin.toWorldX(t.position.x),o=this.sceneOrigin.toWorldY(t.position.y),a=this.sceneOrigin.toWorldZ(t.position.z));let l=Math.floor(s/16)*16,c=Math.floor(a/16)*16,d=Math.floor(o/i)*i,f=`${l},${c}`,m=`${l},${d},${c}`;return!!this.finishedChunks[f]||!!this.sectionObjects[m]}handleUserClick(t){this.media.handleUserClick(t)}updateSectionOffsets(){let t=performance.now();for(let[r,i]of Object.entries(this.sectionsOffsetsAnimations)){let s=(t-i.time)/1e3;i.time=t,i.currentOffsetX+=i.speedX*s,i.currentOffsetY+=i.speedY*s,i.currentOffsetZ+=i.speedZ*s,i.limitX!==void 0&&(i.speedX>0?i.currentOffsetX=Math.min(i.currentOffsetX,i.limitX):i.currentOffsetX=Math.max(i.currentOffsetX,i.limitX)),i.limitY!==void 0&&(i.speedY>0?i.currentOffsetY=Math.min(i.currentOffsetY,i.limitY):i.currentOffsetY=Math.max(i.currentOffsetY,i.limitY)),i.limitZ!==void 0&&(i.speedZ>0?i.currentOffsetZ=Math.min(i.currentOffsetZ,i.limitZ):i.currentOffsetZ=Math.max(i.currentOffsetZ,i.limitZ));let o=this.sectionObjects[r];o&&(o.position.set(i.currentOffsetX,i.currentOffsetY,i.currentOffsetZ),o.updateMatrix())}}reloadWorld(){this.entities.reloadEntities()}};u(gt,"FOV_TRANSITION_MS",200),u(gt,"MAX_SECTION_UPDATE_BUFFER_MS",500);var bt=gt;E();x();k();R();E();x();k();R();var Kt="1.21.4";E();x();k();R();function yt(n,e){n.aspect=e.width/e.height,n.updateProjectionMatrix()}E();x();k();R();function sn(n,e=!1){return n?.mode?n.mode:e?"worldBlocks":pe.mode}E();x();k();R();E();x();k();R();E();x();k();R();E();x();k();R();function ln(n){throw new Error("Node.js process "+n+" is not supported by JSPM core outside of Node.js")}var Se=[],Jt=!1,_t,hr=-1;function Jv(){!Jt||!_t||(Jt=!1,_t.length?Se=_t.concat(Se):hr=-1,Se.length&&Sa())}function Sa(){if(!Jt){var n=setTimeout(Jv,0);Jt=!0;for(var e=Se.length;e;){for(_t=Se,Se=[];++hr<e;)_t&&_t[hr].run();hr=-1,e=Se.length}_t=null,Jt=!1,clearTimeout(n)}}function qv(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];Se.push(new Ca(n,e)),Se.length===1&&!Jt&&setTimeout(Sa,0)}function Ca(n,e){this.fun=n,this.array=e}Ca.prototype.run=function(){this.fun.apply(null,this.array)};var Zv="browser",Xv="x64",$v="browser",e9={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},t9=["/usr/bin/node"],r9=[],i9="v16.8.0",n9={},s9=function(n,e){},o9=function(n){ln("binding")},a9=function(n){return 0},v9=function(){return"/"},l9=function(n){},c9={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function J0(){}var d9=J0,u9=[];function f9(n){ln("_linkedBinding")}var h9={},m9=!1,p9={};function g9(n){ln("dlopen")}function b9(){return[]}function y9(){return[]}var _9=J0,w9=J0,cn=function(){return{}},A9=cn,E9=cn,x9=J0,R9=J0,k9=J0,T9={};function M9(n,e){if(!n)throw new Error(e||"assertion error")}var S9={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},C9=J0,B9=J0;function P9(){return!1}var I9=J0,H9=J0,O9=J0,F9=J0,D9=J0,z9=void 0,L9=void 0,U9=void 0,G9=J0,N9=2,W9=1,V9="/bin/usr/node",j9=9229,Y9="node",Q9=[],K9=J0,We={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};We.now===void 0&&(on=Date.now(),We.timing&&We.timing.navigationStart&&(on=We.timing.navigationStart),We.now=()=>Date.now()-on);var on;function J9(){return We.now()/1e3}var an=1e9;function vn(n){var e=Math.floor((Date.now()-We.now())*.001),t=We.now()*.001,r=Math.floor(t)+e,i=Math.floor(t%1*1e9);return n&&(r=r-n[0],i=i-n[1],i<0&&(r--,i+=an)),[r,i]}vn.bigint=function(n){var e=vn(n);return typeof BigInt>"u"?e[0]*an+e[1]:BigInt(e[0]*an)+BigInt(e[1])};var q9=10,Z9={},X9=0;function Ve(){return dn}var $9=Ve,el=Ve,tl=Ve,rl=Ve,il=Ve,nl=J0,sl=Ve,ol=Ve;function al(n){return[]}var dn={version:i9,versions:n9,arch:Xv,platform:$v,release:c9,_rawDebug:d9,moduleLoadList:u9,binding:o9,_linkedBinding:f9,_events:Z9,_eventsCount:X9,_maxListeners:q9,on:Ve,addListener:$9,once:el,off:tl,removeListener:rl,removeAllListeners:il,emit:nl,prependListener:sl,prependOnceListener:ol,listeners:al,domain:h9,_exiting:m9,config:p9,dlopen:g9,uptime:J9,_getActiveRequests:b9,_getActiveHandles:y9,reallyExit:_9,_kill:w9,cpuUsage:cn,resourceUsage:A9,memoryUsage:E9,kill:x9,exit:R9,openStdin:k9,allowedNodeEnvironmentFlags:T9,assert:M9,features:S9,_fatalExceptions:C9,setUncaughtExceptionCaptureCallback:B9,hasUncaughtExceptionCaptureCallback:P9,emitWarning:s9,nextTick:qv,_tickCallback:I9,_debugProcess:H9,_debugEnd:O9,_startProfilerIdleNotifier:F9,_stopProfilerIdleNotifier:D9,stdout:z9,stdin:U9,stderr:L9,abort:G9,umask:a9,chdir:l9,cwd:v9,env:e9,title:Zv,argv:t9,execArgv:r9,pid:N9,ppid:W9,execPath:V9,debugPort:j9,hrtime:vn,argv0:Y9,_preload_modules:Q9,setSourceMapsEnabled:K9};var un={},Ba=!1;function vl(){if(Ba)return un;Ba=!0;var n=dn;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function t(s,o){for(var a="",v=0,l=-1,c=0,d,f=0;f<=s.length;++f){if(f<s.length)d=s.charCodeAt(f);else{if(d===47)break;d=47}if(d===47){if(!(l===f-1||c===1))if(l!==f-1&&c===2){if(a.length<2||v!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){var m=a.lastIndexOf("/");if(m!==a.length-1){m===-1?(a="",v=0):(a=a.slice(0,m),v=a.length-1-a.lastIndexOf("/")),l=f,c=0;continue}}else if(a.length===2||a.length===1){a="",v=0,l=f,c=0;continue}}o&&(a.length>0?a+="/..":a="..",v=2)}else a.length>0?a+="/"+s.slice(l+1,f):a=s.slice(l+1,f),v=f-l-1;l=f,c=0}else d===46&&c!==-1?++c:c=-1}return a}function r(s,o){var a=o.dir||o.root,v=o.base||(o.name||"")+(o.ext||"");return a?a===o.root?a+v:a+s+v:v}var i={resolve:function(){for(var o="",a=!1,v,l=arguments.length-1;l>=-1&&!a;l--){var c;l>=0?c=arguments[l]:(v===void 0&&(v=n.cwd()),c=v),e(c),c.length!==0&&(o=c+"/"+o,a=c.charCodeAt(0)===47)}return o=t(o,!a),a?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(e(o),o.length===0)return".";var a=o.charCodeAt(0)===47,v=o.charCodeAt(o.length-1)===47;return o=t(o,!a),o.length===0&&!a&&(o="."),o.length>0&&v&&(o+="/"),a?"/"+o:o},isAbsolute:function(o){return e(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,a=0;a<arguments.length;++a){var v=arguments[a];e(v),v.length>0&&(o===void 0?o=v:o+="/"+v)}return o===void 0?".":i.normalize(o)},relative:function(o,a){if(e(o),e(a),o===a||(o=i.resolve(o),a=i.resolve(a),o===a))return"";for(var v=1;v<o.length&&o.charCodeAt(v)===47;++v);for(var l=o.length,c=l-v,d=1;d<a.length&&a.charCodeAt(d)===47;++d);for(var f=a.length,m=f-d,g=c<m?c:m,b=-1,w=0;w<=g;++w){if(w===g){if(m>g){if(a.charCodeAt(d+w)===47)return a.slice(d+w+1);if(w===0)return a.slice(d+w)}else c>g&&(o.charCodeAt(v+w)===47?b=w:w===0&&(b=0));break}var y=o.charCodeAt(v+w),A=a.charCodeAt(d+w);if(y!==A)break;y===47&&(b=w)}var C="";for(w=v+b+1;w<=l;++w)(w===l||o.charCodeAt(w)===47)&&(C.length===0?C+="..":C+="/..");return C.length>0?C+a.slice(d+b):(d+=b,a.charCodeAt(d)===47&&++d,a.slice(d))},_makeLong:function(o){return o},dirname:function(o){if(e(o),o.length===0)return".";for(var a=o.charCodeAt(0),v=a===47,l=-1,c=!0,d=o.length-1;d>=1;--d)if(a=o.charCodeAt(d),a===47){if(!c){l=d;break}}else c=!1;return l===-1?v?"/":".":v&&l===1?"//":o.slice(0,l)},basename:function(o,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');e(o);var v=0,l=-1,c=!0,d;if(a!==void 0&&a.length>0&&a.length<=o.length){if(a.length===o.length&&a===o)return"";var f=a.length-1,m=-1;for(d=o.length-1;d>=0;--d){var g=o.charCodeAt(d);if(g===47){if(!c){v=d+1;break}}else m===-1&&(c=!1,m=d+1),f>=0&&(g===a.charCodeAt(f)?--f===-1&&(l=d):(f=-1,l=m))}return v===l?l=m:l===-1&&(l=o.length),o.slice(v,l)}else{for(d=o.length-1;d>=0;--d)if(o.charCodeAt(d)===47){if(!c){v=d+1;break}}else l===-1&&(c=!1,l=d+1);return l===-1?"":o.slice(v,l)}},extname:function(o){e(o);for(var a=-1,v=0,l=-1,c=!0,d=0,f=o.length-1;f>=0;--f){var m=o.charCodeAt(f);if(m===47){if(!c){v=f+1;break}continue}l===-1&&(c=!1,l=f+1),m===46?a===-1?a=f:d!==1&&(d=1):a!==-1&&(d=-1)}return a===-1||l===-1||d===0||d===1&&a===l-1&&a===v+1?"":o.slice(a,l)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return r("/",o)},parse:function(o){e(o);var a={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return a;var v=o.charCodeAt(0),l=v===47,c;l?(a.root="/",c=1):c=0;for(var d=-1,f=0,m=-1,g=!0,b=o.length-1,w=0;b>=c;--b){if(v=o.charCodeAt(b),v===47){if(!g){f=b+1;break}continue}m===-1&&(g=!1,m=b+1),v===46?d===-1?d=b:w!==1&&(w=1):d!==-1&&(w=-1)}return d===-1||m===-1||w===0||w===1&&d===m-1&&d===f+1?m!==-1&&(f===0&&l?a.base=a.name=o.slice(1,m):a.base=a.name=o.slice(f,m)):(f===0&&l?(a.name=o.slice(1,d),a.base=o.slice(1,m)):(a.name=o.slice(f,d),a.base=o.slice(f,m)),a.ext=o.slice(d,m)),f>0?a.dir=o.slice(0,f-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,un=i,un}var q0=vl();var rC=q0._makeLong,iC=q0.basename,nC=q0.delimiter,sC=q0.dirname,oC=q0.extname,aC=q0.format,vC=q0.isAbsolute,fn=q0.join,lC=q0.normalize,cC=q0.parse,dC=q0.posix,uC=q0.relative,fC=q0.resolve,hC=q0.sep,mC=q0.win32;import*as a0 from"three";var hn=new Date,Pa=hn.getMonth()===11&&hn.getDate()>=24&&hn.getDate()<=26,ll=["panorama_3.webp","panorama_1.webp","panorama_4.webp","panorama_5.webp","panorama_0.webp","panorama_2.webp"],cl=200,qt=class{constructor(e){this.documentRenderer=e;u(this,"scene");u(this,"camera");u(this,"startTimes",new Map);u(this,"time",0);u(this,"panoramaGroup",null);this.scene=new a0.Scene,this.scene.background=new a0.Color(3294568);let t=new a0.AmbientLight(13421772);this.scene.add(t);let r=new a0.DirectionalLight(16777215,.5);r.position.set(1,1,.5).normalize(),r.castShadow=!0,this.scene.add(r),this.camera=new a0.PerspectiveCamera(85,e.canvas.width/e.canvas.height,.05,1e3),this.camera.position.set(0,0,0),this.camera.rotation.set(0,0,0)}async init(){this.buildCubemap()}update(e,t){t&&yt(this.camera,this.documentRenderer.canvas)}dispose(){this.scene.clear(),this.panoramaGroup=null,this.startTimes.clear()}buildCubemap(){let e=new a0.BoxGeometry(1e3,1e3,1e3),t=[];for(let s of ll)(async()=>{let{texture:a}=v1(fn("background",Pa?"christmas":"",s));a.matrixAutoUpdate=!1,a.matrix.set(-1,0,1,0,1,0,0,0,1),a.wrapS=a0.ClampToEdgeWrapping,a.wrapT=a0.ClampToEdgeWrapping,a.minFilter=a0.LinearFilter,a.magFilter=a0.LinearFilter;let v=new a0.MeshBasicMaterial({map:a,transparent:!0,side:a0.DoubleSide,depthWrite:!1,opacity:0});this.startTimes.set(v,Date.now()),t.push(v)})();let r=new a0.Mesh(e,t);r.onBeforeRender=()=>{this.time+=.01,r.rotation.y=Math.PI+this.time*.01,r.rotation.z=Math.sin(-this.time*.001)*.001;for(let s of t){let o=this.startTimes.get(s);if(o){let a=Date.now()-o;s.opacity=Math.min(1,a/cl)}}};let i=new a0.Object3D;if(i.add(r),!Pa)for(let s=0;s<20;s++){let o=new Me("1.16.4","squid").mesh;o.position.set(Math.random()*30-15,Math.random()*20-10,Math.random()*10-17),o.rotation.set(0,Math.PI+Math.random(),-Math.PI/4,"ZYX");let a=Math.random()*.01;o.children[0].onBeforeRender=()=>{o.rotation.y+=a,o.rotation.z=Math.cos(r.rotation.y*3)*Math.PI/4-Math.PI/2},i.add(o)}this.scene.add(i),this.panoramaGroup=i}async debugImageInFrontOfCamera(){let e=await Ie(fn("background","panorama_0.webp")),t=new a0.Mesh(new a0.PlaneGeometry(1e3,1e3),new a0.MeshBasicMaterial({map:e}));t.position.set(0,0,-500),this.scene.add(t)}};E();x();k();R();import*as V from"three";var Ia=.1,pn={mixed:["white_wool","cyan_wool","blue_wool","purple_wool","white_stained_glass","cyan_stained_glass","blue_stained_glass","purple_stained_glass","glowstone","sea_lantern","amethyst_block","copper_block","gold_block","diamond_block"],stainedGlass:["white_stained_glass","orange_stained_glass","magenta_stained_glass","light_blue_stained_glass","yellow_stained_glass","lime_stained_glass","pink_stained_glass","gray_stained_glass","light_gray_stained_glass","cyan_stained_glass","purple_stained_glass","blue_stained_glass","brown_stained_glass","green_stained_glass","red_stained_glass","black_stained_glass"],wool:["white_wool","orange_wool","magenta_wool","light_blue_wool","yellow_wool","lime_wool","pink_wool","gray_wool","light_gray_wool","cyan_wool","purple_wool","blue_wool","brown_wool","green_wool","red_wool","black_wool"],construction:["copper_block","exposed_copper","weathered_copper","oxidized_copper","cut_copper","exposed_cut_copper","weathered_cut_copper","oxidized_cut_copper","iron_block","gold_block","diamond_block","emerald_block","netherite_block","lapis_block","redstone_block","coal_block","quartz_block","amethyst_block","bricks","stone_bricks","deepslate_bricks","polished_blackstone"],glow:["glowstone","sea_lantern","shroomlight","ochre_froglight","verdant_froglight","pearlescent_froglight","redstone_lamp","beacon"],world:["grass_block","podzol","mycelium","dirt","coarse_dirt","rooted_dirt","mud","clay","stone","cobblestone","mossy_cobblestone","deepslate","cobbled_deepslate","tuff","calcite","sand","red_sand","gravel","snow_block","coal_ore","deepslate_coal_ore","iron_ore","deepslate_iron_ore","copper_ore","deepslate_copper_ore","gold_ore","deepslate_gold_ore","diamond_ore","deepslate_diamond_ore","emerald_ore","deepslate_emerald_ore","lapis_ore","deepslate_lapis_ore","redstone_ore","deepslate_redstone_ore","nether_gold_ore","ancient_debris","oak_log","birch_log","spruce_log","jungle_log","acacia_log","dark_oak_log","mangrove_log","cherry_log","netherrack","soul_sand","basalt","end_stone"]},Ha={galaxy:{bg:132114,fog:132114,fogD:.011,blocks:[61695,54527,47359,59647,2280703,43263],emit:[13158,8789,6724],nebula:[4403,1114146,4386],galFn:n=>new V.Color(n*.05,n*.2,n),ambient:264216,dir:3368703,pt1:43775,pt2:16729343,name:"GALAXY"},nether:{bg:917760,fog:917760,fogD:.016,blocks:[16720384,16737792,16750848,13373696,16729122,16755200],emit:[2230272,1114112,3346688],nebula:[1704960,851968,1705984],galFn:n=>new V.Color(n,n*.15,0),ambient:1573376,dir:16724736,pt1:16729088,pt2:16755200,name:"NETHER"},end:{bg:0,fog:0,fogD:.009,blocks:[7807658,11158732,5570679,14527231,3342421,12299007],emit:[655381,1572901,327696],nebula:[524312,851989,262158],galFn:n=>new V.Color(n*.4,0,n),ambient:393232,dir:10040319,pt1:11158783,pt2:4456618,name:"THE END"},cyber:{bg:2566,fog:2566,fogD:.01,blocks:[65535,65416,11206400,52479,6749952,65518],emit:[8721,6656,6690],nebula:[6674,5120,4634],galFn:n=>new V.Color(0,n,n*.6),ambient:6669,dir:65450,pt1:65484,pt2:4521728,name:"CYBER"},light:{bg:8951984,fog:7899296,fogD:.006,gradientBg:{top:14214392,mid:10531016,bottom:6846608,radial:!0},blocks:[15266559,13691135,12114175,10537208,8960240,7383272,10012927,12640511,15792383,7909608,14216447,14739711],emit:[6854864,8958176,11061488,12638456],nebula:[9480392,11059424,12637420,14215416,7901360],galFn:n=>{let e=new V.Color;return n<.4?e.lerpColors(new V.Color(16054527),new V.Color(14215423),n/.4):n<.75?e.lerpColors(new V.Color(14215423),new V.Color(11061488),(n-.4)/.35):e.lerpColors(new V.Color(11061488),new V.Color(9482464),(n-.75)/.25),e},ambient:7899296,dir:13688040,pt1:11061503,pt2:13162751,name:"LIGHT",starColor:15266047,starOpacity:.5,galaxyOpacity:.7,nebulaOpacity:.32,edgeLineColor:10010856,blockOpacity:[.42,.56]}},dl={cruise:{pos:(n,e,t)=>({x:Math.sin(n*.28)*18+Math.cos(n*.11)*7+e*10,y:Math.sin(n*.19)*6+Math.cos(n*.31)*3+t*6,z:0}),look:(n,e,t)=>({x:Math.sin((n+.18)*.28)*18+e*8,y:Math.sin((n+.18)*.19)*6+t*4,z:-25}),roll:(n,e=0)=>e*.05+Math.sin(n*.22)*.015,spd:.18},barrel:{pos:(n,e,t)=>{let i=n*2.4;return{x:Math.cos(i)*10+e*4,y:Math.sin(i)*10+t*4,z:Math.sin(n*.4)*8}},look:n=>({x:Math.sin(n*.5)*5,y:Math.cos(n*.5)*5,z:-30}),roll:n=>n*2.4+Math.PI*.5,spd:.24},dive:{pos:(n,e,t)=>({x:Math.sin(n*.6)*30+e*8,y:Math.cos(n*.4)*18+t*6,z:Math.sin(n*.3)*12}),look:(n,e,t)=>({x:Math.sin(n*.6+.2)*30+e*6,y:Math.cos(n*.4+.2)*18-8+t*4,z:-35}),roll:(n,e=0)=>e*.08+Math.sin(n*.6)*.12,spd:.3},orbit:{pos:(n,e,t)=>({x:Math.cos(n*.5)*20+e*5,y:Math.sin(n*.25)*10+t*5,z:Math.sin(n*.5)*20}),look:()=>({x:0,y:0,z:-60}),roll:n=>Math.sin(n*.5)*.08,spd:.15},snake:{pos:(n,e,t)=>({x:Math.sin(n*1.1)*22+Math.sin(n*.37)*8+e*10,y:Math.sin(n*.7)*10+e*4+t*8,z:0}),look:(n,e,t)=>{let r=n+.12;return{x:Math.sin(r*1.1)*22+Math.sin(r*.37)*8+e*8,y:Math.sin(r*.7)*10+t*6,z:-22}},roll:(n,e=0)=>e*.1+Math.sin(n*1.1)*.06,spd:.22}},ul={cruise:1,barrel:1.6,dive:2.2,orbit:.7,snake:1.4},fl=250,mr=1e4,pr=3e3,Zt=n=>n[Math.floor(Math.random()*n.length)],mn=n=>"#"+n.toString(16).padStart(6,"0"),Oa=n=>{if(typeof document>"u")return null;let e=document.createElement("canvas");e.width=4,e.height=512;let t=e.getContext("2d");if(!t)return null;let r=e.width,i=e.height,s=n.radial?t.createRadialGradient(r/2,i*.32,0,r/2,i*.32,i*.85):t.createLinearGradient(0,0,0,i);s.addColorStop(0,mn(n.top)),n.mid!=null&&s.addColorStop(.45,mn(n.mid)),s.addColorStop(1,mn(n.bottom)),t.fillStyle=s,t.fillRect(0,0,r,i);let o=new V.CanvasTexture(e);return o.needsUpdate=!0,o},wt=class{constructor(e,t={},r){this.documentRenderer=e;this.abortSignal=r;u(this,"scene");u(this,"camera");u(this,"ambient");u(this,"dir");u(this,"pt1");u(this,"pt2");u(this,"blocks",[]);u(this,"bGroup",new V.Group);u(this,"galaxy");u(this,"nebula");u(this,"stars");u(this,"galGeo");u(this,"nebGeo");u(this,"bGeo",new V.BoxGeometry(1,1,1));u(this,"eGeo",new V.EdgesGeometry(this.bGeo));u(this,"curScene");u(this,"curCam");u(this,"blockGroup");u(this,"cameraSpeed");u(this,"blockSpeed");u(this,"camT",0);u(this,"mx",0);u(this,"my",0);u(this,"tmx",0);u(this,"tmy",0);u(this,"transitioning",!1);u(this,"useMinecraftTextures",!1);u(this,"resourcesManager");u(this,"atlasTexture",null);u(this,"blockMaterialPool",new Map);u(this,"gradientSky",null);u(this,"gradientSkyTexture",null);u(this,"disposed",!1);u(this,"animTime",0);let i=pe;this.curScene=t.initialScene??i.futuristicScene,this.curCam=t.initialCamera??i.futuristicCamera,this.blockGroup=t.initialBlockGroup??i.futuristicBlockGroup,this.cameraSpeed=t.initialCameraSpeed??h5.camera,this.blockSpeed=t.initialBlockSpeed??h5.block,this.useMinecraftTextures=t.useMinecraftTextures??i.minecraftTextures,this.resourcesManager=t.resourcesManager;let s=Ha[this.curScene];this.scene=new V.Scene,this.scene.fog=new V.FogExp2(s.fog,s.fogD),this.applyScenePalette(s),this.camera=new V.PerspectiveCamera(80,this.documentRenderer.canvas.width/this.documentRenderer.canvas.height,.1,700),this.ambient=new V.AmbientLight(s.ambient,2.5),this.scene.add(this.ambient),this.dir=new V.DirectionalLight(s.dir,4),this.dir.position.set(1,1,0),this.scene.add(this.dir),this.pt1=new V.PointLight(s.pt1,5,100),this.scene.add(this.pt1),this.pt2=new V.PointLight(s.pt2,4,80),this.pt2.position.set(30,20,-30),this.scene.add(this.pt2);for(let f=0;f<fl;f++)this.spawnBlock(s,!0);if(!this.useMinecraftTextures){let f=s.edgeLineColor??62975;for(let m=0;m<40;m++){let g=new V.LineBasicMaterial({color:f,transparent:!0,opacity:.25});Zt(this.blocks).mesh.add(new V.LineSegments(this.eGeo,g))}}this.scene.add(this.bGroup);let o=new V.BufferGeometry,a=new Float32Array(5e3*3);for(let f=0;f<5e3*3;f++)a[f]=(Math.random()-.5)*500;o.setAttribute("position",new V.BufferAttribute(a,3)),this.stars=new V.Points(o,new V.PointsMaterial({color:s.starColor??16777215,size:.3,transparent:!0,opacity:s.starOpacity??.7,sizeAttenuation:!0})),this.scene.add(this.stars),this.galGeo=new V.BufferGeometry;let v=new Float32Array(mr*3),l=new Float32Array(mr*3);for(let f=0;f<mr;f++){let m=f%3,g=Math.random(),b=m/3*Math.PI*2+g*Math.PI*5,w=g*90+Math.random()*10,y=(1-g)*18;v[f*3]=Math.cos(b)*w+(Math.random()-.5)*y,v[f*3+1]=(Math.random()-.5)*7,v[f*3+2]=Math.sin(b)*w+(Math.random()-.5)*y-180;let A=.2+g*.8,C=s.galFn(A);l[f*3]=C.r,l[f*3+1]=C.g,l[f*3+2]=C.b}this.galGeo.setAttribute("position",new V.BufferAttribute(v,3)),this.galGeo.setAttribute("color",new V.BufferAttribute(l,3)),this.galaxy=new V.Points(this.galGeo,new V.PointsMaterial({size:.9,vertexColors:!0,transparent:!0,opacity:s.galaxyOpacity??.55,sizeAttenuation:!0})),this.scene.add(this.galaxy),this.nebGeo=new V.BufferGeometry;let c=new Float32Array(pr*3),d=new Float32Array(pr*3);for(let f=0;f<pr;f++){let m=25+Math.random()*110,g=Math.random()*Math.PI*2,b=(Math.random()-.5)*Math.PI*.5;c[f*3]=m*Math.cos(g)*Math.cos(b),c[f*3+1]=m*Math.sin(b)*.6,c[f*3+2]=m*Math.sin(g)*Math.cos(b)-80;let w=new V.Color(Zt(s.nebula));d[f*3]=w.r,d[f*3+1]=w.g,d[f*3+2]=w.b}this.nebGeo.setAttribute("position",new V.BufferAttribute(c,3)),this.nebGeo.setAttribute("color",new V.BufferAttribute(d,3)),this.nebula=new V.Points(this.nebGeo,new V.PointsMaterial({size:3,vertexColors:!0,transparent:!0,opacity:s.nebulaOpacity??.3,sizeAttenuation:!0})),this.scene.add(this.nebula),this.addBackgroundTextPlane(),this.setupMouseTracking()}async init(){if(this.useMinecraftTextures)try{await this.loadMinecraftTextures()}catch{this.useMinecraftTextures=!1}}applyScenePalette(e){if(this.documentRenderer.renderer.setClearColor(e.bg),e.gradientBg)if(this.scene.background=null,this.gradientSky){if(this.gradientSky.visible=!0,this.gradientSkyTexture&&e.gradientBg){let s=Oa(e.gradientBg);s&&(this.gradientSkyTexture.dispose(),this.gradientSkyTexture=s,this.gradientSky.material.map=s,this.gradientSky.material.needsUpdate=!0)}}else{let s=Oa(e.gradientBg);s?(this.gradientSkyTexture=s,this.gradientSky=new V.Mesh(new V.PlaneGeometry(900,700),new V.MeshBasicMaterial({map:s,depthWrite:!1,side:V.DoubleSide})),this.gradientSky.position.set(0,0,-280),this.gradientSky.renderOrder=-1e3,this.scene.add(this.gradientSky)):this.scene.background=new V.Color(e.bg)}else this.scene.background=new V.Color(e.bg),this.gradientSky&&(this.gradientSky.visible=!1);this.scene.fog instanceof V.FogExp2&&(this.scene.fog.color.set(e.fog),this.scene.fog.density=e.fogD);let t=this.stars?.material;t&&(t.color.set(e.starColor??16777215),t.opacity=e.starOpacity??.7);let r=this.galaxy?.material;r&&(r.opacity=e.galaxyOpacity??.55);let i=this.nebula?.material;i&&(i.opacity=e.nebulaOpacity??.3)}setupMouseTracking(){let e=r=>{let i=typeof window<"u"?window.innerWidth:this.documentRenderer.canvas.width,s=typeof window<"u"?window.innerHeight:this.documentRenderer.canvas.height;this.tmx=(r.clientX/i-.5)*2,this.tmy=-(r.clientY/s-.5)*2};(typeof document<"u"?document:void 0)?.addEventListener("mousemove",e,{signal:this.abortSignal})}addBackgroundTextPlane(){let r=typeof document<"u"?document.createElement("canvas"):null;if(!r)return;r.width=2048,r.height=768;let i=r.getContext("2d");if(!i)return;i.clearRect(0,0,2048,768),i.save(),i.font="bold 560px Orbitron, sans-serif",i.textAlign="center",i.textBaseline="middle",i.shadowColor="rgba(0,200,255,0.35)",i.shadowBlur=80,i.fillStyle="rgba(255,255,255,0.055)",i.fillText("V2",2048*.28,768*.5),i.restore(),i.save(),i.font="bold 148px Orbitron, sans-serif",i.textAlign="center",i.textBaseline="middle",i.shadowColor="rgba(0,200,255,0.2)",i.shadowBlur=40,i.fillStyle="rgba(255,255,255,0.038)",i.fillText("by ZARDOY",2048*.72,768*.52),i.restore();let s=new V.CanvasTexture(r),o=new V.Mesh(new V.PlaneGeometry(280,105),new V.MeshBasicMaterial({map:s,transparent:!0,opacity:1,depthWrite:!1,side:V.DoubleSide,blending:V.AdditiveBlending}));o.position.set(8,4,-320),this.scene.add(o)}spawnBlock(e,t,r){let i=this.createBlockMaterial(e,r),s=new V.Mesh(this.bGeo,i),o=.3+Math.random()*3;s.scale.setScalar(o),s.position.set((Math.random()-.5)*140,(Math.random()-.5)*70,t?-(Math.random()*140):-155-Math.random()*30),s.rotation.set(Math.random()*Math.PI*2,Math.random()*Math.PI*2,Math.random()*Math.PI*2);let a={mesh:s,spd:.04+Math.random()*.12,dx:(Math.random()-.5)*.012,dy:(Math.random()-.5)*.008,rx:(Math.random()-.5)*.012,ry:(Math.random()-.5)*.012,rz:(Math.random()-.5)*.01,minecraftBlockName:r};this.blocks.push(a),this.bGroup.add(s)}createBlockMaterial(e,t){if(this.useMinecraftTextures&&t){let s=this.blockMaterialPool.get(t);if(s)return s.clone()}let[r,i]=e.blockOpacity??[.32,.46];return new V.MeshBasicMaterial({color:Zt(e.blocks),transparent:!0,opacity:r+Math.random()*(i-r),depthWrite:!1,blending:V.AdditiveBlending})}removeBlockEdgeLines(){for(let e of this.blocks){let t=e.mesh.children.filter(r=>r instanceof V.LineSegments);for(let r of t){e.mesh.remove(r),r.geometry?.dispose();let i=r.material;Array.isArray(i)?i.forEach(s=>s.dispose()):i.dispose()}}}async ensureMcDataLoaded(){let e=globalThis._LOAD_MC_DATA;e&&await e()}resolveBlockAtlasUv(e,t,r){let i=s=>{let o=t[s];return o?{u:o.u,v:o.v,su:o.su??r.suSv,sv:o.sv??r.suSv}:null};if(t[e])return i(e);for(let s of["_top","_side","_front","_0"]){let o=i(`${e}${s}`);if(o)return o}for(let s of Object.keys(t))if(s.startsWith(e))return i(s);return null}async loadMinecraftTextures(){await this.ensureMcDataLoaded();let e=this.resourcesManager??new he;!e.currentResources?.blocksAtlasImage&&(e.currentConfig={...e.currentConfig,version:Kt,noInventoryGui:!0},await e.updateAssetsData?.({}));let r=e.currentResources;if(!r?.blocksAtlasImage||!r.blocksAtlasJson)throw new Error("Block atlas not available");let i=r.blocksAtlasJson,s=i.textures;this.atlasTexture=m5(r.blocksAtlasImage),this.atlasTexture.flipY=!1,this.atlasTexture.needsUpdate=!0;for(let o of pn[this.blockGroup]){let a=this.resolveBlockAtlasUv(o,s,i);if(!a)continue;let v=this.atlasTexture.clone();v.flipY=!1,v.offset.set(a.u,a.v),v.repeat.set(a.su,a.sv),v.needsUpdate=!0;let l=o.includes("glass"),c=new V.MeshBasicMaterial({map:v,side:V.DoubleSide,transparent:l,opacity:l?.85:1,alphaTest:l?.08:0,depthWrite:!0,toneMapped:!1});this.blockMaterialPool.set(o,c)}if(this.blockMaterialPool.size===0)throw new Error("No block textures resolved from atlas (check block names vs atlas keys)");this.removeBlockEdgeLines();for(let o of this.blocks){let a=Zt([...this.blockMaterialPool.keys()]);o.minecraftBlockName=a,o.mesh.material=this.blockMaterialPool.get(a).clone()}}setScene(e){if(!rt.includes(e)||e===this.curScene||this.transitioning)return;this.transitioning=!0,this.curScene=e;let t=Ha[e];setTimeout(()=>{if(this.disposed)return;this.applyScenePalette(t),this.ambient.color.set(t.ambient),this.dir.color.set(t.dir),this.pt1.color.set(t.pt1),this.pt2.color.set(t.pt2);for(let s of this.blocks)this.useMinecraftTextures&&s.minecraftBlockName||s.mesh.material instanceof V.MeshBasicMaterial&&s.mesh.material.color.set(Zt(t.blocks));let r=this.nebGeo.attributes.color;for(let s=0;s<pr;s++){let o=new V.Color(Zt(t.nebula));r.setXYZ(s,o.r,o.g,o.b)}r.needsUpdate=!0;let i=this.galGeo.attributes.color;for(let s=0;s<mr;s++){let o=.2+Math.random()*.8,a=t.galFn(o);i.setXYZ(s,a.r,a.g,a.b)}i.needsUpdate=!0,this.transitioning=!1},150)}setCamera(e){it.includes(e)&&(this.curCam=e)}setCameraSpeed(e){this.cameraSpeed=Math.max(0,e)}setBlockSpeed(e){this.blockSpeed=Math.max(0,e)}async setBlockGroup(e){if(nt.includes(e)&&e!==this.blockGroup&&(this.blockGroup=e,!(!this.useMinecraftTextures||this.disposed))){for(let t of this.blockMaterialPool.values())t.map?.dispose(),t.dispose();this.blockMaterialPool.clear();try{await this.loadMinecraftTextures()}catch{}}}getSceneId(){return this.curScene}getCameraId(){return this.curCam}getBlockGroupId(){return this.blockGroup}update(e,t){t&&yt(this.camera,this.documentRenderer.canvas);let r=dl[this.curCam],i=this.cameraSpeed,s=this.blockSpeed;this.camT+=e*r.spd*i,this.mx+=(this.tmx-this.mx)*.05,this.my+=(this.tmy-this.my)*.05;let o=this.mx*Ia,a=this.my*Ia,v=r.pos(this.camT,o,a),l=r.look(this.camT,o,a);this.camera.position.set(v.x,v.y,v.z),this.camera.lookAt(l.x,l.y,l.z),this.camera.rotation.z=r.roll(this.camT,o);let c=ul[this.curCam]*s;this.animTime+=e*1e3*s;for(let d of this.blocks){if(d.mesh.position.z+=d.spd*c*60*e,d.mesh.position.x+=d.dx*60*e*s,d.mesh.position.y+=d.dy*60*e*s,d.mesh.rotation.x+=d.rx*c,d.mesh.rotation.y+=d.ry*c,d.mesh.rotation.z+=d.rz,!this.useMinecraftTextures&&d.mesh.material instanceof V.MeshBasicMaterial){let f=d.mesh.userData.baseOpacity??.38;d.mesh.userData.baseOpacity==null&&(d.mesh.userData.baseOpacity=f);let m=.88+Math.abs(Math.sin(this.animTime*8e-4+d.mesh.position.x*.3))*.12;d.mesh.material.opacity=f*m}d.mesh.position.z>this.camera.position.z+15&&d.mesh.position.set((Math.random()-.5)*140,(Math.random()-.5)*70,this.camera.position.z-155-Math.random()*30)}this.pt1.position.set(Math.sin(this.camT*.8)*25+this.camera.position.x,Math.cos(this.camT*.6)*12+this.camera.position.y,this.camera.position.z-18),this.pt2.position.set(Math.cos(this.camT*.5)*20+this.camera.position.x,Math.sin(this.camT*.9)*15+this.camera.position.y,this.camera.position.z-30),this.galaxy.rotation.y+=e*.006*s,this.nebula.rotation.y-=e*.003*s,this.stars.rotation.y+=e*4e-4*s}dispose(){this.disposed=!0,this.scene.clear(),this.bGeo.dispose(),this.eGeo.dispose(),this.galGeo.dispose(),this.nebGeo.dispose(),this.gradientSkyTexture?.dispose(),this.atlasTexture?.dispose();for(let e of this.blockMaterialPool.values())e.map?.dispose(),e.dispose();this.blockMaterialPool.clear()}};E();x();k();R();import*as $t from"three";import{Vec3 as Da}from"vec3";E();x();k();R();import hl from"prismarine-world";import ml from"prismarine-chunk";var Fa=n=>{let e=hl(n),t=ml(n),r=new e(n).sync,i=pl(r);for(let s of i)if(s.startsWith("set")&&s!=="setColumn"){let o=r[s].bind(r);r[s]=(...a)=>{let v=a[0];v.x!==void 0&&!r.getColumnAt(v)&&r.setColumn(Math.floor(v.x/16),Math.floor(v.z/16),new t(void 0)),o(...a)}}return r};function pl(n){let e=new Set,t=n;do for(let r of Object.getOwnPropertyNames(t))typeof n[r]=="function"&&r!=="constructor"&&e.add(r);while(t=Object.getPrototypeOf(t));return[...e]}var Xt=class{constructor(e,t,r){this.documentRenderer=e;this.options=t;this.abortSignal=r;u(this,"_scene");u(this,"_camera");u(this,"worldRenderer");u(this,"WorldRendererClass",bt);this._scene=new $t.Scene,this._scene.background=new $t.Color(3294568),this._camera=new $t.PerspectiveCamera(85,e.canvas.width/e.canvas.height,.05,1e3),this.camera.position.set(0,0,0),this.camera.rotation.set(0,0,0)}get scene(){return this._scene}get camera(){return this._camera}async init(){let e=Kt,t=new he;if(t.currentConfig={version:e,noInventoryGui:!0},await t.updateAssetsData?.({}),this.abortSignal.aborted)return;let r=Fa(e),s=Ka("prismarine-block")(e),a=globalThis.mcData.blocksArray.filter(m=>{if(!m.name.includes("stained_glass"))return!1;let g=s.fromStateId(m.defaultState,0);if(g.shapes?.length!==1)return!1;let b=g.shapes[0];return b[0]===0&&b[1]===0&&b[2]===0&&b[3]===1&&b[4]===1&&b[5]===1}),v=-15,l=100,c=100;for(let m=-l;m<l;m++)for(let g=-c;g<c;g++){let b=a[Math.floor(Math.random()*a.length)];r.setBlockStateId(new Da(m,g,v),b.defaultState)}this._camera.updateProjectionMatrix(),this._camera.position.set(.5,c/2+.5,.5),this._camera.rotation.set(0,0,0);let d=new Da(...this._camera.position.toArray()),f=new tt(r,2,d);this.abortSignal.aborted||(this.worldRenderer=new this.WorldRendererClass(this.documentRenderer.renderer,this.options,{version:e,worldView:f,inWorldRenderingConfig:v5,playerStateReactive:V2().reactive,rendererState:Ze().reactive,nonReactiveState:Ze().nonReactive,resourcesManager:t}),this.worldRenderer instanceof bt&&(this._scene=this.worldRenderer.realScene,this._camera=this.worldRenderer.camera),f.init(d),await this.worldRenderer.waitForChunksToRender(),!this.abortSignal.aborted&&this.setupMouseParallax())}update(e,t){t&&yt(this.camera,this.documentRenderer.canvas)}dispose(){this.worldRenderer?.destroy(),this.worldRenderer=void 0,this._scene.clear()}setupMouseParallax(){let e=this._camera,t=e.position.x,r=e.position.y,i;document.body.addEventListener("pointermove",s=>{if(s.pointerType!=="mouse")return;let o=.2,a=s.clientX/window.innerWidth-.5,v=-(s.clientY/window.innerHeight-.5);i?.stop(),i=new F0(e.position).to({x:t+a*o,y:r+v*o},0),i.start(),e.updateProjectionMatrix()},{signal:this.abortSignal})}};E();x();k();R();import*as za from"three";var e5=class{constructor(e,t,r={},i=!1){this.documentRenderer=e;this.options=t;u(this,"active");u(this,"abortController",new AbortController);u(this,"mode");u(this,"lastFrameTime",0);this.mode=sn(r,i)}get futuristic(){return this.active instanceof wt?this.active:void 0}get scene(){return this.active?.scene}get camera(){return this.active?.camera}async start(e={}){this.active=this.createImplementation(e),await this.active.init(),this.active.scene.background instanceof za.Color&&this.documentRenderer.renderer.setClearColor(this.active.scene.background),this.lastFrameTime=performance.now(),this.documentRenderer.render=(t=!1)=>{let r=performance.now(),i=Math.min((r-this.lastFrameTime)/1e3,.05);this.lastFrameTime=r;let s=this.active;s&&(s.update(i,t),this.documentRenderer.renderer.render(s.scene,s.camera))}}createImplementation(e){switch(this.mode){case"futuristic":return new wt(this.documentRenderer,{useMinecraftTextures:e.useMinecraftTextures,initialScene:e.futuristicScene,initialCamera:e.futuristicCamera,initialBlockGroup:e.futuristicBlockGroup,initialCameraSpeed:e.futuristicCameraSpeed,initialBlockSpeed:e.futuristicBlockSpeed,resourcesManager:e.resourcesManager},this.abortController.signal);case"worldBlocks":return new Xt(this.documentRenderer,this.options,this.abortController.signal);default:return new qt(this.documentRenderer)}}dispose(){this.active?.dispose(),this.active=void 0,this.abortController.abort()}};Q5.ColorManagement.enabled=!1;globalThis.THREE=Q5;var La=n=>({updateMap:n.entities.updateMap.bind(n.entities),updateCustomBlock:n.updateCustomBlock.bind(n),getBlockInfo:n.getBlockInfo.bind(n),playEntityAnimation:n.entities.playAnimation.bind(n.entities),damageEntity:n.entities.handleDamageEvent.bind(n.entities),updatePlayerSkin:n.entities.updatePlayerSkin.bind(n.entities),changeHandSwingingState:n.changeHandSwingingState.bind(n),getHighestBlocks:n.getHighestBlocks.bind(n),reloadWorld:n.reloadWorld.bind(n),updateEntityModel:n.entities.updateEntityModel.bind(n.entities),playEntityModelAnimation:n.entities.playEntityModelAnimation.bind(n.entities),addMedia:n.media.addMedia.bind(n.media),destroyMedia:n.media.destroyMedia.bind(n.media),setControlMode:n.media.setControlMode.bind(n.media),setVideoPlaying:n.media.setVideoPlaying.bind(n.media),setVideoSeeking:n.media.setVideoSeeking.bind(n.media),setVideoVolume:n.media.setVideoVolume.bind(n.media),setVideoSpeed:n.media.setVideoSpeed.bind(n.media),handleUserClick:n.media.handleUserClick.bind(n.media),addSectionAnimation(e,t){n.sectionsOffsetsAnimations[e]=t},removeSectionAnimation(e){delete n.sectionsOffsetsAnimations[e]},shakeFromDamage:n.cameraShake.shakeFromDamage.bind(n.cameraShake),onPageInteraction:n.media.onPageInteraction.bind(n.media),downloadMesherLog:n.downloadMesherLog.bind(n),explodeFirework:n.fireworksLegacy.explode.bind(n.fireworksLegacy),explodeFireworkFacingCamera:n.fireworksLegacy.explodeFacingCamera.bind(n.fireworksLegacy),addWaypoint:n.waypoints.addWaypoint.bind(n.waypoints),removeWaypoint:n.waypoints.removeWaypoint.bind(n.waypoints),startCinimaticScript:n.cinimaticScript.startScript.bind(n.cinimaticScript),stopCinimaticScript:n.cinimaticScript.stopScript.bind(n.cinimaticScript),launchFirework:n.fireworks.launchFirework.bind(n.fireworks),setSkyboxImage:n.skyboxRenderer.setSkyboxImage.bind(n.skyboxRenderer),setRain:e=>n.toggleModule("rain",e),spawnBlockBreakParticles(e,t,r,i,s,o){n.getModule("blockBreakParticles")?.spawnBlockBreakParticles(e,t,r,i,s,o)},spawnBlockCrackParticle(e,t,r,i,s,o,a){n.getModule("blockBreakParticles")?.spawnCrackParticle(e,t,r,i,s,o,a)},async loadGeometryExport(e){let{applyWorldGeometryExport:t}=await Promise.resolve().then(()=>(Yi(),aa));return t(n,e)},feedChunkPacket(e){let{kind:t,...r}=e,i={type:t,...r};for(let s of n.workers)s.postMessage(i)}}),bl=[],gr=(n,...e)=>{for(let t of Object.values(globalThis.loadedMods??{}))try{t.threeJsBackendModule?.[n]?.(...e)}catch(r){let i=`[mod three.js] Error calling ${n} on ${t.name}: ${r}`;throw new Error(i)}},Ua=()=>{let n,e=null,t=null,r=null,i=null,s=(c,d)=>{k0?n=f1(c,bl,globalThis):n=c,e=new _5(n,d?.canvas),globalThis.renderer=e.renderer,globalThis.documentRenderer=e,globalThis.threeJsBackend=l,gr("default",l)},o=async c=>{if(!e)throw new Error("Document renderer not initialized");if(!r&&!t){let d={...n.config.menuBackground,...c};t=new e5(e,{...n},d,!!F.env.SINGLE_FILE_BUILD_MODE),gr("menuBackgroundCreated",t),await t.start(d),gr("menuBackgroundReady",t)}},a=async c=>{let f=k0?f1(c,[he,et],globalThis):c;if(!e)throw new Error("Document renderer not initialized");e.nonReactiveState=f.nonReactiveState,globalThis.resourcesManager=f.resourcesManager,t&&(t.dispose(),t=null),r=new bt(e.renderer,n,f),await r.worldReadyPromise,i=new h1(f.nonReactiveState),globalThis.frameTimingCollector=i;let m=e.render;e.render=function(g){m.call(this,g),i?.markFrameStart(),f.inWorldRenderingConfig.paused||r?.render(g),i?.markFrameEnd(),i?.markFrameDisplay()},e.inWorldRenderingConfig=f.inWorldRenderingConfig,globalThis.world=r,gr("worldReady",r)},v=()=>{t&&(t.dispose(),t=null),e&&e.dispose(),r&&(r.destroy(),r=null)},l={id:"threejs",displayName:`three.js ${Q5.REVISION}`,startMenuBackground:o,startWorld:a,disconnect:v,setRendering(c){e.setPaused(!c),r&&(r.renderingActive=c)},getMenuBackground:()=>t??void 0,getDebugOverlay:()=>({get entitiesString(){return r?.entities.getDebugString()},get left(){return{"Geo Memory":r?.chunkMeshManager.getEstimatedMemoryUsage().total??"-"}}}),updateCamera(c,d,f){i?.markCameraUpdate(!c),r?.setFirstPersonCamera(c,d,f)},get soundSystem(){return r?.soundSystem},get backendMethods(){if(r)return La(r)}};return{main:{init:s,backend:l},workerProxy(){return ls({init(c,d){s(c,{canvas:d})},updateSizeExternal(c,d,f){e?.updateSizeExternal(c,d,f)},startMenuBackground:o,startWorld:a,disconnect:v,setRendering:l.setRendering,updateCamera(c,d,f){let m=c?new gl(c.x,c.y,c.z):null;i?.markCameraUpdate(!m),l.updateCamera(m,d,f)},async callBackendMethod(c,...d){if(!r)throw new Error("World renderer not initialized");let m=La(r)[c];if(!m)throw new Error(`Backend method ${String(c)} is unavailable`);return m(...d)}})}}};var br=n=>{let{main:e}=Ua();return e.init(n),e.backend};br.id="threejs";br.displayName="three.js Blocking";br.description="Simple, old and stable main thread graphics backend providing balanced performance on top of WebGL2.";E();x();k();R();import*as Ga from"three";function yl(n){let e="threeWorker.js",t;if(F.env.SINGLE_FILE_BUILD){let r=document.getElementById("three-worker-code").textContent,i=new Blob([r],{type:"text/javascript"});t=new Worker(window.URL.createObjectURL(i))}else t=new Worker(e);return t.onmessage=({data:r})=>{n(r)},t.on&&t.on("message",r=>{t.onmessage({data:r})}),t}var yr=async n=>{let e=yl(()=>{}),t=cs(e),r=Vr();r.onSizeChanged((a,v)=>{t.updateSizeExternal(a,v,window.devicePixelRatio||1)});let i=u1(n,e);try{t.init(i,r.canvas)}catch(a){throw g5(i),a}let s=new Proxy({},{get(a,v){if(typeof v=="string")return async(...l)=>t.callBackendMethod(v,...l)}});return{id:"threejs",displayName:`three.js ${Ga.REVISION}`,async startMenuBackground(){},async startWorld(a){let v={...y5,items:"itemsArray",entities:"entitiesArray"};Jr([e],a.version,v,a.resourcesManager.currentResources.mcData),a.inWorldRenderingConfig.__syncToWorker=!0,a.playerStateReactive&&(a.playerStateReactive.__syncToWorker=!0),a.rendererState&&(a.rendererState.__syncFromWorker=!0),a.nonReactiveState&&(a.nonReactiveState.__syncFromWorker=!0),a.nonReactiveState.__syncFromWorkerInterval=200;let l=u1(a,e);try{await t.startWorld(structuredClone(l))}catch(d){throw g5(l),d}t.updateSizeExternal(r.size.width,r.size.height,window.devicePixelRatio||1);let c=Bt("fps");setInterval(()=>{let{fps:d,avgRenderTime:f,worstRenderTime:m}=a.nonReactiveState;c.updateText(`FPS: ${d.toFixed(0)} (${f.toFixed(0)}ms/${m.toFixed(0)}ms)`),a.nonReactiveState.fps=0},1e3)},disconnect(){r.destroy(),t.disconnect(),e.terminate()},setRendering(a){t.setRendering(a)},updateCamera(a,v,l){t.updateCamera(a?{x:a.x,y:a.y,z:a.z}:null,v,l)},soundSystem:void 0,backendMethods:s}};yr.id="threejs-off-thread";yr.displayName="three.js Multi-thread";yr.description=["Edge-cutting technology that uses a dedicated thread for graphics.","Slightly higher power and RAM usage.","More stable FPS (mid-range devices), but possible inputlag if TPS is low.","On low-end devices it might result in device throttling and stuttering."].join(" ");export{q2 as AppViewer,qt as ClassicMenuBackground,_5 as DocumentRenderer,it as FUTURISTIC_CAMERA_IDS,u5 as FUTURISTIC_CAMERA_LABELS,rt as FUTURISTIC_SCENE_IDS,d5 as FUTURISTIC_SCENE_LABELS,wt as FuturisticMenuBackground,kr as HIGH_TEXTURE_COUNT,r1 as LONG_RENDER_TIME_MS,Rr as LOW_FPS_THRESHOLD,Tt as LoadedResourcesTransferrable,w5 as MC_RENDERER_DEBUG_OVERLAY_CLASS,Kt as MENU_BACKGROUND_MC_VERSION,h5 as MENU_BACKGROUND_MOTION_DEFAULTS,pe as MENU_BACKGROUND_OPTION_DEFAULTS,pn as MINECRAFT_BLOCK_GROUPS,nt as MINECRAFT_BLOCK_GROUP_IDS,f5 as MINECRAFT_BLOCK_GROUP_LABELS,e5 as MenuBackgroundRenderer,a5 as PerformanceMonitor,Z2 as RENDERER_DEFAULT_OPTIONS,X2 as RENDERER_OPTIONS_META,$2 as RENDERER_RENDER_GUI_SECTIONS,he as ResourcesManager,Xt as WorldBlocksMenuBackground,tt as WorldView,et as WorldViewWorker,Vr as addCanvasForWorker,O6 as applyMenuBackgroundLiveOptions,Hf as applyRendererEnableLighting,U6 as applyRendererOptions,Pf as applyRendererWorldViewOptions,kt as chunkPos,yr as createGraphicsBackendOffThread,br as createGraphicsBackendSingleThread,Mc as createWorldRendererConfig,N2 as defaultGraphicsBackendConfig,xr as defaultPerformanceInstabilityFactors,v5 as defaultWorldRendererConfig,Y2 as delayedIterator,Tr as formatPerformanceFactorsDebug,Ze as getDefaultRendererState,is as getInitialPlayerState,W6 as getInitialPlayerStateRenderer,N6 as getPlayerStateUtils,k0 as isWebWorker,Bf as menuBackgroundOptionsFromStorage,Ae as menuBackgroundSpeedToMultiplier,R6 as migrateRendererOptions,Sr as rendererShaderCubeDebugModeToValue,a6 as sectionPos,If as subscribeRendererOptions};
21507
+ #include <${Fv>=154?"colorspace_fragment":"encodings_fragment"}>
21508
+ }`})}},Qi=class{constructor(e){this.worldRenderer=e;d(this,"points");d(this,"clock",new M0.Clock);d(this,"enabled",!1);d(this,"currentTime");d(this,"enablementCheck",()=>this.currentTime?this.currentTime>13500&&this.currentTime<23e3:!1);d(this,"render",e=>{this.points&&(this.points.position.set(0,0,0),this.points.material.uniforms.time.value=this.clock.getElapsedTime()*.2)})}enable(){this.enabled||(this.enabled=!0,this.updateVisibility())}disable(){this.enabled&&(this.enabled=!1,this.removeStars())}toggle(){return this.enabled?this.disable():this.enable(),this.enabled}updateTimeOfDay(e){this.currentTime=e,this.enabled&&this.updateVisibility()}updateVisibility(){if(!this.enabled)return;let e=this.enablementCheck?.()??!1;e&&!this.points?this.createStars():!e&&this.points&&this.removeStars()}createStars(){if(this.points)return;let e=80,t=50,r=7e3,i=7,s=10,o=new M0.BufferGeometry,v=y=>new M0.Vector3().setFromSpherical(new M0.Spherical(y,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),a=[],l=[],c=Array.from({length:r},()=>(.5+.5*Math.random())*i),u=new M0.Color,f=e+t,m=t/r;for(let y=0;y<r;y++)f-=m*Math.random(),a.push(...v(f).toArray()),u.setHSL(y/r,s,.9),l.push(u.r,u.g,u.b);o.setAttribute("position",new M0.Float32BufferAttribute(a,3)),o.setAttribute("color",new M0.Float32BufferAttribute(l,3)),o.setAttribute("size",new M0.Float32BufferAttribute(c,1));let g=new Yi;g.blending=M0.AdditiveBlending,g.depthTest=!0,g.depthWrite=!1,g.transparent=!0,this.points=new M0.Points(o,g),this.points.renderOrder=-1,this.worldRenderer.scene.add(this.points)}dispose(){this.removeStars()}removeStars(){this.points&&(this.points.geometry.dispose(),this.points.material.dispose(),this.worldRenderer.scene.remove(this.points),this.points=void 0)}},ba={id:"starfield",controller:Qi,enabledDefault:!0,cannotBeDisabled:!0};var ya={starfield:ba,futuristicReveal:ga,rain:ma,cameraBobbing:da,blockBreakParticles:ca};var mt=class mt extends c1{constructor(t,r,i){if(!i.resourcesManager)throw new Error("resourcesManager is required in displayOptions");super(i.resourcesManager,i,r);this.renderer=t;this.initOptions=r;this.displayOptions=i;d(this,"outputFormat","threeJs");d(this,"chunkMeshManager");d(this,"chunkTextures",new Map);d(this,"signsCache",new Map);d(this,"cameraSectionPos",new Ue(0,0,0));d(this,"holdingBlock");d(this,"holdingBlockLeft");d(this,"scene",new Q.Scene);d(this,"ambientLight",new Q.AmbientLight(13421772));d(this,"directionalLight",new Q.DirectionalLight(16777215,.5));d(this,"entities",new P1(this,globalThis.mcData));d(this,"performanceMonitor");d(this,"cameraGroupVr");d(this,"material",new Q.MeshBasicMaterial({vertexColors:!0,transparent:!0,alphaTest:.1}));d(this,"itemsTexture");d(this,"cursorBlock");d(this,"onRender",[]);d(this,"lastRenderTime",0);d(this,"animatedFov",0);d(this,"lastFovAnimTime",0);d(this,"cameraShake");d(this,"cameraContainer");d(this,"media");d(this,"waypoints");d(this,"cinimaticScript");d(this,"camera");d(this,"renderTimeAvg",0);d(this,"pendingSectionUpdates",new Map);d(this,"pendingSectionBufferStartTimes",new Map);d(this,"modules",{});d(this,"sectionsOffsetsAnimations",{});d(this,"fountains",[]);d(this,"fireworksLegacy");d(this,"DEBUG_RAYCAST",!1);d(this,"skyboxRenderer");d(this,"fireworks");d(this,"sceneOrigin",new V1(this.scene));d(this,"cameraWorldPos",{x:0,y:0,z:0});d(this,"_cameraPositionAccessWarned",!1);d(this,"_tmpCameraPos",new Q.Vector3);d(this,"currentPosTween");d(this,"currentRotTween");d(this,"_tpDirection",new Q.Vector3);d(this,"_tpPitchQuat",new Q.Quaternion);d(this,"_tpYawQuat",new Q.Quaternion);d(this,"_tpFinalQuat",new Q.Quaternion);d(this,"_tpScenePos",new Q.Vector3);d(this,"_tpAxisX",new Q.Vector3(1,0,0));d(this,"_tpAxisY",new Q.Vector3(0,1,0));d(this,"_tpRaycaster",new Q.Raycaster);d(this,"_tpChunkWorldPos",new Q.Vector3);d(this,"debugOverlayAdded",!1);d(this,"debugRaycastHelper");d(this,"debugHitPoint");d(this,"prevFramePerspective",null);this.performanceMonitor=new n5(this.reactiveState.world.instabilityFactors),this.renderer=t,i.rendererState.renderer=mt.getRendererInfo(t)??"...",this.chunkMeshManager=new U5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.onRenderDistanceChanged=s=>{this.chunkMeshManager.updateViewDistance(s)},this.cursorBlock=new I1(this),this.holdingBlock=H5(this),this.holdingBlockLeft=H5(this,!0);for(let s of Object.values(ya))this.registerModule(s);this.skyboxRenderer=new N1(this.realScene,!1,null),this.skyboxRenderer.init(),this.addDebugOverlay(),this.resetScene(),this.init(),this.soundSystem=new O1(this),this.cameraShake=new F1(this,this.onRender),this.media=new D1(this),this.fireworksLegacy=new U1(this),this.waypoints=new L1(this),this.cinimaticScript=new G1(this,(s,o,v)=>this.setCinimaticCamera(s,o,v),s=>this.setCinimaticFov(s),()=>({position:new Ue(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),yaw:this.cameraShake.getBaseRotation().yaw,pitch:this.cameraShake.getBaseRotation().pitch,fov:this.camera.fov})),this.fireworks=new W1(this.realScene,this.sceneOrigin),this.renderUpdateEmitter.on("chunkFinished",s=>{this.finishChunk(s)}),this.worldSwitchActions(),this.initializeModules()}isShaderCubeBlocksEnabled(){return this.worldRendererConfig.shaderCubeBlocks===!0&&!!this.renderer?.capabilities?.isWebGL2}get sectionObjects(){return this.chunkMeshManager.sectionObjects}get realScene(){return this.scene}get waitingChunksToDisplay(){return this.chunkMeshManager.waitingChunksToDisplay}get estimatedMemoryUsage(){return this.chunkMeshManager.getEstimatedMemoryUsage().total}get tilesRendered(){return this.chunkMeshManager.getTotalTiles()}get blocksRendered(){return this.chunkMeshManager.getTotalBlocks()}registerModule(t){if(t.id in this.modules)return;let r=new t.controller(this),i={manifest:t,controller:r,enabled:!1,toggle:()=>this.toggleModule(t.id)};this.modules[t.id]=i,t.enabledDefault&&this.toggleModule(t.id,!0)}enableModule(t){let r=this.modules[t];r&&(r.enabled||(r.enabled=!0,r.controller.enable(),r.controller.render&&this.onRender.push(r.controller.render)))}disableModule(t){let r=this.modules[t];if(r&&!r.manifest.cannotBeDisabled&&r.enabled&&(r.enabled=!1,r.controller.disable(),r.controller.render)){let i=this.onRender.indexOf(r.controller.render);i>-1&&this.onRender.splice(i,1)}}toggleModule(t,r){let i=this.modules[t];if(!i)return!1;let s=r!==void 0?r:!i.enabled;if(s===i.enabled)return i.enabled;if(!s&&i.manifest.cannotBeDisabled)return!0;if(i.enabled=s,s)i.controller.enable(),i.controller.render&&!this.onRender.includes(i.controller.render)&&this.onRender.push(i.controller.render);else if(i.controller.disable(),i.controller.render){let o=this.onRender.indexOf(i.controller.render);o>-1&&this.onRender.splice(o,1)}return s}disposeModules(){for(let t of Object.values(this.modules))t.controller.dispose();this.modules={}}initializeModules(){this.updateModulesFromConfig()}getModule(t){return this.modules[t]?.controller}anyModuleRequiresHeightmap(){return Object.values(this.modules).some(t=>t.enabled&&t.manifest.requiresHeightmap)}get cameraObject(){return this.cameraGroupVr??this.cameraContainer}_wrapCameraPositionWithWarning(){let t=this.camera.position,r=this,i=20,s=(a,l,c)=>Math.abs(a)>i||Math.abs(l)>i||Math.abs(c)>i,o=()=>{!r._cameraPositionAccessWarned&&typeof F<"u"},v=new Proxy(t,{set(a,l,c){return(l==="x"||l==="y"||l==="z")&&typeof c=="number"&&Math.abs(c)>i&&o(),a[l]=c,!0},get(a,l,c){let u=a[l];return l==="set"?function(f,m,g){return s(f,m,g)&&o(),a.set(f,m,g)}:l==="setX"||l==="setY"||l==="setZ"?function(f){return Math.abs(f)>i&&o(),a[l](f)}:l==="copy"?function(f){return s(f.x,f.y,f.z)&&o(),a.copy(f)}:typeof u=="function"?u.bind(a):u}});Object.defineProperty(this.camera,"position",{value:v,configurable:!0,enumerable:!0})}worldSwitchActions(){this.onWorldSwitched.push(()=>{this.protocolCustomBlocks.clear(),this.sectionsOffsetsAnimations={},this.waypoints.clear(),this.cinimaticScript.stopScript(),this.fireworks.clear()})}downloadWorldGeometry(){Oi(this,new Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraShake.getBaseRotation(),"world-geometry.json")}updateEntity(t,r=!1){let i={rotation:{head:{x:t.headPitch??t.pitch,y:t.headYaw,z:0}}};r?this.entities.updateEntityPosition(t,!1,i):this.entities.update(t,i)}updatePlayerEntity(t){this.entities.handlePlayerEntity(t)}resetScene(){this.sceneOrigin.update(0,0,0),this.cameraWorldPos.x=0,this.cameraWorldPos.y=0,this.cameraWorldPos.z=0,this.scene.matrixAutoUpdate=!1,this.scene.background=new Q.Color(this.initOptions.config.sceneBackground),this.scene.add(this.ambientLight),this.directionalLight.position.set(1,1,.5).normalize(),this.directionalLight.castShadow=!0,this.scene.add(this.directionalLight);let t=this.renderer.getSize(new Q.Vector2);this.camera=new Q.PerspectiveCamera(75,t.x/t.y,.1,1e3),this._wrapCameraPositionWithWarning(),this.cameraContainer=new Q.Object3D,this.cameraContainer.add(this.camera),this.scene.add(this.cameraContainer)}watchReactivePlayerState(){super.watchReactivePlayerState(),this.onReactivePlayerStateUpdated("inWater",t=>{this.skyboxRenderer.updateWaterState(t,this.playerStateReactive.waterBreathing)}),this.onReactivePlayerStateUpdated("waterBreathing",t=>{this.skyboxRenderer.updateWaterState(this.playerStateReactive.inWater,t)}),this.onReactivePlayerStateUpdated("ambientLight",t=>{t&&(this.ambientLight.intensity=t)}),this.onReactivePlayerStateUpdated("directionalLight",t=>{t&&(this.directionalLight.intensity=t)}),this.onReactivePlayerStateUpdated("lookingAtBlock",t=>{this.cursorBlock.setHighlightCursorBlock(t?new Ue(t.x,t.y,t.z):null,t?.shapes)}),this.onReactivePlayerStateUpdated("diggingBlock",t=>{this.cursorBlock.updateBreakAnimation(t?{x:t.x,y:t.y,z:t.z}:void 0,t?.stage??null,t?.mergedShape)}),this.onReactivePlayerStateUpdated("perspective",t=>{let r=new Ue(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z);this.updateCamera(r,this.cameraShake.getBaseRotation().yaw,this.cameraShake.getBaseRotation().pitch)})}watchReactiveConfig(){super.watchReactiveConfig(),this.onReactiveConfigUpdated("showChunkBorders",r=>{this.updateShowChunksBorder(r)}),this.onReactiveConfigUpdated("defaultSkybox",r=>{this.skyboxRenderer.updateDefaultSkybox(r)}),this.onReactiveConfigUpdated("shaderCubeDebugMode",()=>{this.chunkMeshManager.syncCubeShaderUniforms()}),this.onReactiveConfigUpdated("futuristicReveal",()=>{this.updateModulesFromConfig()});let t=this.displayOptions.inWorldRenderingConfig.handRenderer;this.onReactiveConfigUpdated("handRenderer",r=>{if(r===t)return;t=r;let i=this.holdingBlock.ready,s=this.holdingBlockLeft.ready;this.holdingBlock.dispose(),this.holdingBlockLeft.dispose(),this.holdingBlock=H5(this),this.holdingBlockLeft=H5(this,!0),i&&(this.holdingBlock.ready=!0,this.holdingBlock.updateItem()),s&&(this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem())}),this.onReactiveConfigUpdated("*",()=>{this.updateModulesFromConfig()}),this.updateModulesFromConfig()}updateModulesFromConfig(){let{moduleStates:t}=this.worldRendererConfig;for(let[r,i]of Object.entries(this.modules)){let s=t[r];if(s==="enabled"){i.enabled||this.toggleModule(r,!0);continue}if(s==="disabled"){i.enabled&&!i.manifest.cannotBeDisabled&&this.toggleModule(r,!1);continue}if(s==="auto"||s===void 0)if(i.controller.autoEnableCheck){let o=i.controller.autoEnableCheck();o&&!i.enabled?this.toggleModule(r,!0):!o&&i.enabled&&!i.manifest.cannotBeDisabled&&this.toggleModule(r,!1)}else{let o=i.manifest.enabledDefault??!1;o&&!i.enabled?this.toggleModule(r,!0):!o&&i.enabled&&!i.manifest.cannotBeDisabled&&this.toggleModule(r,!1)}}}changeHandSwingingState(t,r=!1){let i=r?this.holdingBlockLeft:this.holdingBlock;t?i.startSwing():i.stopSwing()}async updateAssetsData(){let t=this.resourcesManager.currentResources,r=this.material.map,i=this.itemsTexture,s=Pe(t.blocksAtlasImage);s.needsUpdate=!0,s.flipY=!1,this.material.map=s,this.chunkMeshManager.syncCubeShaderUniforms();let o=Pe(t.itemsAtlasImage);o.needsUpdate=!0,o.flipY=!1,this.itemsTexture=o,r&&r.dispose(),i&&i.dispose(),await super.updateAssetsData(),this.onAllTexturesLoaded(),Object.keys(this.loadedChunks).length>0&&this.rerenderAllChunks()}onAllTexturesLoaded(){this.holdingBlock.ready=!0,this.holdingBlock.updateItem(),this.holdingBlockLeft.ready=!0,this.holdingBlockLeft.updateItem()}changeBackgroundColor(t){this.realScene.background=new Q.Color(t[0],t[1],t[2])}changeCardinalLight(t){this.worldRendererConfig.cardinalLight=t}timeUpdated(t){let r=this.getModule("starfield");r?.updateTimeOfDay&&r.updateTimeOfDay(t),this.skyboxRenderer.updateTime(t)}biomeUpdated(t){t?.temperature!==void 0&&this.skyboxRenderer.updateTemperature(t.temperature)}biomeReset(){this.skyboxRenderer.updateTemperature(Mi)}getItemRenderData(t,r){return H3(t,r,this.resourcesManager,this.playerStateReactive)}async demoModel(){let t=cursorBlockRel(0,1,0).position,r=await y5();ms(r,t);let i=new Q.BoxHelper(r,16776960);r.add(i),this.realScene.add(r)}demoItem(){let t=cursorBlockRel(0,1,0).position,{mesh:r}=this.entities.getItemMesh({itemId:541},{});r.position.set(t.x+.5,t.y+.5,t.z+.5);let i=new Q.BoxHelper(r,16776960);r.add(i),this.realScene.add(r)}addDebugOverlay(){if(this.debugOverlayAdded)return;this.debugOverlayAdded=!0;let t=Ct("debug-overlay",80,0,void 0,{className:p5});setInterval(()=>{if(t.setVisibility(this.displayAdvancedStats),this.displayAdvancedStats){let r=a=>new Intl.NumberFormat("en-US",{}).format(a),i=a=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(a),s="";s+=`TE: ${r(this.renderer.info.memory.textures)} `,s+=`F: ${i(this.tilesRendered)} `,s+=`B: ${i(this.blocksRendered)} `,s+=`MEM: ${this.chunkMeshManager.getEstimatedMemoryUsage().total} `;let o=this.chunkMeshManager.getStats();s+=`POOL: ${o.activeCount}/${o.poolSize} `;let v=gr(this.reactiveState.world.instabilityFactors);v&&(s+=`PF: ${v} `),t.updateText(s),this.backendInfoReport=s}},200)}updatePosDataChunk(t){let r=this.sectionObjects[t];if(!r)return;let[i,s,o]=t.split(",").map(c=>Math.floor(+c/16)),a=500-(Math.abs(i-this.cameraSectionPos.x)+Math.abs(s-this.cameraSectionPos.y)+Math.abs(o-this.cameraSectionPos.z)),l=r.mesh??r.shaderMesh??r.children.find(c=>c.name==="mesh"||c.name==="shaderMesh");l&&(l.renderOrder=a)}updateViewerPosition(t){this.viewerChunkPosition=t}cameraSectionPositionUpdate(){for(let t in this.sectionObjects)this.sectionObjects[t]&&this.updatePosDataChunk(t)}getDir(t,r){return t===r?0:t<r?1:-1}finishChunk(t){this.chunkMeshManager.finishChunkDisplay(t)}applyPendingSectionUpdates(){if(this.pendingSectionUpdates.size===0)return;let t=performance.now(),r=this.getSectionHeight(),i=[];for(let s of this.pendingSectionUpdates.keys()){let o=this.pendingSectionBufferStartTimes.get(s)??t;if(t-o<mt.MAX_SECTION_UPDATE_BUFFER_MS){let[a,l,c]=s.split(",").map(Number),u=[`${a-16},${l},${c}`,`${a+16},${l},${c}`,`${a},${l-r},${c}`,`${a},${l+r},${c}`,`${a},${l},${c-16}`,`${a},${l},${c+16}`],f=!1;for(let m of u)if(this.sectionsWaiting.has(m)&&!this.pendingSectionUpdates.has(m)&&this.sectionObjects[m]){f=!0;break}if(f)continue}i.push(s)}if(i.length!==0)for(let s of i){let o=this.pendingSectionUpdates.get(s);this.pendingSectionUpdates.delete(s),this.pendingSectionBufferStartTimes.delete(s);let v=o.key.split(","),a=`${v[0]},${v[2]}`;if(!this.loadedChunks[a]||!this.active){this.chunkMeshManager.releaseSection(o.key);continue}if(!this.chunkMeshManager.sectionHasRenderableContent(o.geometry)){this.chunkMeshManager.releaseSection(o.key);continue}this.chunkMeshManager.updateSection(o.key,o.geometry),this.updatePosDataChunk(o.key)}}clearPendingSectionUpdatesForChunk(t,r){for(let i of[...this.pendingSectionUpdates.keys()])i.startsWith(`${t},`)&&i.endsWith(`,${r}`)&&(this.pendingSectionUpdates.delete(i),this.pendingSectionBufferStartTimes.delete(i))}handleWorkerMessage(t){if(t.type==="geometry"){let r=t.key.split(","),i=`${r[0]},${r[2]}`;if(!this.loadedChunks[i]||!this.active){this.pendingSectionUpdates.delete(t.key),this.pendingSectionBufferStartTimes.delete(t.key);return}if(this.sectionObjects[t.key]){this.pendingSectionUpdates.set(t.key,t),this.pendingSectionBufferStartTimes.has(t.key)||this.pendingSectionBufferStartTimes.set(t.key,performance.now());return}if(!this.chunkMeshManager.sectionHasRenderableContent(t.geometry)){this.chunkMeshManager.releaseSection(t.key);return}this.chunkMeshManager.updateSection(t.key,t.geometry),this.updatePosDataChunk(t.key)}}getSignTexture(t,r,i,s=!1){let o=St(t),v=this.chunkTextures.get(`${o[0]},${o[1]}`);v||(v={},this.chunkTextures.set(`${o[0]},${o[1]}`,v));let a=`${t.x},${t.y},${t.z}`;if(v[a])return v[a];let l=Dv(this.version),c=l1(r,i,l);if(!c)return;let u=new Q.Texture(c);return u.magFilter=Q.NearestFilter,u.minFilter=Q.NearestFilter,u.needsUpdate=!0,v[a]=u,u}getCameraPosition(t){return(t??this._tmpCameraPos).set(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z)}getSectionCameraPosition(){let t=this.getCameraPosition();return new Ue(Math.floor(t.x/16),Math.floor(t.y/16),Math.floor(t.z/16))}updateCameraSectionPos(){let t=this.getSectionCameraPosition();this.cameraSectionPos.equals(t)||(this.cameraSectionPos=t,this.cameraSectionPositionUpdate())}setFirstPersonCamera(t,r,i){let s=this.playerStateReactive.eyeHeight;this.updateCamera(t?.offset(0,s,0)??null,r,i),this.updateCameraSectionPos()}getThirdPersonCamera(t,r,i){t??(t=new Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z));let s=this.playerStateReactive.perspective==="third_person_back",o=4,v=this._tpDirection.set(0,0,-1),a=this._tpPitchQuat.setFromAxisAngle(this._tpAxisX,i),l=this._tpYawQuat.setFromAxisAngle(this._tpAxisY,r),c=this._tpFinalQuat.multiplyQuaternions(l,a);v.applyQuaternion(c),s&&v.multiplyScalar(-1),this.DEBUG_RAYCAST&&this.debugRaycast(t,v,o);let u=this._tpScenePos.set(this.sceneOrigin.toSceneX(t.x),this.sceneOrigin.toSceneY(t.y),this.sceneOrigin.toSceneZ(t.z)),f=this._tpRaycaster;f.set(u,v),f.far=o;let m=80,g=m*m,y=t.x,w=t.y,b=t.z,A=[];for(let B of Object.values(this.sectionObjects)){if(B.name!=="chunk"||!B.visible||B.worldX===void 0)continue;let I=B.worldX-y,G=B.worldY-w,O=B.worldZ-b;if(I*I+G*G+O*O>g)continue;let j=B.children.find(J=>J.name==="mesh"||J.name==="shaderMesh");j&&A.push(j)}let C=f.intersectObjects(A,!1),M=o;C.length>0&&(M=Math.max(.5,C[0].distance-.2));let S=this.chunkMeshManager.raycastShaderSectionAABBs(t,v,M,m);return S!==void 0&&(M=Math.max(.5,S-.2)),new Ue(t.x+v.x*M,t.y+v.y*M,t.z+v.z*M)}debugRaycast(t,r,i){this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0);let s=new Q.Vector3(this.sceneOrigin.toSceneX(t.x),this.sceneOrigin.toSceneY(t.y),this.sceneOrigin.toSceneZ(t.z));this.debugRaycastHelper=new Q.ArrowHelper(r.clone().normalize(),s,i,16711680,i*.1,i*.05),this.realScene.add(this.debugRaycastHelper);let o=new Q.SphereGeometry(.2,8,8),v=new Q.MeshBasicMaterial({color:65280});this.debugHitPoint=new Q.Mesh(o,v),this.debugHitPoint.position.copy(s).add(r.clone().multiplyScalar(i)),this.realScene.add(this.debugHitPoint)}setCinimaticCamera(t,r,i){this.cameraWorldPos.x=t.x,this.cameraWorldPos.y=t.y,this.cameraWorldPos.z=t.z,this.sceneOrigin.update(t.x,t.y,t.z),this.cameraObject.position.set(0,0,0),this.cameraShake.setBaseRotation(i,r),this.updateCameraSectionPos()}setCinimaticFov(t){this.animatedFov=t,this.camera.fov=t,this.camera.updateProjectionMatrix()}updateSmoothFov(){if(this.cinimaticScript.running)return;let t=this.displayOptions.inWorldRenderingConfig.fov,r=this.playerStateReactive.fovMultiplier,i=t*(Number.isFinite(r)?r:1),s=performance.now();if(this.animatedFov===0&&(this.animatedFov=i),Math.abs(this.animatedFov-i)>=.01){let o=s-this.lastFovAnimTime,v=Math.min(o/mt.FOV_TRANSITION_MS,1),a=l=>1-(1-l)**3;this.animatedFov+=(i-this.animatedFov)*a(v),Math.abs(this.animatedFov-i)<.01&&(this.animatedFov=i)}else this.animatedFov=i;this.lastFovAnimTime=s,this.camera.fov!==this.animatedFov&&(this.camera.fov=this.animatedFov,this.camera.updateProjectionMatrix())}updateCamera(t,r,i){if(!this.cinimaticScript.running){if(t){this.renderer.xr.isPresenting&&(t.y-=this.camera.position.y),this.currentPosTween?.stop();let s=this.displayOptions.inWorldRenderingConfig.instantCameraUpdate?0:this.playerStateUtils.isSpectatingEntity()?150:50;this.currentPosTween=new F0(this.cameraWorldPos).to({x:t.x,y:t.y,z:t.z},s).onUpdate(()=>{this.sceneOrigin.update(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),this.cameraObject.position.set(0,0,0)}).start()}if(this.playerStateUtils.isSpectatingEntity()){let s=this.cameraShake.getBaseRotation(),o=0,v=Math.PI/2;s.yaw<v&&r>Math.PI+v?o=-Math.PI*2:r<v&&s.yaw>Math.PI+v&&(o=Math.PI*2),this.currentRotTween?.stop(),this.currentRotTween=new F0(s).to({pitch:i,yaw:r+o},100).onUpdate(a=>this.cameraShake.setBaseRotation(a.pitch,a.yaw-o)).start()}else{this.currentRotTween?.stop(),this.cameraShake.setBaseRotation(i,r);let{perspective:s}=this.playerStateReactive;if(s==="third_person_back"||s==="third_person_front"){let o=new Q.Vector3(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),v=this.getThirdPersonCamera(o,r,i),a=o.distanceTo(new Q.Vector3(v.x,v.y,v.z)),l=s==="third_person_back"?a:-a;this.camera.position.set(0,0,l),s==="third_person_front"?this.camera.rotation.set(0,Math.PI,0):this.camera.rotation.set(0,0,0)}else this.camera.position.z=0,this.camera.rotation.set(0,0,0),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}this.updateCameraSectionPos()}}debugChunksVisibilityOverride(){let{chunksRenderAboveOverride:t,chunksRenderBelowOverride:r,chunksRenderDistanceOverride:i,chunksRenderAboveEnabled:s,chunksRenderBelowEnabled:o,chunksRenderDistanceEnabled:v}=this.reactiveDebugParams,a=this.getSectionHeight(),l=this.cameraSectionPos.y*a;if(this.displayOptions.inWorldRenderingConfig.enableDebugOverlay&&t!==void 0||r!==void 0||i!==void 0)for(let[c,u]of Object.entries(this.sectionObjects)){if(u._waitingForChunkDisplay)continue;let[f,m,g]=c.split(",").map(Number),y=s&&t!==void 0?m<=l+t:o&&r!==void 0?m>=l-r:v&&i!==void 0?Math.abs(m-l)<=i:!0;u.visible=y}else this.chunkMeshManager.updateSectionsVisibility()}render(t=!1){if(this.currentRenderedFrames++,this.reactiveDebugParams.stopRendering)return;this.debugChunksVisibilityOverride();let r=performance.now();this.lastRendered=performance.now();let i=this.lastRenderTime>0?Math.min(Math.max((r-this.lastRenderTime)/1e3,0),.1):1/60;this.lastRenderTime=r,this.cursorBlock.render(),this.updateSectionOffsets();let s=this.getCameraPosition();if(this.skyboxRenderer.update(s,this.viewDistance),this.updateSmoothFov(),t){let u=this.renderer.getSize(new Q.Vector2);this.camera.aspect=u.width/u.height,this.camera.updateProjectionMatrix()}let o=0;if(!this.reactiveDebugParams.disableEntities){let u=performance.now();this.entities.render(),o=performance.now()-u}let v=this.cameraGroupVr instanceof Q.Group?this.cameraGroupVr.children.find(u=>u instanceof Q.PerspectiveCamera):this.camera;this.applyPendingSectionUpdates();let a=this.chunkMeshManager.globalBlockBuffer;a&&(a.setCameraOrigin(this.cameraWorldPos.x,this.cameraWorldPos.y,this.cameraWorldPos.z),a.uploadDirtyRange()),this.renderer.render(this.scene,v),this.displayOptions.inWorldRenderingConfig.showHand&&this.playerStateReactive.gameMode!=="spectator"&&this.playerStateReactive.perspective==="first_person"&&!this.renderer.xr.isPresenting&&(this.holdingBlock.render(this.camera,this.renderer,this.ambientLight,this.directionalLight),this.holdingBlockLeft.render(this.camera,this.renderer,this.ambientLight,this.directionalLight));for(let u of this.fountains)this.sectionObjects[u.sectionId]&&!this.sectionObjects[u.sectionId].foutain&&(u.createParticles(this.sectionObjects[u.sectionId]),this.sectionObjects[u.sectionId].foutain=!0),u.render();this.waypoints.render(),this.fireworks.update();for(let u of this.onRender)u(i);let c=performance.now()-r;this.worldRendererConfig.autoLowerRenderDistance&&this.chunkMeshManager.recordRenderTime(c),this.renderTimeAvgCount++,this.renderTimeAvg=(this.renderTimeAvg*(this.renderTimeAvgCount-1)+c)/this.renderTimeAvgCount,this.renderTimeMax=Math.max(this.renderTimeMax,c),this.performanceMonitor.onFrame({totalMs:c,entitiesMs:o,loadedTextureCount:this.renderer.info.memory.textures,fps:this.lastFps})}renderHead(t,r,i,s){let o;if(s.SkullOwner?o=s.SkullOwner.Properties?.textures?.[0]?.Value:o=s.profile?.properties?.find(v=>v.name==="textures")?.value,!!o)try{let a=JSON.parse(z.from(o,"base64").toString()).textures?.SKIN?.url,{skinTexturesProxy:l}=this.worldRendererConfig;l&&(a=a?.replace("http://textures.minecraft.net/",l).replace("https://textures.minecraft.net/",l));let c=Oe(this,a,Fe.head),u=new Q.Group;return i&&c.position.set(0,.3125,.3125),c.position.y-=23/16,u.add(c),this.sceneOrigin.track(u),u.position.set(t.x+.5,t.y+.045,t.z+.5),u.rotation.set(0,-Q.MathUtils.degToRad(r*(i?90:45/2)),0),u.scale.set(.8,.8,.8),u}catch{}}renderSign(t,r,i,s,o){let v=this.getSignTexture(t,o,s);if(!v)return;let a=new Q.Mesh(new Q.PlaneGeometry(1,1),new Q.MeshBasicMaterial({map:v,transparent:!0}));a.renderOrder=999;let l=7/16,c=s?1.3:1;a.scale.set(1*c,l*c,1*c);let u=(s?2:1.5)/16,f=.25/16;i&&!s?a.position.set(0,0,-.5+u+f+1e-4):a.position.set(0,0,u/2+1e-4);let m=new Q.Group;m.rotation.set(0,-Q.MathUtils.degToRad(r*(i?90:45/2)),0),m.add(a);let g=(s?10:8)/16,y=(s?0:i?4.333:9.333)/16,w=g/2+y;return this.sceneOrigin.track(m),m.position.set(t.x+.5,t.y+w,t.z+.5),m}lightUpdate(t,r){for(let i=this.worldSizeParams.minY;i<this.worldSizeParams.worldHeight;i+=16)this.setSectionDirty(new Ue(t,i,r))}rerenderAllChunks(){for(let t of Object.keys(this.sectionObjects)){let[r,i,s]=t.split(",").map(Number);this.setSectionDirty(new Ue(r,i,s))}}updateShowChunksBorder(t){this.chunkMeshManager.updateAllBoxHelpers(t)}resetWorld(){super.resetWorld(),this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.chunkMeshManager=new U5(this,this.scene,this.material,this.worldSizeParams.worldHeight,this.viewDistance),this.debugRaycastHelper&&(this.realScene.remove(this.debugRaycastHelper),this.debugRaycastHelper=void 0),this.debugHitPoint&&(this.realScene.remove(this.debugHitPoint),this.debugHitPoint=void 0)}getLoadedChunksRelative(t,r=!1){let[i,s,o]=Hr(t);return Object.fromEntries(Object.entries(this.sectionObjects).map(([v,a])=>{let[l,c,u]=v.split(",").map(Number),[f,m,g]=Hr({x:l,y:c,z:u});return[r?`${f-i},${m-s},${g-o}`:`${f-i},${g-o}`,a]}))}cleanChunkTextures(t,r){let i=this.chunkTextures.get(`${Math.floor(t/16)},${Math.floor(r/16)}`)??{};for(let s of Object.keys(i))i[s].dispose(),delete i[s];this.chunkMeshManager.cleanSignChunkTextures(t,r)}readdChunks(){for(let t of Object.keys(this.sectionObjects))this.scene.remove(this.sectionObjects[t]);setTimeout(()=>{for(let t of Object.keys(this.sectionObjects))this.scene.add(this.sectionObjects[t])},500)}disableUpdates(t=this.scene.children){for(let r of t)r.matrixWorldNeedsUpdate=!1,this.disableUpdates(r.children??[])}removeColumn(t,r){super.removeColumn(t,r),this.cleanChunkTextures(t,r),this.clearPendingSectionUpdatesForChunk(t,r);let i=this.getSectionHeight(),s=this.worldMinYRender;for(let o=s;o<this.worldSizeParams.worldHeight;o+=i){let v=`${t},${o},${r}`;this.chunkMeshManager.sectionObjects[v]&&this.chunkMeshManager.releaseSection(v)}this.chunkMeshManager.onChunkRemovedFromGate(`${t},${r}`)}updateViewerPosition(t){super.updateViewerPosition(t),this.chunkMeshManager.pendingNearReveal.size>0&&this.chunkMeshManager.tryRevealPending()}onViewerChunkPositionChanged(){this.chunkMeshManager.tryRevealPending()}setSectionDirty(...t){let[r]=t;this.cleanChunkTextures(r.x,r.z),super.setSectionDirty(...t)}static getRendererInfo(t){try{let r=t.getContext();return`${r.getParameter(r.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)}`}catch{}}worldStop(){this.media.onWorldStop()}destroy(){this.performanceMonitor?.reset(),this.pendingSectionUpdates.clear(),this.pendingSectionBufferStartTimes.clear(),this.chunkMeshManager.dispose(),this.disposeModules(),this.fireworksLegacy.destroy(),super.destroy(),this.skyboxRenderer.dispose(),this.fireworks.dispose()}shouldObjectVisible(t){let i=this.getSectionHeight(),s,o,v,a=this.sceneOrigin.getWorldPosition(t);a?(s=a.x,o=a.y,v=a.z):(s=this.sceneOrigin.toWorldX(t.position.x),o=this.sceneOrigin.toWorldY(t.position.y),v=this.sceneOrigin.toWorldZ(t.position.z));let l=Math.floor(s/16)*16,c=Math.floor(v/16)*16,u=Math.floor(o/i)*i,f=`${l},${c}`,m=`${l},${u},${c}`;return!!this.finishedChunks[f]||!!this.sectionObjects[m]}handleUserClick(t){this.media.handleUserClick(t)}updateSectionOffsets(){let t=performance.now();for(let[r,i]of Object.entries(this.sectionsOffsetsAnimations)){let s=(t-i.time)/1e3;i.time=t,i.currentOffsetX+=i.speedX*s,i.currentOffsetY+=i.speedY*s,i.currentOffsetZ+=i.speedZ*s,i.limitX!==void 0&&(i.speedX>0?i.currentOffsetX=Math.min(i.currentOffsetX,i.limitX):i.currentOffsetX=Math.max(i.currentOffsetX,i.limitX)),i.limitY!==void 0&&(i.speedY>0?i.currentOffsetY=Math.min(i.currentOffsetY,i.limitY):i.currentOffsetY=Math.max(i.currentOffsetY,i.limitY)),i.limitZ!==void 0&&(i.speedZ>0?i.currentOffsetZ=Math.min(i.currentOffsetZ,i.limitZ):i.currentOffsetZ=Math.max(i.currentOffsetZ,i.limitZ));let o=this.sectionObjects[r];o&&(o.position.set(i.currentOffsetX,i.currentOffsetY,i.currentOffsetZ),o.updateMatrix())}}reloadWorld(){this.entities.reloadEntities()}};d(mt,"FOV_TRANSITION_MS",200),d(mt,"MAX_SECTION_UPDATE_BUFFER_MS",500);var pt=mt;E();x();k();R();E();x();k();R();var Ge="1.21.4";E();x();k();R();function gt(n,e){n.aspect=e.width/e.height,n.updateProjectionMatrix()}E();x();k();R();function Ki(n,e=!1){return n?.mode?n.mode:e?"worldBlocks":pe.mode}E();x();k();R();import*as a0 from"three";E();x();k();R();function Ji(...n){let e=n.filter(r=>r.length>0).join("/"),t=typeof globalThis.location<"u"&&globalThis.location.href?globalThis.location.href:typeof import.meta<"u"&&import.meta.url?import.meta.url:`/${e}`;try{return new URL(e,t).href}catch{return`/${e}`}}var qi=new Date,_a=qi.getMonth()===11&&qi.getDate()>=24&&qi.getDate()<=26,zv=["panorama_3.webp","panorama_1.webp","panorama_4.webp","panorama_5.webp","panorama_0.webp","panorama_2.webp"],Lv=200,Qt=class{constructor(e){this.documentRenderer=e;d(this,"scene");d(this,"camera");d(this,"startTimes",new Map);d(this,"time",0);d(this,"panoramaGroup",null);this.scene=new a0.Scene,this.scene.background=new a0.Color(3294568);let t=new a0.AmbientLight(13421772);this.scene.add(t);let r=new a0.DirectionalLight(16777215,.5);r.position.set(1,1,.5).normalize(),r.castShadow=!0,this.scene.add(r),this.camera=new a0.PerspectiveCamera(85,e.canvas.width/e.canvas.height,.05,1e3),this.camera.position.set(0,0,0),this.camera.rotation.set(0,0,0)}async init(){this.buildCubemap()}update(e,t){t&&gt(this.camera,this.documentRenderer.canvas)}dispose(){this.scene.clear(),this.panoramaGroup=null,this.startTimes.clear()}buildCubemap(){let e=new a0.BoxGeometry(1e3,1e3,1e3),t=[];for(let s of zv)(async()=>{let v=Ji("background",_a?"christmas":"",s),a=await it(v),l=Pe(a);l.matrixAutoUpdate=!1,l.matrix.set(-1,0,1,0,1,0,0,0,1),l.wrapS=a0.ClampToEdgeWrapping,l.wrapT=a0.ClampToEdgeWrapping,l.minFilter=a0.LinearFilter,l.magFilter=a0.LinearFilter;let c=new a0.MeshBasicMaterial({map:l,transparent:!0,side:a0.DoubleSide,depthWrite:!1,opacity:0});this.startTimes.set(c,Date.now()),t.push(c)})().catch(v=>{});let r=new a0.Mesh(e,t);r.onBeforeRender=()=>{this.time+=.01,r.rotation.y=Math.PI+this.time*.01,r.rotation.z=Math.sin(-this.time*.001)*.001;for(let s of t){let o=this.startTimes.get(s);if(o){let v=Date.now()-o;s.opacity=Math.min(1,v/Lv)}}};let i=new a0.Object3D;if(i.add(r),!_a)for(let s=0;s<20;s++){let o=new Te("1.16.4","squid").mesh;o.position.set(Math.random()*30-15,Math.random()*20-10,Math.random()*10-17),o.rotation.set(0,Math.PI+Math.random(),-Math.PI/4,"ZYX");let v=Math.random()*.01;o.children[0].onBeforeRender=()=>{o.rotation.y+=v,o.rotation.z=Math.cos(r.rotation.y*3)*Math.PI/4-Math.PI/2},i.add(o)}this.scene.add(i),this.panoramaGroup=i}async debugImageInFrontOfCamera(){let e=await it(Ji("background","panorama_0.webp")),t=Pe(e),r=new a0.Mesh(new a0.PlaneGeometry(1e3,1e3),new a0.MeshBasicMaterial({map:t}));r.position.set(0,0,-500),this.scene.add(r)}};E();x();k();R();import*as V from"three";var wa=.1,Xi={mixed:["white_wool","cyan_wool","blue_wool","purple_wool","white_stained_glass","cyan_stained_glass","blue_stained_glass","purple_stained_glass","glowstone","sea_lantern","amethyst_block","copper_block","gold_block","diamond_block"],stainedGlass:["white_stained_glass","orange_stained_glass","magenta_stained_glass","light_blue_stained_glass","yellow_stained_glass","lime_stained_glass","pink_stained_glass","gray_stained_glass","light_gray_stained_glass","cyan_stained_glass","purple_stained_glass","blue_stained_glass","brown_stained_glass","green_stained_glass","red_stained_glass","black_stained_glass"],wool:["white_wool","orange_wool","magenta_wool","light_blue_wool","yellow_wool","lime_wool","pink_wool","gray_wool","light_gray_wool","cyan_wool","purple_wool","blue_wool","brown_wool","green_wool","red_wool","black_wool"],construction:["copper_block","exposed_copper","weathered_copper","oxidized_copper","cut_copper","exposed_cut_copper","weathered_cut_copper","oxidized_cut_copper","iron_block","gold_block","diamond_block","emerald_block","netherite_block","lapis_block","redstone_block","coal_block","quartz_block","amethyst_block","bricks","stone_bricks","deepslate_bricks","polished_blackstone"],glow:["glowstone","sea_lantern","shroomlight","ochre_froglight","verdant_froglight","pearlescent_froglight","redstone_lamp","beacon"],world:["grass_block","podzol","mycelium","dirt","coarse_dirt","rooted_dirt","mud","clay","stone","cobblestone","mossy_cobblestone","deepslate","cobbled_deepslate","tuff","calcite","sand","red_sand","gravel","snow_block","coal_ore","deepslate_coal_ore","iron_ore","deepslate_iron_ore","copper_ore","deepslate_copper_ore","gold_ore","deepslate_gold_ore","diamond_ore","deepslate_diamond_ore","emerald_ore","deepslate_emerald_ore","lapis_ore","deepslate_lapis_ore","redstone_ore","deepslate_redstone_ore","nether_gold_ore","ancient_debris","oak_log","birch_log","spruce_log","jungle_log","acacia_log","dark_oak_log","mangrove_log","cherry_log","netherrack","soul_sand","basalt","end_stone"]},Aa={galaxy:{bg:132114,fog:132114,fogD:.011,blocks:[61695,54527,47359,59647,2280703,43263],emit:[13158,8789,6724],nebula:[4403,1114146,4386],galFn:n=>new V.Color(n*.05,n*.2,n),ambient:264216,dir:3368703,pt1:43775,pt2:16729343,name:"GALAXY"},nether:{bg:917760,fog:917760,fogD:.016,blocks:[16720384,16737792,16750848,13373696,16729122,16755200],emit:[2230272,1114112,3346688],nebula:[1704960,851968,1705984],galFn:n=>new V.Color(n,n*.15,0),ambient:1573376,dir:16724736,pt1:16729088,pt2:16755200,name:"NETHER"},end:{bg:0,fog:0,fogD:.009,blocks:[7807658,11158732,5570679,14527231,3342421,12299007],emit:[655381,1572901,327696],nebula:[524312,851989,262158],galFn:n=>new V.Color(n*.4,0,n),ambient:393232,dir:10040319,pt1:11158783,pt2:4456618,name:"THE END"},cyber:{bg:2566,fog:2566,fogD:.01,blocks:[65535,65416,11206400,52479,6749952,65518],emit:[8721,6656,6690],nebula:[6674,5120,4634],galFn:n=>new V.Color(0,n,n*.6),ambient:6669,dir:65450,pt1:65484,pt2:4521728,name:"CYBER"},light:{bg:8951984,fog:7899296,fogD:.006,gradientBg:{top:14214392,mid:10531016,bottom:6846608,radial:!0},blocks:[15266559,13691135,12114175,10537208,8960240,7383272,10012927,12640511,15792383,7909608,14216447,14739711],emit:[6854864,8958176,11061488,12638456],nebula:[9480392,11059424,12637420,14215416,7901360],galFn:n=>{let e=new V.Color;return n<.4?e.lerpColors(new V.Color(16054527),new V.Color(14215423),n/.4):n<.75?e.lerpColors(new V.Color(14215423),new V.Color(11061488),(n-.4)/.35):e.lerpColors(new V.Color(11061488),new V.Color(9482464),(n-.75)/.25),e},ambient:7899296,dir:13688040,pt1:11061503,pt2:13162751,name:"LIGHT",starColor:15266047,starOpacity:.5,galaxyOpacity:.7,nebulaOpacity:.32,edgeLineColor:10010856,blockOpacity:[.42,.56]}},Uv={cruise:{pos:(n,e,t)=>({x:Math.sin(n*.28)*18+Math.cos(n*.11)*7+e*10,y:Math.sin(n*.19)*6+Math.cos(n*.31)*3+t*6,z:0}),look:(n,e,t)=>({x:Math.sin((n+.18)*.28)*18+e*8,y:Math.sin((n+.18)*.19)*6+t*4,z:-25}),roll:(n,e=0)=>e*.05+Math.sin(n*.22)*.015,spd:.18},barrel:{pos:(n,e,t)=>{let i=n*2.4;return{x:Math.cos(i)*10+e*4,y:Math.sin(i)*10+t*4,z:Math.sin(n*.4)*8}},look:n=>({x:Math.sin(n*.5)*5,y:Math.cos(n*.5)*5,z:-30}),roll:n=>n*2.4+Math.PI*.5,spd:.24},dive:{pos:(n,e,t)=>({x:Math.sin(n*.6)*30+e*8,y:Math.cos(n*.4)*18+t*6,z:Math.sin(n*.3)*12}),look:(n,e,t)=>({x:Math.sin(n*.6+.2)*30+e*6,y:Math.cos(n*.4+.2)*18-8+t*4,z:-35}),roll:(n,e=0)=>e*.08+Math.sin(n*.6)*.12,spd:.3},orbit:{pos:(n,e,t)=>({x:Math.cos(n*.5)*20+e*5,y:Math.sin(n*.25)*10+t*5,z:Math.sin(n*.5)*20}),look:()=>({x:0,y:0,z:-60}),roll:n=>Math.sin(n*.5)*.08,spd:.15},snake:{pos:(n,e,t)=>({x:Math.sin(n*1.1)*22+Math.sin(n*.37)*8+e*10,y:Math.sin(n*.7)*10+e*4+t*8,z:0}),look:(n,e,t)=>{let r=n+.12;return{x:Math.sin(r*1.1)*22+Math.sin(r*.37)*8+e*8,y:Math.sin(r*.7)*10+t*6,z:-22}},roll:(n,e=0)=>e*.1+Math.sin(n*1.1)*.06,spd:.22}},Gv={cruise:1,barrel:1.6,dive:2.2,orbit:.7,snake:1.4},Nv=250,sr=1e4,or=3e3,Kt=n=>n[Math.floor(Math.random()*n.length)],Zi=n=>"#"+n.toString(16).padStart(6,"0"),Ea=n=>{if(typeof document>"u")return null;let e=document.createElement("canvas");e.width=4,e.height=512;let t=e.getContext("2d");if(!t)return null;let r=e.width,i=e.height,s=n.radial?t.createRadialGradient(r/2,i*.32,0,r/2,i*.32,i*.85):t.createLinearGradient(0,0,0,i);s.addColorStop(0,Zi(n.top)),n.mid!=null&&s.addColorStop(.45,Zi(n.mid)),s.addColorStop(1,Zi(n.bottom)),t.fillStyle=s,t.fillRect(0,0,r,i);let o=new V.CanvasTexture(e);return o.needsUpdate=!0,o},bt=class{constructor(e,t={},r){this.documentRenderer=e;this.abortSignal=r;d(this,"scene");d(this,"camera");d(this,"ambient");d(this,"dir");d(this,"pt1");d(this,"pt2");d(this,"blocks",[]);d(this,"bGroup",new V.Group);d(this,"galaxy");d(this,"nebula");d(this,"stars");d(this,"galGeo");d(this,"nebGeo");d(this,"bGeo",new V.BoxGeometry(1,1,1));d(this,"eGeo",new V.EdgesGeometry(this.bGeo));d(this,"curScene");d(this,"curCam");d(this,"blockGroup");d(this,"cameraSpeed");d(this,"blockSpeed");d(this,"camT",0);d(this,"mx",0);d(this,"my",0);d(this,"tmx",0);d(this,"tmy",0);d(this,"transitioning",!1);d(this,"useMinecraftTextures",!1);d(this,"resourcesManager");d(this,"atlasTexture",null);d(this,"blockMaterialPool",new Map);d(this,"gradientSky",null);d(this,"gradientSkyTexture",null);d(this,"disposed",!1);d(this,"animTime",0);let i=pe;this.curScene=t.initialScene??i.futuristicScene,this.curCam=t.initialCamera??i.futuristicCamera,this.blockGroup=t.initialBlockGroup??i.futuristicBlockGroup,this.cameraSpeed=t.initialCameraSpeed??f5.camera,this.blockSpeed=t.initialBlockSpeed??f5.block,this.useMinecraftTextures=t.useMinecraftTextures??i.minecraftTextures,this.resourcesManager=t.resourcesManager;let s=Aa[this.curScene];this.scene=new V.Scene,this.scene.fog=new V.FogExp2(s.fog,s.fogD),this.applyScenePalette(s),this.camera=new V.PerspectiveCamera(80,this.documentRenderer.canvas.width/this.documentRenderer.canvas.height,.1,700),this.ambient=new V.AmbientLight(s.ambient,2.5),this.scene.add(this.ambient),this.dir=new V.DirectionalLight(s.dir,4),this.dir.position.set(1,1,0),this.scene.add(this.dir),this.pt1=new V.PointLight(s.pt1,5,100),this.scene.add(this.pt1),this.pt2=new V.PointLight(s.pt2,4,80),this.pt2.position.set(30,20,-30),this.scene.add(this.pt2);for(let f=0;f<Nv;f++)this.spawnBlock(s,!0);if(!this.useMinecraftTextures){let f=s.edgeLineColor??62975;for(let m=0;m<40;m++){let g=new V.LineBasicMaterial({color:f,transparent:!0,opacity:.25});Kt(this.blocks).mesh.add(new V.LineSegments(this.eGeo,g))}}this.scene.add(this.bGroup);let o=new V.BufferGeometry,v=new Float32Array(5e3*3);for(let f=0;f<5e3*3;f++)v[f]=(Math.random()-.5)*500;o.setAttribute("position",new V.BufferAttribute(v,3)),this.stars=new V.Points(o,new V.PointsMaterial({color:s.starColor??16777215,size:.3,transparent:!0,opacity:s.starOpacity??.7,sizeAttenuation:!0})),this.scene.add(this.stars),this.galGeo=new V.BufferGeometry;let a=new Float32Array(sr*3),l=new Float32Array(sr*3);for(let f=0;f<sr;f++){let m=f%3,g=Math.random(),y=m/3*Math.PI*2+g*Math.PI*5,w=g*90+Math.random()*10,b=(1-g)*18;a[f*3]=Math.cos(y)*w+(Math.random()-.5)*b,a[f*3+1]=(Math.random()-.5)*7,a[f*3+2]=Math.sin(y)*w+(Math.random()-.5)*b-180;let A=.2+g*.8,C=s.galFn(A);l[f*3]=C.r,l[f*3+1]=C.g,l[f*3+2]=C.b}this.galGeo.setAttribute("position",new V.BufferAttribute(a,3)),this.galGeo.setAttribute("color",new V.BufferAttribute(l,3)),this.galaxy=new V.Points(this.galGeo,new V.PointsMaterial({size:.9,vertexColors:!0,transparent:!0,opacity:s.galaxyOpacity??.55,sizeAttenuation:!0})),this.scene.add(this.galaxy),this.nebGeo=new V.BufferGeometry;let c=new Float32Array(or*3),u=new Float32Array(or*3);for(let f=0;f<or;f++){let m=25+Math.random()*110,g=Math.random()*Math.PI*2,y=(Math.random()-.5)*Math.PI*.5;c[f*3]=m*Math.cos(g)*Math.cos(y),c[f*3+1]=m*Math.sin(y)*.6,c[f*3+2]=m*Math.sin(g)*Math.cos(y)-80;let w=new V.Color(Kt(s.nebula));u[f*3]=w.r,u[f*3+1]=w.g,u[f*3+2]=w.b}this.nebGeo.setAttribute("position",new V.BufferAttribute(c,3)),this.nebGeo.setAttribute("color",new V.BufferAttribute(u,3)),this.nebula=new V.Points(this.nebGeo,new V.PointsMaterial({size:3,vertexColors:!0,transparent:!0,opacity:s.nebulaOpacity??.3,sizeAttenuation:!0})),this.scene.add(this.nebula),this.addBackgroundTextPlane(),this.setupMouseTracking()}async init(){if(this.useMinecraftTextures)try{await this.loadMinecraftTextures()}catch{this.useMinecraftTextures=!1}}applyScenePalette(e){if(this.documentRenderer.renderer.setClearColor(e.bg),e.gradientBg)if(this.scene.background=null,this.gradientSky){if(this.gradientSky.visible=!0,this.gradientSkyTexture&&e.gradientBg){let s=Ea(e.gradientBg);s&&(this.gradientSkyTexture.dispose(),this.gradientSkyTexture=s,this.gradientSky.material.map=s,this.gradientSky.material.needsUpdate=!0)}}else{let s=Ea(e.gradientBg);s?(this.gradientSkyTexture=s,this.gradientSky=new V.Mesh(new V.PlaneGeometry(900,700),new V.MeshBasicMaterial({map:s,depthWrite:!1,side:V.DoubleSide})),this.gradientSky.position.set(0,0,-280),this.gradientSky.renderOrder=-1e3,this.scene.add(this.gradientSky)):this.scene.background=new V.Color(e.bg)}else this.scene.background=new V.Color(e.bg),this.gradientSky&&(this.gradientSky.visible=!1);this.scene.fog instanceof V.FogExp2&&(this.scene.fog.color.set(e.fog),this.scene.fog.density=e.fogD);let t=this.stars?.material;t&&(t.color.set(e.starColor??16777215),t.opacity=e.starOpacity??.7);let r=this.galaxy?.material;r&&(r.opacity=e.galaxyOpacity??.55);let i=this.nebula?.material;i&&(i.opacity=e.nebulaOpacity??.3)}setupMouseTracking(){let e=r=>{let i=typeof window<"u"?window.innerWidth:this.documentRenderer.canvas.width,s=typeof window<"u"?window.innerHeight:this.documentRenderer.canvas.height;this.tmx=(r.clientX/i-.5)*2,this.tmy=-(r.clientY/s-.5)*2};(typeof document<"u"?document:void 0)?.addEventListener("mousemove",e,{signal:this.abortSignal})}addBackgroundTextPlane(){let r=typeof document<"u"?document.createElement("canvas"):null;if(!r)return;r.width=2048,r.height=768;let i=r.getContext("2d");if(!i)return;i.clearRect(0,0,2048,768),i.save(),i.font="bold 560px Orbitron, sans-serif",i.textAlign="center",i.textBaseline="middle",i.shadowColor="rgba(0,200,255,0.35)",i.shadowBlur=80,i.fillStyle="rgba(255,255,255,0.055)",i.fillText("V2",2048*.28,768*.5),i.restore(),i.save(),i.font="bold 148px Orbitron, sans-serif",i.textAlign="center",i.textBaseline="middle",i.shadowColor="rgba(0,200,255,0.2)",i.shadowBlur=40,i.fillStyle="rgba(255,255,255,0.038)",i.fillText("by ZARDOY",2048*.72,768*.52),i.restore();let s=new V.CanvasTexture(r),o=new V.Mesh(new V.PlaneGeometry(280,105),new V.MeshBasicMaterial({map:s,transparent:!0,opacity:1,depthWrite:!1,side:V.DoubleSide,blending:V.AdditiveBlending}));o.position.set(8,4,-320),this.scene.add(o)}spawnBlock(e,t,r){let i=this.createBlockMaterial(e,r),s=new V.Mesh(this.bGeo,i),o=.3+Math.random()*3;s.scale.setScalar(o),s.position.set((Math.random()-.5)*140,(Math.random()-.5)*70,t?-(Math.random()*140):-155-Math.random()*30),s.rotation.set(Math.random()*Math.PI*2,Math.random()*Math.PI*2,Math.random()*Math.PI*2);let v={mesh:s,spd:.04+Math.random()*.12,dx:(Math.random()-.5)*.012,dy:(Math.random()-.5)*.008,rx:(Math.random()-.5)*.012,ry:(Math.random()-.5)*.012,rz:(Math.random()-.5)*.01,minecraftBlockName:r};this.blocks.push(v),this.bGroup.add(s)}createBlockMaterial(e,t){if(this.useMinecraftTextures&&t){let s=this.blockMaterialPool.get(t);if(s)return s.clone()}let[r,i]=e.blockOpacity??[.32,.46];return new V.MeshBasicMaterial({color:Kt(e.blocks),transparent:!0,opacity:r+Math.random()*(i-r),depthWrite:!1,blending:V.AdditiveBlending})}removeBlockEdgeLines(){for(let e of this.blocks){let t=e.mesh.children.filter(r=>r instanceof V.LineSegments);for(let r of t){e.mesh.remove(r),r.geometry?.dispose();let i=r.material;Array.isArray(i)?i.forEach(s=>s.dispose()):i.dispose()}}}async ensureMcDataLoaded(){let e=globalThis._LOAD_MC_DATA;e&&await e()}resolveBlockAtlasUv(e,t,r){let i=s=>{let o=t[s];return o?{u:o.u,v:o.v,su:o.su??r.suSv,sv:o.sv??r.suSv}:null};if(t[e])return i(e);for(let s of["_top","_side","_front","_0"]){let o=i(`${e}${s}`);if(o)return o}for(let s of Object.keys(t))if(s.startsWith(e))return i(s);return null}async loadMinecraftTextures(){await this.ensureMcDataLoaded();let e=this.resourcesManager??new fe;if(!e.currentResources?.blocksAtlasImage){if(typeof document>"u")throw new Error("Menu atlas missing in worker; pass resourcesManager from main thread");e.currentConfig={...e.currentConfig,version:Ge,noInventoryGui:!0},await e.updateAssetsData?.({})}let r=e.currentResources;if(!r?.blocksAtlasImage||!r.blocksAtlasJson)throw new Error("Block atlas not available");let i=r.blocksAtlasJson,s=i.textures;this.atlasTexture=Pe(r.blocksAtlasImage),this.atlasTexture.flipY=!1,this.atlasTexture.needsUpdate=!0;for(let o of Xi[this.blockGroup]){let v=this.resolveBlockAtlasUv(o,s,i);if(!v)continue;let a=this.atlasTexture.clone();a.flipY=!1,a.offset.set(v.u,v.v),a.repeat.set(v.su,v.sv),a.needsUpdate=!0;let l=o.includes("glass"),c=new V.MeshBasicMaterial({map:a,side:V.DoubleSide,transparent:l,opacity:l?.85:1,alphaTest:l?.08:0,depthWrite:!0,toneMapped:!1});this.blockMaterialPool.set(o,c)}if(this.blockMaterialPool.size===0)throw new Error("No block textures resolved from atlas (check block names vs atlas keys)");this.removeBlockEdgeLines();for(let o of this.blocks){let v=Kt([...this.blockMaterialPool.keys()]);o.minecraftBlockName=v,o.mesh.material=this.blockMaterialPool.get(v).clone()}}setScene(e){if(!$e.includes(e)||e===this.curScene||this.transitioning)return;this.transitioning=!0,this.curScene=e;let t=Aa[e];setTimeout(()=>{if(this.disposed)return;this.applyScenePalette(t),this.ambient.color.set(t.ambient),this.dir.color.set(t.dir),this.pt1.color.set(t.pt1),this.pt2.color.set(t.pt2);for(let s of this.blocks)this.useMinecraftTextures&&s.minecraftBlockName||s.mesh.material instanceof V.MeshBasicMaterial&&s.mesh.material.color.set(Kt(t.blocks));let r=this.nebGeo.attributes.color;for(let s=0;s<or;s++){let o=new V.Color(Kt(t.nebula));r.setXYZ(s,o.r,o.g,o.b)}r.needsUpdate=!0;let i=this.galGeo.attributes.color;for(let s=0;s<sr;s++){let o=.2+Math.random()*.8,v=t.galFn(o);i.setXYZ(s,v.r,v.g,v.b)}i.needsUpdate=!0,this.transitioning=!1},150)}setCamera(e){et.includes(e)&&(this.curCam=e)}setCameraSpeed(e){this.cameraSpeed=Math.max(0,e)}setBlockSpeed(e){this.blockSpeed=Math.max(0,e)}async setBlockGroup(e){if(tt.includes(e)&&e!==this.blockGroup&&(this.blockGroup=e,!(!this.useMinecraftTextures||this.disposed))){for(let t of this.blockMaterialPool.values())t.map?.dispose(),t.dispose();this.blockMaterialPool.clear();try{await this.loadMinecraftTextures()}catch{}}}getSceneId(){return this.curScene}getCameraId(){return this.curCam}getBlockGroupId(){return this.blockGroup}update(e,t){t&&gt(this.camera,this.documentRenderer.canvas);let r=Uv[this.curCam],i=this.cameraSpeed,s=this.blockSpeed;this.camT+=e*r.spd*i,this.mx+=(this.tmx-this.mx)*.05,this.my+=(this.tmy-this.my)*.05;let o=this.mx*wa,v=this.my*wa,a=r.pos(this.camT,o,v),l=r.look(this.camT,o,v);this.camera.position.set(a.x,a.y,a.z),this.camera.lookAt(l.x,l.y,l.z),this.camera.rotation.z=r.roll(this.camT,o);let c=Gv[this.curCam]*s;this.animTime+=e*1e3*s;for(let u of this.blocks){if(u.mesh.position.z+=u.spd*c*60*e,u.mesh.position.x+=u.dx*60*e*s,u.mesh.position.y+=u.dy*60*e*s,u.mesh.rotation.x+=u.rx*c,u.mesh.rotation.y+=u.ry*c,u.mesh.rotation.z+=u.rz,!this.useMinecraftTextures&&u.mesh.material instanceof V.MeshBasicMaterial){let f=u.mesh.userData.baseOpacity??.38;u.mesh.userData.baseOpacity==null&&(u.mesh.userData.baseOpacity=f);let m=.88+Math.abs(Math.sin(this.animTime*8e-4+u.mesh.position.x*.3))*.12;u.mesh.material.opacity=f*m}u.mesh.position.z>this.camera.position.z+15&&u.mesh.position.set((Math.random()-.5)*140,(Math.random()-.5)*70,this.camera.position.z-155-Math.random()*30)}this.pt1.position.set(Math.sin(this.camT*.8)*25+this.camera.position.x,Math.cos(this.camT*.6)*12+this.camera.position.y,this.camera.position.z-18),this.pt2.position.set(Math.cos(this.camT*.5)*20+this.camera.position.x,Math.sin(this.camT*.9)*15+this.camera.position.y,this.camera.position.z-30),this.galaxy.rotation.y+=e*.006*s,this.nebula.rotation.y-=e*.003*s,this.stars.rotation.y+=e*4e-4*s}dispose(){this.disposed=!0,this.scene.clear(),this.bGeo.dispose(),this.eGeo.dispose(),this.galGeo.dispose(),this.nebGeo.dispose(),this.gradientSkyTexture?.dispose(),this.atlasTexture?.dispose();for(let e of this.blockMaterialPool.values())e.map?.dispose(),e.dispose();this.blockMaterialPool.clear()}};E();x();k();R();import*as qt from"three";import{Vec3 as Ra}from"vec3";E();x();k();R();import Wv from"prismarine-world";import Vv from"prismarine-chunk";var xa=n=>{let e=Wv(n),t=Vv(n),r=new e(n).sync,i=jv(r);for(let s of i)if(s.startsWith("set")&&s!=="setColumn"){let o=r[s].bind(r);r[s]=(...v)=>{let a=v[0];a.x!==void 0&&!r.getColumnAt(a)&&r.setColumn(Math.floor(a.x/16),Math.floor(a.z/16),new t(void 0)),o(...v)}}return r};function jv(n){let e=new Set,t=n;do for(let r of Object.getOwnPropertyNames(t))typeof n[r]=="function"&&r!=="constructor"&&e.add(r);while(t=Object.getPrototypeOf(t));return[...e]}var Jt=class{constructor(e,t,r){this.documentRenderer=e;this.options=t;this.abortSignal=r;d(this,"_scene");d(this,"_camera");d(this,"worldRenderer");d(this,"WorldRendererClass",pt);this._scene=new qt.Scene,this._scene.background=new qt.Color(3294568),this._camera=new qt.PerspectiveCamera(85,e.canvas.width/e.canvas.height,.05,1e3),this.camera.position.set(0,0,0),this.camera.rotation.set(0,0,0)}get scene(){return this._scene}get camera(){return this._camera}async init(){let e=Ge,t=new fe;if(t.currentConfig={version:e,noInventoryGui:!0},await t.updateAssetsData?.({}),this.abortSignal.aborted)return;let r=xa(e),s=Fa("prismarine-block")(e),v=globalThis.mcData.blocksArray.filter(m=>{if(!m.name.includes("stained_glass"))return!1;let g=s.fromStateId(m.defaultState,0);if(g.shapes?.length!==1)return!1;let y=g.shapes[0];return y[0]===0&&y[1]===0&&y[2]===0&&y[3]===1&&y[4]===1&&y[5]===1}),a=-15,l=100,c=100;for(let m=-l;m<l;m++)for(let g=-c;g<c;g++){let y=v[Math.floor(Math.random()*v.length)];r.setBlockStateId(new Ra(m,g,a),y.defaultState)}this._camera.updateProjectionMatrix(),this._camera.position.set(.5,c/2+.5,.5),this._camera.rotation.set(0,0,0);let u=new Ra(...this._camera.position.toArray()),f=new Xe(r,2,u);this.abortSignal.aborted||(this.worldRenderer=new this.WorldRendererClass(this.documentRenderer.renderer,this.options,{version:e,worldView:f,inWorldRenderingConfig:s5,playerStateReactive:T2().reactive,rendererState:Ke().reactive,nonReactiveState:Ke().nonReactive,resourcesManager:t}),this.worldRenderer instanceof pt&&(this._scene=this.worldRenderer.realScene,this._camera=this.worldRenderer.camera),f.init(u),await this.worldRenderer.waitForChunksToRender(),!this.abortSignal.aborted&&this.setupMouseParallax())}update(e,t){t&&gt(this.camera,this.documentRenderer.canvas)}dispose(){this.worldRenderer?.destroy(),this.worldRenderer=void 0,this._scene.clear()}setupMouseParallax(){let e=this._camera,t=e.position.x,r=e.position.y,i;document.body.addEventListener("pointermove",s=>{if(s.pointerType!=="mouse")return;let o=.2,v=s.clientX/window.innerWidth-.5,a=-(s.clientY/window.innerHeight-.5);i?.stop(),i=new F0(e.position).to({x:t+v*o,y:r+a*o},0),i.start(),e.updateProjectionMatrix()},{signal:this.abortSignal})}};E();x();k();R();import*as ka from"three";var Zt=class{constructor(e,t,r={},i=!1){this.documentRenderer=e;this.options=t;d(this,"active");d(this,"abortController",new AbortController);d(this,"mode");d(this,"lastFrameTime",0);this.mode=Ki(r,i)}get futuristic(){return this.active instanceof bt?this.active:void 0}get scene(){return this.active?.scene}get camera(){return this.active?.camera}async start(e={}){this.active=this.createImplementation(e),await this.active.init(),this.active.scene.background instanceof ka.Color&&this.documentRenderer.renderer.setClearColor(this.active.scene.background),this.lastFrameTime=performance.now(),this.documentRenderer.render=(t=!1)=>{let r=performance.now(),i=Math.min((r-this.lastFrameTime)/1e3,.05);this.lastFrameTime=r;let s=this.active;s&&(s.update(i,t),this.documentRenderer.renderer.render(s.scene,s.camera))}}createImplementation(e){switch(this.mode){case"futuristic":return new bt(this.documentRenderer,{useMinecraftTextures:e.useMinecraftTextures,initialScene:e.futuristicScene,initialCamera:e.futuristicCamera,initialBlockGroup:e.futuristicBlockGroup,initialCameraSpeed:e.futuristicCameraSpeed,initialBlockSpeed:e.futuristicBlockSpeed,resourcesManager:e.resourcesManager},this.abortController.signal);case"worldBlocks":return new Jt(this.documentRenderer,this.options,this.abortController.signal);default:return new Qt(this.documentRenderer)}}dispose(){this.active?.dispose(),this.active=void 0,this.abortController.abort()}};G5.ColorManagement.enabled=!1;globalThis.THREE=G5;var Ta=n=>({updateMap:n.entities.updateMap.bind(n.entities),updateCustomBlock:n.updateCustomBlock.bind(n),getBlockInfo:n.getBlockInfo.bind(n),playEntityAnimation:n.entities.playAnimation.bind(n.entities),damageEntity:n.entities.handleDamageEvent.bind(n.entities),updatePlayerSkin:n.entities.updatePlayerSkin.bind(n.entities),changeHandSwingingState:n.changeHandSwingingState.bind(n),getHighestBlocks:n.getHighestBlocks.bind(n),reloadWorld:n.reloadWorld.bind(n),updateEntityModel:n.entities.updateEntityModel.bind(n.entities),playEntityModelAnimation:n.entities.playEntityModelAnimation.bind(n.entities),addMedia:n.media.addMedia.bind(n.media),destroyMedia:n.media.destroyMedia.bind(n.media),setControlMode:n.media.setControlMode.bind(n.media),setVideoPlaying:n.media.setVideoPlaying.bind(n.media),setVideoSeeking:n.media.setVideoSeeking.bind(n.media),setVideoVolume:n.media.setVideoVolume.bind(n.media),setVideoSpeed:n.media.setVideoSpeed.bind(n.media),handleUserClick:n.media.handleUserClick.bind(n.media),addSectionAnimation(e,t){n.sectionsOffsetsAnimations[e]=t},removeSectionAnimation(e){delete n.sectionsOffsetsAnimations[e]},shakeFromDamage:n.cameraShake.shakeFromDamage.bind(n.cameraShake),onPageInteraction:n.media.onPageInteraction.bind(n.media),downloadMesherLog:n.downloadMesherLog.bind(n),explodeFirework:n.fireworksLegacy.explode.bind(n.fireworksLegacy),explodeFireworkFacingCamera:n.fireworksLegacy.explodeFacingCamera.bind(n.fireworksLegacy),addWaypoint:n.waypoints.addWaypoint.bind(n.waypoints),removeWaypoint:n.waypoints.removeWaypoint.bind(n.waypoints),startCinimaticScript:n.cinimaticScript.startScript.bind(n.cinimaticScript),stopCinimaticScript:n.cinimaticScript.stopScript.bind(n.cinimaticScript),launchFirework:n.fireworks.launchFirework.bind(n.fireworks),setSkyboxImage:n.skyboxRenderer.setSkyboxImage.bind(n.skyboxRenderer),setRain:e=>n.toggleModule("rain",e),spawnBlockBreakParticles(e,t,r,i,s,o){n.getModule("blockBreakParticles")?.spawnBlockBreakParticles(e,t,r,i,s,o)},spawnBlockCrackParticle(e,t,r,i,s,o,v){n.getModule("blockBreakParticles")?.spawnCrackParticle(e,t,r,i,s,o,v)},async loadGeometryExport(e){let{applyWorldGeometryExport:t}=await Promise.resolve().then(()=>(Fi(),X3));return t(n,e)},feedChunkPacket(e){let{kind:t,...r}=e,i={type:t,...r};for(let s of n.workers)s.postMessage(i)}}),Qv=[],ar=(n,...e)=>{for(let t of Object.values(globalThis.loadedMods??{}))try{t.threeJsBackendModule?.[n]?.(...e)}catch(r){let i=`[mod three.js] Error calling ${n} on ${t.name}: ${r}`;throw new Error(i)}},Ma=()=>{let n,e=null,t=null,r=null,i=null,s=(c,u)=>{y0?n=a1(c,Qv,globalThis):n=c,e=new l5(n,u?.canvas),globalThis.renderer=e.renderer,globalThis.documentRenderer=e,globalThis.threeJsBackend=l,ar("default",l)},o=async c=>{if(!e)throw new Error("Document renderer not initialized");r&&(r.destroy(),r=null,i=null,globalThis.world=void 0,globalThis.frameTimingCollector=void 0),t&&(t.dispose(),t=null);let u={...n.config.menuBackground,...c};t=new Zt(e,{...n},u,!!F.env.SINGLE_FILE_BUILD_MODE),ar("menuBackgroundCreated",t),await t.start(u),ar("menuBackgroundReady",t)},v=async c=>{let f=y0?a1(c,[fe,Ze],globalThis):c;if(!e)throw new Error("Document renderer not initialized");e.nonReactiveState=f.nonReactiveState,globalThis.resourcesManager=f.resourcesManager,t&&(t.dispose(),t=null),r=new pt(e.renderer,n,f),await r.worldReadyPromise,i=new v1(f.nonReactiveState),globalThis.frameTimingCollector=i;let m=e.render;e.render=function(g){m.call(this,g),i?.markFrameStart(),f.inWorldRenderingConfig.paused||r?.render(g),i?.markFrameEnd(),i?.markFrameDisplay()},e.inWorldRenderingConfig=f.inWorldRenderingConfig,globalThis.world=r,ar("worldReady",r)},a=()=>{t&&(t.dispose(),t=null),e&&e.dispose(),r&&(r.destroy(),r=null)},l={id:"threejs",displayName:`three.js ${G5.REVISION}`,startMenuBackground:o,startWorld:v,disconnect:a,setRendering(c){e.setPaused(!c),r&&(r.renderingActive=c)},getMenuBackground:()=>t??void 0,getDebugOverlay:()=>({get entitiesString(){return r?.entities.getDebugString()},get left(){return{"Geo Memory":r?.chunkMeshManager.getEstimatedMemoryUsage().total??"-"}}}),updateCamera(c,u,f){i?.markCameraUpdate(!c),r?.setFirstPersonCamera(c,u,f)},get soundSystem(){return r?.soundSystem},get backendMethods(){if(r)return Ta(r)}};return{main:{init:s,backend:l},workerProxy(){return $2({init(c,u){s(c,{canvas:u})},updateSizeExternal(c,u,f){e?.updateSizeExternal(c,u,f)},startMenuBackground:o,startWorld:v,disconnect:a,setRendering:l.setRendering,updateCamera(c,u,f){let m=c?new Yv(c.x,c.y,c.z):null;i?.markCameraUpdate(!m),l.updateCamera(m,u,f)},async callBackendMethod(c,...u){if(!r)throw new Error("World renderer not initialized");let m=Ta(r)[c];if(!m)throw new Error(`Backend method ${String(c)} is unavailable`);return m(...u)}})}}};var vr=n=>{let{main:e}=Ma();return e.init(n),e.backend};vr.id="threejs";vr.displayName="three.js Blocking";vr.description="Simple, old and stable main thread graphics backend providing balanced performance on top of WebGL2.";E();x();k();R();import*as Sa from"three";function Kv(n){let e="threeWorker.js",t;if(F.env.SINGLE_FILE_BUILD){let r=document.getElementById("three-worker-code").textContent,i=new Blob([r],{type:"text/javascript"});t=new Worker(window.URL.createObjectURL(i))}else t=new Worker(e);return t.onmessage=({data:r})=>{n(r)},t.on&&t.on("message",r=>{t.onmessage({data:r})}),t}var lr=async n=>{let e=Kv(()=>{}),t=es(e),r=Rr();r.onSizeChanged((v,a)=>{t.updateSizeExternal(v,a,window.devicePixelRatio||1)});let i=m5(n,e);try{t.init(i,r.canvas)}catch(v){throw Mt(i),v}let s=new Proxy({},{get(v,a){if(typeof a=="string")return async(...l)=>t.callBackendMethod(a,...l)}});return{id:"threejs",displayName:`three.js ${Sa.REVISION}`,async startMenuBackground(v){let a=v?.resourcesManager?.currentResources?.mcData;if(a){let c={...nt,items:"itemsArray",entities:"entitiesArray"};await Lr([e],Ge,c,a)}let l=m5(v??{},e);try{await t.startMenuBackground(structuredClone(l))}catch(c){throw Mt(l),c}},async startWorld(v){let a={...nt,items:"itemsArray",entities:"entitiesArray"};await Lr([e],v.version,a,v.resourcesManager.currentResources.mcData),v.inWorldRenderingConfig.__syncToWorker=!0,v.playerStateReactive&&(v.playerStateReactive.__syncToWorker=!0),v.rendererState&&(v.rendererState.__syncFromWorker=!0),v.nonReactiveState&&(v.nonReactiveState.__syncFromWorker=!0),v.nonReactiveState.__syncFromWorkerInterval=200;let l=m5(v,e);try{await t.startWorld(structuredClone(l))}catch(u){throw Mt(l),u}t.updateSizeExternal(r.size.width,r.size.height,window.devicePixelRatio||1);let c=Ct("fps");setInterval(()=>{let{fps:u,avgRenderTime:f,worstRenderTime:m}=v.nonReactiveState;c.updateText(`FPS: ${u.toFixed(0)} (${f.toFixed(0)}ms/${m.toFixed(0)}ms)`),v.nonReactiveState.fps=0},1e3)},disconnect(){r.destroy(),t.disconnect(),e.terminate()},setRendering(v){t.setRendering(v)},updateCamera(v,a,l){t.updateCamera(v?{x:v.x,y:v.y,z:v.z}:null,a,l)},soundSystem:void 0,backendMethods:s}};lr.id="threejs-off-thread";lr.displayName="three.js Multi-thread";lr.description=["Edge-cutting technology that uses a dedicated thread for graphics.","Slightly higher power and RAM usage.","More stable FPS (mid-range devices), but possible inputlag if TPS is low.","On low-end devices it might result in device throttling and stuttering."].join(" ");export{L2 as AppViewer,Qt as ClassicMenuBackground,l5 as DocumentRenderer,et as FUTURISTIC_CAMERA_IDS,d5 as FUTURISTIC_CAMERA_LABELS,$e as FUTURISTIC_SCENE_IDS,c5 as FUTURISTIC_SCENE_LABELS,bt as FuturisticMenuBackground,pr as HIGH_TEXTURE_COUNT,q5 as LONG_RENDER_TIME_MS,mr as LOW_FPS_THRESHOLD,kt as LoadedResourcesTransferrable,p5 as MC_RENDERER_DEBUG_OVERLAY_CLASS,Ge as MENU_BACKGROUND_MC_VERSION,f5 as MENU_BACKGROUND_MOTION_DEFAULTS,pe as MENU_BACKGROUND_OPTION_DEFAULTS,Xi as MINECRAFT_BLOCK_GROUPS,tt as MINECRAFT_BLOCK_GROUP_IDS,u5 as MINECRAFT_BLOCK_GROUP_LABELS,Zt as MenuBackgroundRenderer,n5 as PerformanceMonitor,U2 as RENDERER_DEFAULT_OPTIONS,G2 as RENDERER_OPTIONS_META,N2 as RENDERER_RENDER_GUI_SECTIONS,fe as ResourcesManager,Jt as WorldBlocksMenuBackground,Xe as WorldView,Ze as WorldViewWorker,Rr as addCanvasForWorker,E6 as applyMenuBackgroundLiveOptions,Yu as applyRendererEnableLighting,M6 as applyRendererOptions,Vu as applyRendererWorldViewOptions,Et as chunkPos,lr as createGraphicsBackendOffThread,vr as createGraphicsBackendSingleThread,il as createWorldRendererConfig,R2 as defaultGraphicsBackendConfig,hr as defaultPerformanceInstabilityFactors,s5 as defaultWorldRendererConfig,S2 as delayedIterator,gr as formatPerformanceFactorsDebug,Ke as getDefaultRendererState,Q2 as getInitialPlayerState,B6 as getInitialPlayerStateRenderer,C6 as getPlayerStateUtils,y0 as isWebWorker,Wu as menuBackgroundOptionsFromStorage,_e as menuBackgroundSpeedToMultiplier,f6 as migrateRendererOptions,kr as rendererShaderCubeDebugModeToValue,Ja as sectionPos,ju as subscribeRendererOptions};
21509
21509
  /*! Bundled license information:
21510
21510
 
21511
21511
  @jspm/core/nodelibs/browser/chunk-DtuTasat.js: