>>8^F[(c^u.charCodeAt(o))&255];return c^-1}r.exports=function(u,g){if(typeof u>"u"||!u.length)return 0;var v=l.getTypeOf(u)!=="string";return v?n(g|0,u,u.length,0):m(g|0,u,u.length,0)}},{"./utils":32}],5:[function(e,r,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(e,r,s){var l=null;typeof Promise<"u"?l=Promise:l=e("lie"),r.exports={Promise:l}},{lie:37}],7:[function(e,r,s){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=e("pako"),h=e("./utils"),n=e("./stream/GenericWorker"),m=l?"uint8array":"array";s.magic="\b\0";function c(u,g){n.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=g,this.meta={}}h.inherits(c,n),c.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(h.transformTo(m,u.data),!1)},c.prototype.flush=function(){n.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(g){u.push({data:g,meta:u.meta})}},s.compressWorker=function(u){return new c("Deflate",u)},s.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,r,s){var l=e("../utils"),a=e("../stream/GenericWorker"),h=e("../utf8"),n=e("../crc32"),m=e("../signature"),c=function(_,p){var I="",P;for(P=0;P>>8;return I},u=function(_,p){var I=_;return _||(I=p?16893:33204),(I&65535)<<16},g=function(_){return(_||0)&63},v=function(_,p,I,P,y,w){var S=_.file,E=_.compression,N=w!==h.utf8encode,D=l.transformTo("string",w(S.name)),B=l.transformTo("string",h.utf8encode(S.name)),R=S.comment,Z=l.transformTo("string",w(R)),Q=l.transformTo("string",h.utf8encode(R)),J=B.length!==S.name.length,G=Q.length!==R.length,$,j,tt="",nt="",ht="",H=S.dir,st=S.date,ft={crc32:0,compressedSize:0,uncompressedSize:0};(!p||I)&&(ft.crc32=_.crc32,ft.compressedSize=_.compressedSize,ft.uncompressedSize=_.uncompressedSize);var Dt=0;p&&(Dt|=8),!N&&(J||G)&&(Dt|=2048);var kt=0,vt=0;H&&(kt|=16),y==="UNIX"?(vt=798,kt|=u(S.unixPermissions,H)):(vt=20,kt|=g(S.dosPermissions)),$=st.getUTCHours(),$=$<<6,$=$|st.getUTCMinutes(),$=$<<5,$=$|st.getUTCSeconds()/2,j=st.getUTCFullYear()-1980,j=j<<4,j=j|st.getUTCMonth()+1,j=j<<5,j=j|st.getUTCDate(),J&&(nt=c(1,1)+c(n(D),4)+B,tt+="up"+c(nt.length,2)+nt),G&&(ht=c(1,1)+c(n(Z),4)+Q,tt+="uc"+c(ht.length,2)+ht);var at="";at+=`
+\0`,at+=c(Dt,2),at+=E.magic,at+=c($,2),at+=c(j,2),at+=c(ft.crc32,4),at+=c(ft.compressedSize,4),at+=c(ft.uncompressedSize,4),at+=c(D.length,2),at+=c(tt.length,2);var St=m.LOCAL_FILE_HEADER+at+D+tt,gt=m.CENTRAL_FILE_HEADER+c(vt,2)+at+c(Z.length,2)+"\0\0\0\0"+c(kt,4)+c(P,4)+D+tt+Z;return{fileRecord:St,dirRecord:gt}},F=function(_,p,I,P,y){var w="",S=l.transformTo("string",y(P));return w=m.CENTRAL_DIRECTORY_END+"\0\0\0\0"+c(_,2)+c(_,2)+c(p,4)+c(I,4)+c(S.length,2)+S,w},C=function(_){var p="";return p=m.DATA_DESCRIPTOR+c(_.crc32,4)+c(_.compressedSize,4)+c(_.uncompressedSize,4),p};function o(_,p,I,P){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=I,this.encodeFileName=P,this.streamFiles=_,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(o,a),o.prototype.push=function(_){var p=_.meta.percent||0,I=this.entriesCount,P=this._sources.length;this.accumulate?this.contentBuffer.push(_):(this.bytesWritten+=_.data.length,a.prototype.push.call(this,{data:_.data,meta:{currentFile:this.currentFile,percent:I?(p+100*(I-P-1))/I:100}}))},o.prototype.openedSource=function(_){this.currentSourceOffset=this.bytesWritten,this.currentFile=_.file.name;var p=this.streamFiles&&!_.file.dir;if(p){var I=v(_,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:I.fileRecord,meta:{percent:0}})}else this.accumulate=!0},o.prototype.closedSource=function(_){this.accumulate=!1;var p=this.streamFiles&&!_.file.dir,I=v(_,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(I.dirRecord),p)this.push({data:C(_),meta:{percent:100}});else for(this.push({data:I.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},o.prototype.flush=function(){for(var _=this.bytesWritten,p=0;p"u")&&(D.binary=!B);var R=w instanceof c&&w.uncompressedSize===0;(R||D.dir||!w||w.length===0)&&(D.base64=!1,D.binary=!0,w="",D.compression="STORE",E="string");var Z=null;w instanceof c||w instanceof h?Z=w:v.isNode&&v.isStream(w)?Z=new F(y,w):Z=a.prepareContent(y,w,D.binary,D.optimizedBinaryString,D.base64);var Q=new u(y,Z,D);this.files[y]=Q},o=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return w>0?y.substring(0,w):""},_=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},p=function(y,w){return w=typeof w<"u"?w:m.createFolders,y=_(y),this.files[y]||C.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function I(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var P={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,S,E;for(w in this.files)E=this.files[w],S=w.slice(this.root.length,w.length),S&&w.slice(0,this.root.length)===this.root&&y(S,E)},filter:function(y){var w=[];return this.forEach(function(S,E){y(S,E)&&w.push(E)}),w},file:function(y,w,S){if(arguments.length===1)if(I(y)){var E=y;return this.filter(function(D,B){return!B.dir&&E.test(D)})}else{var N=this.files[this.root+y];return N&&!N.dir?N:null}else y=this.root+y,C.call(this,y,w,S);return this},folder:function(y){if(!y)return this;if(I(y))return this.filter(function(N,D){return D.dir&&y.test(N)});var w=this.root+y,S=p.call(this,w),E=this.clone();return E.root=S.name,E},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var S=this.filter(function(N,D){return D.name.slice(0,y.length)===y}),E=0;E=0;--v)if(this.data[v]===m&&this.data[v+1]===c&&this.data[v+2]===u&&this.data[v+3]===g)return v-this.zero;return-1},h.prototype.readAndCheckSignature=function(n){var m=n.charCodeAt(0),c=n.charCodeAt(1),u=n.charCodeAt(2),g=n.charCodeAt(3),v=this.readData(4);return m===v[0]&&c===v[1]&&u===v[2]&&g===v[3]},h.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,m},r.exports=h},{"../utils":32,"./DataReader":18}],18:[function(e,r,s){var l=e("../utils");function a(h){this.data=h,this.length=h.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(h){this.checkIndex(this.index+h)},checkIndex:function(h){if(this.length=this.index;m--)n=(n<<8)+this.byteAt(m);return this.index+=h,n},readString:function(h){return l.transformTo("string",this.readData(h))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var h=this.readInt(4);return new Date(Date.UTC((h>>25&127)+1980,(h>>21&15)-1,h>>16&31,h>>11&31,h>>5&63,(h&31)<<1))}},r.exports=a},{"../utils":32}],19:[function(e,r,s){var l=e("./Uint8ArrayReader"),a=e("../utils");function h(n){l.call(this,n)}a.inherits(h,l),h.prototype.readData=function(n){this.checkOffset(n);var m=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,m},r.exports=h},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,r,s){var l=e("./DataReader"),a=e("../utils");function h(n){l.call(this,n)}a.inherits(h,l),h.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},h.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},h.prototype.readAndCheckSignature=function(n){var m=this.readData(4);return n===m},h.prototype.readData=function(n){this.checkOffset(n);var m=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,m},r.exports=h},{"../utils":32,"./DataReader":18}],21:[function(e,r,s){var l=e("./ArrayReader"),a=e("../utils");function h(n){l.call(this,n)}a.inherits(h,l),h.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,m},r.exports=h},{"../utils":32,"./ArrayReader":17}],22:[function(e,r,s){var l=e("../utils"),a=e("../support"),h=e("./ArrayReader"),n=e("./StringReader"),m=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");r.exports=function(u){var g=l.getTypeOf(u);return l.checkSupport(g),g==="string"&&!a.uint8array?new n(u):g==="nodebuffer"?new m(u):a.uint8array?new c(l.transformTo("uint8array",u)):new h(l.transformTo("array",u))}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,r,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,r,s){var l=e("./GenericWorker"),a=e("../utils");function h(n){l.call(this,"ConvertWorker to "+n),this.destType=n}a.inherits(h,l),h.prototype.processChunk=function(n){this.push({data:a.transformTo(this.destType,n.data),meta:n.meta})},r.exports=h},{"../utils":32,"./GenericWorker":28}],25:[function(e,r,s){var l=e("./GenericWorker"),a=e("../crc32"),h=e("../utils");function n(){l.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h.inherits(n,l),n.prototype.processChunk=function(m){this.streamInfo.crc32=a(m.data,this.streamInfo.crc32||0),this.push(m)},r.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,r,s){var l=e("../utils"),a=e("./GenericWorker");function h(n){a.call(this,"DataLengthProbe for "+n),this.propName=n,this.withStreamInfo(n,0)}l.inherits(h,a),h.prototype.processChunk=function(n){if(n){var m=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=m+n.data.length}a.prototype.processChunk.call(this,n)},r.exports=h},{"../utils":32,"./GenericWorker":28}],27:[function(e,r,s){var l=e("../utils"),a=e("./GenericWorker"),h=16*1024;function n(m){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=l.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}l.inherits(n,a),n.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return a.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,l.delay(this._tickAndRepeat,[],this)),!0):!1},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(l.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=h,c=null,u=Math.min(this.max,this.index+m);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u);break}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(e,r,s){function l(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}l.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return this.isFinished?!1:(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,h){return this._listeners[a].push(h),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,h){if(this._listeners[a])for(var n=0;n "+a:a}},r.exports=l},{}],29:[function(e,r,s){var l=e("../utils"),a=e("./ConvertWorker"),h=e("./GenericWorker"),n=e("../base64"),m=e("../support"),c=e("../external"),u=null;if(m.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function g(o,_,p){switch(o){case"blob":return l.newBlob(l.transformTo("arraybuffer",_),p);case"base64":return n.encode(_);default:return l.transformTo(o,_)}}function v(o,_){var p,I=0,P=null,y=0;for(p=0;p<_.length;p++)y+=_[p].length;switch(o){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(P=new Uint8Array(y),p=0;p<_.length;p++)P.set(_[p],I),I+=_[p].length;return P;case"nodebuffer":return Buffer.concat(_);default:throw new Error("concat : unsupported type '"+o+"'")}}function F(o,_){return new c.Promise(function(p,I){var P=[],y=o._internalType,w=o._outputType,S=o._mimeType;o.on("data",function(E,N){P.push(E),_&&_(N)}).on("error",function(E){P=[],I(E)}).on("end",function(){try{var E=g(w,v(y,P),S);p(E)}catch(N){I(N)}P=[]}).resume()})}function C(o,_,p){var I=_;switch(_){case"blob":case"arraybuffer":I="uint8array";break;case"base64":I="string";break}try{this._internalType=I,this._outputType=_,this._mimeType=p,l.checkSupport(I),this._worker=o.pipe(new a(I)),o.lock()}catch(P){this._worker=new h("error"),this._worker.error(P)}}C.prototype={accumulate:function(o){return F(this,o)},on:function(o,_){var p=this;return o==="data"?this._worker.on(o,function(I){_.call(p,I.data,I.meta)}):this._worker.on(o,function(){l.delay(_,arguments,p)}),this},resume:function(){return l.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(o){if(l.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},o)}},r.exports=C},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,r,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var l=new ArrayBuffer(0);try{s.blob=new Blob([l],{type:"application/zip"}).size===0}catch{try{var a=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,h=new a;h.append(l),s.blob=h.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!e("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(e,r,s){for(var l=e("./utils"),a=e("./support"),h=e("./nodejsUtils"),n=e("./stream/GenericWorker"),m=new Array(256),c=0;c<256;c++)m[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;m[254]=m[254]=1;var u=function(o){var _,p,I,P,y,w=o.length,S=0;for(P=0;P>>6,_[y++]=128|p&63):p<65536?(_[y++]=224|p>>>12,_[y++]=128|p>>>6&63,_[y++]=128|p&63):(_[y++]=240|p>>>18,_[y++]=128|p>>>12&63,_[y++]=128|p>>>6&63,_[y++]=128|p&63);return _},g=function(o,_){var p;for(_=_||o.length,_>o.length&&(_=o.length),p=_-1;p>=0&&(o[p]&192)===128;)p--;return p<0||p===0?_:p+m[o[p]]>_?p:_},v=function(o){var _,p,I,P,y=o.length,w=new Array(y*2);for(p=0,_=0;_4){w[p++]=65533,_+=P-1;continue}for(I&=P===2?31:P===3?15:7;P>1&&_1){w[p++]=65533;continue}I<65536?w[p++]=I:(I-=65536,w[p++]=55296|I>>10&1023,w[p++]=56320|I&1023)}return w.length!==p&&(w.subarray?w=w.subarray(0,p):w.length=p),l.applyFromCharCode(w)};s.utf8encode=function(_){return a.nodebuffer?h.newBufferFrom(_,"utf-8"):u(_)},s.utf8decode=function(_){return a.nodebuffer?l.transformTo("nodebuffer",_).toString("utf-8"):(_=l.transformTo(a.uint8array?"uint8array":"array",_),v(_))};function F(){n.call(this,"utf-8 decode"),this.leftOver=null}l.inherits(F,n),F.prototype.processChunk=function(o){var _=l.transformTo(a.uint8array?"uint8array":"array",o.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var p=_;_=new Uint8Array(p.length+this.leftOver.length),_.set(this.leftOver,0),_.set(p,this.leftOver.length)}else _=this.leftOver.concat(_);this.leftOver=null}var I=g(_),P=_;I!==_.length&&(a.uint8array?(P=_.subarray(0,I),this.leftOver=_.subarray(I,_.length)):(P=_.slice(0,I),this.leftOver=_.slice(I,_.length))),this.push({data:s.utf8decode(P),meta:o.meta})},F.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=F;function C(){n.call(this,"utf-8 encode")}l.inherits(C,n),C.prototype.processChunk=function(o){this.push({data:s.utf8encode(o.data),meta:o.meta})},s.Utf8EncodeWorker=C},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,r,s){var l=e("./support"),a=e("./base64"),h=e("./nodejsUtils"),n=e("./external");e("setimmediate");function m(o){var _=null;return l.uint8array?_=new Uint8Array(o.length):_=new Array(o.length),u(o,_)}s.newBlob=function(o,_){s.checkSupport("blob");try{return new Blob([o],{type:_})}catch{try{var p=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,I=new p;return I.append(o),I.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};function c(o){return o}function u(o,_){for(var p=0;p1;)try{return g.stringifyByChunk(o,p,_)}catch{_=Math.floor(_/2)}return g.stringifyByChar(o)}s.applyFromCharCode=v;function F(o,_){for(var p=0;p"u"&&(o[p]=arguments[_][p]);return o},s.prepareContent=function(o,_,p,I,P){var y=n.Promise.resolve(_).then(function(w){var S=l.blob&&(w instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(w))!==-1);return S&&typeof FileReader<"u"?new n.Promise(function(E,N){var D=new FileReader;D.onload=function(B){E(B.target.result)},D.onerror=function(B){N(B.target.error)},D.readAsArrayBuffer(w)}):w});return y.then(function(w){var S=s.getTypeOf(w);return S?(S==="arraybuffer"?w=s.transformTo("uint8array",w):S==="string"&&(P?w=a.decode(w):p&&I!==!0&&(w=m(w))),w):n.Promise.reject(new Error("Can't read the data of '"+o+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,r,s){var l=e("./reader/readerFor"),a=e("./utils"),h=e("./signature"),n=e("./zipEntry"),m=e("./support");function c(u){this.files=[],this.loadOptions=u}c.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var g=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(g)+", expected "+a.pretty(u)+")")}},isSignature:function(u,g){var v=this.reader.index;this.reader.setIndex(u);var F=this.reader.readString(4),C=F===g;return this.reader.setIndex(v),C},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),g=m.uint8array?"uint8array":"array",v=a.transformTo(g,u);this.zipComment=this.loadOptions.decodeFileName(v)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u=this.zip64EndOfCentralSize-44,g=0,v,F,C;g1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,g;for(u=0;u0)this.isSignature(v,h.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(u){this.reader=l(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,r,s){var l=e("./reader/readerFor"),a=e("./utils"),h=e("./compressedObject"),n=e("./crc32"),m=e("./utf8"),c=e("./compressions"),u=e("./support"),g=0,v=3,F=function(o){for(var _ in c)if(Object.prototype.hasOwnProperty.call(c,_)&&c[_].magic===o)return c[_];return null};function C(o,_){this.options=o,this.loadOptions=_}C.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(o){var _,p;if(o.skip(22),this.fileNameLength=o.readInt(2),p=o.readInt(2),this.fileName=o.readData(this.fileNameLength),o.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(_=F(this.compressionMethod),_===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new h(this.compressedSize,this.uncompressedSize,this.crc32,_,o.readData(this.compressedSize))},readCentralPart:function(o){this.versionMadeBy=o.readInt(2),o.skip(2),this.bitFlag=o.readInt(2),this.compressionMethod=o.readString(2),this.date=o.readDate(),this.crc32=o.readInt(4),this.compressedSize=o.readInt(4),this.uncompressedSize=o.readInt(4);var _=o.readInt(2);if(this.extraFieldsLength=o.readInt(2),this.fileCommentLength=o.readInt(2),this.diskNumberStart=o.readInt(2),this.internalFileAttributes=o.readInt(2),this.externalFileAttributes=o.readInt(4),this.localHeaderOffset=o.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");o.skip(_),this.readExtraFields(o),this.parseZIP64ExtraField(o),this.fileComment=o.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var o=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),o===g&&(this.dosPermissions=this.externalFileAttributes&63),o===v&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var o=l(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=o.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=o.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=o.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=o.readInt(4))}},readExtraFields:function(o){var _=o.index+this.extraFieldsLength,p,I,P;for(this.extraFields||(this.extraFields={});o.index+4<_;)p=o.readInt(2),I=o.readInt(2),P=o.readData(I),this.extraFields[p]={id:p,length:I,value:P};o.setIndex(_)},handleUTF8:function(){var o=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=m.utf8decode(this.fileName),this.fileCommentStr=m.utf8decode(this.fileComment);else{var _=this.findExtraFieldUnicodePath();if(_!==null)this.fileNameStr=_;else{var p=a.transformTo(o,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var I=this.findExtraFieldUnicodeComment();if(I!==null)this.fileCommentStr=I;else{var P=a.transformTo(o,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(P)}}},findExtraFieldUnicodePath:function(){var o=this.extraFields[28789];if(o){var _=l(o.value);return _.readInt(1)!==1||n(this.fileName)!==_.readInt(4)?null:m.utf8decode(_.readData(o.length-5))}return null},findExtraFieldUnicodeComment:function(){var o=this.extraFields[25461];if(o){var _=l(o.value);return _.readInt(1)!==1||n(this.fileComment)!==_.readInt(4)?null:m.utf8decode(_.readData(o.length-5))}return null}},r.exports=C},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,r,s){var l=e("./stream/StreamHelper"),a=e("./stream/DataWorker"),h=e("./utf8"),n=e("./compressedObject"),m=e("./stream/GenericWorker"),c=function(F,C,o){this.name=F,this.dir=o.dir,this.date=o.date,this.comment=o.comment,this.unixPermissions=o.unixPermissions,this.dosPermissions=o.dosPermissions,this._data=C,this._dataBinary=o.binary,this.options={compression:o.compression,compressionOptions:o.compressionOptions}};c.prototype={internalStream:function(F){var C=null,o="string";try{if(!F)throw new Error("No output type specified.");o=F.toLowerCase();var _=o==="string"||o==="text";(o==="binarystring"||o==="text")&&(o="string"),C=this._decompressWorker();var p=!this._dataBinary;p&&!_&&(C=C.pipe(new h.Utf8EncodeWorker)),!p&&_&&(C=C.pipe(new h.Utf8DecodeWorker))}catch(I){C=new m("error"),C.error(I)}return new l(C,o,"")},async:function(F,C){return this.internalStream(F).accumulate(C)},nodeStream:function(F,C){return this.internalStream(F||"nodebuffer").toNodejsStream(C)},_compressWorker:function(F,C){if(this._data instanceof n&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var o=this._decompressWorker();return this._dataBinary||(o=o.pipe(new h.Utf8EncodeWorker)),n.createWorkerFrom(o,F,C)},_decompressWorker:function(){return this._data instanceof n?this._data.getContentWorker():this._data instanceof m?this._data:new a(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],g=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},v=0;v0?E.windowBits=-E.windowBits:E.gzip&&E.windowBits>0&&E.windowBits<16&&(E.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var N=l.deflateInit2(this.strm,E.level,E.method,E.windowBits,E.memLevel,E.strategy);if(N!==v)throw new Error(n[N]);if(E.header&&l.deflateSetHeader(this.strm,E.header),E.dictionary){var D;if(typeof E.dictionary=="string"?D=h.string2buf(E.dictionary):c.call(E.dictionary)==="[object ArrayBuffer]"?D=new Uint8Array(E.dictionary):D=E.dictionary,N=l.deflateSetDictionary(this.strm,D),N!==v)throw new Error(n[N]);this._dict_set=!0}}I.prototype.push=function(S,E){var N=this.strm,D=this.options.chunkSize,B,R;if(this.ended)return!1;R=E===~~E?E:E===!0?g:u,typeof S=="string"?N.input=h.string2buf(S):c.call(S)==="[object ArrayBuffer]"?N.input=new Uint8Array(S):N.input=S,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new a.Buf8(D),N.next_out=0,N.avail_out=D),B=l.deflate(N,R),B!==F&&B!==v)return this.onEnd(B),this.ended=!0,!1;(N.avail_out===0||N.avail_in===0&&(R===g||R===C))&&(this.options.to==="string"?this.onData(h.buf2binstring(a.shrinkBuf(N.output,N.next_out))):this.onData(a.shrinkBuf(N.output,N.next_out)))}while((N.avail_in>0||N.avail_out===0)&&B!==F);return R===g?(B=l.deflateEnd(this.strm),this.onEnd(B),this.ended=!0,B===v):(R===C&&(this.onEnd(v),N.avail_out=0),!0)},I.prototype.onData=function(S){this.chunks.push(S)},I.prototype.onEnd=function(S){S===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg};function P(S,E){var N=new I(E);if(N.push(S,!0),N.err)throw N.msg||n[N.err];return N.result}function y(S,E){return E=E||{},E.raw=!0,P(S,E)}function w(S,E){return E=E||{},E.gzip=!0,P(S,E)}s.Deflate=I,s.deflate=P,s.deflateRaw=y,s.gzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,r,s){var l=e("./zlib/inflate"),a=e("./utils/common"),h=e("./utils/strings"),n=e("./zlib/constants"),m=e("./zlib/messages"),c=e("./zlib/zstream"),u=e("./zlib/gzheader"),g=Object.prototype.toString;function v(o){if(!(this instanceof v))return new v(o);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},o||{});var _=this.options;_.raw&&_.windowBits>=0&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),_.windowBits>=0&&_.windowBits<16&&!(o&&o.windowBits)&&(_.windowBits+=32),_.windowBits>15&&_.windowBits<48&&(_.windowBits&15||(_.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var p=l.inflateInit2(this.strm,_.windowBits);if(p!==n.Z_OK)throw new Error(m[p]);this.header=new u,l.inflateGetHeader(this.strm,this.header)}v.prototype.push=function(o,_){var p=this.strm,I=this.options.chunkSize,P=this.options.dictionary,y,w,S,E,N,D,B=!1;if(this.ended)return!1;w=_===~~_?_:_===!0?n.Z_FINISH:n.Z_NO_FLUSH,typeof o=="string"?p.input=h.binstring2buf(o):g.call(o)==="[object ArrayBuffer]"?p.input=new Uint8Array(o):p.input=o,p.next_in=0,p.avail_in=p.input.length;do{if(p.avail_out===0&&(p.output=new a.Buf8(I),p.next_out=0,p.avail_out=I),y=l.inflate(p,n.Z_NO_FLUSH),y===n.Z_NEED_DICT&&P&&(typeof P=="string"?D=h.string2buf(P):g.call(P)==="[object ArrayBuffer]"?D=new Uint8Array(P):D=P,y=l.inflateSetDictionary(this.strm,D)),y===n.Z_BUF_ERROR&&B===!0&&(y=n.Z_OK,B=!1),y!==n.Z_STREAM_END&&y!==n.Z_OK)return this.onEnd(y),this.ended=!0,!1;p.next_out&&(p.avail_out===0||y===n.Z_STREAM_END||p.avail_in===0&&(w===n.Z_FINISH||w===n.Z_SYNC_FLUSH))&&(this.options.to==="string"?(S=h.utf8border(p.output,p.next_out),E=p.next_out-S,N=h.buf2string(p.output,S),p.next_out=E,p.avail_out=I-E,E&&a.arraySet(p.output,p.output,S,E,0),this.onData(N)):this.onData(a.shrinkBuf(p.output,p.next_out))),p.avail_in===0&&p.avail_out===0&&(B=!0)}while((p.avail_in>0||p.avail_out===0)&&y!==n.Z_STREAM_END);return y===n.Z_STREAM_END&&(w=n.Z_FINISH),w===n.Z_FINISH?(y=l.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===n.Z_OK):(w===n.Z_SYNC_FLUSH&&(this.onEnd(n.Z_OK),p.avail_out=0),!0)},v.prototype.onData=function(o){this.chunks.push(o)},v.prototype.onEnd=function(o){o===n.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=o,this.msg=this.strm.msg};function F(o,_){var p=new v(_);if(p.push(o,!0),p.err)throw p.msg||m[p.err];return p.result}function C(o,_){return _=_||{},_.raw=!0,F(o,_)}s.Inflate=v,s.inflate=F,s.inflateRaw=C,s.ungzip=F},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,r,s){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(n){for(var m=Array.prototype.slice.call(arguments,1);m.length;){var c=m.shift();if(c){if(typeof c!="object")throw new TypeError(c+"must be non-object");for(var u in c)c.hasOwnProperty(u)&&(n[u]=c[u])}}return n},s.shrinkBuf=function(n,m){return n.length===m?n:n.subarray?n.subarray(0,m):(n.length=m,n)};var a={arraySet:function(n,m,c,u,g){if(m.subarray&&n.subarray){n.set(m.subarray(c,c+u),g);return}for(var v=0;v=252?6:m>=248?5:m>=240?4:m>=224?3:m>=192?2:1;n[254]=n[254]=1,s.string2buf=function(u){var g,v,F,C,o,_=u.length,p=0;for(C=0;C<_;C++)v=u.charCodeAt(C),(v&64512)===55296&&C+1<_&&(F=u.charCodeAt(C+1),(F&64512)===56320&&(v=65536+(v-55296<<10)+(F-56320),C++)),p+=v<128?1:v<2048?2:v<65536?3:4;for(g=new l.Buf8(p),o=0,C=0;o>>6,g[o++]=128|v&63):v<65536?(g[o++]=224|v>>>12,g[o++]=128|v>>>6&63,g[o++]=128|v&63):(g[o++]=240|v>>>18,g[o++]=128|v>>>12&63,g[o++]=128|v>>>6&63,g[o++]=128|v&63);return g};function c(u,g){if(g<65537&&(u.subarray&&h||!u.subarray&&a))return String.fromCharCode.apply(null,l.shrinkBuf(u,g));for(var v="",F=0;F4){p[F++]=65533,v+=o-1;continue}for(C&=o===2?31:o===3?15:7;o>1&&v<_;)C=C<<6|u[v++]&63,o--;if(o>1){p[F++]=65533;continue}C<65536?p[F++]=C:(C-=65536,p[F++]=55296|C>>10&1023,p[F++]=56320|C&1023)}return c(p,F)},s.utf8border=function(u,g){var v;for(g=g||u.length,g>u.length&&(g=u.length),v=g-1;v>=0&&(u[v]&192)===128;)v--;return v<0||v===0?g:v+n[u[v]]>g?v:g}},{"./common":41}],43:[function(e,r,s){function l(a,h,n,m){for(var c=a&65535|0,u=a>>>16&65535|0,g=0;n!==0;){g=n>2e3?2e3:n,n-=g;do c=c+h[m++]|0,u=u+c|0;while(--g);c%=65521,u%=65521}return c|u<<16|0}r.exports=l},{}],44:[function(e,r,s){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,r,s){function l(){for(var n,m=[],c=0;c<256;c++){n=c;for(var u=0;u<8;u++)n=n&1?3988292384^n>>>1:n>>>1;m[c]=n}return m}var a=l();function h(n,m,c,u){var g=a,v=u+c;n^=-1;for(var F=u;F>>8^g[(n^m[F])&255];return n^-1}r.exports=h},{}],46:[function(e,r,s){var l=e("../utils/common"),a=e("./trees"),h=e("./adler32"),n=e("./crc32"),m=e("./messages"),c=0,u=1,g=3,v=4,F=5,C=0,o=1,_=-2,p=-3,I=-5,P=-1,y=1,w=2,S=3,E=4,N=0,D=2,B=8,R=9,Z=15,Q=8,J=29,G=256,$=G+1+J,j=30,tt=19,nt=2*$+1,ht=15,H=3,st=258,ft=st+H+1,Dt=32,kt=42,vt=69,at=73,St=91,gt=103,dt=113,bt=666,ct=1,At=2,Ut=3,Bt=4,ut=3;function Nt(i,A){return i.msg=m[A],A}function he(i){return(i<<1)-(i>4?9:0)}function Vt(i){for(var A=i.length;--A>=0;)i[A]=0}function Mt(i){var A=i.state,T=A.pending;T>i.avail_out&&(T=i.avail_out),T!==0&&(l.arraySet(i.output,A.pending_buf,A.pending_out,T,i.next_out),i.next_out+=T,A.pending_out+=T,i.total_out+=T,i.avail_out-=T,A.pending-=T,A.pending===0&&(A.pending_out=0))}function _t(i,A){a._tr_flush_block(i,i.block_start>=0?i.block_start:-1,i.strstart-i.block_start,A),i.block_start=i.strstart,Mt(i.strm)}function rt(i,A){i.pending_buf[i.pending++]=A}function jt(i,A){i.pending_buf[i.pending++]=A>>>8&255,i.pending_buf[i.pending++]=A&255}function de(i,A,T,d){var x=i.avail_in;return x>d&&(x=d),x===0?0:(i.avail_in-=x,l.arraySet(A,i.input,i.next_in,x,T),i.state.wrap===1?i.adler=h(i.adler,A,x,T):i.state.wrap===2&&(i.adler=n(i.adler,A,x,T)),i.next_in+=x,i.total_in+=x,x)}function ae(i,A){var T=i.max_chain_length,d=i.strstart,x,O,K=i.prev_length,Y=i.nice_match,X=i.strstart>i.w_size-ft?i.strstart-(i.w_size-ft):0,ot=i.window,qt=i.w_mask,mt=i.prev,lt=i.strstart+st,xt=ot[d+K-1],Tt=ot[d+K];i.prev_length>=i.good_match&&(T>>=2),Y>i.lookahead&&(Y=i.lookahead);do if(x=A,!(ot[x+K]!==Tt||ot[x+K-1]!==xt||ot[x]!==ot[d]||ot[++x]!==ot[d+1])){d+=2,x++;do;while(ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&ot[++d]===ot[++x]&&dK){if(i.match_start=A,K=O,O>=Y)break;xt=ot[d+K-1],Tt=ot[d+K]}}while((A=mt[A&qt])>X&&--T!==0);return K<=i.lookahead?K:i.lookahead}function Zt(i){var A=i.w_size,T,d,x,O,K;do{if(O=i.window_size-i.lookahead-i.strstart,i.strstart>=A+(A-ft)){l.arraySet(i.window,i.window,A,A,0),i.match_start-=A,i.strstart-=A,i.block_start-=A,d=i.hash_size,T=d;do x=i.head[--T],i.head[T]=x>=A?x-A:0;while(--d);d=A,T=d;do x=i.prev[--T],i.prev[T]=x>=A?x-A:0;while(--d);O+=A}if(i.strm.avail_in===0)break;if(d=de(i.strm,i.window,i.strstart+i.lookahead,O),i.lookahead+=d,i.lookahead+i.insert>=H)for(K=i.strstart-i.insert,i.ins_h=i.window[K],i.ins_h=(i.ins_h<i.pending_buf_size-5&&(T=i.pending_buf_size-5);;){if(i.lookahead<=1){if(Zt(i),i.lookahead===0&&A===c)return ct;if(i.lookahead===0)break}i.strstart+=i.lookahead,i.lookahead=0;var d=i.block_start+T;if((i.strstart===0||i.strstart>=d)&&(i.lookahead=i.strstart-d,i.strstart=d,_t(i,!1),i.strm.avail_out===0)||i.strstart-i.block_start>=i.w_size-ft&&(_t(i,!1),i.strm.avail_out===0))return ct}return i.insert=0,A===v?(_t(i,!0),i.strm.avail_out===0?Ut:Bt):(i.strstart>i.block_start&&(_t(i,!1),i.strm.avail_out===0),ct)}function ne(i,A){for(var T,d;;){if(i.lookahead=H&&(i.ins_h=(i.ins_h<=H)if(d=a._tr_tally(i,i.strstart-i.match_start,i.match_length-H),i.lookahead-=i.match_length,i.match_length<=i.max_lazy_match&&i.lookahead>=H){i.match_length--;do i.strstart++,i.ins_h=(i.ins_h<=H&&(i.ins_h=(i.ins_h<4096)&&(i.match_length=H-1)),i.prev_length>=H&&i.match_length<=i.prev_length){x=i.strstart+i.lookahead-H,d=a._tr_tally(i,i.strstart-1-i.prev_match,i.prev_length-H),i.lookahead-=i.prev_length-1,i.prev_length-=2;do++i.strstart<=x&&(i.ins_h=(i.ins_h<=H&&i.strstart>0&&(x=i.strstart-1,d=K[x],d===K[++x]&&d===K[++x]&&d===K[++x])){O=i.strstart+st;do;while(d===K[++x]&&d===K[++x]&&d===K[++x]&&d===K[++x]&&d===K[++x]&&d===K[++x]&&d===K[++x]&&d===K[++x]&&xi.lookahead&&(i.match_length=i.lookahead)}if(i.match_length>=H?(T=a._tr_tally(i,1,i.match_length-H),i.lookahead-=i.match_length,i.strstart+=i.match_length,i.match_length=0):(T=a._tr_tally(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++),T&&(_t(i,!1),i.strm.avail_out===0))return ct}return i.insert=0,A===v?(_t(i,!0),i.strm.avail_out===0?Ut:Bt):i.last_lit&&(_t(i,!1),i.strm.avail_out===0)?ct:At}function se(i,A){for(var T;;){if(i.lookahead===0&&(Zt(i),i.lookahead===0)){if(A===c)return ct;break}if(i.match_length=0,T=a._tr_tally(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++,T&&(_t(i,!1),i.strm.avail_out===0))return ct}return i.insert=0,A===v?(_t(i,!0),i.strm.avail_out===0?Ut:Bt):i.last_lit&&(_t(i,!1),i.strm.avail_out===0)?ct:At}function Pt(i,A,T,d,x){this.good_length=i,this.max_lazy=A,this.nice_length=T,this.max_chain=d,this.func=x}var Gt;Gt=[new Pt(0,0,0,0,ue),new Pt(4,4,8,4,ne),new Pt(4,5,16,8,ne),new Pt(4,6,32,32,ne),new Pt(4,4,16,16,Wt),new Pt(8,16,32,32,Wt),new Pt(8,16,128,128,Wt),new Pt(8,32,128,256,Wt),new Pt(32,128,258,1024,Wt),new Pt(32,258,258,4096,Wt)];function pe(i){i.window_size=2*i.w_size,Vt(i.head),i.max_lazy_match=Gt[i.level].max_lazy,i.good_match=Gt[i.level].good_length,i.nice_match=Gt[i.level].nice_length,i.max_chain_length=Gt[i.level].max_chain,i.strstart=0,i.block_start=0,i.lookahead=0,i.insert=0,i.match_length=i.prev_length=H-1,i.match_available=0,i.ins_h=0}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=B,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new l.Buf16(nt*2),this.dyn_dtree=new l.Buf16((2*j+1)*2),this.bl_tree=new l.Buf16((2*tt+1)*2),Vt(this.dyn_ltree),Vt(this.dyn_dtree),Vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new l.Buf16(ht+1),this.heap=new l.Buf16(2*$+1),Vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new l.Buf16(2*$+1),Vt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function M(i){var A;return!i||!i.state?Nt(i,_):(i.total_in=i.total_out=0,i.data_type=D,A=i.state,A.pending=0,A.pending_out=0,A.wrap<0&&(A.wrap=-A.wrap),A.status=A.wrap?kt:dt,i.adler=A.wrap===2?0:1,A.last_flush=c,a._tr_init(A),C)}function V(i){var A=M(i);return A===C&&pe(i.state),A}function W(i,A){return!i||!i.state||i.state.wrap!==2?_:(i.state.gzhead=A,C)}function k(i,A,T,d,x,O){if(!i)return _;var K=1;if(A===P&&(A=6),d<0?(K=0,d=-d):d>15&&(K=2,d-=16),x<1||x>R||T!==B||d<8||d>15||A<0||A>9||O<0||O>E)return Nt(i,_);d===8&&(d=9);var Y=new b;return i.state=Y,Y.strm=i,Y.wrap=K,Y.gzhead=null,Y.w_bits=d,Y.w_size=1<F||A<0)return i?Nt(i,_):_;if(d=i.state,!i.output||!i.input&&i.avail_in!==0||d.status===bt&&A!==v)return Nt(i,i.avail_out===0?I:_);if(d.strm=i,T=d.last_flush,d.last_flush=A,d.status===kt)if(d.wrap===2)i.adler=0,rt(d,31),rt(d,139),rt(d,8),d.gzhead?(rt(d,(d.gzhead.text?1:0)+(d.gzhead.hcrc?2:0)+(d.gzhead.extra?4:0)+(d.gzhead.name?8:0)+(d.gzhead.comment?16:0)),rt(d,d.gzhead.time&255),rt(d,d.gzhead.time>>8&255),rt(d,d.gzhead.time>>16&255),rt(d,d.gzhead.time>>24&255),rt(d,d.level===9?2:d.strategy>=w||d.level<2?4:0),rt(d,d.gzhead.os&255),d.gzhead.extra&&d.gzhead.extra.length&&(rt(d,d.gzhead.extra.length&255),rt(d,d.gzhead.extra.length>>8&255)),d.gzhead.hcrc&&(i.adler=n(i.adler,d.pending_buf,d.pending,0)),d.gzindex=0,d.status=vt):(rt(d,0),rt(d,0),rt(d,0),rt(d,0),rt(d,0),rt(d,d.level===9?2:d.strategy>=w||d.level<2?4:0),rt(d,ut),d.status=dt);else{var K=B+(d.w_bits-8<<4)<<8,Y=-1;d.strategy>=w||d.level<2?Y=0:d.level<6?Y=1:d.level===6?Y=2:Y=3,K|=Y<<6,d.strstart!==0&&(K|=Dt),K+=31-K%31,d.status=dt,jt(d,K),d.strstart!==0&&(jt(d,i.adler>>>16),jt(d,i.adler&65535)),i.adler=1}if(d.status===vt)if(d.gzhead.extra){for(x=d.pending;d.gzindex<(d.gzhead.extra.length&65535)&&!(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>x&&(i.adler=n(i.adler,d.pending_buf,d.pending-x,x)),Mt(i),x=d.pending,d.pending===d.pending_buf_size));)rt(d,d.gzhead.extra[d.gzindex]&255),d.gzindex++;d.gzhead.hcrc&&d.pending>x&&(i.adler=n(i.adler,d.pending_buf,d.pending-x,x)),d.gzindex===d.gzhead.extra.length&&(d.gzindex=0,d.status=at)}else d.status=at;if(d.status===at)if(d.gzhead.name){x=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>x&&(i.adler=n(i.adler,d.pending_buf,d.pending-x,x)),Mt(i),x=d.pending,d.pending===d.pending_buf_size)){O=1;break}d.gzindexx&&(i.adler=n(i.adler,d.pending_buf,d.pending-x,x)),O===0&&(d.gzindex=0,d.status=St)}else d.status=St;if(d.status===St)if(d.gzhead.comment){x=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>x&&(i.adler=n(i.adler,d.pending_buf,d.pending-x,x)),Mt(i),x=d.pending,d.pending===d.pending_buf_size)){O=1;break}d.gzindexx&&(i.adler=n(i.adler,d.pending_buf,d.pending-x,x)),O===0&&(d.status=gt)}else d.status=gt;if(d.status===gt&&(d.gzhead.hcrc?(d.pending+2>d.pending_buf_size&&Mt(i),d.pending+2<=d.pending_buf_size&&(rt(d,i.adler&255),rt(d,i.adler>>8&255),i.adler=0,d.status=dt)):d.status=dt),d.pending!==0){if(Mt(i),i.avail_out===0)return d.last_flush=-1,C}else if(i.avail_in===0&&he(A)<=he(T)&&A!==v)return Nt(i,I);if(d.status===bt&&i.avail_in!==0)return Nt(i,I);if(i.avail_in!==0||d.lookahead!==0||A!==c&&d.status!==bt){var X=d.strategy===w?se(d,A):d.strategy===S?_e(d,A):Gt[d.level].func(d,A);if((X===Ut||X===Bt)&&(d.status=bt),X===ct||X===Ut)return i.avail_out===0&&(d.last_flush=-1),C;if(X===At&&(A===u?a._tr_align(d):A!==F&&(a._tr_stored_block(d,0,0,!1),A===g&&(Vt(d.head),d.lookahead===0&&(d.strstart=0,d.block_start=0,d.insert=0))),Mt(i),i.avail_out===0))return d.last_flush=-1,C}return A!==v?C:d.wrap<=0?o:(d.wrap===2?(rt(d,i.adler&255),rt(d,i.adler>>8&255),rt(d,i.adler>>16&255),rt(d,i.adler>>24&255),rt(d,i.total_in&255),rt(d,i.total_in>>8&255),rt(d,i.total_in>>16&255),rt(d,i.total_in>>24&255)):(jt(d,i.adler>>>16),jt(d,i.adler&65535)),Mt(i),d.wrap>0&&(d.wrap=-d.wrap),d.pending!==0?C:o)}function U(i){var A;return!i||!i.state?_:(A=i.state.status,A!==kt&&A!==vt&&A!==at&&A!==St&&A!==gt&&A!==dt&&A!==bt?Nt(i,_):(i.state=null,A===dt?Nt(i,p):C))}function q(i,A){var T=A.length,d,x,O,K,Y,X,ot,qt;if(!i||!i.state||(d=i.state,K=d.wrap,K===2||K===1&&d.status!==kt||d.lookahead))return _;for(K===1&&(i.adler=h(i.adler,A,T,0)),d.wrap=0,T>=d.w_size&&(K===0&&(Vt(d.head),d.strstart=0,d.block_start=0,d.insert=0),qt=new l.Buf8(d.w_size),l.arraySet(qt,A,T-d.w_size,d.w_size,0),A=qt,T=d.w_size),Y=i.avail_in,X=i.next_in,ot=i.input,i.avail_in=T,i.next_in=0,i.input=A,Zt(d);d.lookahead>=H;){x=d.strstart,O=d.lookahead-(H-1);do d.ins_h=(d.ins_h<>>24,y>>>=R,w-=R,R=B>>>16&255,R===0)j[v++]=B&65535;else if(R&16){Z=B&65535,R&=15,R&&(w>>=R,w-=R),w<15&&(y+=$[u++]<>>24,y>>>=R,w-=R,R=B>>>16&255,R&16){if(Q=B&65535,R&=15,wo){n.msg="invalid distance too far back",c.mode=l;break t}if(y>>>=R,w-=R,R=v-F,Q>R){if(R=Q-R,R>p&&c.sane){n.msg="invalid distance too far back",c.mode=l;break t}if(J=0,G=P,I===0){if(J+=_-R,R2;)j[v++]=G[J++],j[v++]=G[J++],j[v++]=G[J++],Z-=3;Z&&(j[v++]=G[J++],Z>1&&(j[v++]=G[J++]))}else{J=v-Q;do j[v++]=j[J++],j[v++]=j[J++],j[v++]=j[J++],Z-=3;while(Z>2);Z&&(j[v++]=j[J++],Z>1&&(j[v++]=j[J++]))}}else if(R&64){n.msg="invalid distance code",c.mode=l;break t}else{B=E[(B&65535)+(y&(1<>3,u-=Z,w-=Z<<3,y&=(1<>>24&255)+(k>>>8&65280)+((k&65280)<<8)+((k&255)<<24)}function de(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new l.Buf16(320),this.work=new l.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ae(k){var z;return!k||!k.state?I:(z=k.state,k.total_in=k.total_out=z.total=0,k.msg="",z.wrap&&(k.adler=z.wrap&1),z.mode=E,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new l.Buf32(Vt),z.distcode=z.distdyn=new l.Buf32(Mt),z.sane=1,z.back=-1,o)}function Zt(k){var z;return!k||!k.state?I:(z=k.state,z.wsize=0,z.whave=0,z.wnext=0,ae(k))}function ue(k,z){var f,U;return!k||!k.state||(U=k.state,z<0?(f=0,z=-z):(f=(z>>4)+1,z<48&&(z&=15)),z&&(z<8||z>15))?I:(U.window!==null&&U.wbits!==z&&(U.window=null),U.wrap=f,U.wbits=z,Zt(k))}function ne(k,z){var f,U;return k?(U=new de,k.state=U,U.window=null,f=ue(k,z),f!==o&&(k.state=null),f):I}function Wt(k){return ne(k,rt)}var _e=!0,se,Pt;function Gt(k){if(_e){var z;for(se=new l.Buf32(512),Pt=new l.Buf32(32),z=0;z<144;)k.lens[z++]=8;for(;z<256;)k.lens[z++]=9;for(;z<280;)k.lens[z++]=7;for(;z<288;)k.lens[z++]=8;for(m(u,k.lens,0,288,se,0,k.work,{bits:9}),z=0;z<32;)k.lens[z++]=5;m(g,k.lens,0,32,Pt,0,k.work,{bits:5}),_e=!1}k.lencode=se,k.lenbits=9,k.distcode=Pt,k.distbits=5}function pe(k,z,f,U){var q,i=k.state;return i.window===null&&(i.wsize=1<=i.wsize?(l.arraySet(i.window,z,f-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(q=i.wsize-i.wnext,q>U&&(q=U),l.arraySet(i.window,z,f-U,q,i.wnext),U-=q,U?(l.arraySet(i.window,z,f-U,U,0),i.wnext=U,i.whave=i.wsize):(i.wnext+=q,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,f.check=h(f.check,Ct,2,0),x=0,O=0,f.mode=N;break}if(f.flags=0,f.head&&(f.head.done=!1),!(f.wrap&1)||(((x&255)<<8)+(x>>8))%31){k.msg="incorrect header check",f.mode=ut;break}if((x&15)!==S){k.msg="unknown compression method",f.mode=ut;break}if(x>>>=4,O-=4,yt=(x&15)+8,f.wbits===0)f.wbits=yt;else if(yt>f.wbits){k.msg="invalid window size",f.mode=ut;break}f.dmax=1<>8&1),f.flags&512&&(Ct[0]=x&255,Ct[1]=x>>>8&255,f.check=h(f.check,Ct,2,0)),x=0,O=0,f.mode=D;case D:for(;O<32;){if(T===0)break t;T--,x+=U[i++]<>>8&255,Ct[2]=x>>>16&255,Ct[3]=x>>>24&255,f.check=h(f.check,Ct,4,0)),x=0,O=0,f.mode=B;case B:for(;O<16;){if(T===0)break t;T--,x+=U[i++]<>8),f.flags&512&&(Ct[0]=x&255,Ct[1]=x>>>8&255,f.check=h(f.check,Ct,2,0)),x=0,O=0,f.mode=R;case R:if(f.flags&1024){for(;O<16;){if(T===0)break t;T--,x+=U[i++]<>>8&255,f.check=h(f.check,Ct,2,0)),x=0,O=0}else f.head&&(f.head.extra=null);f.mode=Z;case Z:if(f.flags&1024&&(X=f.length,X>T&&(X=T),X&&(f.head&&(yt=f.head.extra_len-f.length,f.head.extra||(f.head.extra=new Array(f.head.extra_len)),l.arraySet(f.head.extra,U,i,X,yt)),f.flags&512&&(f.check=h(f.check,U,X,i)),T-=X,i+=X,f.length-=X),f.length))break t;f.length=0,f.mode=Q;case Q:if(f.flags&2048){if(T===0)break t;X=0;do yt=U[i+X++],f.head&&yt&&f.length<65536&&(f.head.name+=String.fromCharCode(yt));while(yt&&X>9&1,f.head.done=!0),k.adler=f.check=0,f.mode=tt;break;case $:for(;O<32;){if(T===0)break t;T--,x+=U[i++]<>>=O&7,O-=O&7,f.mode=At;break}for(;O<3;){if(T===0)break t;T--,x+=U[i++]<>>=1,O-=1,x&3){case 0:f.mode=ht;break;case 1:if(Gt(f),f.mode=vt,z===C){x>>>=2,O-=2;break t}break;case 2:f.mode=ft;break;case 3:k.msg="invalid block type",f.mode=ut}x>>>=2,O-=2;break;case ht:for(x>>>=O&7,O-=O&7;O<32;){if(T===0)break t;T--,x+=U[i++]<>>16^65535)){k.msg="invalid stored block lengths",f.mode=ut;break}if(f.length=x&65535,x=0,O=0,f.mode=H,z===C)break t;case H:f.mode=st;case st:if(X=f.length,X){if(X>T&&(X=T),X>d&&(X=d),X===0)break t;l.arraySet(q,U,i,X,A),T-=X,i+=X,d-=X,A+=X,f.length-=X;break}f.mode=tt;break;case ft:for(;O<14;){if(T===0)break t;T--,x+=U[i++]<>>=5,O-=5,f.ndist=(x&31)+1,x>>>=5,O-=5,f.ncode=(x&15)+4,x>>>=4,O-=4,f.nlen>286||f.ndist>30){k.msg="too many length or distance symbols",f.mode=ut;break}f.have=0,f.mode=Dt;case Dt:for(;f.have>>=3,O-=3}for(;f.have<19;)f.lens[Me[f.have++]]=0;if(f.lencode=f.lendyn,f.lenbits=7,te={bits:f.lenbits},Yt=m(c,f.lens,0,19,f.lencode,0,f.work,te),f.lenbits=te.bits,Yt){k.msg="invalid code lengths set",f.mode=ut;break}f.have=0,f.mode=kt;case kt:for(;f.have>>24,xt=mt>>>16&255,Tt=mt&65535,!(lt<=O);){if(T===0)break t;T--,x+=U[i++]<>>=lt,O-=lt,f.lens[f.have++]=Tt;else{if(Tt===16){for(Jt=lt+2;O>>=lt,O-=lt,f.have===0){k.msg="invalid bit length repeat",f.mode=ut;break}yt=f.lens[f.have-1],X=3+(x&3),x>>>=2,O-=2}else if(Tt===17){for(Jt=lt+3;O>>=lt,O-=lt,yt=0,X=3+(x&7),x>>>=3,O-=3}else{for(Jt=lt+7;O>>=lt,O-=lt,yt=0,X=11+(x&127),x>>>=7,O-=7}if(f.have+X>f.nlen+f.ndist){k.msg="invalid bit length repeat",f.mode=ut;break}for(;X--;)f.lens[f.have++]=yt}}if(f.mode===ut)break;if(f.lens[256]===0){k.msg="invalid code -- missing end-of-block",f.mode=ut;break}if(f.lenbits=9,te={bits:f.lenbits},Yt=m(u,f.lens,0,f.nlen,f.lencode,0,f.work,te),f.lenbits=te.bits,Yt){k.msg="invalid literal/lengths set",f.mode=ut;break}if(f.distbits=6,f.distcode=f.distdyn,te={bits:f.distbits},Yt=m(g,f.lens,f.nlen,f.ndist,f.distcode,0,f.work,te),f.distbits=te.bits,Yt){k.msg="invalid distances set",f.mode=ut;break}if(f.mode=vt,z===C)break t;case vt:f.mode=at;case at:if(T>=6&&d>=258){k.next_out=A,k.avail_out=d,k.next_in=i,k.avail_in=T,f.hold=x,f.bits=O,n(k,Y),A=k.next_out,q=k.output,d=k.avail_out,i=k.next_in,U=k.input,T=k.avail_in,x=f.hold,O=f.bits,f.mode===tt&&(f.back=-1);break}for(f.back=0;mt=f.lencode[x&(1<>>24,xt=mt>>>16&255,Tt=mt&65535,!(lt<=O);){if(T===0)break t;T--,x+=U[i++]<>Rt)],lt=mt>>>24,xt=mt>>>16&255,Tt=mt&65535,!(Rt+lt<=O);){if(T===0)break t;T--,x+=U[i++]<>>=Rt,O-=Rt,f.back+=Rt}if(x>>>=lt,O-=lt,f.back+=lt,f.length=Tt,xt===0){f.mode=ct;break}if(xt&32){f.back=-1,f.mode=tt;break}if(xt&64){k.msg="invalid literal/length code",f.mode=ut;break}f.extra=xt&15,f.mode=St;case St:if(f.extra){for(Jt=f.extra;O>>=f.extra,O-=f.extra,f.back+=f.extra}f.was=f.length,f.mode=gt;case gt:for(;mt=f.distcode[x&(1<>>24,xt=mt>>>16&255,Tt=mt&65535,!(lt<=O);){if(T===0)break t;T--,x+=U[i++]<>Rt)],lt=mt>>>24,xt=mt>>>16&255,Tt=mt&65535,!(Rt+lt<=O);){if(T===0)break t;T--,x+=U[i++]<>>=Rt,O-=Rt,f.back+=Rt}if(x>>>=lt,O-=lt,f.back+=lt,xt&64){k.msg="invalid distance code",f.mode=ut;break}f.offset=Tt,f.extra=xt&15,f.mode=dt;case dt:if(f.extra){for(Jt=f.extra;O>>=f.extra,O-=f.extra,f.back+=f.extra}if(f.offset>f.dmax){k.msg="invalid distance too far back",f.mode=ut;break}f.mode=bt;case bt:if(d===0)break t;if(X=Y-d,f.offset>X){if(X=f.offset-X,X>f.whave&&f.sane){k.msg="invalid distance too far back",f.mode=ut;break}X>f.wnext?(X-=f.wnext,ot=f.wsize-X):ot=f.wnext-X,X>f.length&&(X=f.length),qt=f.window}else qt=q,ot=A-f.offset,X=f.length;X>d&&(X=d),d-=X,f.length-=X;do q[A++]=qt[ot++];while(--X);f.length===0&&(f.mode=at);break;case ct:if(d===0)break t;q[A++]=f.length,d--,f.mode=at;break;case At:if(f.wrap){for(;O<32;){if(T===0)break t;T--,x|=U[i++]<=1&&at[Z]===0;Z--);if(Q>Z&&(Q=Z),Z===0)return y[w++]=20971520,y[w++]=20971520,E.bits=1,0;for(R=1;R0&&(_===m||Z!==1))return-1;for(St[1]=0,D=1;Dh||_===u&&j>n)return 1;for(;;){bt=D-G,S[B]vt?(ct=gt[dt+S[B]],At=Dt[kt+S[B]]):(ct=96,At=0),nt=1<>G)+ht]=bt<<24|ct<<16|At|0;while(ht!==0);for(nt=1<>=1;if(nt!==0?(tt&=nt-1,tt+=nt):tt=0,B++,--at[D]===0){if(D===Z)break;D=p[I+S[B]]}if(D>Q&&(tt&st)!==H){for(G===0&&(G=Q),ft+=R,J=D-G,$=1<h||_===u&&j>n)return 1;H=tt&st,y[H]=Q<<24|J<<16|ft-w|0}}return tt!==0&&(y[ft+tt]=D-G<<24|4194304|0),E.bits=Q,0}},{"../utils/common":41}],51:[function(e,r,s){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,r,s){var l=e("../utils/common"),a=4,h=0,n=1,m=2;function c(b){for(var M=b.length;--M>=0;)b[M]=0}var u=0,g=1,v=2,F=3,C=258,o=29,_=256,p=_+1+o,I=30,P=19,y=2*p+1,w=15,S=16,E=7,N=256,D=16,B=17,R=18,Z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$=512,j=new Array((p+2)*2);c(j);var tt=new Array(I*2);c(tt);var nt=new Array($);c(nt);var ht=new Array(C-F+1);c(ht);var H=new Array(o);c(H);var st=new Array(I);c(st);function ft(b,M,V,W,k){this.static_tree=b,this.extra_bits=M,this.extra_base=V,this.elems=W,this.max_length=k,this.has_stree=b&&b.length}var Dt,kt,vt;function at(b,M){this.dyn_tree=b,this.max_code=0,this.stat_desc=M}function St(b){return b<256?nt[b]:nt[256+(b>>>7)]}function gt(b,M){b.pending_buf[b.pending++]=M&255,b.pending_buf[b.pending++]=M>>>8&255}function dt(b,M,V){b.bi_valid>S-V?(b.bi_buf|=M<>S-b.bi_valid,b.bi_valid+=V-S):(b.bi_buf|=M<>>=1,V<<=1;while(--M>0);return V>>>1}function At(b){b.bi_valid===16?(gt(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):b.bi_valid>=8&&(b.pending_buf[b.pending++]=b.bi_buf&255,b.bi_buf>>=8,b.bi_valid-=8)}function Ut(b,M){var V=M.dyn_tree,W=M.max_code,k=M.stat_desc.static_tree,z=M.stat_desc.has_stree,f=M.stat_desc.extra_bits,U=M.stat_desc.extra_base,q=M.stat_desc.max_length,i,A,T,d,x,O,K=0;for(d=0;d<=w;d++)b.bl_count[d]=0;for(V[b.heap[b.heap_max]*2+1]=0,i=b.heap_max+1;iq&&(d=q,K++),V[A*2+1]=d,!(A>W)&&(b.bl_count[d]++,x=0,A>=U&&(x=f[A-U]),O=V[A*2],b.opt_len+=O*(d+x),z&&(b.static_len+=O*(k[A*2+1]+x)));if(K!==0){do{for(d=q-1;b.bl_count[d]===0;)d--;b.bl_count[d]--,b.bl_count[d+1]+=2,b.bl_count[q]--,K-=2}while(K>0);for(d=q;d!==0;d--)for(A=b.bl_count[d];A!==0;)T=b.heap[--i],!(T>W)&&(V[T*2+1]!==d&&(b.opt_len+=(d-V[T*2+1])*V[T*2],V[T*2+1]=d),A--)}}function Bt(b,M,V){var W=new Array(w+1),k=0,z,f;for(z=1;z<=w;z++)W[z]=k=k+V[z-1]<<1;for(f=0;f<=M;f++){var U=b[f*2+1];U!==0&&(b[f*2]=ct(W[U]++,U))}}function ut(){var b,M,V,W,k,z=new Array(w+1);for(V=0,W=0;W>=7;W8?gt(b,b.bi_buf):b.bi_valid>0&&(b.pending_buf[b.pending++]=b.bi_buf),b.bi_buf=0,b.bi_valid=0}function Vt(b,M,V,W){he(b),gt(b,V),gt(b,~V),l.arraySet(b.pending_buf,b.window,M,V,b.pending),b.pending+=V}function Mt(b,M,V,W){var k=M*2,z=V*2;return b[k]>1;f>=1;f--)_t(b,V,f);i=z;do f=b.heap[1],b.heap[1]=b.heap[b.heap_len--],_t(b,V,1),U=b.heap[1],b.heap[--b.heap_max]=f,b.heap[--b.heap_max]=U,V[i*2]=V[f*2]+V[U*2],b.depth[i]=(b.depth[f]>=b.depth[U]?b.depth[f]:b.depth[U])+1,V[f*2+1]=V[U*2+1]=i,b.heap[1]=i++,_t(b,V,1);while(b.heap_len>=2);b.heap[--b.heap_max]=b.heap[1],Ut(b,M),Bt(V,q,b.bl_count)}function de(b,M,V){var W,k=-1,z,f=M[0*2+1],U=0,q=7,i=4;for(f===0&&(q=138,i=3),M[(V+1)*2+1]=65535,W=0;W<=V;W++)z=f,f=M[(W+1)*2+1],!(++U=3&&b.bl_tree[G[M]*2+1]===0;M--);return b.opt_len+=3*(M+1)+5+5+4,M}function ue(b,M,V,W){var k;for(dt(b,M-257,5),dt(b,V-1,5),dt(b,W-4,4),k=0;k>>=1)if(M&1&&b.dyn_ltree[V*2]!==0)return h;if(b.dyn_ltree[18]!==0||b.dyn_ltree[20]!==0||b.dyn_ltree[26]!==0)return n;for(V=32;V<_;V++)if(b.dyn_ltree[V*2]!==0)return n;return h}var Wt=!1;function _e(b){Wt||(ut(),Wt=!0),b.l_desc=new at(b.dyn_ltree,Dt),b.d_desc=new at(b.dyn_dtree,kt),b.bl_desc=new at(b.bl_tree,vt),b.bi_buf=0,b.bi_valid=0,Nt(b)}function se(b,M,V,W){dt(b,(u<<1)+(W?1:0),3),Vt(b,M,V)}function Pt(b){dt(b,g<<1,3),bt(b,N,j),At(b)}function Gt(b,M,V,W){var k,z,f=0;b.level>0?(b.strm.data_type===m&&(b.strm.data_type=ne(b)),jt(b,b.l_desc),jt(b,b.d_desc),f=Zt(b),k=b.opt_len+3+7>>>3,z=b.static_len+3+7>>>3,z<=k&&(k=z)):k=z=V+5,V+4<=k&&M!==-1?se(b,M,V,W):b.strategy===a||z===k?(dt(b,(g<<1)+(W?1:0),3),rt(b,j,tt)):(dt(b,(v<<1)+(W?1:0),3),ue(b,b.l_desc.max_code+1,b.d_desc.max_code+1,f+1),rt(b,b.dyn_ltree,b.dyn_dtree)),Nt(b),W&&he(b)}function pe(b,M,V){return b.pending_buf[b.d_buf+b.last_lit*2]=M>>>8&255,b.pending_buf[b.d_buf+b.last_lit*2+1]=M&255,b.pending_buf[b.l_buf+b.last_lit]=V&255,b.last_lit++,M===0?b.dyn_ltree[V*2]++:(b.matches++,M--,b.dyn_ltree[(ht[V]+_+1)*2]++,b.dyn_dtree[St(M)*2]++),b.last_lit===b.lit_bufsize-1}s._tr_init=_e,s._tr_stored_block=se,s._tr_flush_block=Gt,s._tr_tally=pe,s._tr_align=Pt},{"../utils/common":41}],53:[function(e,r,s){function l(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}r.exports=l},{}],54:[function(e,r,s){(function(l){(function(a,h){if(a.setImmediate)return;var n=1,m={},c=!1,u=a.document,g;function v(E){typeof E!="function"&&(E=new Function(""+E));for(var N=new Array(arguments.length-1),D=0;D"u"?typeof l>"u"?this:l:self)}).call(this,typeof Ie<"u"?Ie:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Re);var Ke=Re.exports,Ge=He(Ke);class Je{load(t,e){fetch(t).then(function(r){return r.status===200||r.status===0?Promise.resolve(r.blob()):Promise.reject(new Error(r.statusText))}).then(Ge.loadAsync).then(async function(r){let s=null;const l={};for(let h in r.files){r.files[h];const n=h.split(".").pop();if(n==="ssfb"){if(s!==null){e(null,null,null,new Error("already exist ssfb file"));return}s=h}else if(n==="png"){const m=h.split(".").slice(0,-1).join(".");l[m]=await r.file(h).async("uint8array")}}let a=await r.file(s).async("uint8array");e(s,a,l,null)},function(s){e(null,null,null,s)})}}class $e{static createAnimePackMap(t){const e=t.fbObj.animePacksLength(),r={};for(let s=0;s{e.setupForLoadComplete(r)})}loadSspkg(t){const e=this;new Je().load(t,(s,l,a,h)=>{if(h!==null)return;let n=new Ne(s,l,a,()=>{e.setupForLoadComplete(n)})})}setupForLoadComplete(t){this.projectData=t,this.animePackMap=$e.createAnimePackMap(this.projectData),this.onComplete!==null&&this.onComplete()}loadAnimation(t,e){let r=!1;this.textureContainer==null&&(r=!0,this.textureContainer=new We(this));const s=this.animePackMap[t],l=s.animePack,h=s.animationMap[e];this.currentAnimation=h,this.currentAnimePack=l,this.textureContainer.Setup(t,e);const n=h.labelDataLength();for(let m=0;m= 0)
- return vec2;
+ if (c3 <= 0 && c3 >= 0) return vec2;
const ca = c1 / c3;
const cb = c2 / c3;
if (0 <= ca && 1 >= ca && (0 <= cb && 1 >= cb)) {
@@ -3162,6 +3133,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
this.parentAlpha = 1;
this.prevCellID = [];
this.prevPartObject = [];
+ this.changeCellID = [];
this.substituteOverWrite = [];
this.substituteKeyParam = [];
this.alphaBlendType = [];
@@ -3227,12 +3199,14 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
const partsLength = animePackData.partsLength();
this.prevCellID = new Array(partsLength);
this.prevPartObject = new Array(partsLength);
+ this.changeCellID = new Array(partsLength);
this.substituteOverWrite = new Array(partsLength);
this.substituteKeyParam = new Array(partsLength);
for (let j = 0; j < partsLength; j++) {
const index = animePackData.parts(j).index();
this.prevCellID[index] = -1;
this.prevPartObject[index] = null;
+ this.changeCellID[index] = -1;
this.substituteOverWrite[index] = null;
this.substituteKeyParam[index] = null;
}
@@ -3350,8 +3324,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
* @param {boolean} _skipEnabled - 描画更新が間に合わないときにフレームをスキップするかどうか
*/
SetAnimationFramerate(fps, _skipEnabled = true) {
- if (fps <= 0)
- return;
+ if (fps <= 0) return;
this.updateInterval = 1e3 / fps;
this.skipEnabled = _skipEnabled;
}
@@ -3361,8 +3334,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
* @param {boolean} _skipEnabled - 描画更新が間に合わないときにフレームをスキップするかどうか
*/
SetAnimationSpeed(fpsRate, _skipEnabled = true) {
- if (fpsRate === 0)
- return;
+ if (fpsRate === 0) return;
this.playDirection = fpsRate > 0 ? 1 : -1;
this.updateInterval = 1e3 / (this.playerLib.animationData.fps() * fpsRate * this.playDirection);
this.skipEnabled = _skipEnabled;
@@ -3495,6 +3467,45 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
SetPlayEndCallback(fn) {
this.playEndCallback = fn;
}
+ /**
+ * パーツに割り当たるセルを変更します.
+ *
+ * @param {string} partsname - パーツ名
+ * @param {string} sscename - セルマップ名
+ * @param {string} cellname - 表示させたいセル名
+ *
+ * @return {void}
+ */
+ SetPartCell(partsname, sscename, cellname) {
+ if (this.playerLib.animationData) {
+ let changeCellIndex = -1;
+ if (sscename !== "" && cellname !== "") {
+ const fbObj = this.playerLib.fbObj;
+ const numCells = this.playerLib.fbObj.numCells();
+ for (let i = 0; i < numCells; i++) {
+ const cell = fbObj.cells(i);
+ const name1 = cell.name();
+ const cellMap = cell.cellMap();
+ const name2 = cellMap.name();
+ if (cellname === name1 && sscename === name2) {
+ changeCellIndex = i;
+ break;
+ }
+ }
+ }
+ const animePackData = this.playerLib.animePackData;
+ const partsLength = animePackData.partsLength();
+ for (let i = 0; i < partsLength; i++) {
+ const part = animePackData.parts(i);
+ const index = part.index();
+ const partName = part.name();
+ if (partName === partsname) {
+ this.changeCellID[index] = changeCellIndex;
+ break;
+ }
+ }
+ }
+ }
/**
* パーツの描画モードを取得する
* @return {array} - 全パーツの描画モード
@@ -3548,8 +3559,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
*/
GetColorMatrixFilter(blendType, rate, argb32) {
const key = blendType.toString() + "_" + rate.toString() + "_" + argb32.toString();
- if (this.colorMatrixFilterCache[key])
- return this.colorMatrixFilterCache[key];
+ if (this.colorMatrixFilterCache[key]) return this.colorMatrixFilterCache[key];
const colorMatrix = new pixi_js.ColorMatrixFilter();
const ca = ((argb32 & 4278190080) >>> 24) / 255;
const cr = ((argb32 & 16711680) >>> 16) / 255;
@@ -3664,7 +3674,10 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
for (let ii = 0; ii < l; ii = ii + 1 | 0) {
const i = this.playerLib.prio2index[ii];
const data = fd[i];
- const cellID = data.cellIndex;
+ let cellID = data.cellIndex;
+ if (this.changeCellID[i] !== -1) {
+ cellID = this.changeCellID[i];
+ }
let partObject = this.prevPartObject[i];
const part = this.playerLib.animePackData.parts(i);
const partType = part.type();
@@ -3680,16 +3693,14 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
case SsPartType.Normal:
case SsPartType.Mask:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeCellMesh(cellID);
partObject.label = part.name();
}
break;
case SsPartType.Mesh:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeMeshCellMesh(i, cellID);
partObject.label = part.name();
}
@@ -3697,23 +3708,20 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
case SsPartType.Nulltype:
case SsPartType.Joint:
if (this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = new pixi_js.Container();
partObject.label = part.name();
}
break;
default:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeCellMesh(cellID);
partObject.label = part.name();
}
break;
}
- if (partObject == null)
- continue;
+ if (partObject == null) continue;
this.prevCellID[i] = cellID;
this.prevPartObject[i] = partObject;
switch (partType) {
@@ -3780,17 +3788,13 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
}
const selfTopKeyframe = refKeyframe;
let reftime = Math.floor((time - selfTopKeyframe) * refSpeed);
- if (reftime < 0)
- continue;
- if (selfTopKeyframe > time)
- continue;
+ if (reftime < 0) continue;
+ if (selfTopKeyframe > time) continue;
const inst_scale = refEndframe - refStartframe + 1;
- if (inst_scale <= 0)
- continue;
+ if (inst_scale <= 0) continue;
let nowloop = Math.floor(reftime / inst_scale);
let checkloopnum = refloopNum;
- if (pingpong)
- checkloopnum = checkloopnum * 2;
+ if (pingpong) checkloopnum = checkloopnum * 2;
if (!infinity) {
if (nowloop >= checkloopnum) {
reftime = inst_scale - 1;
@@ -3922,8 +3926,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
if (blendMode === "multiply" || blendMode === "screen") {
mesh.alpha = 1;
}
- if (partType !== SsPartType.Mask)
- this.addChild(mesh);
+ if (partType !== SsPartType.Mask) this.addChild(mesh);
break;
}
case SsPartType.Nulltype: {
@@ -14784,7 +14787,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
{
bi_windup(s); /* align on byte boundary */
- if (header) {
+ {
put_short(s, len);
put_short(s, ~len);
}
@@ -15282,7 +15285,7 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
//int last; /* one if this is the last block for a file */
{
send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */
- copy_block(s, buf, stored_len, true); /* with header */
+ copy_block(s, buf, stored_len); /* with header */
}
@@ -15787,16 +15790,18 @@ var ss6PlayerViewer = (function (exports, pixi_js) {
getFrameDataMap() {
return this.frameDataMap;
}
- async init(canvasWrapperElement) {
+ async init(canvasWrapperElement, options) {
this.canvasWidth = canvasWrapperElement.clientWidth;
this.canvasHeight = canvasWrapperElement.clientHeight;
const pixiApplication = new pixi_js.Application();
- await pixiApplication.init({
+ const pixiOptions = options === void 0 || options === null ? {
+ // default options
preference: "webgpu",
width: this.canvasWidth,
height: this.canvasHeight,
backgroundAlpha: 0
- });
+ } : options;
+ await pixiApplication.init(pixiOptions);
const canvasElement = pixiApplication.canvas;
canvasWrapperElement.appendChild(canvasElement);
const mainContainer = new MainContainer();
diff --git a/docs/mz/SampleProject/js/plugins/ss6player-rpgmakermz.js b/docs/mz/SampleProject/js/plugins/ss6player-rpgmakermz.js
index a37f297..c0303fd 100644
--- a/docs/mz/SampleProject/js/plugins/ss6player-rpgmakermz.js
+++ b/docs/mz/SampleProject/js/plugins/ss6player-rpgmakermz.js
@@ -1,6 +1,6 @@
/**
* -----------------------------------------------------------
- * SS6Player For RPG Maker MZ v0.8.2
+ * SS6Player For RPG Maker MZ v0.8.3
*
* Copyright(C) CRI Middleware Co., Ltd.
* https://www.webtech.co.jp/
@@ -14,7 +14,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
/*:ja
* @target MZ
* @plugindesc SpriteStudio 7.0 & 6 アニメーション再生プラグイン
- * @version 0.8.2
+ * @version 0.8.3
* @author CRI Middleware Co., Ltd.
* @url https://github.com/SpriteStudio/SS6PlayerForWeb/tree/master/packages/ss6player-rpgmakermz
* @help SS6Player for RPG Maker MZ
@@ -2607,62 +2607,34 @@ Imported.SS6PlayerRPGMakerMZ = true;
fd.flag1 = f1;
fd.flag2 = f2;
let id = 0;
- if (f1 & PART_FLAG.INVISIBLE)
- fd.f_hide = true;
- if (f1 & PART_FLAG.FLIP_H)
- fd.f_flipH = true;
- if (f1 & PART_FLAG.FLIP_V)
- fd.f_flipV = true;
- if (f1 & PART_FLAG.CELL_INDEX)
- fd.cellIndex = curPartState.data(id++);
- if (f1 & PART_FLAG.POSITION_X)
- fd.positionX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.POSITION_Y)
- fd.positionY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.POSITION_Z)
- id++;
- if (f1 & PART_FLAG.PIVOT_X)
- fd.pivotX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.PIVOT_Y)
- fd.pivotY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.ROTATIONX)
- id++;
- if (f1 & PART_FLAG.ROTATIONY)
- id++;
- if (f1 & PART_FLAG.ROTATIONZ)
- fd.rotationZ = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.SCALE_X)
- fd.scaleX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.SCALE_Y)
- fd.scaleY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.LOCALSCALE_X)
- fd.localscaleX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.LOCALSCALE_Y)
- fd.localscaleY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.OPACITY)
- fd.opacity = curPartState.data(id++);
- if (f1 & PART_FLAG.LOCALOPACITY)
- fd.localopacity = curPartState.data(id++);
- if (f1 & PART_FLAG.SIZE_X)
- fd.size_X = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.SIZE_Y)
- fd.size_Y = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.U_MOVE)
- fd.uv_move_X = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.V_MOVE)
- fd.uv_move_Y = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.UV_ROTATION)
- fd.uv_rotation = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.U_SCALE)
- fd.uv_scale_X = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.V_SCALE)
- fd.uv_scale_Y = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.BOUNDINGRADIUS)
- id++;
- if (f1 & PART_FLAG.MASK)
- fd.masklimen = curPartState.data(id++);
- if (f1 & PART_FLAG.PRIORITY)
- fd.priority = curPartState.data(id++);
+ if (f1 & PART_FLAG.INVISIBLE) fd.f_hide = true;
+ if (f1 & PART_FLAG.FLIP_H) fd.f_flipH = true;
+ if (f1 & PART_FLAG.FLIP_V) fd.f_flipV = true;
+ if (f1 & PART_FLAG.CELL_INDEX) fd.cellIndex = curPartState.data(id++);
+ if (f1 & PART_FLAG.POSITION_X) fd.positionX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.POSITION_Y) fd.positionY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.POSITION_Z) id++;
+ if (f1 & PART_FLAG.PIVOT_X) fd.pivotX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.PIVOT_Y) fd.pivotY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.ROTATIONX) id++;
+ if (f1 & PART_FLAG.ROTATIONY) id++;
+ if (f1 & PART_FLAG.ROTATIONZ) fd.rotationZ = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.SCALE_X) fd.scaleX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.SCALE_Y) fd.scaleY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.LOCALSCALE_X) fd.localscaleX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.LOCALSCALE_Y) fd.localscaleY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.OPACITY) fd.opacity = curPartState.data(id++);
+ if (f1 & PART_FLAG.LOCALOPACITY) fd.localopacity = curPartState.data(id++);
+ if (f1 & PART_FLAG.SIZE_X) fd.size_X = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.SIZE_Y) fd.size_Y = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.U_MOVE) fd.uv_move_X = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.V_MOVE) fd.uv_move_Y = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.UV_ROTATION) fd.uv_rotation = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.U_SCALE) fd.uv_scale_X = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.V_SCALE) fd.uv_scale_Y = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.BOUNDINGRADIUS) id++;
+ if (f1 & PART_FLAG.MASK) fd.masklimen = curPartState.data(id++);
+ if (f1 & PART_FLAG.PRIORITY) fd.priority = curPartState.data(id++);
if (f1 & PART_FLAG.INSTANCE_KEYFRAME) {
fd.instanceValue_curKeyframe = curPartState.data(id++);
fd.instanceValue_startFrame = curPartState.data(id++);
@@ -2937,8 +2909,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
const c1 = (LDy - RUy) * (LDx - LUx) - (LDx - RUx) * (LDy - LUy);
const c2 = (RDx - LUx) * (LDy - LUy) - (RDy - LUy) * (LDx - LUx);
const c3 = (RDx - LUx) * (LDy - RUy) - (RDy - LUy) * (LDx - RUx);
- if (c3 <= 0 && c3 >= 0)
- return vec2;
+ if (c3 <= 0 && c3 >= 0) return vec2;
const ca = c1 / c3;
const cb = c2 / c3;
if (0 <= ca && 1 >= ca && (0 <= cb && 1 >= cb)) {
@@ -3412,8 +3383,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
* @param {boolean} _skipEnabled - 描画更新が間に合わないときにフレームをスキップするかどうか
*/
SetAnimationFramerate(fps, _skipEnabled = true) {
- if (fps <= 0)
- return;
+ if (fps <= 0) return;
this.updateInterval = 1e3 / fps;
this.skipEnabled = _skipEnabled;
}
@@ -3423,8 +3393,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
* @param {boolean} _skipEnabled - 描画更新が間に合わないときにフレームをスキップするかどうか
*/
SetAnimationSpeed(fpsRate, _skipEnabled = true) {
- if (fpsRate === 0)
- return;
+ if (fpsRate === 0) return;
this.playDirection = fpsRate > 0 ? 1 : -1;
this.updateInterval = 1e3 / (this.playerLib.animationData.fps() * fpsRate * this.playDirection);
this.skipEnabled = _skipEnabled;
@@ -3610,8 +3579,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
*/
GetColorMatrixFilter(blendType, rate, argb32) {
const key = blendType.toString() + "_" + rate.toString() + "_" + argb32.toString();
- if (this.colorMatrixFilterCache[key])
- return this.colorMatrixFilterCache[key];
+ if (this.colorMatrixFilterCache[key]) return this.colorMatrixFilterCache[key];
const colorMatrix = new filterColorMatrix.ColorMatrixFilter();
const ca = ((argb32 & 4278190080) >>> 24) / 255;
const cr = ((argb32 & 16711680) >>> 16) / 255;
@@ -3742,16 +3710,14 @@ Imported.SS6PlayerRPGMakerMZ = true;
case SsPartType.Normal:
case SsPartType.Mask:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeCellMesh(cellID);
partObject.name = part.name();
}
break;
case SsPartType.Mesh:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeMeshCellMesh(i, cellID);
partObject.name = part.name();
}
@@ -3759,23 +3725,20 @@ Imported.SS6PlayerRPGMakerMZ = true;
case SsPartType.Nulltype:
case SsPartType.Joint:
if (this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = new display.Container();
partObject.name = part.name();
}
break;
default:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeCellMesh(cellID);
partObject.name = part.name();
}
break;
}
- if (partObject == null)
- continue;
+ if (partObject == null) continue;
this.prevCellID[i] = cellID;
this.prevPartObject[i] = partObject;
switch (partType) {
@@ -3842,17 +3805,13 @@ Imported.SS6PlayerRPGMakerMZ = true;
}
const selfTopKeyframe = refKeyframe;
let reftime = Math.floor((time - selfTopKeyframe) * refSpeed);
- if (reftime < 0)
- continue;
- if (selfTopKeyframe > time)
- continue;
+ if (reftime < 0) continue;
+ if (selfTopKeyframe > time) continue;
const inst_scale = refEndframe - refStartframe + 1;
- if (inst_scale <= 0)
- continue;
+ if (inst_scale <= 0) continue;
let nowloop = Math.floor(reftime / inst_scale);
let checkloopnum = refloopNum;
- if (pingpong)
- checkloopnum = checkloopnum * 2;
+ if (pingpong) checkloopnum = checkloopnum * 2;
if (!infinity) {
if (nowloop >= checkloopnum) {
reftime = inst_scale - 1;
@@ -3984,8 +3943,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
if (blendMode === constants.BLEND_MODES.MULTIPLY || blendMode === constants.BLEND_MODES.SCREEN) {
mesh.alpha = 1;
}
- if (partType !== SsPartType.Mask)
- this.addChild(mesh);
+ if (partType !== SsPartType.Mask) this.addChild(mesh);
break;
}
case SsPartType.Nulltype: {
@@ -4129,10 +4087,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
var __defProp$1 = Object.defineProperty;
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
- var __publicField$1 = (obj, key, value) => {
- __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
- return value;
- };
+ var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
const _PluginParameters = class _PluginParameters {
// string
constructor() {
@@ -4177,10 +4132,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
- var __publicField = (obj, key, value) => {
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
- return value;
- };
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
const _SS6ProjectManager = class _SS6ProjectManager {
constructor() {
__publicField(this, "ssprojectMap");
diff --git a/docs/mz/ss6player-rpgmakermz.js b/docs/mz/ss6player-rpgmakermz.js
index a37f297..c0303fd 100644
--- a/docs/mz/ss6player-rpgmakermz.js
+++ b/docs/mz/ss6player-rpgmakermz.js
@@ -1,6 +1,6 @@
/**
* -----------------------------------------------------------
- * SS6Player For RPG Maker MZ v0.8.2
+ * SS6Player For RPG Maker MZ v0.8.3
*
* Copyright(C) CRI Middleware Co., Ltd.
* https://www.webtech.co.jp/
@@ -14,7 +14,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
/*:ja
* @target MZ
* @plugindesc SpriteStudio 7.0 & 6 アニメーション再生プラグイン
- * @version 0.8.2
+ * @version 0.8.3
* @author CRI Middleware Co., Ltd.
* @url https://github.com/SpriteStudio/SS6PlayerForWeb/tree/master/packages/ss6player-rpgmakermz
* @help SS6Player for RPG Maker MZ
@@ -2607,62 +2607,34 @@ Imported.SS6PlayerRPGMakerMZ = true;
fd.flag1 = f1;
fd.flag2 = f2;
let id = 0;
- if (f1 & PART_FLAG.INVISIBLE)
- fd.f_hide = true;
- if (f1 & PART_FLAG.FLIP_H)
- fd.f_flipH = true;
- if (f1 & PART_FLAG.FLIP_V)
- fd.f_flipV = true;
- if (f1 & PART_FLAG.CELL_INDEX)
- fd.cellIndex = curPartState.data(id++);
- if (f1 & PART_FLAG.POSITION_X)
- fd.positionX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.POSITION_Y)
- fd.positionY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.POSITION_Z)
- id++;
- if (f1 & PART_FLAG.PIVOT_X)
- fd.pivotX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.PIVOT_Y)
- fd.pivotY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.ROTATIONX)
- id++;
- if (f1 & PART_FLAG.ROTATIONY)
- id++;
- if (f1 & PART_FLAG.ROTATIONZ)
- fd.rotationZ = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.SCALE_X)
- fd.scaleX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.SCALE_Y)
- fd.scaleY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.LOCALSCALE_X)
- fd.localscaleX = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.LOCALSCALE_Y)
- fd.localscaleY = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.OPACITY)
- fd.opacity = curPartState.data(id++);
- if (f1 & PART_FLAG.LOCALOPACITY)
- fd.localopacity = curPartState.data(id++);
- if (f1 & PART_FLAG.SIZE_X)
- fd.size_X = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.SIZE_Y)
- fd.size_Y = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.U_MOVE)
- fd.uv_move_X = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.V_MOVE)
- fd.uv_move_Y = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.UV_ROTATION)
- fd.uv_rotation = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.U_SCALE)
- fd.uv_scale_X = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.V_SCALE)
- fd.uv_scale_Y = this.I2F(curPartState.data(id++));
- if (f1 & PART_FLAG.BOUNDINGRADIUS)
- id++;
- if (f1 & PART_FLAG.MASK)
- fd.masklimen = curPartState.data(id++);
- if (f1 & PART_FLAG.PRIORITY)
- fd.priority = curPartState.data(id++);
+ if (f1 & PART_FLAG.INVISIBLE) fd.f_hide = true;
+ if (f1 & PART_FLAG.FLIP_H) fd.f_flipH = true;
+ if (f1 & PART_FLAG.FLIP_V) fd.f_flipV = true;
+ if (f1 & PART_FLAG.CELL_INDEX) fd.cellIndex = curPartState.data(id++);
+ if (f1 & PART_FLAG.POSITION_X) fd.positionX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.POSITION_Y) fd.positionY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.POSITION_Z) id++;
+ if (f1 & PART_FLAG.PIVOT_X) fd.pivotX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.PIVOT_Y) fd.pivotY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.ROTATIONX) id++;
+ if (f1 & PART_FLAG.ROTATIONY) id++;
+ if (f1 & PART_FLAG.ROTATIONZ) fd.rotationZ = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.SCALE_X) fd.scaleX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.SCALE_Y) fd.scaleY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.LOCALSCALE_X) fd.localscaleX = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.LOCALSCALE_Y) fd.localscaleY = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.OPACITY) fd.opacity = curPartState.data(id++);
+ if (f1 & PART_FLAG.LOCALOPACITY) fd.localopacity = curPartState.data(id++);
+ if (f1 & PART_FLAG.SIZE_X) fd.size_X = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.SIZE_Y) fd.size_Y = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.U_MOVE) fd.uv_move_X = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.V_MOVE) fd.uv_move_Y = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.UV_ROTATION) fd.uv_rotation = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.U_SCALE) fd.uv_scale_X = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.V_SCALE) fd.uv_scale_Y = this.I2F(curPartState.data(id++));
+ if (f1 & PART_FLAG.BOUNDINGRADIUS) id++;
+ if (f1 & PART_FLAG.MASK) fd.masklimen = curPartState.data(id++);
+ if (f1 & PART_FLAG.PRIORITY) fd.priority = curPartState.data(id++);
if (f1 & PART_FLAG.INSTANCE_KEYFRAME) {
fd.instanceValue_curKeyframe = curPartState.data(id++);
fd.instanceValue_startFrame = curPartState.data(id++);
@@ -2937,8 +2909,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
const c1 = (LDy - RUy) * (LDx - LUx) - (LDx - RUx) * (LDy - LUy);
const c2 = (RDx - LUx) * (LDy - LUy) - (RDy - LUy) * (LDx - LUx);
const c3 = (RDx - LUx) * (LDy - RUy) - (RDy - LUy) * (LDx - RUx);
- if (c3 <= 0 && c3 >= 0)
- return vec2;
+ if (c3 <= 0 && c3 >= 0) return vec2;
const ca = c1 / c3;
const cb = c2 / c3;
if (0 <= ca && 1 >= ca && (0 <= cb && 1 >= cb)) {
@@ -3412,8 +3383,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
* @param {boolean} _skipEnabled - 描画更新が間に合わないときにフレームをスキップするかどうか
*/
SetAnimationFramerate(fps, _skipEnabled = true) {
- if (fps <= 0)
- return;
+ if (fps <= 0) return;
this.updateInterval = 1e3 / fps;
this.skipEnabled = _skipEnabled;
}
@@ -3423,8 +3393,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
* @param {boolean} _skipEnabled - 描画更新が間に合わないときにフレームをスキップするかどうか
*/
SetAnimationSpeed(fpsRate, _skipEnabled = true) {
- if (fpsRate === 0)
- return;
+ if (fpsRate === 0) return;
this.playDirection = fpsRate > 0 ? 1 : -1;
this.updateInterval = 1e3 / (this.playerLib.animationData.fps() * fpsRate * this.playDirection);
this.skipEnabled = _skipEnabled;
@@ -3610,8 +3579,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
*/
GetColorMatrixFilter(blendType, rate, argb32) {
const key = blendType.toString() + "_" + rate.toString() + "_" + argb32.toString();
- if (this.colorMatrixFilterCache[key])
- return this.colorMatrixFilterCache[key];
+ if (this.colorMatrixFilterCache[key]) return this.colorMatrixFilterCache[key];
const colorMatrix = new filterColorMatrix.ColorMatrixFilter();
const ca = ((argb32 & 4278190080) >>> 24) / 255;
const cr = ((argb32 & 16711680) >>> 16) / 255;
@@ -3742,16 +3710,14 @@ Imported.SS6PlayerRPGMakerMZ = true;
case SsPartType.Normal:
case SsPartType.Mask:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeCellMesh(cellID);
partObject.name = part.name();
}
break;
case SsPartType.Mesh:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeMeshCellMesh(i, cellID);
partObject.name = part.name();
}
@@ -3759,23 +3725,20 @@ Imported.SS6PlayerRPGMakerMZ = true;
case SsPartType.Nulltype:
case SsPartType.Joint:
if (this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = new display.Container();
partObject.name = part.name();
}
break;
default:
if (cellID >= 0 && this.prevCellID[i] !== cellID) {
- if (partObject != null)
- partObject.destroy();
+ if (partObject != null) partObject.destroy();
partObject = this.MakeCellMesh(cellID);
partObject.name = part.name();
}
break;
}
- if (partObject == null)
- continue;
+ if (partObject == null) continue;
this.prevCellID[i] = cellID;
this.prevPartObject[i] = partObject;
switch (partType) {
@@ -3842,17 +3805,13 @@ Imported.SS6PlayerRPGMakerMZ = true;
}
const selfTopKeyframe = refKeyframe;
let reftime = Math.floor((time - selfTopKeyframe) * refSpeed);
- if (reftime < 0)
- continue;
- if (selfTopKeyframe > time)
- continue;
+ if (reftime < 0) continue;
+ if (selfTopKeyframe > time) continue;
const inst_scale = refEndframe - refStartframe + 1;
- if (inst_scale <= 0)
- continue;
+ if (inst_scale <= 0) continue;
let nowloop = Math.floor(reftime / inst_scale);
let checkloopnum = refloopNum;
- if (pingpong)
- checkloopnum = checkloopnum * 2;
+ if (pingpong) checkloopnum = checkloopnum * 2;
if (!infinity) {
if (nowloop >= checkloopnum) {
reftime = inst_scale - 1;
@@ -3984,8 +3943,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
if (blendMode === constants.BLEND_MODES.MULTIPLY || blendMode === constants.BLEND_MODES.SCREEN) {
mesh.alpha = 1;
}
- if (partType !== SsPartType.Mask)
- this.addChild(mesh);
+ if (partType !== SsPartType.Mask) this.addChild(mesh);
break;
}
case SsPartType.Nulltype: {
@@ -4129,10 +4087,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
var __defProp$1 = Object.defineProperty;
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
- var __publicField$1 = (obj, key, value) => {
- __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
- return value;
- };
+ var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
const _PluginParameters = class _PluginParameters {
// string
constructor() {
@@ -4177,10 +4132,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
- var __publicField = (obj, key, value) => {
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
- return value;
- };
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
const _SS6ProjectManager = class _SS6ProjectManager {
constructor() {
__publicField(this, "ssprojectMap");
diff --git a/docs/mz/ss6player-rpgmakermz.min.js b/docs/mz/ss6player-rpgmakermz.min.js
index a350091..50b13f0 100644
--- a/docs/mz/ss6player-rpgmakermz.min.js
+++ b/docs/mz/ss6player-rpgmakermz.min.js
@@ -1,6 +1,6 @@
/**
* -----------------------------------------------------------
- * SS6Player For RPG Maker MZ v0.8.2
+ * SS6Player For RPG Maker MZ v0.8.3
*
* Copyright(C) CRI Middleware Co., Ltd.
* https://www.webtech.co.jp/
@@ -14,7 +14,7 @@ Imported.SS6PlayerRPGMakerMZ = true;
/*:ja
* @target MZ
* @plugindesc SpriteStudio 7.0 & 6 アニメーション再生プラグイン
- * @version 0.8.2
+ * @version 0.8.3
* @author CRI Middleware Co., Ltd.
* @url https://github.com/SpriteStudio/SS6PlayerForWeb/tree/master/packages/ss6player-rpgmakermz
* @help SS6Player for RPG Maker MZ
@@ -156,4 +156,4 @@ Imported.SS6PlayerRPGMakerMZ = true;
*
*/
-var Imported=Imported||{};Imported.SS6PlayerRPGMakerMZ=!0,function(Jt,Nt,ht,gt,wt,k){"use strict";class Gt{}const pt=4,ut=4,O=4,st=new Int32Array(2),At=new Float32Array(st.buffer),kt=new Float64Array(st.buffer),mt=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Ft;(function(i){i[i.UTF8_BYTES=1]="UTF8_BYTES",i[i.UTF16_STRING=2]="UTF16_STRING"})(Ft||(Ft={}));class vt{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new vt(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){At[0]=e,this.writeInt32(t,st[0])}writeFloat64(t,e){kt[0]=e,this.writeInt32(t,st[mt?0:1]),this.writeInt32(t+4,st[mt?1:0])}getBufferIdentifier(){if(this.bytes_.length=0;s--)t.addInt32(e[s]);return t.endVector()}static startDataVector(t,e){t.startVector(4,e,4)}static endpartState(t){return t.endObject()}static createpartState(t,e,s,a,o){return R.startpartState(t),R.addIndex(t,e),R.addFlag1(t,s),R.addFlag2(t,a),R.addData(t,o),R.endpartState(t)}}class ot{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsframeDataIndex(t,e){return(e||new ot).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsframeDataIndex(t,e){return t.setPosition(t.position()+O),(e||new ot).__init(t.readInt32(t.position())+t.position(),t)}states(t,e){const s=this.bb.__offset(this.bb_pos,4);return s?(e||new R).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}statesLength(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__vector_len(this.bb_pos+t):0}static startframeDataIndex(t){t.startObject(1)}static addStates(t,e){t.addFieldOffset(0,e,0)}static createStatesVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startStatesVector(t,e){t.startVector(4,e,4)}static endframeDataIndex(t){return t.endObject()}static createframeDataIndex(t,e){return ot.startframeDataIndex(t),ot.addStates(t,e),ot.endframeDataIndex(t)}}class it{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAslabelDataItem(t,e){return(e||new it).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAslabelDataItem(t,e){return t.setPosition(t.position()+O),(e||new it).__init(t.readInt32(t.position())+t.position(),t)}label(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}frameIndex(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt16(this.bb_pos+t):0}static startlabelDataItem(t){t.startObject(2)}static addLabel(t,e){t.addFieldOffset(0,e,0)}static addFrameIndex(t,e){t.addFieldInt16(1,e,0)}static endlabelDataItem(t){return t.endObject()}static createlabelDataItem(t,e,s){return it.startlabelDataItem(t),it.addLabel(t,e),it.addFrameIndex(t,s),it.endlabelDataItem(t)}}class rt{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsmeshDataIndices(t,e){return(e||new rt).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsmeshDataIndices(t,e){return t.setPosition(t.position()+O),(e||new rt).__init(t.readInt32(t.position())+t.position(),t)}indices(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readFloat32(this.bb.__vector(this.bb_pos+e)+t*4):0}indicesLength(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__vector_len(this.bb_pos+t):0}indicesArray(){const t=this.bb.__offset(this.bb_pos,4);return t?new Float32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startmeshDataIndices(t){t.startObject(1)}static addIndices(t,e){t.addFieldOffset(0,e,0)}static createIndicesVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addFloat32(e[s]);return t.endVector()}static startIndicesVector(t,e){t.startVector(4,e,4)}static endmeshDataIndices(t){return t.endObject()}static createmeshDataIndices(t,e){return rt.startmeshDataIndices(t),rt.addIndices(t,e),rt.endmeshDataIndices(t)}}class ct{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsmeshDataUV(t,e){return(e||new ct).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsmeshDataUV(t,e){return t.setPosition(t.position()+O),(e||new ct).__init(t.readInt32(t.position())+t.position(),t)}uv(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readFloat32(this.bb.__vector(this.bb_pos+e)+t*4):0}uvLength(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__vector_len(this.bb_pos+t):0}uvArray(){const t=this.bb.__offset(this.bb_pos,4);return t?new Float32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startmeshDataUV(t){t.startObject(1)}static addUv(t,e){t.addFieldOffset(0,e,0)}static createUvVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addFloat32(e[s]);return t.endVector()}static startUvVector(t,e){t.startVector(4,e,4)}static endmeshDataUV(t){return t.endObject()}static createmeshDataUV(t,e){return ct.startmeshDataUV(t),ct.addUv(t,e),ct.endmeshDataUV(t)}}class W{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsuserDataItem(t,e){return(e||new W).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsuserDataItem(t,e){return t.setPosition(t.position()+O),(e||new W).__init(t.readInt32(t.position())+t.position(),t)}flags(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):0}arrayIndex(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt16(this.bb_pos+t):0}dataType(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb.__vector(this.bb_pos+e)+t):0}dataTypeLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}dataTypeArray(){const t=this.bb.__offset(this.bb_pos,8);return t?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}data(t,e){const s=this.bb.__offset(this.bb_pos,10);return s?this.bb.__union(e,this.bb.__vector(this.bb_pos+s)+t*4):null}dataLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startuserDataItem(t){t.startObject(4)}static addFlags(t,e){t.addFieldInt16(0,e,0)}static addArrayIndex(t,e){t.addFieldInt16(1,e,0)}static addDataType(t,e){t.addFieldOffset(2,e,0)}static createDataTypeVector(t,e){t.startVector(1,e.length,1);for(let s=e.length-1;s>=0;s--)t.addInt8(e[s]);return t.endVector()}static startDataTypeVector(t,e){t.startVector(1,e,1)}static addData(t,e){t.addFieldOffset(3,e,0)}static createDataVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startDataVector(t,e){t.startVector(4,e,4)}static enduserDataItem(t){return t.endObject()}static createuserDataItem(t,e,s,a,o){return W.startuserDataItem(t),W.addFlags(t,e),W.addArrayIndex(t,s),W.addDataType(t,a),W.addData(t,o),W.enduserDataItem(t)}}class at{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsuserDataPerFrame(t,e){return(e||new at).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsuserDataPerFrame(t,e){return t.setPosition(t.position()+O),(e||new at).__init(t.readInt32(t.position())+t.position(),t)}frameIndex(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):0}data(t,e){const s=this.bb.__offset(this.bb_pos,6);return s?(e||new W).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}dataLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}static startuserDataPerFrame(t){t.startObject(2)}static addFrameIndex(t,e){t.addFieldInt16(0,e,0)}static addData(t,e){t.addFieldOffset(1,e,0)}static createDataVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startDataVector(t,e){t.startVector(4,e,4)}static enduserDataPerFrame(t){return t.endObject()}static createuserDataPerFrame(t,e,s){return at.startuserDataPerFrame(t),at.addFrameIndex(t,e),at.addData(t,s),at.enduserDataPerFrame(t)}}class g{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsAnimationData(t,e){return(e||new g).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsAnimationData(t,e){return t.setPosition(t.position()+O),(e||new g).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}defaultData(t,e){const s=this.bb.__offset(this.bb_pos,6);return s?(e||new b).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}defaultDataLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}frameData(t,e){const s=this.bb.__offset(this.bb_pos,8);return s?(e||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}frameDataLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}userData(t,e){const s=this.bb.__offset(this.bb_pos,10);return s?(e||new at).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}userDataLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}labelData(t,e){const s=this.bb.__offset(this.bb_pos,12);return s?(e||new it).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}labelDataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}meshsDataUv(t,e){const s=this.bb.__offset(this.bb_pos,14);return s?(e||new ct).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}meshsDataUvLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}meshsDataIndices(t,e){const s=this.bb.__offset(this.bb_pos,16);return s?(e||new rt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}meshsDataIndicesLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}startFrames(){const t=this.bb.__offset(this.bb_pos,18);return t?this.bb.readInt16(this.bb_pos+t):0}endFrames(){const t=this.bb.__offset(this.bb_pos,20);return t?this.bb.readInt16(this.bb_pos+t):0}totalFrames(){const t=this.bb.__offset(this.bb_pos,22);return t?this.bb.readInt16(this.bb_pos+t):0}fps(){const t=this.bb.__offset(this.bb_pos,24);return t?this.bb.readInt16(this.bb_pos+t):0}labelNum(){const t=this.bb.__offset(this.bb_pos,26);return t?this.bb.readInt16(this.bb_pos+t):0}canvasSizeW(){const t=this.bb.__offset(this.bb_pos,28);return t?this.bb.readInt16(this.bb_pos+t):0}canvasSizeH(){const t=this.bb.__offset(this.bb_pos,30);return t?this.bb.readInt16(this.bb_pos+t):0}canvasPvotX(){const t=this.bb.__offset(this.bb_pos,32);return t?this.bb.readFloat32(this.bb_pos+t):0}canvasPvotY(){const t=this.bb.__offset(this.bb_pos,34);return t?this.bb.readFloat32(this.bb_pos+t):0}static startAnimationData(t){t.startObject(16)}static addName(t,e){t.addFieldOffset(0,e,0)}static addDefaultData(t,e){t.addFieldOffset(1,e,0)}static createDefaultDataVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startDefaultDataVector(t,e){t.startVector(4,e,4)}static addFrameData(t,e){t.addFieldOffset(2,e,0)}static createFrameDataVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startFrameDataVector(t,e){t.startVector(4,e,4)}static addUserData(t,e){t.addFieldOffset(3,e,0)}static createUserDataVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startUserDataVector(t,e){t.startVector(4,e,4)}static addLabelData(t,e){t.addFieldOffset(4,e,0)}static createLabelDataVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startLabelDataVector(t,e){t.startVector(4,e,4)}static addMeshsDataUv(t,e){t.addFieldOffset(5,e,0)}static createMeshsDataUvVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startMeshsDataUvVector(t,e){t.startVector(4,e,4)}static addMeshsDataIndices(t,e){t.addFieldOffset(6,e,0)}static createMeshsDataIndicesVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startMeshsDataIndicesVector(t,e){t.startVector(4,e,4)}static addStartFrames(t,e){t.addFieldInt16(7,e,0)}static addEndFrames(t,e){t.addFieldInt16(8,e,0)}static addTotalFrames(t,e){t.addFieldInt16(9,e,0)}static addFps(t,e){t.addFieldInt16(10,e,0)}static addLabelNum(t,e){t.addFieldInt16(11,e,0)}static addCanvasSizeW(t,e){t.addFieldInt16(12,e,0)}static addCanvasSizeH(t,e){t.addFieldInt16(13,e,0)}static addCanvasPvotX(t,e){t.addFieldFloat32(14,e,0)}static addCanvasPvotY(t,e){t.addFieldFloat32(15,e,0)}static endAnimationData(t){return t.endObject()}static createAnimationData(t,e,s,a,o,n,c,r,l,h,d,u,f,_,v,S,y){return g.startAnimationData(t),g.addName(t,e),g.addDefaultData(t,s),g.addFrameData(t,a),g.addUserData(t,o),g.addLabelData(t,n),g.addMeshsDataUv(t,c),g.addMeshsDataIndices(t,r),g.addStartFrames(t,l),g.addEndFrames(t,h),g.addTotalFrames(t,d),g.addFps(t,u),g.addLabelNum(t,f),g.addCanvasSizeW(t,_),g.addCanvasSizeH(t,v),g.addCanvasPvotX(t,S),g.addCanvasPvotY(t,y),g.endAnimationData(t)}}var E=(i=>(i[i.Invalid=-1]="Invalid",i[i.Nulltype=0]="Nulltype",i[i.Normal=1]="Normal",i[i.Text=2]="Text",i[i.Instance=3]="Instance",i[i.Armature=4]="Armature",i[i.Effect=5]="Effect",i[i.Mesh=6]="Mesh",i[i.Movenode=7]="Movenode",i[i.Constraint=8]="Constraint",i[i.Mask=9]="Mask",i[i.Joint=10]="Joint",i[i.Bonepoint=11]="Bonepoint",i))(E||{});class M{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsPartData(t,e){return(e||new M).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsPartData(t,e){return t.setPosition(t.position()+O),(e||new M).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}index(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt16(this.bb_pos+t):0}parentIndex(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readInt16(this.bb_pos+t):0}type(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt8(this.bb_pos+t):E.Nulltype}boundsType(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readInt16(this.bb_pos+t):0}alphaBlendType(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.readInt16(this.bb_pos+t):0}refname(t){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__string(this.bb_pos+e,t):null}effectfilename(t){const e=this.bb.__offset(this.bb_pos,18);return e?this.bb.__string(this.bb_pos+e,t):null}colorLabel(t){const e=this.bb.__offset(this.bb_pos,20);return e?this.bb.__string(this.bb_pos+e,t):null}maskInfluence(){const t=this.bb.__offset(this.bb_pos,22);return t?this.bb.readInt16(this.bb_pos+t):0}static startPartData(t){t.startObject(10)}static addName(t,e){t.addFieldOffset(0,e,0)}static addIndex(t,e){t.addFieldInt16(1,e,0)}static addParentIndex(t,e){t.addFieldInt16(2,e,0)}static addType(t,e){t.addFieldInt8(3,e,E.Nulltype)}static addBoundsType(t,e){t.addFieldInt16(4,e,0)}static addAlphaBlendType(t,e){t.addFieldInt16(5,e,0)}static addRefname(t,e){t.addFieldOffset(6,e,0)}static addEffectfilename(t,e){t.addFieldOffset(7,e,0)}static addColorLabel(t,e){t.addFieldOffset(8,e,0)}static addMaskInfluence(t,e){t.addFieldInt16(9,e,0)}static endPartData(t){return t.endObject()}static createPartData(t,e,s,a,o,n,c,r,l,h,d){return M.startPartData(t),M.addName(t,e),M.addIndex(t,s),M.addParentIndex(t,a),M.addType(t,o),M.addBoundsType(t,n),M.addAlphaBlendType(t,c),M.addRefname(t,r),M.addEffectfilename(t,l),M.addColorLabel(t,h),M.addMaskInfluence(t,d),M.endPartData(t)}}class H{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsAnimePackData(t,e){return(e||new H).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsAnimePackData(t,e){return t.setPosition(t.position()+O),(e||new H).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}parts(t,e){const s=this.bb.__offset(this.bb_pos,6);return s?(e||new M).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}partsLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}animations(t,e){const s=this.bb.__offset(this.bb_pos,8);return s?(e||new g).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}animationsLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}static startAnimePackData(t){t.startObject(3)}static addName(t,e){t.addFieldOffset(0,e,0)}static addParts(t,e){t.addFieldOffset(1,e,0)}static createPartsVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startPartsVector(t,e){t.startVector(4,e,4)}static addAnimations(t,e){t.addFieldOffset(2,e,0)}static createAnimationsVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startAnimationsVector(t,e){t.startVector(4,e,4)}static endAnimePackData(t){return t.endObject()}static createAnimePackData(t,e,s,a){return H.startAnimePackData(t),H.addName(t,e),H.addParts(t,s),H.addAnimations(t,a),H.endAnimePackData(t)}}class B{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsCellMap(t,e){return(e||new B).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsCellMap(t,e){return t.setPosition(t.position()+O),(e||new B).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}imagePath(t){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__string(this.bb_pos+e,t):null}index(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readInt16(this.bb_pos+t):0}wrapmode(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt16(this.bb_pos+t):0}filtermode(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readInt16(this.bb_pos+t):0}static startCellMap(t){t.startObject(5)}static addName(t,e){t.addFieldOffset(0,e,0)}static addImagePath(t,e){t.addFieldOffset(1,e,0)}static addIndex(t,e){t.addFieldInt16(2,e,0)}static addWrapmode(t,e){t.addFieldInt16(3,e,0)}static addFiltermode(t,e){t.addFieldInt16(4,e,0)}static endCellMap(t){return t.endObject()}static createCellMap(t,e,s,a,o,n){return B.startCellMap(t),B.addName(t,e),B.addImagePath(t,s),B.addIndex(t,a),B.addWrapmode(t,o),B.addFiltermode(t,n),B.endCellMap(t)}}class St{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsCell(t,e){return(e||new St).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsCell(t,e){return t.setPosition(t.position()+O),(e||new St).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}cellMap(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new B).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}indexInCellMap(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readInt16(this.bb_pos+t):0}x(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt16(this.bb_pos+t):0}y(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readInt16(this.bb_pos+t):0}width(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.readInt16(this.bb_pos+t):0}height(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.readInt16(this.bb_pos+t):0}pivotX(){const t=this.bb.__offset(this.bb_pos,18);return t?this.bb.readFloat32(this.bb_pos+t):0}pivotY(){const t=this.bb.__offset(this.bb_pos,20);return t?this.bb.readFloat32(this.bb_pos+t):0}u1(){const t=this.bb.__offset(this.bb_pos,22);return t?this.bb.readFloat32(this.bb_pos+t):0}v1(){const t=this.bb.__offset(this.bb_pos,24);return t?this.bb.readFloat32(this.bb_pos+t):0}u2(){const t=this.bb.__offset(this.bb_pos,26);return t?this.bb.readFloat32(this.bb_pos+t):0}v2(){const t=this.bb.__offset(this.bb_pos,28);return t?this.bb.readFloat32(this.bb_pos+t):0}static startCell(t){t.startObject(13)}static addName(t,e){t.addFieldOffset(0,e,0)}static addCellMap(t,e){t.addFieldOffset(1,e,0)}static addIndexInCellMap(t,e){t.addFieldInt16(2,e,0)}static addX(t,e){t.addFieldInt16(3,e,0)}static addY(t,e){t.addFieldInt16(4,e,0)}static addWidth(t,e){t.addFieldInt16(5,e,0)}static addHeight(t,e){t.addFieldInt16(6,e,0)}static addPivotX(t,e){t.addFieldFloat32(7,e,0)}static addPivotY(t,e){t.addFieldFloat32(8,e,0)}static addU1(t,e){t.addFieldFloat32(9,e,0)}static addV1(t,e){t.addFieldFloat32(10,e,0)}static addU2(t,e){t.addFieldFloat32(11,e,0)}static addV2(t,e){t.addFieldFloat32(12,e,0)}static endCell(t){return t.endObject()}}class D{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsEffectNode(t,e){return(e||new D).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsEffectNode(t,e){return t.setPosition(t.position()+O),(e||new D).__init(t.readInt32(t.position())+t.position(),t)}arrayIndex(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):0}parentIndex(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt16(this.bb_pos+t):0}type(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readInt16(this.bb_pos+t):0}cellIndex(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt16(this.bb_pos+t):0}blendType(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readInt16(this.bb_pos+t):0}numBehavior(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.readInt16(this.bb_pos+t):0}behaviorType(t){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.readUint8(this.bb.__vector(this.bb_pos+e)+t):0}behaviorTypeLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}behaviorTypeArray(){const t=this.bb.__offset(this.bb_pos,16);return t?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}behavior(t,e){const s=this.bb.__offset(this.bb_pos,18);return s?this.bb.__union(e,this.bb.__vector(this.bb_pos+s)+t*4):null}behaviorLength(){const t=this.bb.__offset(this.bb_pos,18);return t?this.bb.__vector_len(this.bb_pos+t):0}static startEffectNode(t){t.startObject(8)}static addArrayIndex(t,e){t.addFieldInt16(0,e,0)}static addParentIndex(t,e){t.addFieldInt16(1,e,0)}static addType(t,e){t.addFieldInt16(2,e,0)}static addCellIndex(t,e){t.addFieldInt16(3,e,0)}static addBlendType(t,e){t.addFieldInt16(4,e,0)}static addNumBehavior(t,e){t.addFieldInt16(5,e,0)}static addBehaviorType(t,e){t.addFieldOffset(6,e,0)}static createBehaviorTypeVector(t,e){t.startVector(1,e.length,1);for(let s=e.length-1;s>=0;s--)t.addInt8(e[s]);return t.endVector()}static startBehaviorTypeVector(t,e){t.startVector(1,e,1)}static addBehavior(t,e){t.addFieldOffset(7,e,0)}static createBehaviorVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startBehaviorVector(t,e){t.startVector(4,e,4)}static endEffectNode(t){return t.endObject()}static createEffectNode(t,e,s,a,o,n,c,r,l){return D.startEffectNode(t),D.addArrayIndex(t,e),D.addParentIndex(t,s),D.addType(t,a),D.addCellIndex(t,o),D.addBlendType(t,n),D.addNumBehavior(t,c),D.addBehaviorType(t,r),D.addBehavior(t,l),D.endEffectNode(t)}}class x{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsEffectFile(t,e){return(e||new x).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsEffectFile(t,e){return t.setPosition(t.position()+O),(e||new x).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}fps(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt16(this.bb_pos+t):0}isLockRandSeed(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readInt16(this.bb_pos+t):0}lockRandSeed(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt16(this.bb_pos+t):0}layoutScaleX(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readInt16(this.bb_pos+t):0}layoutScaleY(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.readInt16(this.bb_pos+t):0}numNodeList(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.readInt16(this.bb_pos+t):0}effectNode(t,e){const s=this.bb.__offset(this.bb_pos,18);return s?(e||new D).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}effectNodeLength(){const t=this.bb.__offset(this.bb_pos,18);return t?this.bb.__vector_len(this.bb_pos+t):0}static startEffectFile(t){t.startObject(8)}static addName(t,e){t.addFieldOffset(0,e,0)}static addFps(t,e){t.addFieldInt16(1,e,0)}static addIsLockRandSeed(t,e){t.addFieldInt16(2,e,0)}static addLockRandSeed(t,e){t.addFieldInt16(3,e,0)}static addLayoutScaleX(t,e){t.addFieldInt16(4,e,0)}static addLayoutScaleY(t,e){t.addFieldInt16(5,e,0)}static addNumNodeList(t,e){t.addFieldInt16(6,e,0)}static addEffectNode(t,e){t.addFieldOffset(7,e,0)}static createEffectNodeVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startEffectNodeVector(t,e){t.startVector(4,e,4)}static endEffectFile(t){return t.endObject()}static createEffectFile(t,e,s,a,o,n,c,r,l){return x.startEffectFile(t),x.addName(t,e),x.addFps(t,s),x.addIsLockRandSeed(t,a),x.addLockRandSeed(t,o),x.addLayoutScaleX(t,n),x.addLayoutScaleY(t,c),x.addNumNodeList(t,r),x.addEffectNode(t,l),x.endEffectFile(t)}}var p=(i=>(i[i.INVISIBLE=1]="INVISIBLE",i[i.FLIP_H=2]="FLIP_H",i[i.FLIP_V=4]="FLIP_V",i[i.CELL_INDEX=8]="CELL_INDEX",i[i.POSITION_X=16]="POSITION_X",i[i.POSITION_Y=32]="POSITION_Y",i[i.POSITION_Z=64]="POSITION_Z",i[i.PIVOT_X=128]="PIVOT_X",i[i.PIVOT_Y=256]="PIVOT_Y",i[i.ROTATIONX=512]="ROTATIONX",i[i.ROTATIONY=1024]="ROTATIONY",i[i.ROTATIONZ=2048]="ROTATIONZ",i[i.SCALE_X=4096]="SCALE_X",i[i.SCALE_Y=8192]="SCALE_Y",i[i.LOCALSCALE_X=16384]="LOCALSCALE_X",i[i.LOCALSCALE_Y=32768]="LOCALSCALE_Y",i[i.OPACITY=65536]="OPACITY",i[i.LOCALOPACITY=131072]="LOCALOPACITY",i[i.PARTS_COLOR=262144]="PARTS_COLOR",i[i.VERTEX_TRANSFORM=524288]="VERTEX_TRANSFORM",i[i.SIZE_X=1048576]="SIZE_X",i[i.SIZE_Y=2097152]="SIZE_Y",i[i.U_MOVE=4194304]="U_MOVE",i[i.V_MOVE=8388608]="V_MOVE",i[i.UV_ROTATION=16777216]="UV_ROTATION",i[i.U_SCALE=33554432]="U_SCALE",i[i.V_SCALE=67108864]="V_SCALE",i[i.BOUNDINGRADIUS=134217728]="BOUNDINGRADIUS",i[i.MASK=268435456]="MASK",i[i.PRIORITY=536870912]="PRIORITY",i[i.INSTANCE_KEYFRAME=1073741824]="INSTANCE_KEYFRAME",i[i.EFFECT_KEYFRAME=2147483648]="EFFECT_KEYFRAME",i))(p||{}),Yt=(i=>(i[i.MESHDATA=1]="MESHDATA",i))(Yt||{});class C{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsProjectData(t,e){return(e||new C).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsProjectData(t,e){return t.setPosition(t.position()+O),(e||new C).__init(t.readInt32(t.position())+t.position(),t)}static bufferHasIdentifier(t){return t.__has_identifier("SSFB")}dataId(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readUint32(this.bb_pos+t):0}version(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint32(this.bb_pos+t):0}flags(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint32(this.bb_pos+t):0}imageBaseDir(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__string(this.bb_pos+e,t):null}cells(t,e){const s=this.bb.__offset(this.bb_pos,12);return s?(e||new St).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}cellsLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}animePacks(t,e){const s=this.bb.__offset(this.bb_pos,14);return s?(e||new H).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}animePacksLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}effectFileList(t,e){const s=this.bb.__offset(this.bb_pos,16);return s?(e||new x).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+t*4),this.bb):null}effectFileListLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}numCells(){const t=this.bb.__offset(this.bb_pos,18);return t?this.bb.readInt16(this.bb_pos+t):0}numAnimePacks(){const t=this.bb.__offset(this.bb_pos,20);return t?this.bb.readInt16(this.bb_pos+t):0}numEffectFileList(){const t=this.bb.__offset(this.bb_pos,22);return t?this.bb.readInt16(this.bb_pos+t):0}static startProjectData(t){t.startObject(10)}static addDataId(t,e){t.addFieldInt32(0,e,0)}static addVersion(t,e){t.addFieldInt32(1,e,0)}static addFlags(t,e){t.addFieldInt32(2,e,0)}static addImageBaseDir(t,e){t.addFieldOffset(3,e,0)}static addCells(t,e){t.addFieldOffset(4,e,0)}static createCellsVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startCellsVector(t,e){t.startVector(4,e,4)}static addAnimePacks(t,e){t.addFieldOffset(5,e,0)}static createAnimePacksVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startAnimePacksVector(t,e){t.startVector(4,e,4)}static addEffectFileList(t,e){t.addFieldOffset(6,e,0)}static createEffectFileListVector(t,e){t.startVector(4,e.length,4);for(let s=e.length-1;s>=0;s--)t.addOffset(e[s]);return t.endVector()}static startEffectFileListVector(t,e){t.startVector(4,e,4)}static addNumCells(t,e){t.addFieldInt16(7,e,0)}static addNumAnimePacks(t,e){t.addFieldInt16(8,e,0)}static addNumEffectFileList(t,e){t.addFieldInt16(9,e,0)}static endProjectData(t){return t.endObject()}static finishProjectDataBuffer(t,e){t.finish(e,"SSFB")}static finishSizePrefixedProjectDataBuffer(t,e){t.finish(e,"SSFB",!0)}static createProjectData(t,e,s,a,o,n,c,r,l,h,d){return C.startProjectData(t),C.addDataId(t,e),C.addVersion(t,s),C.addFlags(t,a),C.addImageBaseDir(t,o),C.addCells(t,n),C.addAnimePacks(t,c),C.addEffectFileList(t,r),C.addNumCells(t,l),C.addNumAnimePacks(t,h),C.addNumEffectFileList(t,d),C.endProjectData(t)}}class qt{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}integer(){return this.bb.readInt32(this.bb_pos)}static sizeOf(){return 4}static createuserDataInteger(t,e){return t.prep(4,4),t.writeInt32(e),t.offset()}}class Ut{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}x(){return this.bb.readInt32(this.bb_pos)}y(){return this.bb.readInt32(this.bb_pos+4)}static sizeOf(){return 8}static createuserDataPoint(t,e,s){return t.prep(4,8),t.writeInt32(s),t.writeInt32(e),t.offset()}}class yt{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}x(){return this.bb.readInt32(this.bb_pos)}y(){return this.bb.readInt32(this.bb_pos+4)}w(){return this.bb.readInt32(this.bb_pos+8)}h(){return this.bb.readInt32(this.bb_pos+12)}static sizeOf(){return 16}static createuserDataRect(t,e,s,a,o){return t.prep(4,16),t.writeInt32(o),t.writeInt32(a),t.writeInt32(s),t.writeInt32(e),t.offset()}}class ${constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsuserDataString(t,e){return(e||new $).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsuserDataString(t,e){return t.setPosition(t.position()+O),(e||new $).__init(t.readInt32(t.position())+t.position(),t)}length(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt32(this.bb_pos+t):0}data(t){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__string(this.bb_pos+e,t):null}static startuserDataString(t){t.startObject(2)}static addLength(t,e){t.addFieldInt32(0,e,0)}static addData(t,e){t.addFieldOffset(1,e,0)}static enduserDataString(t){return t.endObject()}static createuserDataString(t,e,s){return $.startuserDataString(t),$.addLength(t,e),$.addData(t,s),$.enduserDataString(t)}}let Qt=class{static getProjectData(t){const e=new vt(t);return C.getRootAsProjectData(e)}};class Pt{static getProjectData(t){return Qt.getProjectData(t)}}class lt{constructor(t,e=null,s=null){this.curAnimePackName=null,this.curAnimeName=null,this.curAnimation=null,this.curAnimePackData=null,this._animePackIdx=-1,this._parentIndex=[],this._prio2index=[],this.userData=[],this.frameDataCache=null,this.currentCachedFrameNumber=-1,this.defaultFrameMap=[],this._uint32=new Uint32Array(1),this._float32=new Float32Array(this._uint32.buffer),t.hasOwnProperty("bb")?this._fbObj=t:this._fbObj=Pt.getProjectData(t),e!==null&&s!==null&&this.Setup(e,s)}get fbObj(){return this._fbObj}get animePackName(){return this.curAnimePackName}get animeName(){return this.curAnimeName}get animePackIdx(){return this._animePackIdx}get animePackData(){return this.curAnimePackData}get animationData(){return this.curAnimation}get parentIndex(){return this._parentIndex}get prio2index(){return this._prio2index}Setup(t,e){this.clearCaches();const s=this._fbObj.animePacksLength();let a=!1;for(let o=0;o>>0,h.colorBlendType===1&&(h.tint=h.colorArgb32&16777215)}}if(l&Yt.MESHDATA){const u=this.curAnimation.meshsDataUv(c);h.meshIsBind=u.uv(0),h.meshNum=u.uv(1);let f=new Float32Array(h.meshNum*3);for(let _=0;_=0&&(t=this.InheritOpacity(t,this._parentIndex[e],s)),t}TransformVertsLocal(t,e,s){const a=this.GetFrameData(s)[e],o=-a.rotationZ*Math.PI/180,n=Math.cos(o),c=Math.sin(o);for(let r=0;r=0&&(t=this.TransformVerts(t,this._parentIndex[e],s)),t}TransformMeshVertsLocal(t,e,s){const a=this.GetFrameData(s)[e],o=-a.rotationZ*Math.PI/180,n=Math.cos(o),c=Math.sin(o);for(let r=0;r=0&&(t=this.TransformVerts(t,this._parentIndex[e],s)),t}TransformPositionLocal(t,e,s){const a=this.GetFrameData(s)[e];t[4]+=-a.rotationZ;const o=-a.rotationZ*Math.PI/180,n=Math.cos(o),c=Math.sin(o),r=t[0]*a.scaleX*a.localscaleX,l=t[1]*a.scaleY*a.localscaleY;return t[2]*=a.scaleX*a.localscaleX,t[3]*=a.scaleY*a.localscaleY,t[0]=n*r-c*l+a.positionX,t[1]=c*r+n*l-a.positionY,this._parentIndex[e]>=0&&(t=this.TransformPosition(t,this._parentIndex[e],s)),t}static CoordinateGetDiagonalIntersection(t,e,s,a,o,n,c,r,l,h,d){const u=(r-n)*(c-s)-(c-o)*(r-a),f=(l-s)*(r-a)-(h-a)*(c-s),_=(l-s)*(r-n)-(h-a)*(c-o);if(_<=0&&_>=0)return d;const v=u/_,S=f/_;return 0<=v&&1>=v&&0<=S&&1>=S&&(t=s+v*(l-s),e=a+v*(h-a)),d[0]=t,d[1]=e,d}TransformVerts(t,e,s){const a=this.GetFrameData(s)[e],o=-a.rotationZ*Math.PI/180,n=Math.cos(o),c=Math.sin(o);for(let r=0;r=0&&(t=this.TransformVerts(t,this._parentIndex[e],s)),t}TransformPosition(t,e,s){const a=this.GetFrameData(s)[e];t[4]+=-a.rotationZ;const o=-a.rotationZ*Math.PI/180,n=Math.cos(o),c=Math.sin(o),r=t[0]*a.scaleX,l=t[1]*a.scaleY;return t[2]*=a.scaleX,t[3]*=a.scaleY,t[0]=n*r-c*l+a.positionX,t[1]=c*r+n*l-a.positionY,this._parentIndex[e]>=0&&(t=this.TransformPosition(t,this._parentIndex[e],s)),t}static GetVerts(t,e,s){const a=e.size_X/2,o=e.size_Y/2,n=e.size_X*-(e.pivotX+t.pivotX()),c=e.size_Y*(e.pivotY+t.pivotY());return s.set([n,c,n-a,c-o,n+a,c-o,n-a,c+o,n+a,c+o]),s}static GetMeshVerts(t,e,s){for(let a=0;a{a.resources=n,s!==null&&s(null)})}unload(t,e,s){this.resources=null,s!==null&&s(null)}texture(t){return console.log(this.resources),this.resources[t].texture}}class ee{constructor(){this.loader=new te}load(t,e,s){return this.loader.load(t,e,s)}unload(t,e,s=null){return this.loader.unload(t,e,s)}texture(t){return this.loader.texture(t)}}class Et{constructor(t,e,s,a){if(this.sspjMap={},this.resourceLoader=new ee,typeof t=="string"&&s===void 0){let o=t;this.ssfbPath=o;const n=o.lastIndexOf("/");this.rootPath=o.substring(0,n)+"/",this.ssfbFile=o.substring(n+1),this.onComplete=e===void 0?null:e,this.status=0,this.LoadFlatBuffersProject()}else if(typeof e=="object"&&e.constructor===Uint8Array){this.ssfbPath=null,this.rootPath=null,this.ssfbFile=t;let o=e,n=s;this.onComplete=a===void 0?null:a,this.load(o,n)}}getBundle(){return this.ssfbFile}getTexture(t){return this.resourceLoader.texture(t)}dispose(t=null){this.resourceLoader.unload(this.getBundle(),this.sspjMap,e=>{t!==null&&t()})}LoadFlatBuffersProject(){const t=this;fetch(this.ssfbPath,{method:"get"}).then(e=>e.ok?Promise.resolve(e.arrayBuffer()):Promise.reject(new Error(e.statusText))).then(e=>{t.fbObj=Pt.getProjectData(new Uint8Array(e)),t.LoadCellResources()}).catch(e=>{this.onComplete!==null&&this.onComplete(null,e)})}LoadCellResources(){let t=[];this.sspjMap={};for(let s=0;s{s===null?(e.status=1,e.onComplete!==null&&e.onComplete(this,null)):this.onComplete!==null&&this.onComplete(null,s)})}load(t,e){this.fbObj=Pt.getProjectData(t);let s={};for(let o in e){const n=e[o];let c="";const r=n.byteLength;for(let l=0;l{o===null?(a.status=1,a.onComplete!==null&&a.onComplete(this,null)):this.onComplete!==null&&this.onComplete(null,o)})}}class se{constructor(){this.refStartframe=0,this.refEndframe=0,this.refSpeed=1,this.refloopNum=0,this.infinity=!1,this.reverse=!1,this.pingpong=!1,this.independent=!1}}class J extends Nt.Container{constructor(t,e=null,s=null){super(),this.liveFrame=[],this.colorMatrixFilterCache=[],this.parentAlpha=1,this.prevCellID=[],this.prevPartObject=[],this.substituteOverWrite=[],this.substituteKeyParam=[],this.alphaBlendType=[],this.defaultColorFilter=new wt.ColorMatrixFilter,this._instancePos=new Float32Array(5),this._CoordinateGetDiagonalIntersectionVec2=new Float32Array(2),this.ss6project=t,this.playerLib=new lt(t.fbObj,e,s),this.parentAlpha=1,e!==null&&s!==null&&this.Setup(e,s),this.on("added",(...a)=>{gt.Ticker.shared.add(this.Update,this)},this),this.on("removed",(...a)=>{gt.Ticker.shared.remove(this.Update,this)},this)}get startFrame(){return this._startFrame}get endFrame(){return this._endFrame}get totalFrame(){return this.playerLib.animationData.totalFrames()}get fps(){return this.playerLib.animationData.fps()}get frameNo(){return Math.floor(this._currentFrame)}set loop(t){this._loops=t}get loop(){return this._loops}get isPlaying(){return this._isPlaying}get isPausing(){return this._isPausing}get animePackName(){return this.playerLib.animePackName}get animeName(){return this.playerLib.animeName}Setup(t,e){this.playerLib.Setup(t,e),this.clearCaches();const s=this.playerLib.animePackData,a=s.partsLength();this.prevCellID=new Array(a),this.prevPartObject=new Array(a),this.substituteOverWrite=new Array(a),this.substituteKeyParam=new Array(a);for(let o=0;o=this.updateInterval){let o=!1;const n=this.nextFrameTime/this.updateInterval;this.nextFrameTime-=this.updateInterval*n;let c=this.skipEnabled?n*this.playDirection:this.playDirection,r=this._currentFrame+c,l=Math.floor(r),h=r-l,d=Math.floor(this._currentFrame);if(this.playDirection>=1)for(let u=l-d;u;u--){let f=d+1;if(f>this._endFrame)if(this._loops===-1)f=this._startFrame;else if(this._loops--,o=!0,this._loops===0){this._isPlaying=!1,f=e?this._startFrame:this._endFrame;break}else f=this._startFrame;d=f,this._isPlaying&&this.playerLib.HaveUserData(d)&&this.onUserDataCallback!==null&&this.onUserDataCallback(this.playerLib.GetUserData(d))}if(this.playDirection<=-1)for(let u=d-l;u;u--){let f=d-1;if(f0?1:-1,this.updateInterval=1e3/(this.playerLib.animationData.fps()*t*this.playDirection),this.skipEnabled=e)}SetAnimationSection(t=-1,e=-1,s=-1){t>=0&&t=0&&e0?this._loops=s:this._loops=-1,this._currentFrame=this.playDirection>0?this._startFrame:this._endFrame}Play(t){this._isPlaying=!0,this._isPausing=!1;let e=this.playDirection>0?this._startFrame:this._endFrame;t&&typeof t=="number"&&(e=t),this._currentFrame=e,this.resetLiveFrame();const s=Math.floor(this._currentFrame);this.SetFrameAnimation(s),this.playerLib.HaveUserData(s)&&this.onUserDataCallback!==null&&this.onUserDataCallback(this.playerLib.GetUserData(s))}Pause(){this._isPausing=!0}Resume(){this._isPausing=!1}Stop(){this._isPlaying=!1}SetFrame(t){this._currentFrame=t}NextFrame(){const t=Math.floor(this._currentFrame),e=this.endFrame;t!==e&&this.SetFrame(t+1)}PrevFrame(){const t=Math.floor(this._currentFrame);t!==0&&this.SetFrame(t-1)}SetAlpha(t){this.parentAlpha=t}ThrowError(t){}SetUserDataCalback(t){this.onUserDataCallback=t}SetPlayEndCallback(t){this.playEndCallback=t}GetPartsBlendMode(){const t=this.playerLib.animePackData,e=t.partsLength();let s=[];for(let a=0;a>>24)/255,c=((s&16711680)>>>16)/255,r=((s&65280)>>>8)/255,l=(s&255)/255;if(t===0){const h=1-e;o.matrix=[h,0,0,0,c*e,0,h,0,0,r*e,0,0,h,0,l*e,0,0,0,1,0]}else t===1?o.matrix=[c,0,0,0,0,0,r,0,0,0,0,0,l,0,0,0,0,0,n,0]:t===2?o.matrix=[1,0,0,0,c,0,1,0,0,r,0,0,1,0,l,0,0,0,n,0]:t===3&&(o.matrix=[1,0,0,0,-c,0,1,0,0,-r,0,0,1,0,-l,0,0,0,n,0]);return this.colorMatrixFilterCache[a]=o,o}SetFrameAnimation(t,e=0){const s=this.playerLib.GetFrameData(t);this.removeChildren();const a=s.length;for(let o=0;o