!function(){class e extends THREE.Loader{constructor(e){super(e),this.debug=!1,this.group=null,this.materials=[],this.meshes=[]}load(e,s,t,a){const i=this,r=""===this.path?THREE.LoaderUtils.extractUrlBase(e):this.path,n=new THREE.FileLoader(this.manager);n.setPath(this.path),n.setResponseType("arraybuffer"),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(e,(function(t){try{s(i.parse(t,r))}catch(s){a?a(s):console.error(s),i.manager.itemError(e)}}),t,a)}parse(e,s){this.group=new THREE.Group,this.materials=[],this.meshes=[],this.readFile(e,s);for(let e=0;ee.byteLength&&this.debugMessage("Bad chunk size for chunk at "+s)}readChunk(){if(this.endOfChunk)return null;try{const e=new s(this.data,this.position,this.debugMessage);return this.position+=e.size,e}catch(e){return this.debugMessage("Unable to read chunk at "+this.position),null}}get hexId(){return this.id.toString(16)}get endOfChunk(){return this.position>=this.end}readByte(){const e=this.data.getUint8(this.position,!0);return this.position+=1,e}readFloat(){try{const e=this.data.getFloat32(this.position,!0);return this.position+=4,e}catch(e){return this.debugMessage(e+" "+this.position+" "+this.data.byteLength),0}}readInt(){const e=this.data.getInt32(this.position,!0);return this.position+=4,e}readShort(){const e=this.data.getInt16(this.position,!0);return this.position+=2,e}readDWord(){const e=this.data.getUint32(this.position,!0);return this.position+=4,e}readWord(){const e=this.data.getUint16(this.position,!0);return this.position+=2,e}readString(){let e="",s=this.readByte();for(;s;)e+=String.fromCharCode(s),s=this.readByte();return e}}const t=19789,a=15786,i=49725,r=2,n=16,d=17,o=18,h=19,u=48,g=49,l=15677,c=15678,p=256,M=45055,f=40960,b=40976,m=40992,k=41008,E=41024,y=41040,C=41089,w=41091,F=41093,x=41095,T=41472,R=41488,H=41520,W=41476,B=41728,S=41812,U=41814,D=41816,I=41818,A=16384,O=16640,P=16656,G=16672,L=16688,v=16704,N=16736;THREE.TDSLoader=e}();