UNPKG

wl-live2d

Version:

Live2D for web, 这是一个运行在浏览器环境的 Live2D 看板组件

9 lines 797 kB
"use strict"; /*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/constants is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ var t,e,i,r,n,s,o,a,h,l,u,c,d,p,f,_,g,v,y,x;Object.defineProperty(exports,"__esModule",{value:!0}),function(){var t=!0;function e(){t||(this._$MT=null,this._$5S=null,this._$NP=0,e._$42++,this._$5S=new k(this))}function i(e){if(!t){this.clipContextList=new Array,this.glcontext=e.gl,this.dp_webgl=e,this.curFrameNo=0,this.firstError_clipInNotUpdate=!0,this.colorBuffer=0,this.isInitGLFBFunc=!1,this.tmpBoundsOnModel=new T,ot.glContext.length>ot.frameBuffers.length&&(this.curFrameNo=this.getMaskRenderTexture()),this.tmpModelToViewMatrix=new C,this.tmpMatrix2=new C,this.tmpMatrixForMask=new C,this.tmpMatrixForDraw=new C,this.CHANNEL_COLORS=new Array;var i=new M;(i=new M).r=0,i.g=0,i.b=0,i.a=1,this.CHANNEL_COLORS.push(i),(i=new M).r=1,i.g=0,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),(i=new M).r=0,i.g=1,i.b=0,i.a=0,this.CHANNEL_COLORS.push(i),(i=new M).r=0,i.g=0,i.b=1,i.a=0,this.CHANNEL_COLORS.push(i);for(var r=0;r<this.CHANNEL_COLORS.length;r++)this.dp_webgl.setChannelFlagAsColor(r,this.CHANNEL_COLORS[r])}}function r(t,e,i){this.clipIDList=new Array,this.clipIDList=i,this.clippingMaskDrawIndexList=new Array;for(var r=0;r<i.length;r++)this.clippingMaskDrawIndexList.push(e.getDrawDataIndex(i[r]));this.clippedDrawContextList=new Array,this.isUsing=!0,this.layoutChannelNo=0,this.layoutBounds=new T,this.allClippedDrawRect=new T,this.matrixForMask=new Float32Array(16),this.matrixForDraw=new Float32Array(16),this.owner=t}function n(t,e){this._$gP=t,this.drawDataIndex=e}function s(){t||(this.color=null)}function o(){t||(this._$dP=null,this._$eo=null,this._$V0=null,this._$dP=1e3,this._$eo=1e3,this._$V0=1,this._$a0())}function a(){}function h(){this._$r=null,this._$0S=null}function l(){t||(this.x=null,this.y=null,this.width=null,this.height=null)}function u(e){t||et.prototype.constructor.call(this,e)}function c(e){t||et.prototype.constructor.call(this,e)}function d(){t||(this._$vo=null,this._$F2=null,this._$ao=400,this._$1S=400,d._$42++)}function p(){t||(this.p1=new f,this.p2=new f,this._$Fo=0,this._$Db=0,this._$L2=0,this._$M2=0,this._$ks=0,this._$9b=0,this._$iP=0,this._$iT=0,this._$lL=new Array,this._$qP=new Array,this.setup(.3,.5,.1))}function f(){this._$p=1,this.x=0,this.y=0,this.vx=0,this.vy=0,this.ax=0,this.ay=0,this.fx=0,this.fy=0,this._$s0=0,this._$70=0,this._$7L=0,this._$HL=0}function _(t,e,i){this._$wL=null,this.scale=null,this._$V0=null,this._$wL=t,this.scale=e,this._$V0=i}function g(t,e,i,r){_.prototype.constructor.call(this,e,i,r),this._$tL=null,this._$tL=t}function v(t,e,i){this._$wL=null,this.scale=null,this._$V0=null,this._$wL=t,this.scale=e,this._$V0=i}function y(t,e,i,r){v.prototype.constructor.call(this,e,i,r),this._$YP=null,this._$YP=t}function x(){t||(this._$fL=0,this._$gL=0,this._$B0=1,this._$z0=1,this._$qT=0,this.reflectX=!1,this.reflectY=!1)}e._$0s=1,e._$4s=2,e._$42=0,e._$62=function(t,i){try{if(i instanceof ArrayBuffer&&(i=new DataView(i)),!(i instanceof DataView))throw new ht("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer");var r,n=new xt(i),s=n._$ST(),o=n._$ST(),h=n._$ST();if(109!=s||111!=o||99!=h)throw new ht("_$gi _$C _$li , _$Q0 _$P0.");if(r=n._$ST(),n._$gr(r),r>G._$T7)throw t._$NP|=e._$4s,new ht("_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+G._$T7+" < _$f0 : "+r+" )@_$SS#loadModel()\n");var l=n._$nP();if(r>=G._$s7){var u=n._$9T(),c=n._$9T();if(-30584!=u||-30584!=c)throw t._$NP|=e._$0s,new ht("_$gi _$C _$li , _$0 _$6 _$Ui.")}t._$KS(l);var d=t.getModelContext();d.setDrawParam(t.getDrawParam()),d.init()}catch(t){a._$Rb(t)}},e.prototype._$KS=function(t){this._$MT=t},e.prototype.getModelImpl=function(){return null==this._$MT&&(this._$MT=new d,this._$MT._$zP()),this._$MT},e.prototype.getCanvasWidth=function(){return null==this._$MT?0:this._$MT.getCanvasWidth()},e.prototype.getCanvasHeight=function(){return null==this._$MT?0:this._$MT.getCanvasHeight()},e.prototype.getParamFloat=function(t){return"number"!=typeof t&&(t=this._$5S.getParamIndex(c.getID(t))),this._$5S.getParamFloat(t)},e.prototype.setParamFloat=function(t,e,i){"number"!=typeof t&&(t=this._$5S.getParamIndex(c.getID(t))),arguments.length<3&&(i=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1-i)+e*i)},e.prototype.addToParamFloat=function(t,e,i){"number"!=typeof t&&(t=this._$5S.getParamIndex(c.getID(t))),arguments.length<3&&(i=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)+e*i)},e.prototype.multParamFloat=function(t,e,i){"number"!=typeof t&&(t=this._$5S.getParamIndex(c.getID(t))),arguments.length<3&&(i=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1+(e-1)*i))},e.prototype.getParamIndex=function(t){return this._$5S.getParamIndex(c.getID(t))},e.prototype.loadParam=function(){this._$5S.loadParam()},e.prototype.saveParam=function(){this._$5S.saveParam()},e.prototype.init=function(){this._$5S.init()},e.prototype.update=function(){this._$5S.update()},e.prototype._$Rs=function(){return a._$li("_$60 _$PT _$Rs()"),-1},e.prototype._$Ds=function(t){a._$li("_$60 _$PT _$SS#_$Ds() \n")},e.prototype._$K2=function(){},e.prototype.draw=function(){},e.prototype.getModelContext=function(){return this._$5S},e.prototype._$s2=function(){return this._$NP},e.prototype._$P7=function(t,e,i,r){var n=-1,s=0,o=this,a=.5;if(0!=i)if(1==t.length){f=t[0];var h=0!=o.getParamFloat(f),l=(_=e[0],o.getPartsOpacity(_)),u=i/r;h?(l+=u)>1&&(l=1):(l-=u)<0&&(l=0),o.setPartsOpacity(_,l)}else{for(p=0;p<t.length;p++){f=t[p];if(g=0!=o.getParamFloat(f)){if(n>=0)break;n=p;_=e[p];s=o.getPartsOpacity(_),(s+=i/r)>1&&(s=1)}}n<0&&(console.log("No _$wi _$q0/ _$U default[%s]",t[0]),n=0,s=1,o.loadParam(),o.setParamFloat(t[n],s),o.saveParam());for(p=0;p<t.length;p++){_=e[p];if(n==p)o.setPartsOpacity(_,s);else{var c,d=o.getPartsOpacity(_);(1-(c=s<a?-.5*s/a+1:(1-s)*a/.5))*(1-s)>.15&&(c=1-.15/(1-s)),d>c&&(d=c),o.setPartsOpacity(_,d)}}}else for(var p=0;p<t.length;p++){var f=t[p],_=e[p],g=0!=o.getParamFloat(f);o.setPartsOpacity(_,g?1:0)}},e.prototype.setPartsOpacity=function(t,e){"number"!=typeof t&&(t=this._$5S.getPartsDataIndex(u.getID(t))),this._$5S.setPartsOpacity(t,e)},e.prototype.getPartsDataIndex=function(t){return t instanceof u||(t=u.getID(t)),this._$5S.getPartsDataIndex(t)},e.prototype.getPartsOpacity=function(t){return"number"!=typeof t&&(t=this._$5S.getPartsDataIndex(u.getID(t))),t<0?0:this._$5S.getPartsOpacity(t)},e.prototype.getDrawParam=function(){},e.prototype.getDrawDataIndex=function(t){return this._$5S.getDrawDataIndex(D.getID(t))},e.prototype.getDrawData=function(t){return this._$5S.getDrawData(t)},e.prototype.getTransformedPoints=function(t){var e=this._$5S._$C2(t);return e instanceof ut?e.getTransformedPoints():null},e.prototype.getIndexArray=function(t){if(t<0||t>=this._$5S._$aS.length)return null;var e=this._$5S._$aS[t];return null!=e&&e.getType()==Y._$wb&&e instanceof lt?e.getIndexArray():null},i.CHANNEL_COUNT=4,i.RENDER_TEXTURE_USE_MIPMAP=!1,i.NOT_USED_FRAME=-100,i.prototype._$L7=function(){if(this.tmpModelToViewMatrix&&(this.tmpModelToViewMatrix=null),this.tmpMatrix2&&(this.tmpMatrix2=null),this.tmpMatrixForMask&&(this.tmpMatrixForMask=null),this.tmpMatrixForDraw&&(this.tmpMatrixForDraw=null),this.tmpBoundsOnModel&&(this.tmpBoundsOnModel=null),this.CHANNEL_COLORS){for(var t=this.CHANNEL_COLORS.length-1;t>=0;--t)this.CHANNEL_COLORS.splice(t,1);this.CHANNEL_COLORS=[]}this.releaseShader()},i.prototype.releaseShader=function(){for(var t=ot.frameBuffers.length,e=0;e<t;e++)this.gl.deleteFramebuffer(ot.frameBuffers[e].framebuffer);ot.frameBuffers=[],ot.glContext=[]},i.prototype.init=function(t,e,i){for(var n=0;n<e.length;n++){var s=e[n].getClipIDList();if(null!=s){var o=this.findSameClip(s);null==o&&(o=new r(this,t,s),this.clipContextList.push(o));var a=e[n].getDrawDataID(),h=t.getDrawDataIndex(a);o.addClippedDrawData(a,h),i[n].clipBufPre_clipContext=o}}},i.prototype.getMaskRenderTexture=function(){var t;return t=this.dp_webgl.createFramebuffer(),ot.frameBuffers[this.dp_webgl.glno]=t,this.dp_webgl.glno},i.prototype.setupClip=function(t,e){for(var i=0,r=0;r<this.clipContextList.length;r++){var n=this.clipContextList[r];this.calcClippedDrawTotalBounds(t,n),n.isUsing&&i++}if(i>0){var s=e.gl.getParameter(e.gl.FRAMEBUFFER_BINDING),o=new Array(4);o[0]=0,o[1]=0,o[2]=e.gl.canvas.width,o[3]=e.gl.canvas.height,e.gl.viewport(0,0,ot.clippingMaskBufferSize,ot.clippingMaskBufferSize),this.setupLayoutBounds(i),e.gl.bindFramebuffer(e.gl.FRAMEBUFFER,ot.frameBuffers[this.curFrameNo].framebuffer),e.gl.clearColor(0,0,0,0),e.gl.clear(e.gl.COLOR_BUFFER_BIT);for(r=0;r<this.clipContextList.length;r++){var a=(n=this.clipContextList[r]).allClippedDrawRect;n.layoutChannelNo;var h=n.layoutBounds;this.tmpBoundsOnModel._$jL(a),this.tmpBoundsOnModel.expand(.05*a.width,.05*a.height);var l=h.width/this.tmpBoundsOnModel.width,u=h.height/this.tmpBoundsOnModel.height;this.tmpMatrix2.identity(),this.tmpMatrix2.translate(-1,-1,0),this.tmpMatrix2.scale(2,2,1),this.tmpMatrix2.translate(h.x,h.y,0),this.tmpMatrix2.scale(l,u,1),this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x,-this.tmpBoundsOnModel.y,0),this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m),this.tmpMatrix2.identity(),this.tmpMatrix2.translate(h.x,h.y,0),this.tmpMatrix2.scale(l,u,1),this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x,-this.tmpBoundsOnModel.y,0),this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m);for(var c=this.tmpMatrixForMask.getArray(),d=0;d<16;d++)n.matrixForMask[d]=c[d];var p=this.tmpMatrixForDraw.getArray();for(d=0;d<16;d++)n.matrixForDraw[d]=p[d];for(var f=n.clippingMaskDrawIndexList.length,_=0;_<f;_++){var g=n.clippingMaskDrawIndexList[_],m=t.getDrawData(g),v=t._$C2(g);e.setClipBufPre_clipContextForMask(n),m.draw(e,t,v)}}e.gl.bindFramebuffer(e.gl.FRAMEBUFFER,s),e.setClipBufPre_clipContextForMask(null),e.gl.viewport(o[0],o[1],o[2],o[3])}},i.prototype.getColorBuffer=function(){return this.colorBuffer},i.prototype.findSameClip=function(t){for(var e=0;e<this.clipContextList.length;e++){var i=this.clipContextList[e],r=i.clipIDList.length;if(r==t.length){for(var n=0,s=0;s<r;s++)for(var o=i.clipIDList[s],a=0;a<r;a++)if(t[a]==o){n++;break}if(n==r)return i}}return null},i.prototype.calcClippedDrawTotalBounds=function(t,e){for(var i=t._$Ri.getModelImpl().getCanvasWidth(),r=t._$Ri.getModelImpl().getCanvasHeight(),n=i>r?i:r,s=n,o=n,a=0,h=0,l=e.clippedDrawContextList.length,u=0;u<l;u++){var c=e.clippedDrawContextList[u].drawDataIndex,d=t._$C2(c);if(d._$yo()){for(var p=d.getTransformedPoints(),f=p.length,_=[],g=[],m=0,v=U._$i2;v<f;v+=U._$No)_[m]=p[v],g[m]=p[v+1],m++;var y=Math.min.apply(null,_),x=Math.min.apply(null,g),b=Math.max.apply(null,_),T=Math.max.apply(null,g);y<s&&(s=y),x<o&&(o=x),b>a&&(a=b),T>h&&(h=T)}}if(s==n)e.allClippedDrawRect.x=0,e.allClippedDrawRect.y=0,e.allClippedDrawRect.width=0,e.allClippedDrawRect.height=0,e.isUsing=!1;else{var E=a-s,w=h-o;e.allClippedDrawRect.x=s,e.allClippedDrawRect.y=o,e.allClippedDrawRect.width=E,e.allClippedDrawRect.height=w,e.isUsing=!0}},i.prototype.setupLayoutBounds=function(t){var e=t/i.CHANNEL_COUNT,r=t%i.CHANNEL_COUNT;e=~~e,r=~~r;for(var n=0,s=0;s<i.CHANNEL_COUNT;s++){var o=e+(s<r?1:0);if(0==o);else if(1==o)(c=this.clipContextList[n++]).layoutChannelNo=s,c.layoutBounds.x=0,c.layoutBounds.y=0,c.layoutBounds.width=1,c.layoutBounds.height=1;else if(2==o)for(var h=0;h<o;h++){var l=0;u=~~(u=h%2),(c=this.clipContextList[n++]).layoutChannelNo=s,c.layoutBounds.x=.5*u,c.layoutBounds.y=0,c.layoutBounds.width=.5,c.layoutBounds.height=1}else if(o<=4)for(h=0;h<o;h++){u=~~(u=h%2),l=~~(l=h/2),(c=this.clipContextList[n++]).layoutChannelNo=s,c.layoutBounds.x=.5*u,c.layoutBounds.y=.5*l,c.layoutBounds.width=.5,c.layoutBounds.height=.5}else if(o<=9)for(h=0;h<o;h++){var u,c;u=~~(u=h%3),l=~~(l=h/3),(c=this.clipContextList[n++]).layoutChannelNo=s,c.layoutBounds.x=u/3,c.layoutBounds.y=l/3,c.layoutBounds.width=1/3,c.layoutBounds.height=1/3}else a._$li("_$6 _$0P mask count : %d",o)}},r.prototype.addClippedDrawData=function(t,e){var i=new n(t,e);this.clippedDrawContextList.push(i)},o._$JT=function(t,e,i){var r=t/e,n=i/e,s=1/3,o=2/3,a=1-(1-n)*(1-n),h=1-(1-n)*(1-n),l=(1-n)*s*a+(n*o+(1-n)*s)*(1-a),u=(n+(1-n)*o)*h+(n*s+(1-n)*o)*(1-h);if(r<=0)return 0;if(r>=1)return 1;var c=r*r;return(1-3*u+3*l-0)*(r*c)+(3*u-6*l+0)*c+(3*l-0)*r+0},o.prototype._$a0=function(){},o.prototype.setFadeIn=function(t){this._$dP=t},o.prototype.setFadeOut=function(t){this._$eo=t},o.prototype._$pT=function(t){this._$V0=t},o.prototype.getFadeOut=function(){return this._$eo},o.prototype._$4T=function(){return this._$eo},o.prototype._$mT=function(){return this._$V0},o.prototype.getDurationMSec=function(){return-1},o.prototype.getLoopDurationMSec=function(){return-1},o.prototype.updateParam=function(t,e){if(e._$AT&&!e._$9L){var i=I.getUserTimeMSec();if(e._$z2<0){e._$z2=i,e._$bs=i;var r=this.getDurationMSec();e._$Do<0&&(e._$Do=r<=0?-1:e._$z2+r)}var n=this._$V0;0<=(n=n*(0==this._$dP?1:at._$r2((i-e._$bs)/this._$dP))*(0==this._$eo||e._$Do<0?1:at._$r2((e._$Do-i)/this._$eo)))&&n<=1||console.log("### assert!! ### "),this.updateParamExe(t,i,n,e),e._$Do>0&&e._$Do<i&&(e._$9L=!0)}},o.prototype.updateParamExe=function(t,e,i,r){},a._$8s=0,a._$fT=new Object,a.start=function(t){var e=a._$fT[t];null==e&&((e=new h)._$r=t,a._$fT[t]=e),e._$0S=I.getSystemTimeMSec()},a.dump=function(t){var e=a._$fT[t];if(null!=e){var i=I.getSystemTimeMSec()-e._$0S;return console.log(t+" : "+i+"ms"),i}return-1},a.end=function(t){var e=a._$fT[t];return null!=e?I.getSystemTimeMSec()-e._$0S:-1},a._$li=function(t,e){console.log("_$li : "+t+"\n",e)},a._$Ji=function(t,e){console.log(t,e)},a._$dL=function(t,e){console.log(t,e),console.log("\n")},a._$KL=function(t,e){for(var i=0;i<e;i++)i%16==0&&i>0?console.log("\n"):i%8==0&&i>0&&console.log(" "),console.log("%02X ",255&t[i]);console.log("\n")},a._$nr=function(t,e,i){console.log("%s\n",t);for(var r=e.length,n=0;n<r;++n)console.log("%5d",e[n]),console.log("%s\n",i),console.log(",");console.log("\n")},a._$Rb=function(t){console.log("dump exception : "+t),console.log("stack :: "+t.stack)},l.prototype._$8P=function(){return.5*(this.x+this.x+this.width)},l.prototype._$6P=function(){return.5*(this.y+this.y+this.height)},l.prototype._$EL=function(){return this.x+this.width},l.prototype._$5T=function(){return this.y+this.height},l.prototype._$jL=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},l.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},u.prototype=new et,u._$tP=new Object,u._$27=function(){u._$tP.clear()},u.getID=function(t){var e=u._$tP[t];return null==e&&(e=new u(t),u._$tP[t]=e),e},u.prototype._$3s=function(){return new u},c.prototype=new et,c._$tP=new Object,c._$27=function(){c._$tP.clear()},c.getID=function(t){var e=c._$tP[t];return null==e&&(e=new c(t),c._$tP[t]=e),e},c.prototype._$3s=function(){return new c},d._$42=0,d.prototype._$zP=function(){null==this._$vo&&(this._$vo=new it),null==this._$F2&&(this._$F2=new Array)},d.prototype.getCanvasWidth=function(){return this._$ao},d.prototype.getCanvasHeight=function(){return this._$1S},d.prototype._$F0=function(t){this._$vo=t._$nP(),this._$F2=t._$nP(),this._$ao=t._$6L(),this._$1S=t._$6L()},d.prototype._$6S=function(t){this._$F2.push(t)},d.prototype._$Xr=function(){return this._$F2},d.prototype._$E2=function(){return this._$vo},p.prototype.setup=function(t,e,i){this._$ks=this._$Yb(),this.p2._$xT(),3==arguments.length&&(this._$Fo=t,this._$L2=e,this.p1._$p=i,this.p2._$p=i,this.p2.y=t,this.setup())},p.prototype.getPhysicsPoint1=function(){return this.p1},p.prototype.getPhysicsPoint2=function(){return this.p2},p.prototype._$qr=function(){return this._$Db},p.prototype._$pr=function(t){this._$Db=t},p.prototype._$5r=function(){return this._$M2},p.prototype._$Cs=function(){return this._$9b},p.prototype._$Yb=function(){return-180*Math.atan2(this.p1.x-this.p2.x,-(this.p1.y-this.p2.y))/Math.PI},p.prototype.addSrcParam=function(t,e,i,r){var n=new g(t,e,i,r);this._$lL.push(n)},p.prototype.addTargetParam=function(t,e,i,r){var n=new y(t,e,i,r);this._$qP.push(n)},p.prototype.update=function(t,e){if(0==this._$iP)return this._$iP=this._$iT=e,void(this._$Fo=Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y)));var i=(e-this._$iT)/1e3;if(0!=i){for(var r=this._$lL.length-1;r>=0;--r){this._$lL[r]._$oP(t,this)}this._$oo(t,i),this._$M2=this._$Yb(),this._$9b=(this._$M2-this._$ks)/i,this._$ks=this._$M2}for(r=this._$qP.length-1;r>=0;--r){this._$qP[r]._$YS(t,this)}this._$iT=e},p.prototype._$oo=function(t,e){e<.033&&(e=.033);var i=1/e;this.p1.vx=(this.p1.x-this.p1._$s0)*i,this.p1.vy=(this.p1.y-this.p1._$70)*i,this.p1.ax=(this.p1.vx-this.p1._$7L)*i,this.p1.ay=(this.p1.vy-this.p1._$HL)*i,this.p1.fx=this.p1.ax*this.p1._$p,this.p1.fy=this.p1.ay*this.p1._$p,this.p1._$xT();var r,n,s=-Math.atan2(this.p1.y-this.p2.y,this.p1.x-this.p2.x),o=Math.cos(s),a=Math.sin(s),h=9.8*this.p2._$p,l=this._$Db*Tt._$bS,u=h*Math.cos(s-l);r=u*a,n=u*o;var c=-this.p1.fx*a*a,d=-this.p1.fy*a*o,p=-this.p2.vx*this._$L2,f=-this.p2.vy*this._$L2;this.p2.fx=r+c+p,this.p2.fy=n+d+f,this.p2.ax=this.p2.fx/this.p2._$p,this.p2.ay=this.p2.fy/this.p2._$p,this.p2.vx+=this.p2.ax*e,this.p2.vy+=this.p2.ay*e,this.p2.x+=this.p2.vx*e,this.p2.y+=this.p2.vy*e;var _=Math.sqrt((this.p1.x-this.p2.x)*(this.p1.x-this.p2.x)+(this.p1.y-this.p2.y)*(this.p1.y-this.p2.y));this.p2.x=this.p1.x+this._$Fo*(this.p2.x-this.p1.x)/_,this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/_,this.p2.vx=(this.p2.x-this.p2._$s0)*i,this.p2.vy=(this.p2.y-this.p2._$70)*i,this.p2._$xT()},f.prototype._$xT=function(){this._$s0=this.x,this._$70=this.y,this._$7L=this.vx,this._$HL=this.vy},_.prototype._$oP=function(t,e){},g.prototype=new _,g.prototype._$oP=function(t,e){var i=this.scale*t.getParamFloat(this._$wL),r=e.getPhysicsPoint1();switch(this._$tL){default:case p.Src.SRC_TO_X:r.x=r.x+(i-r.x)*this._$V0;break;case p.Src.SRC_TO_Y:r.y=r.y+(i-r.y)*this._$V0;break;case p.Src.SRC_TO_G_ANGLE:var n=e._$qr();n+=(i-n)*this._$V0,e._$pr(n)}},v.prototype._$YS=function(t,e){},y.prototype=new v,y.prototype._$YS=function(t,e){switch(this._$YP){default:case p.Target.TARGET_FROM_ANGLE:t.setParamFloat(this._$wL,this.scale*e._$5r(),this._$V0);break;case p.Target.TARGET_FROM_ANGLE_V:t.setParamFloat(this._$wL,this.scale*e._$Cs(),this._$V0)}},p.Src=function(){},p.Src.SRC_TO_X="SRC_TO_X",p.Src.SRC_TO_Y="SRC_TO_Y",p.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE",p.Target=function(){},p.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE",p.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V",x.prototype.init=function(t){this._$fL=t._$fL,this._$gL=t._$gL,this._$B0=t._$B0,this._$z0=t._$z0,this._$qT=t._$qT,this.reflectX=t.reflectX,this.reflectY=t.reflectY},x.prototype._$F0=function(t){this._$fL=t._$_T(),this._$gL=t._$_T(),this._$B0=t._$_T(),this._$z0=t._$_T(),this._$qT=t._$_T(),t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this.reflectX=t._$po(),this.reflectY=t._$po())},x.prototype._$e=function(){};var b=function(){};function T(){t||(this.x=null,this.y=null,this.width=null,this.height=null)}function E(){}function w(){t||(this.x=null,this.y=null)}function S(){t||(this._$gP=null,this._$dr=null,this._$GS=null,this._$qb=null,this._$Lb=null,this._$mS=null,this.clipID=null,this.clipIDList=new Array)}function P(){t||(this._$Eb=P._$ps,this._$lT=1,this._$C0=1,this._$tT=1,this._$WL=1,this.culling=!1,this.matrix4x4=new Float32Array(16),this.premultipliedAlpha=!1,this.anisotropy=0,this.clippingProcess=P.CLIPPING_PROCESS_NONE,this.clipBufPre_clipContextMask=null,this.clipBufPre_clipContextDraw=null,this.CHANNEL_COLORS=new Array)}function M(){t||(this.a=1,this.r=1,this.g=1,this.b=1,this.scale=1,this._$ho=1,this.blendMode=ot.L2D_COLOR_BLEND_MODE_MULT)}function A(){t||(this._$kP=null,this._$dr=null,this._$Ai=!0,this._$mS=null)}function I(){}function O(){t||(this._$VP=0,this._$wL=null,this._$GP=null,this._$8o=O._$ds,this._$2r=-1,this._$O2=0,this._$ri=0)}function R(){}function $(){t||(this._$Ob=null)}function C(){this.m=new Float32Array(16),this.identity()}function D(e){t||et.prototype.constructor.call(this,e)}function L(){t||(this._$7=1,this._$f=0,this._$H=0,this._$g=1,this._$k=0,this._$w=0,this._$hi=STATE_IDENTITY,this._$Z=_$pS)}function F(){t||(o.prototype.constructor.call(this),this.motions=new Array,this._$7r=null,this._$7r=F._$Co++,this._$D0=30,this._$yT=0,this._$E=!0,this.loopFadeIn=!0,this._$AS=-1,_$a0())}function N(){this._$P=new Float32Array(100),this.size=0}function B(){this._$4P=null,this._$I0=null,this._$RP=null}function U(){}function G(){}function k(e){t||(this._$QT=!0,this._$co=-1,this._$qo=0,this._$pb=new Array(k._$is),this._$_2=new Float32Array(k._$is),this._$vr=new Float32Array(k._$is),this._$Rr=new Float32Array(k._$is),this._$Or=new Float32Array(k._$is),this._$fs=new Float32Array(k._$is),this._$Js=new Array(k._$is),this._$3S=new Array,this._$aS=new Array,this._$Bo=null,this._$F2=new Array,this._$db=new Array,this._$8b=new Array,this._$Hr=new Array,this._$Ws=null,this._$Vs=null,this._$Er=null,this._$Es=new Int16Array(U._$Qb),this._$ZP=new Float32Array(2*U._$1r),this._$Ri=e,this._$b0=k._$HP++,this.clipManager=null,this.dp_webgl=null)}function X(){}function j(){t||(P.prototype.constructor.call(this),this._$sb=new Int32Array(j._$As),this._$U2=new Array,this.transform=null,this.gl=null,null==j._$NT&&(j._$NT=j._$9r(256),j._$vS=j._$9r(256),j._$no=j._$vb(256)))}function H(){t||(A.prototype.constructor.call(this),this._$GS=null,this._$Y0=null)}function V(t){st.prototype.constructor.call(this,t),this._$8r=A._$ur,this._$Yr=null,this._$Wr=null}function Y(){t||(S.prototype.constructor.call(this),this._$gP=null,this._$dr=null,this._$GS=null,this._$qb=null,this._$Lb=null,this._$mS=null)}function z(){t||(this._$NL=null,this._$3S=null,this._$aS=null,z._$42++)}function W(){t||(e.prototype.constructor.call(this),this._$zo=new j)}function q(){t||(o.prototype.constructor.call(this),this.motions=new Array,this._$o2=null,this._$7r=q._$Co++,this._$D0=30,this._$yT=0,this._$E=!1,this.loopFadeIn=!0,this._$rr=-1,this._$eP=0)}function Z(t,e){return String.fromCharCode(t.getUint8(e))}function N(){this._$P=new Float32Array(100),this.size=0}function B(){this._$4P=null,this._$I0=null,this._$RP=null}function J(){t||(A.prototype.constructor.call(this),this._$o=0,this._$A=0,this._$GS=null,this._$Eo=null)}function K(t){st.prototype.constructor.call(this,t),this._$8r=A._$ur,this._$Cr=null,this._$hr=null}function Q(){t||(this.visible=!0,this._$g0=!1,this._$NL=null,this._$3S=null,this._$aS=null,Q._$42++)}function tt(t){this._$VS=null,this._$e0=null,this._$e0=t}function et(e){t||(this.id=e)}function it(){t||(this._$4S=null)}function rt(t,e){this.canvas=t,this.context=e,this.viewport=new Array(0,0,t.width,t.height),this._$6r=1,this._$xP=0,this._$3r=1,this._$uP=0,this._$Qo=-1,this.cacheImages={}}function nt(){t||(this._$TT=null,this._$LT=null,this._$FS=null,this._$wL=null)}function st(e){t||(this._$e0=null,this._$IP=null,this._$JS=!1,this._$AT=!0,this._$e0=e,this.totalScale=1,this._$7s=1,this.totalOpacity=1)}function ot(){}function at(){}function ht(e){t||(this._$ib=e)}function lt(){t||(Y.prototype.constructor.call(this),this._$LP=-1,this._$d0=0,this._$Yo=0,this._$JP=null,this._$5P=null,this._$BP=null,this._$Eo=null,this._$Qi=null,this._$6s=lt._$ms,this.culling=!0,this.gl_cacheImage=null,this.instanceNo=lt._$42++)}function ut(t){Et.prototype.constructor.call(this,t),this._$8r=Y._$ur,this._$Cr=null,this._$hr=null}function ct(){t||(this.x=null,this.y=null)}function dt(i){t||(e.prototype.constructor.call(this),this.drawParamWebGL=new mt(i),this.drawParamWebGL.setGL(ot.getGL(i)))}function pt(){t||(this.motions=null,this._$eb=!1,this.motions=new Array)}function ft(){this._$w0=null,this._$AT=!0,this._$9L=!1,this._$z2=-1,this._$bs=-1,this._$Do=-1,this._$sr=null,this._$sr=ft._$Gs++}function _t(){this.m=new Array(1,0,0,0,1,0,0,0,1)}function gt(e){t||et.prototype.constructor.call(this,e)}function mt(e){t||(P.prototype.constructor.call(this),this.textures=new Array,this.transform=null,this.gl=null,this.glno=e,this.firstDraw=!0,this.anisotropyExt=null,this.maxAnisotropy=0,this._$As=32,this._$Gr=!1,this._$NT=null,this._$vS=null,this._$no=null,this.vertShader=null,this.fragShader=null,this.vertShaderOff=null,this.fragShaderOff=null)}function vt(t,e,i){return null==e&&(e=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,e),t.bufferData(t.ARRAY_BUFFER,i,t.DYNAMIC_DRAW),e}function yt(t,e,i){return null==e&&(e=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),t.bufferData(t.ELEMENT_ARRAY_BUFFER,i,t.DYNAMIC_DRAW),e}function xt(e){t||(this._$P=new Int8Array(8),this._$R0=new DataView(this._$P.buffer),this._$3i=new Int8Array(1e3),this._$hL=0,this._$v0=0,this._$S2=0,this._$Ko=new Array,this._$T=e,this._$F=0)}b._$ni=function(t,e,i,r,n,s,o,a,h){var l=o*s-a*n;if(0==l)return null;var u,c=((t-i)*s-(e-r)*n)/l;return u=0!=n?(t-i-c*o)/n:(e-r-c*a)/s,isNaN(u)&&(u=(t-i-c*o)/n,isNaN(u)&&(u=(e-r-c*a)/s),isNaN(u)&&(console.log("a is NaN @UtVector#_$ni() "),console.log("v1x : "+n),console.log("v1x != 0 ? "+(0!=n)))),null==h?new Array(u,c):(h[0]=u,h[1]=c,h)},T.prototype._$8P=function(){return this.x+.5*this.width},T.prototype._$6P=function(){return this.y+.5*this.height},T.prototype._$EL=function(){return this.x+this.width},T.prototype._$5T=function(){return this.y+this.height},T.prototype._$jL=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},T.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},T.prototype.contains=function(t,e){return this.x<=this.x&&this.y<=this.y&&this.x<=this.x+this.width&&this.y<=this.y+this.height},T.prototype.expand=function(t,e){this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},E._$Z2=function(t,e,i,r){var n=e._$Q2(t,i),s=t._$vs(),o=t._$Tr();if(e._$zr(s,o,n),n<=0)return r[s[0]];if(1==n)return(a=r[s[0]])+((h=r[s[1]])-a)*(y=o[0])|0;if(2==n){var a=r[s[0]],h=r[s[1]],l=r[s[2]],u=r[s[3]];return(T=a+(h-a)*(y=o[0])|0)+((l+(u-l)*y|0)-T)*(x=o[1])|0}if(3==n){var c=r[s[0]],d=r[s[1]],p=r[s[2]],f=r[s[3]],_=r[s[4]],g=r[s[5]],m=r[s[6]],v=r[s[7]];return(T=(a=c+(d-c)*(y=o[0])|0)+((h=p+(f-p)*y|0)-a)*(x=o[1])|0)+(((l=_+(g-_)*y|0)+((u=m+(v-m)*y|0)-l)*x|0)-T)*(b=o[2])|0}if(4==n){var y,x,b,T,E=r[s[0]],w=r[s[1]],S=r[s[2]],P=r[s[3]],M=r[s[4]],A=r[s[5]],I=r[s[6]],O=r[s[7]],R=r[s[8]],$=r[s[9]],C=r[s[10]],D=r[s[11]],L=r[s[12]],F=r[s[13]],N=r[s[14]],B=r[s[15]];return(T=(a=(c=E+(w-E)*(y=o[0])|0)+((d=S+(P-S)*y|0)-c)*(x=o[1])|0)+((h=(p=M+(A-M)*y|0)+((f=I+(O-I)*y|0)-p)*x|0)-a)*(b=o[2])|0)+(((l=(_=R+($-R)*y|0)+((g=C+(D-C)*y|0)-_)*x|0)+((u=(m=L+(F-L)*y|0)+((v=N+(B-N)*y|0)-m)*x|0)-l)*b|0)-T)*o[3]|0}for(var U=1<<n,G=new Float32Array(U),k=0;k<U;k++){for(var X=k,j=1,H=0;H<n;H++)j*=X%2==0?1-o[H]:o[H],X/=2;G[k]=j}for(var V=new Float32Array(U),Y=0;Y<U;Y++)V[Y]=r[s[Y]];var z=0;for(Y=0;Y<U;Y++)z+=G[Y]*V[Y];return z+.5|0},E._$br=function(t,e,i,r){var n=e._$Q2(t,i),s=t._$vs(),o=t._$Tr();if(e._$zr(s,o,n),n<=0)return r[s[0]];if(1==n)return(a=r[s[0]])+((h=r[s[1]])-a)*(c=o[0]);if(2==n){var a=r[s[0]],h=r[s[1]],l=r[s[2]],u=r[s[3]],c=o[0];return(1-(x=o[1]))*(a+(h-a)*c)+x*(l+(u-l)*c)}if(3==n){var d=r[s[0]],p=r[s[1]],f=r[s[2]],_=r[s[3]],g=r[s[4]],m=r[s[5]],v=r[s[6]],y=r[s[7]],x=(c=o[0],o[1]);return(1-(N=o[2]))*((1-x)*(d+(p-d)*c)+x*(f+(_-f)*c))+N*((1-x)*(g+(m-g)*c)+x*(v+(y-v)*c))}if(4==n){var b=r[s[0]],T=r[s[1]],E=r[s[2]],w=r[s[3]],S=r[s[4]],P=r[s[5]],M=r[s[6]],A=r[s[7]],I=r[s[8]],O=r[s[9]],R=r[s[10]],$=r[s[11]],C=r[s[12]],D=r[s[13]],L=r[s[14]],F=r[s[15]],N=(c=o[0],x=o[1],o[2]),B=o[3];return(1-B)*((1-N)*((1-x)*(b+(T-b)*c)+x*(E+(w-E)*c))+N*((1-x)*(S+(P-S)*c)+x*(M+(A-M)*c)))+B*((1-N)*((1-x)*(I+(O-I)*c)+x*(R+($-R)*c))+N*((1-x)*(C+(D-C)*c)+x*(L+(F-L)*c)))}for(var U=1<<n,G=new Float32Array(U),k=0;k<U;k++){for(var X=k,j=1,H=0;H<n;H++)j*=X%2==0?1-o[H]:o[H],X/=2;G[k]=j}for(var V=new Float32Array(U),Y=0;Y<U;Y++)V[Y]=r[s[Y]];var z=0;for(Y=0;Y<U;Y++)z+=G[Y]*V[Y];return z},E._$Vr=function(t,e,i,r,n,s,o,a){var h=e._$Q2(t,i),l=t._$vs(),u=t._$Tr();e._$zr(l,u,h);var c=2*r,d=o;if(h<=0){var p=n[l[0]];if(2==a&&0==o)I._$jT(p,0,s,0,c);else for(var f=0;f<c;)s[d]=p[f++],s[d+1]=p[f++],d+=a}else if(1==h){p=n[l[0]];var _=n[l[1]],g=1-(y=u[0]);for(f=0;f<c;)s[d]=p[f]*g+_[f]*y,++f,s[d+1]=p[f]*g+_[f]*y,++f,d+=a}else if(2==h){p=n[l[0]],_=n[l[1]];var m=n[l[2]],v=n[l[3]],y=u[0],x=(X=1-(C=u[1]))*(g=1-y),b=X*y,T=C*g,E=C*y;for(f=0;f<c;)s[d]=x*p[f]+b*_[f]+T*m[f]+E*v[f],++f,s[d+1]=x*p[f]+b*_[f]+T*m[f]+E*v[f],++f,d+=a}else if(3==h){var w=n[l[0]],S=n[l[1]],P=n[l[2]],M=n[l[3]],A=n[l[4]],O=n[l[5]],R=n[l[6]],$=n[l[7]],C=(y=u[0],u[1]),D=(j=1-(ot=u[2]))*(X=1-C)*(g=1-y),L=j*X*y,F=j*C*g,N=j*C*y,B=ot*X*g,U=ot*X*y,G=ot*C*g,k=ot*C*y;for(f=0;f<c;)s[d]=D*w[f]+L*S[f]+F*P[f]+N*M[f]+B*A[f]+U*O[f]+G*R[f]+k*$[f],++f,s[d+1]=D*w[f]+L*S[f]+F*P[f]+N*M[f]+B*A[f]+U*O[f]+G*R[f]+k*$[f],++f,d+=a}else if(4==h){var X,j,H=n[l[0]],V=n[l[1]],Y=n[l[2]],z=n[l[3]],W=n[l[4]],q=n[l[5]],Z=n[l[6]],J=n[l[7]],K=n[l[8]],Q=n[l[9]],tt=n[l[10]],et=n[l[11]],it=n[l[12]],rt=n[l[13]],nt=n[l[14]],st=n[l[15]],ot=(y=u[0],C=u[1],u[2]),at=u[3],ht=1-at,lt=ht*(j=1-ot)*(X=1-C)*(g=1-y),ut=ht*j*X*y,ct=ht*j*C*g,dt=ht*j*C*y,pt=ht*ot*X*g,ft=ht*ot*X*y,_t=ht*ot*C*g,gt=ht*ot*C*y,mt=at*j*X*g,vt=at*j*X*y,yt=at*j*C*g,xt=at*j*C*y,bt=at*ot*X*g,Tt=at*ot*X*y,Et=at*ot*C*g,wt=at*ot*C*y;for(f=0;f<c;)s[d]=lt*H[f]+ut*V[f]+ct*Y[f]+dt*z[f]+pt*W[f]+ft*q[f]+_t*Z[f]+gt*J[f]+mt*K[f]+vt*Q[f]+yt*tt[f]+xt*et[f]+bt*it[f]+Tt*rt[f]+Et*nt[f]+wt*st[f],++f,s[d+1]=lt*H[f]+ut*V[f]+ct*Y[f]+dt*z[f]+pt*W[f]+ft*q[f]+_t*Z[f]+gt*J[f]+mt*K[f]+vt*Q[f]+yt*tt[f]+xt*et[f]+bt*it[f]+Tt*rt[f]+Et*nt[f]+wt*st[f],++f,d+=a}else{for(var St=1<<h,Pt=new Float32Array(St),Mt=0;Mt<St;Mt++){for(var At=Mt,It=1,Ot=0;Ot<h;Ot++)It*=At%2==0?1-u[Ot]:u[Ot],At/=2;Pt[Mt]=It}for(var Rt=new Float32Array(St),$t=0;$t<St;$t++)Rt[$t]=n[l[$t]];for(f=0;f<c;){var Ct=0,Dt=0,Lt=f+1;for($t=0;$t<St;$t++)Ct+=Pt[$t]*Rt[$t][f],Dt+=Pt[$t]*Rt[$t][Lt];f+=2,s[d]=Ct,s[d+1]=Dt,d+=a}}},w.prototype._$HT=function(t,e){this.x=t,this.y=e},w.prototype._$HT=function(t){this.x=t.x,this.y=t.y},S._$ur=-2,S._$ES=500,S._$wb=2,S._$8S=3,S._$52=S._$ES,S._$R2=S._$ES,S._$or=function(){return S._$52},S._$Pr=function(){return S._$R2},S.prototype.convertClipIDForV2_11=function(t){var e=[];return null==t||0==t.length?null:/,/.test(t)?e=t.id.split(","):(e.push(t.id),e)},S.prototype._$F0=function(t){this._$gP=t._$nP(),this._$dr=t._$nP(),this._$GS=t._$nP(),this._$qb=t._$6L(),this._$Lb=t._$cS(),this._$mS=t._$Tb(),t.getFormatVersion()>=G._$T7?(this.clipID=t._$nP(),this.clipIDList=this.convertClipIDForV2_11(this.clipID)):this.clipIDList=[],this._$MS(this._$Lb)},S.prototype.getClipIDList=function(){return this.clipIDList},S.prototype.init=function(t){},S.prototype._$Nr=function(t,e){if(e._$IS[0]=!1,e._$Us=E._$Z2(t,this._$GS,e._$IS,this._$Lb),ot._$Zs);else if(e._$IS[0])return;e._$7s=E._$br(t,this._$GS,e._$IS,this._$mS)},S.prototype._$2b=function(t,e){},S.prototype.getDrawDataID=function(){return this._$gP},S.prototype._$j2=function(t){this._$gP=t},S.prototype.getOpacity=function(t,e){return e._$7s},S.prototype._$zS=function(t,e){return e._$Us},S.prototype._$MS=function(t){for(var e=t.length-1;e>=0;--e){var i=t[e];i<S._$52?S._$52=i:i>S._$R2&&(S._$R2=i)}},S.prototype.getTargetBaseDataID=function(){return this._$dr},S.prototype._$gs=function(t){this._$dr=t},S.prototype._$32=function(){return null!=this._$dr&&this._$dr!=gt._$2o()},S.prototype.preDraw=function(t,e,i){},S.prototype.draw=function(t,e,i){},S.prototype.getType=function(){},S.prototype._$B2=function(t,e,i){},P._$ps=32,P.CLIPPING_PROCESS_NONE=0,P.CLIPPING_PROCESS_OVERWRITE_ALPHA=1,P.CLIPPING_PROCESS_MULTIPLY_ALPHA=2,P.CLIPPING_PROCESS_DRAW=3,P.CLIPPING_PROCESS_CLEAR_ALPHA=4,P.prototype.setChannelFlagAsColor=function(t,e){this.CHANNEL_COLORS[t]=e},P.prototype.getChannelFlagAsColor=function(t){return this.CHANNEL_COLORS[t]},P.prototype._$ZT=function(){},P.prototype._$Uo=function(t,e,i,r,n,s,o){},P.prototype._$Rs=function(){return-1},P.prototype._$Ds=function(t){},P.prototype.setBaseColor=function(t,e,i,r){t<0?t=0:t>1&&(t=1),e<0?e=0:e>1&&(e=1),i<0?i=0:i>1&&(i=1),r<0?r=0:r>1&&(r=1),this._$lT=t,this._$C0=e,this._$tT=i,this._$WL=r},P.prototype._$WP=function(t){this.culling=t},P.prototype.setMatrix=function(t){for(var e=0;e<16;e++)this.matrix4x4[e]=t[e]},P.prototype._$IT=function(){return this.matrix4x4},P.prototype.setPremultipliedAlpha=function(t){this.premultipliedAlpha=t},P.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha},P.prototype.setAnisotropy=function(t){this.anisotropy=t},P.prototype.getAnisotropy=function(){return this.anisotropy},P.prototype.getClippingProcess=function(){return this.clippingProcess},P.prototype.setClippingProcess=function(t){this.clippingProcess=t},P.prototype.setClipBufPre_clipContextForMask=function(t){this.clipBufPre_clipContextMask=t},P.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask},P.prototype.setClipBufPre_clipContextForDraw=function(t){this.clipBufPre_clipContextDraw=t},P.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw},A._$ur=-2,A._$c2=1,A._$_b=2,A.prototype._$F0=function(t){this._$kP=t._$nP(),this._$dr=t._$nP()},A.prototype.readV2_opacity=function(t){t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this._$mS=t._$Tb())},A.prototype.init=function(t){},A.prototype._$Nr=function(t,e){},A.prototype.interpolateOpacity=function(t,e,i,r){null==this._$mS?i.setInterpolatedOpacity(1):i.setInterpolatedOpacity(E._$br(t,e,r,this._$mS))},A.prototype._$2b=function(t,e){},A.prototype._$nb=function(t,e,i,r,n,s,o){},A.prototype.getType=function(){},A.prototype._$gs=function(t){this._$dr=t},A.prototype._$a2=function(t){this._$kP=t},A.prototype.getTargetBaseDataID=function(){return this._$dr},A.prototype.getBaseDataID=function(){return this._$kP},A.prototype._$32=function(){return null!=this._$dr&&this._$dr!=gt._$2o()},I._$W2=0,I._$CS=I._$W2,I._$Mo=function(){return!0},I._$XP=function(t){try{for(var e=getTimeMSec();getTimeMSec()-e<t;);}catch(t){t._$Rb()}},I.getUserTimeMSec=function(){return I._$CS==I._$W2?I.getSystemTimeMSec():I._$CS},I.setUserTimeMSec=function(t){I._$CS=t},I.updateUserTimeMSec=function(){return I._$CS=I.getSystemTimeMSec()},I.getTimeMSec=function(){return(new Date).getTime()},I.getSystemTimeMSec=function(){return(new Date).getTime()},I._$Q=function(t){},I._$jT=function(t,e,i,r,n){for(var s=0;s<n;s++)i[r+s]=t[e+s]},O._$ds=-2,O.prototype._$F0=function(t){this._$wL=t._$nP(),this._$VP=t._$6L(),this._$GP=t._$nP()},O.prototype.getParamIndex=function(t){return this._$2r!=t&&(this._$8o=O._$ds),this._$8o},O.prototype._$Pb=function(t,e){this._$8o=t,this._$2r=e},O.prototype.getParamID=function(){return this._$wL},O.prototype._$yP=function(t){this._$wL=t},O.prototype._$N2=function(){return this._$VP},O.prototype._$d2=function(){return this._$GP},O.prototype._$t2=function(t,e){this._$VP=t,this._$GP=e},O.prototype._$Lr=function(){return this._$O2},O.prototype._$wr=function(t){this._$O2=t},O.prototype._$SL=function(){return this._$ri},O.prototype._$AL=function(t){this._$ri=t},R.startsWith=function(t,e,i){var r=e+i.length;if(r>=t.length)return!1;for(var n=e;n<r;n++)if(R.getChar(t,n)!=i.charAt(n-e))return!1;return!0},R.getChar=function(t,e){return String.fromCharCode(t.getUint8(e))},R.createString=function(t,e,i){for(var r=new ArrayBuffer(2*i),n=new Uint16Array(r),s=0;s<i;s++)n[s]=t.getUint8(e+s);return String.fromCharCode.apply(null,n)},R._$LS=function(t,e,i,r){t instanceof ArrayBuffer&&(t=new DataView(t));var n=i,s=!1,o=!1,a=0,h=R.getChar(t,n);"-"==h&&(s=!0,n++);for(var l=!1;n<e;n++){switch(h=R.getChar(t,n)){case"0":a*=10;break;case"1":a=10*a+1;break;case"2":a=10*a+2;break;case"3":a=10*a+3;break;case"4":a=10*a+4;break;case"5":a=10*a+5;break;case"6":a=10*a+6;break;case"7":a=10*a+7;break;case"8":a=10*a+8;break;case"9":a=10*a+9;break;case".":o=!0,n++,l=!0;break;default:l=!0}if(l)break}if(o)for(var u=.1,c=!1;n<e;n++){switch(h=R.getChar(t,n)){case"0":break;case"1":a+=1*u;break;case"2":a+=2*u;break;case"3":a+=3*u;break;case"4":a+=4*u;break;case"5":a+=5*u;break;case"6":a+=6*u;break;case"7":a+=7*u;break;case"8":a+=8*u;break;case"9":a+=9*u;break;default:c=!0}if(u*=.1,c)break}return s&&(a=-a),r[0]=n,a},$.prototype._$zP=function(){this._$Ob=new Array},$.prototype._$F0=function(t){this._$Ob=t._$nP()},$.prototype._$Ur=function(t){if(t._$WS())return!0;for(var e=t._$v2(),i=this._$Ob.length-1;i>=0;--i){var r=this._$Ob[i].getParamIndex(e);if(r==O._$ds&&(r=t.getParamIndex(this._$Ob[i].getParamID())),t._$Xb(r))return!0}return!1},$.prototype._$Q2=function(t,e){for(var i,r,n=this._$Ob.length,s=t._$v2(),o=0,a=0;a<n;a++){var h=this._$Ob[a];if((i=h.getParamIndex(s))==O._$ds&&(i=t.getParamIndex(h.getParamID()),h._$Pb(i,s)),i<0)throw new Exception("err 23242 : "+h.getParamID());var l=i<0?0:t.getParamFloat(i);r=h._$N2();var u,c,d=h._$d2(),p=-1,f=0;if(r<1);else if(1==r)(u=d[0])-U._$J<l&&l<u+U._$J?(p=0,f=0):(p=0,e[0]=!0);else if(l<(u=d[0])-U._$J)p=0,e[0]=!0;else if(l<u+U._$J)p=0;else{for(var _=!1,g=1;g<r;++g){if(l<(c=d[g])+U._$J){c-U._$J<l?p=g:(p=g-1,f=(l-u)/(c-u),o++),_=!0;break}u=c}_||(p=r-1,f=0,e[0]=!0)}h._$wr(p),h._$AL(f)}return o},$.prototype._$zr=function(t,e,i){var r=1<<i;r+1>U._$Qb&&console.log("err 23245\n");for(var n=this._$Ob.length,s=1,o=1,a=0,h=0;h<r;++h)t[h]=0;for(var l=0;l<n;++l){var u=this._$Ob[l];if(0==u._$SL()){if((c=u._$Lr()*s)<0&&ot._$3T)throw new Exception("err 23246");for(h=0;h<r;++h)t[h]+=c}else{var c=s*u._$Lr(),d=s*(u._$Lr()+1);for(h=0;h<r;++h)t[h]+=(h/o|0)%2==0?c:d;e[a++]=u._$SL(),o*=2}s*=u._$N2()}t[r]=65535,e[a]=-1},$.prototype._$h2=function(t,e,i){for(var r=new Float32Array(e),n=0;n<e;++n)r[n]=i[n];var s=new O;s._$yP(t),s._$t2(e,r),this._$Ob.push(s)},$.prototype._$J2=function(t){for(var e=t,i=this._$Ob.length,r=0;r<i;++r){var n=this._$Ob[r],s=n._$N2(),o=e%n._$N2(),a=n._$d2()[o];console.log("%s[%d]=%7.2f / ",n.getParamID(),o,a),e/=s}console.log("\n")},$.prototype.getParamCount=function(){return this._$Ob.length},$.prototype._$zs=function(){return this._$Ob},C.prototype.identity=function(){for(var t=0;t<16;t++)this.m[t]=t%5==0?1:0},C.prototype.getArray=function(){return this.m},C.prototype.getCopyMatrix=function(){return new Float32Array(this.m)},C.prototype.setMatrix=function(t){if(null!=t&&16==t.length)for(var e=0;e<16;e++)this.m[e]=t[e]},C.prototype.mult=function(t,e,i){return null==e?null:(this==e?this.mult_safe(this.m,t.m,e.m,i):this.mult_fast(this.m,t.m,e.m,i),e)},C.prototype.mult_safe=function(t,e,i,r){if(t==i){var n=new Array(16);this.mult_fast(t,e,n,r);for(var s=15;s>=0;--s)i[s]=n[s]}else this.mult_fast(t,e,i,r)},C.prototype.mult_fast=function(t,e,i,r){r?(i[0]=t[0]*e[0]+t[4]*e[1]+t[8]*e[2],i[4]=t[0]*e[4]+t[4]*e[5]+t[8]*e[6],i[8]=t[0]*e[8]+t[4]*e[9]+t[8]*e[10],i[12]=t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12],i[1]=t[1]*e[0]+t[5]*e[1]+t[9]*e[2],i[5]=t[1]*e[4]+t[5]*e[5]+t[9]*e[6],i[9]=t[1]*e[8]+t[5]*e[9]+t[9]*e[10],i[13]=t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13],i[2]=t[2]*e[0]+t[6]*e[1]+t[10]*e[2],i[6]=t[2]*e[4]+t[6]*e[5]+t[10]*e[6],i[10]=t[2]*e[8]+t[6]*e[9]+t[10]*e[10],i[14]=t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14],i[3]=i[7]=i[11]=0,i[15]=1):(i[0]=t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],i[4]=t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],i[8]=t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],i[12]=t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],i[1]=t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],i[5]=t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],i[9]=t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],i[13]=t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],i[2]=t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],i[6]=t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],i[10]=t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],i[14]=t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],i[3]=t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],i[7]=t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],i[11]=t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],i[15]=t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15])},C.prototype.translate=function(t,e,i){this.m[12]=this.m[0]*t+this.m[4]*e+this.m[8]*i+this.m[12],this.m[13]=this.m[1]*t+this.m[5]*e+this.m[9]*i+this.m[13],this.m[14]=this.m[2]*t+this.m[6]*e+this.m[10]*i+this.m[14],this.m[15]=this.m[3]*t+this.m[7]*e+this.m[11]*i+this.m[15]},C.prototype.scale=function(t,e,i){this.m[0]*=t,this.m[4]*=e,this.m[8]*=i,this.m[1]*=t,this.m[5]*=e,this.m[9]*=i,this.m[2]*=t,this.m[6]*=e,this.m[10]*=i,this.m[3]*=t,this.m[7]*=e,this.m[11]*=i},C.prototype.rotateX=function(t){var e=Tt.fcos(t),i=Tt._$9(t),r=this.m[4];this.m[4]=r*e+this.m[8]*i,this.m[8]=r*-i+this.m[8]*e,r=this.m[5],this.m[5]=r*e+this.m[9]*i,this.m[9]=r*-i+this.m[9]*e,r=this.m[6],this.m[6]=r*e+this.m[10]*i,this.m[10]=r*-i+this.m[10]*e,r=this.m[7],this.m[7]=r*e+this.m[11]*i,this.m[11]=r*-i+this.m[11]*e},C.prototype.rotateY=function(t){var e=Tt.fcos(t),i=Tt._$9(t),r=this.m[0];this.m[0]=r*e+this.m[8]*-i,this.m[8]=r*i+this.m[8]*e,r=this.m[1],this.m[1]=r*e+this.m[9]*-i,this.m[9]=r*i+this.m[9]*e,r=m[2],this.m[2]=r*e+this.m[10]*-i,this.m[10]=r*i+this.m[10]*e,r=m[3],this.m[3]=r*e+this.m[11]*-i,this.m[11]=r*i+this.m[11]*e},C.prototype.rotateZ=function(t){var e=Tt.fcos(t),i=Tt._$9(t),r=this.m[0];this.m[0]=r*e+this.m[4]*i,this.m[4]=r*-i+this.m[4]*e,r=this.m[1],this.m[1]=r*e+this.m[5]*i,this.m[5]=r*-i+this.m[5]*e,r=this.m[2],this.m[2]=r*e+this.m[6]*i,this.m[6]=r*-i+this.m[6]*e,r=this.m[3],this.m[3]=r*e+this.m[7]*i,this.m[7]=r*-i+this.m[7]*e},D.prototype=new et,D._$tP=new Object,D._$27=function(){D._$tP.clear()},D.getID=function(t){var e=D._$tP[t];return null==e&&(e=new D(t),D._$tP[t]=e),e},D.prototype._$3s=function(){return new D},L._$kS=-1,L._$pS=0,L._$hb=1,L.STATE_IDENTITY=0,L._$gb=1,L._$fo=2,L._$go=4,L.prototype.transform=function(t,e,i){var r,n,s,o,a,h,l=0,u=0;switch(this._$hi){default:return;case L._$go|L._$fo|L._$gb:for(r=this._$7,n=this._$H,s=this._$k,o=this._$f,a=this._$g,h=this._$w;--i>=0;){var c=t[l++],d=t[l++];e[u++]=r*c+n*d+s,e[u++]=o*c+a*d+h}return;case L._$go|L._$fo:for(r=this._$7,n=this._$H,o=this._$f,a=this._$g;--i>=0;){c=t[l++],d=t[l++];e[u++]=r*c+n*d,e[u++]=o*c+a*d}return;case L._$go|L._$gb:for(n=this._$H,s=this._$k,o=this._$f,h=this._$w;--i>=0;){c=t[l++];e[u++]=n*t[l++]+s,e[u++]=o*c+h}return;case L._$go:for(n=this._$H,o=this._$f;--i>=0;){c=t[l++];e[u++]=n*t[l++],e[u++]=o*c}return;case L._$fo|L._$gb:for(r=this._$7,s=this._$k,a=this._$g,h=this._$w;--i>=0;)e[u++]=r*t[l++]+s,e[u++]=a*t[l++]+h;return;case L._$fo:for(r=this._$7,a=this._$g;--i>=0;)e[u++]=r*t[l++],e[u++]=a*t[l++];return;case L._$gb:for(s=this._$k,h=this._$w;--i>=0;)e[u++]=t[l++]+s,e[u++]=t[l++]+h;return;case L.STATE_IDENTITY:return void(t==e&&l==u||I._$jT(t,l,e,u,2*i))}},L.prototype.update=function(){0==this._$H&&0==this._$f?1==this._$7&&1==this._$g?0==this._$k&&0==this._$w?(this._$hi=L.STATE_IDENTITY,this._$Z=L._$pS):(this._$hi=L._$gb,this._$Z=L._$hb):0==this._$k&&0==this._$w?(this._$hi=L._$fo,this._$Z=L._$kS):(this._$hi=L._$fo|L._$gb,this._$Z=L._$kS):0==this._$7&&0==this._$g?0==this._$k&&0==this._$w?(this._$hi=L._$go,this._$Z=L._$kS):(this._$hi=L._$go|L._$gb,this._$Z=L._$kS):0==this._$k&&0==this._$w?(this._$hi=L._$go|L._$fo,this._$Z=L._$kS):(this._$hi=L._$go|L._$fo|L._$gb,this._$Z=L._$kS)},L.prototype._$RT=function(t){this._$IT(t);var e=t[0],i=t[2],r=t[1],n=t[3],s=Math.sqrt(e*e+r*r),o=e*n-i*r;0==s?ot._$so&&console.log("affine._$RT() / rt==0"):(t[0]=s,t[1]=o/s,t[2]=(r*n+e*i)/o,t[3]=Math.atan2(r,e))},L.prototype._$ho=function(t,e,i,r){var n=new Float32Array(6),s=new Float32Array(6);t._$RT(n),e._$RT(s);var o=new Float32Array(6);o[0]=n[0]+(s[0]-n[0])*i,o[1]=n[1]+(s[1]-n[1])*i,o[2]=n[2]+(s[2]-n[2])*i,o[3]=n[3]+(s[3]-n[3])*i,o[4]=n[4]+(s[4]-n[4])*i,o[5]=n[5]+(s[5]-n[5])*i,r._$CT(o)},L.prototype._$CT=function(t){var e=Math.cos(t[3]),i=Math.sin(t[3]);this._$7=t[0]*e,this._$f=t[0]*i,this._$H=t[1]*(t[2]*e-i),this._$g=t[1]*(t[2]*i+e),this._$k=t[4],this._$w=t[5],this.update()},L.prototype._$IT=function(t){t[0]=this._$7,t[1]=this._$f,t[2]=this._$H,t[3]=this._$g,t[4]=this._$k,t[5]=this._$w},F.prototype=new o,F._$cs="VISIBLE:",F._$ar="LAYOUT:",F._$Co=0,F._$D2=[],F._$1T=1,F.loadMotion=function(t){var e=new F,i=[0],r=t.length;e._$yT=0;for(var n=0;n<r;++n){var s=255&t[n];if("\n"!=s&&"\r"!=s)if("#"!=s)if("$"!=s){if("a"<=s&&s<="z"||"A"<=s&&s<="Z"||"_"==s){for(l=n,u=-1;n<r&&("\r"!=(s=255&t[n])&&"\n"!=s);++n)if("="==s){u=n;break}if(u>=0){var o=new B;R.startsWith(t,l,F._$cs)?(o._$RP=B._$hs,o._$4P=new String(t,l,u-l)):R.startsWith(t,l,F._$ar)?(o._$4P=new String(t,l+7,u-l-7),R.startsWith(t,l+7,"ANCHOR_X")?o._$RP=B._$xs:R.startsWith(t,l+7,"ANCHOR_Y")?o._$RP=B._$us:R.startsWith(t,l+7,"SCALE_X")?o._$RP=B._$qs:R.startsWith(t,l+7,"SCALE_Y")?o._$RP=B._$Ys:R.startsWith(t,l+7,"X")?o._$RP=B._$ws:R.startsWith(t,l+7,"Y")&&(o._$RP=B._$Ns)):(o._$RP=B._$Fr,o._$4P=new String(t,l,u-l)),e.motions.push(o);var a=0;for(F._$D2.clear(),n=u+1;n<r&&("\r"!=(s=255&t[n])&&"\n"!=s);++n)if(","!=s&&" "!=s&&"\t"!=s){d=R._$LS(t,r,n,i);if(i[0]>0){F._$D2.push(d),a++;var h=i[0];if(h<n){console.log("_$n0 _$hi . @Live2DMotion loadMotion()\n");break}n=h}}o._$I0=F._$D2._$BL(),a>e._$yT&&(e._$yT=a)}}}else{for(var l=n,u=-1;n<r&&("\r"!=(s=255&t[n])&&"\n"!=s);++n)if("="==s){u=n;break}var c=!1;if(u>=0)for(u==l+4&&"f"==t[l+1]&&"p"==t[l+2]&&"s"==t[l+3]&&(c=!0),n=u+1;n<r&&("\r"!=(s=255&t[n])&&"\n"!=s);++n)if(","!=s&&" "!=s&&"\t"!=s){var d=R._$LS(t,r,n,i);i[0]>0&&c&&5<d&&d<121&&(e._$D0=d),n=i[0]}for(;n<r&&("\n"!=t[n]&&"\r"!=t[n]);++n);}else for(;n<r&&("\n"!=t[n]&&"\r"!=t[n]);++n);}return e._$AS=1e3*e._$yT/e._$D0|0,e},F.prototype.getDurationMSec=function(){return this._$AS},F.prototype.dump=function(){for(var t=0;t<this.motions.length;t++){var e=this.motions[t];console.log("_$wL[%s] [%d]. ",e._$4P,e._$I0.length);for(var i=0;i<e._$I0.length&&i<10;i++)console.log("%5.2f ,",e._$I0[i]);console.log("\n")}},F.prototype.updateParamExe=function(t,e,i,r){for(var n=(e-r._$z2)*this._$D0/1e3,s=0|n,o=n-s,a=0;a<this.motions.length;a++){var h=this.motions[a],l=h._$I0.length,u=h._$4P;if(h._$RP==B._$hs){var c=h._$I0[s>=l?l-1:s];t.setParamFloat(u,c)}else if(B._$ws<=h._$RP&&h._$RP<=B._$Ys);else{var d=t.getParamFloat(u),p=h._$I0[s>=l?l-1:s],f=d+(p+(h._$I0[s+1>=l?l-1:s+1]-p)*o-d)*i;t.setParamFloat(u,f)}}s>=this._$yT&&(this._$E?(r._$z2=e,this.loopFadeIn&&(r._$bs=e)):r._$9L=!0)},F.prototype._$r0=function(){return this._$E},F.prototype._$aL=function(t){this._$E=t},F.prototype.isLoopFadeIn=function(){return this.loopFadeIn},F.prototype.setLoopFadeIn=function(t){this.loopFadeIn=t},N.prototype.clear=function(){this.size=0},N.prototype.add=function(t){if(this._$P.length<=this.size){var e=new Float32Array(2*this.size);I._$jT(this._$P,0,e,0,this.size),this._$P=e}this._$P[this.size++]=t},N.prototype._$BL=function(){var t=new Float32Array(this.size);return I._$jT(this._$P,0,t,0,this.size),t},B._$Fr=0,B._$hs=1,B._$ws=100,B._$Ns=101,B._$xs=102,B._$us=103,B._$qs=104,B._$Ys=105,U._$Ms=1,U._$Qs=2,U._$i2=0,U._$No=2,U._$do=U._$Ms,U._$Ls=!0,U._$1r=5,U._$Qb=65,U._$J=1e-4,U._$FT=.001,U._$Ss=3,G._$o7=6,G._$S7=7,G._$s7=8,G._$77=9,G.LIVE2D_FORMAT_VERSION_V2_10_SDK2=10,G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1=11,G._$T7=G.LIVE2D_FORMAT_VERSION_V2_11_SDK2_1,G._$Is=-2004318072,G._$h0=0,G._$4L=23,G._$7P=33,G._$uT=function(t){console.log("_$bo :: _$6 _$mo _$E0 : %d\n",t)},G._$9o=function(t){if(t<40)return G._$uT(t),null;if(t<50)return G._$uT(t),null;if(t<60)return G._$uT(t),null;if(t<100)switch(t){case 65:return new J;case 66:return new $;case 67:return new O;case 68:return new H;case 69:return new x;case 70:return new lt;default:return G._$uT(t),null}else if(t<150)switch(t){case 131:return new nt;case 133:return new Q;case 136:return new d;case 137:return new it;case 142:return new z}return G._$uT(t),null},k._$HP=0,k._$_0=!0,k._$V2=-1,k._$W0=-1,k._$jr=!1,k._$ZS=!0,k._$tr=-1e6,k._$lr=1e6,k._$is=32,k._$e=!1,k.prototype.getDrawDataIndex=function(t){for(var e=this._$aS.length-1;e>=0;--e)if(null!=this._$aS[e]&&this._$aS[e].getDrawDataID()==t)return e;return-1},k.prototype.getDrawData=function(t){if(t instanceof D){if(null==this._$Bo){this._$Bo=new Object;for(var e=this._$aS.length,i=0;i<e;i++){var r=this._$aS[i],n=r.getDrawDataID();null!=n&&(this._$Bo[n]=r)}}return this._$Bo[id]}return t<this._$aS.length?this._$aS[t]:null},k.prototype.release=function(){this._$3S.clear(),this._$aS.clear(),this._$F2.clear(),null!=this._$Bo&&this._$Bo.clear(),this._$db.clear(),this._$8b.clear(),this._$Hr.clear()},k.prototype.init=function(){this._$co++,this._$F2.length>0&&this.release();for(var t=this._$Ri.getModelImpl(),e=t._$Xr(),r=e.length,n=new Array,s=new Array,o=0;o<r;++o){var a=e[o];this._$F2.push(a),this._$Hr.push(a.init(this));for(var h=a.getBaseData(),l=h.length,u=0;u<l;++u)n.push(h[u]);for(u=0;u<l;++u){var c=h[u].init(this);c._$l2(o),s.push(c)}var d=a.getDrawData(),p=d.length;for(u=0;u<p;++u){var f=d[u],_=f.init(this);_._$IP=o,this._$aS.push(f),this._$8b.push(_)}}for(var g=n.length,m=gt._$2o();;){var v=!1;for(o=0;o<g;++o){var y=n[o];if(null!=y){var x=y.getTargetBaseDataID();(null==x||x==m||this.getBaseDataIndex(x)>=0)&&(this._$3S.push(y),this._$db.push(s[o]),n[o]=null,v=!0)}}if(!v)break}var b=t._$E2();if(null!=b){var T=b._$1s();if(null!=T){var E=T.length;for(o=0;o<E;++o){var w=T[o];null!=w&&this._$02(w.getParamID(),w.getDefaultValue(),w.getMinValue(),w.getMaxValue())}}}this.clipManager=new i(this.dp_webgl),this.clipManager.init(this,this._$aS,this._$8b),this._$QT=!0},k.prototype.update=function(){k._$e&&a.start("_$zL");for(var t=this._$_2.length,e=0;e<t;e++)this._$_2[e]!=this._$vr[e]&&(this._$Js[e]=k._$ZS,this._$vr[e]=this._$_2[e]);var i=this._$3S.length,r=this._$aS.length,n=Y._$or(),s=Y._$Pr()-n+1;(null==this._$Ws||this._$Ws.length<s)&&(this._$Ws=new Int16Array(s),this._$Vs=new Int16Array(s));for(e=0;e<s;e++)this._$Ws[e]=k._$V2,this._$Vs[e]=k._$V2;(null==this._$Er||this._$Er.length<r)&&(this._$Er=new Int16Array(r));for(e=0;e<r;e++)this._$Er[e]=k._$W0;k._$e&&a.dump("_$zL"),k._$e&&a.start("_$UL");for(var o=null,h=0;h<i;++h){var l=this._$3S[h],u=this._$db[h];try{l._$Nr(this,u),l._$2b(this,u)}catch(t){null==o&&(o=t)}}null!=o&&k._$_0&&a._$Rb(o),k._$e&&a.dump("_$UL"),k._$e&&a.start("_$DL");for(var c=null,d=0;d<r;++d){var p=this._$aS[