l2d
Version:
Loading Live2D in a browser is simpler.
8 lines • 2.15 MB
JavaScript
var cb = Object.defineProperty;
var db = (i, e, t) => e in i ? cb(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
var dn = (i, e, t) => db(i, typeof e != "symbol" ? e + "" : e, t);
const Ol = document.createElement("script");
document.head.append(Ol);
const bb = `
var __NONECONSOLE = {log(){}};(function(){var j=true;function aa(){if(j){return;}this._$MT=null;this._$5S=null;this._$NP=0;aa._$42++;this._$5S=new y(this);}aa._$0s=1;aa._$4s=2;aa._$42=0;aa._$62=function(aQ,aU){try{if(aU instanceof ArrayBuffer){aU=new DataView(aU);}if(!(aU instanceof DataView)){throw new J("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer");}var aS=new K(aU);var aM=aS._$ST();var aK=aS._$ST();var aJ=aS._$ST();var aN;if(aM==109&&aK==111&&aJ==99){aN=aS._$ST();}else{throw new J("_$gi _$C _$li , _$Q0 _$P0.");}aS._$gr(aN);if(aN>ay._$T7){aQ._$NP|=aa._$4s;var aR=ay._$T7;var aI="_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+aR+" < _$f0 : "+aN+" )@_$SS#loadModel()\\
";throw new J(aI);}var aL=aS._$nP();if(aN>=ay._$s7){var aH=aS._$9T();var aT=aS._$9T();if(aH!=-30584||aT!=-30584){aQ._$NP|=aa._$0s;throw new J("_$gi _$C _$li , _$0 _$6 _$Ui.");}}aQ._$KS(aL);var aP=aQ.getModelContext();aP.setDrawParam(aQ.getDrawParam());aP.init();}catch(aO){q._$Rb(aO);}};aa.prototype._$KS=function(aH){this._$MT=aH;};aa.prototype.getModelImpl=function(){if(this._$MT==null){this._$MT=new w();this._$MT._$zP();}return this._$MT;};aa.prototype.getCanvasWidth=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasWidth();};aa.prototype.getCanvasHeight=function(){if(this._$MT==null){return 0;}return this._$MT.getCanvasHeight();};aa.prototype.getParamFloat=function(aH){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}return this._$5S.getParamFloat(aH);};aa.prototype.setParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1-aI)+aJ*aI);};aa.prototype.addToParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)+aJ*aI);};aa.prototype.multParamFloat=function(aH,aJ,aI){if(typeof aH!="number"){aH=this._$5S.getParamIndex(z.getID(aH));}if(arguments.length<3){aI=1;}this._$5S.setParamFloat(aH,this._$5S.getParamFloat(aH)*(1+(aJ-1)*aI));};aa.prototype.getParamIndex=function(aH){return this._$5S.getParamIndex(z.getID(aH));};aa.prototype.loadParam=function(){this._$5S.loadParam();};aa.prototype.saveParam=function(){this._$5S.saveParam();};aa.prototype.init=function(){this._$5S.init();};aa.prototype.update=function(){this._$5S.update();};aa.prototype._$Rs=function(){q._$li("_$60 _$PT _$Rs()");return -1;};aa.prototype._$Ds=function(aH){q._$li("_$60 _$PT _$SS#_$Ds() \\n");};aa.prototype._$K2=function(){};aa.prototype.draw=function(){};aa.prototype.getModelContext=function(){return this._$5S;};aa.prototype._$s2=function(){return this._$NP;};aa.prototype._$P7=function(aK,aR,aH,a0){var aU=-1;var aY=0;var aM=this;var aJ=0.5;var aI=0.15;var aX=true;if(aH==0){for(var aV=0;aV<aK.length;aV++){var aP=aK[aV];var aO=aR[aV];var aS=(aM.getParamFloat(aP)!=0);aM.setPartsOpacity(aO,(aS?1:0));}return;}else{if(aK.length==1){var aP=aK[0];var aT=(aM.getParamFloat(aP)!=0);var aO=aR[0];var aQ=aM.getPartsOpacity(aO);var aW=aH/a0;if(aT){aQ+=aW;if(aQ>1){aQ=1;}}else{aQ-=aW;if(aQ<0){aQ=0;}}aM.setPartsOpacity(aO,aQ);}else{for(var aV=0;aV<aK.length;aV++){var aP=aK[aV];var aS=(aM.getParamFloat(aP)!=0);if(aS){if(aU>=0){break;}aU=aV;var aO=aR[aV];aY=aM.getPartsOpacity(aO);aY+=aH/a0;if(aY>1){aY=1;}}}if(aU<0){__NONECONSOLE.log("No _$wi _$q0/ _$U default[%s]",aK[0]);aU=0;aY=1;aM.loadParam();aM.setParamFloat(aK[aU],aY);aM.saveParam();}for(var aV=0;aV<aK.length;aV++){var aO=aR[aV];if(aU==aV){aM.setPartsOpacity(aO,aY);}else{var aL=aM.getPartsOpacity(aO);var aZ;if(aY<aJ){aZ=aY*(aJ-1)/aJ+1;}else{aZ=(1-aY)*aJ/(1-aJ);}if(aX){var aN=(1-aZ)*(1-aY);if(aN>aI){aZ=1-aI/(1-aY);}}if(aL>aZ){aL=aZ;}aM.setPartsOpacity(aO,aL);}}}}};aa.prototype.setPartsOpacity=function(aI,aH){if(typeof aI!="number"){aI=this._$5S.getPartsDataIndex(i.getID(aI));}this._$5S.setPartsOpacity(aI,aH);};aa.prototype.getPartsDataIndex=function(aH){if(!(aH instanceof i)){aH=i.getID(aH);}return this._$5S.getPartsDataIndex(aH);};aa.prototype.getPartsOpacity=function(aH){if(typeof aH!="number"){aH=this._$5S.getPartsDataIndex(i.getID(aH));}if(aH<0){return 0;}return this._$5S.getPartsOpacity(aH);};aa.prototype.getDrawParam=function(){};aa.prototype.getDrawDataIndex=function(aH){return this._$5S.getDrawDataIndex(Z.getID(aH));};aa.prototype.getDrawData=function(aH){return this._$5S.getDrawData(aH);};aa.prototype.getTransformedPoints=function(aH){var aI=this._$5S._$C2(aH);if(aI instanceof ag){return(aI).getTransformedPoints();}return null;};aa.prototype.getIndexArray=function(aI){if(aI<0||aI>=this._$5S._$aS.length){return null;}var aH=this._$5S._$aS[aI];if(aH!=null&&aH.getType()==a._$wb){if(aH instanceof b){return aH.getIndexArray();}}return null;};function W(aJ){if(j){return;}this.clipContextList=new Array();this.glcontext=aJ.gl;this.dp_webgl=aJ;this.curFrameNo=0;this.firstError_clipInNotUpdate=true;this.colorBuffer=0;this.isInitGLFBFunc=false;this.tmpBoundsOnModel=new av();if(Q.glContext.length>Q.frameBuffers.length){this.curFrameNo=this.getMaskRenderTexture();}else{}this.tmpModelToViewMatrix=new ac();this.tmpMatrix2=new ac();this.tmpMatrixForMask=new ac();this.tmpMatrixForDraw=new ac();this.CHANNEL_COLORS=new Array();var aI=new o();aI=new o();aI.r=0;aI.g=0;aI.b=0;aI.a=1;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=1;aI.g=0;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=1;aI.b=0;aI.a=0;this.CHANNEL_COLORS.push(aI);aI=new o();aI.r=0;aI.g=0;aI.b=1;aI.a=0;this.CHANNEL_COLORS.push(aI);for(var aH=0;aH<this.CHANNEL_COLORS.length;aH++){this.dp_webgl.setChannelFlagAsColor(aH,this.CHANNEL_COLORS[aH]);}}W.CHANNEL_COUNT=4;W.RENDER_TEXTURE_USE_MIPMAP=false;W.NOT_USED_FRAME=-100;W.prototype._$L7=function(){if(this.tmpModelToViewMatrix){this.tmpModelToViewMatrix=null;}if(this.tmpMatrix2){this.tmpMatrix2=null;}if(this.tmpMatrixForMask){this.tmpMatrixForMask=null;}if(this.tmpMatrixForDraw){this.tmpMatrixForDraw=null;}if(this.tmpBoundsOnModel){this.tmpBoundsOnModel=null;}if(this.CHANNEL_COLORS){for(var aH=this.CHANNEL_COLORS.length-1;aH>=0;--aH){this.CHANNEL_COLORS.splice(aH,1);}this.CHANNEL_COLORS=[];}this.releaseShader();};W.prototype.releaseShader=function(){var aI=Q.frameBuffers.length;for(var aH=0;aH<aI;aH++){this.gl.deleteFramebuffer(Q.frameBuffers[aH].framebuffer);}Q.frameBuffers=[];Q.glContext=[];};W.prototype.init=function(aO,aN,aL){for(var aM=0;aM<aN.length;aM++){var aH=aN[aM].getClipIDList();if(aH==null){continue;}var aJ=this.findSameClip(aH);if(aJ==null){aJ=new U(this,aO,aH);this.clipContextList.push(aJ);}var aI=aN[aM].getDrawDataID();var aK=aO.getDrawDataIndex(aI);aJ.addClippedDrawData(aI,aK);var aP=aL[aM];aP.clipBufPre_clipContext=aJ;}};W.prototype.getMaskRenderTexture=function(){var aH=null;aH=this.dp_webgl.createFramebuffer();Q.frameBuffers[this.dp_webgl.glno]=aH;return this.dp_webgl.glno;};W.prototype.setupClip=function(a1,aQ){var aK=0;for(var aO=0;aO<this.clipContextList.length;aO++){var aP=this.clipContextList[aO];this.calcClippedDrawTotalBounds(a1,aP);if(aP.isUsing){aK++;}}if(aK>0){var aM=aQ.gl.getParameter(aQ.gl.FRAMEBUFFER_BINDING);var aW=new Array(4);aW[0]=0;aW[1]=0;aW[2]=aQ.gl.canvas.width;aW[3]=aQ.gl.canvas.height;aQ.gl.viewport(0,0,Q.clippingMaskBufferSize,Q.clippingMaskBufferSize);this.setupLayoutBounds(aK);aQ.gl.bindFramebuffer(aQ.gl.FRAMEBUFFER,Q.frameBuffers[this.curFrameNo].framebuffer);aQ.gl.clearColor(0,0,0,0);aQ.gl.clear(aQ.gl.COLOR_BUFFER_BIT);for(var aO=0;aO<this.clipContextList.length;aO++){var aP=this.clipContextList[aO];var aT=aP.allClippedDrawRect;var aN=aP.layoutChannelNo;var aV=aP.layoutBounds;var aJ=0.05;this.tmpBoundsOnModel._$jL(aT);this.tmpBoundsOnModel.expand(aT.width*aJ,aT.height*aJ);var aZ=aV.width/this.tmpBoundsOnModel.width;var aY=aV.height/this.tmpBoundsOnModel.height;this.tmpMatrix2.identity();this.tmpMatrix2.translate(-1,-1,0);this.tmpMatrix2.scale(2,2,1);this.tmpMatrix2.translate(aV.x,aV.y,0);this.tmpMatrix2.scale(aZ,aY,1);this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x,-this.tmpBoundsOnModel.y,0);this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m);this.tmpMatrix2.identity();this.tmpMatrix2.translate(aV.x,aV.y,0);this.tmpMatrix2.scale(aZ,aY,1);this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x,-this.tmpBoundsOnModel.y,0);this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m);var aH=this.tmpMatrixForMask.getArray();for(var aX=0;aX<16;aX++){aP.matrixForMask[aX]=aH[aX];}var a0=this.tmpMatrixForDraw.getArray();for(var aX=0;aX<16;aX++){aP.matrixForDraw[aX]=a0[aX];}var aS=aP.clippingMaskDrawIndexList.length;for(var aU=0;aU<aS;aU++){var aR=aP.clippingMaskDrawIndexList[aU];var aI=a1.getDrawData(aR);var aL=a1._$C2(aR);aQ.setClipBufPre_clipContextForMask(aP);aI.draw(aQ,a1,aL);}}aQ.gl.bindFramebuffer(aQ.gl.FRAMEBUFFER,aM);aQ.setClipBufPre_clipContextForMask(null);aQ.gl.viewport(aW[0],aW[1],aW[2],aW[3]);}};W.prototype.getColorBuffer=function(){return this.colorBuffer;};W.prototype.findSameClip=function(aK){for(var aN=0;aN<this.clipContextList.length;aN++){var aO=this.clipContextList[aN];var aH=aO.clipIDList.length;if(aH!=aK.length){continue;}var aI=0;for(var aM=0;aM<aH;aM++){var aL=aO.clipIDList[aM];for(var aJ=0;aJ<aH;aJ++){if(aK[aJ]==aL){aI++;break;}}}if(aI==aH){return aO;}}return null;};W.prototype.calcClippedDrawTotalBounds=function(a6,aV){var aU=a6._$Ri.getModelImpl().getCanvasWidth();var a5=a6._$Ri.getModelImpl().getCanvasHeight();var aJ=aU>a5?aU:a5;var aT=aJ;var aR=aJ;var aS=0;var aP=0;var aL=aV.clippedDrawContextList.length;for(var aM=0;aM<aL;aM++){var aW=aV.clippedDrawContextList[aM];var aN=aW.drawDataIndex;var aK=a6._$C2(aN);if(aK._$yo()){var aX=aK.getTransformedPoints();var a4=aX.length;var aI=[];var aH=[];var aO=0;for(var a3=aw._$i2;a3<a4;a3+=aw._$No){aI[aO]=aX[a3];aH[aO]=aX[a3+1];aO++;}var a2=Math.min.apply(null,aI);var a1=Math.min.apply(null,aH);var a0=Math.max.apply(null,aI);var aZ=Math.max.apply(null,aH);if(a2<aT){aT=a2;}if(a1<aR){aR=a1;}if(a0>aS){aS=a0;}if(aZ>aP){aP=aZ;}}}if(aT==aJ){aV.allClippedDrawRect.x=0;aV.allClippedDrawRect.y=0;aV.allClippedDrawRect.width=0;aV.allClippedDrawRect.height=0;aV.isUsing=false;}else{var aQ=aS-aT;var aY=aP-aR;aV.allClippedDrawRect.x=aT;aV.allClippedDrawRect.y=aR;aV.allClippedDrawRect.width=aQ;aV.allClippedDrawRect.height=aY;aV.isUsing=true;}};W.prototype.setupLayoutBounds=function(aQ){var aI=aQ/W.CHANNEL_COUNT;var aP=aQ%W.CHANNEL_COUNT;aI=~~aI;aP=~~aP;var aH=0;for(var aJ=0;aJ<W.CHANNEL_COUNT;aJ++){var aM=aI+(aJ<aP?1:0);if(aM==0){}else{if(aM==1){var aL=this.clipContextList[aH++];aL.layoutChannelNo=aJ;aL.layoutBounds.x=0;aL.layoutBounds.y=0;aL.layoutBounds.width=1;aL.layoutBounds.height=1;}else{if(aM==2){for(var aO=0;aO<aM;aO++){var aN=aO%2;var aK=0;aN=~~aN;var aL=this.clipContextList[aH++];aL.layoutChannelNo=aJ;aL.layoutBounds.x=aN*0.5;aL.layoutBounds.y=0;aL.layoutBounds.width=0.5;aL.layoutBounds.height=1;}}else{if(aM<=4){for(var aO=0;aO<aM;aO++){var aN=aO%2;var aK=aO/2;aN=~~aN;aK=~~aK;var aL=this.clipContextList[aH++];aL.layoutChannelNo=aJ;aL.layoutBounds.x=aN*0.5;aL.layoutBounds.y=aK*0.5;aL.layoutBounds.width=0.5;aL.layoutBounds.height=0.5;}}else{if(aM<=9){for(var aO=0;aO<aM;aO++){var aN=aO%3;var aK=aO/3;aN=~~aN;aK=~~aK;var aL=this.clipContextList[aH++];aL.layoutChannelNo=aJ;aL.layoutBounds.x=aN/3;aL.layoutBounds.y=aK/3;aL.layoutBounds.width=1/3;aL.layoutBounds.height=1/3;}}else{q._$li("_$6 _$0P mask count : %d",aM);}}}}}}};function U(aH,aK,aI){this.clipIDList=new Array();this.clipIDList=aI;this.clippingMaskDrawIndexList=new Array();for(var aJ=0;aJ<aI.length;aJ++){this.clippingMaskDrawIndexList.push(aK.getDrawDataIndex(aI[aJ]));}this.clippedDrawContextList=new Array();this.isUsing=true;this.layoutChannelNo=0;this.layoutBounds=new av();this.allClippedDrawRect=new av();this.matrixForMask=new Float32Array(16);this.matrixForDraw=new Float32Array(16);this.owner=aH;}U.prototype.addClippedDrawData=function(aJ,aI){var aH=new R(aJ,aI);this.clippedDrawContextList.push(aH);};function R(aI,aH){this._$gP=aI;this.drawDataIndex=aH;}function I(){if(j){return;}this.color=null;}function ah(){if(j){return;}this._$dP=null;this._$eo=null;this._$V0=null;this._$dP=1000;this._$eo=1000;this._$V0=1;this._$a0();}ah._$JT=function(aP,aN,aO){var aQ=aP/aN;var a1=aO/aN;var aU=a1;var aZ=1/3;var aR=2/3;var a0=1-(1-a1)*(1-a1);var a2=1-(1-aU)*(1-aU);var aM=0;var aL=((1-a1)*aZ)*a0+(aU*aR+(1-aU)*aZ)*(1-a0);var aK=(aU+(1-aU)*aR)*a2+(a1*aZ+(1-a1)*aR)*(1-a2);var aJ=1;var aY=aJ-3*aK+3*aL-aM;var aX=3*aK-6*aL+3*aM;var aW=3*aL-3*aM;var aV=aM;if(aQ<=0){return 0;}else{if(aQ>=1){return 1;}}var aS=aQ;var aI=aS*aS;var aH=aS*aI;var aT=aY*aH+aX*aI+aW*aS+aV;return aT;};ah.prototype._$a0=function(){};ah.prototype.setFadeIn=function(aH){this._$dP=aH;};ah.prototype.setFadeOut=function(aH){this._$eo=aH;};ah.prototype._$pT=function(aH){this._$V0=aH;};ah.prototype.getFadeOut=function(){return this._$eo;};ah.prototype._$4T=function(){return this._$eo;};ah.prototype._$mT=function(){return this._$V0;};ah.prototype.getDurationMSec=function(){return -1;};ah.prototype.getLoopDurationMSec=function(){return -1;};ah.prototype.updateParam=function(aJ,aN){if(!aN._$AT||aN._$9L){return;}var aL=P.getUserTimeMSec();if(aN._$z2<0){aN._$z2=aL;aN._$bs=aL;var aM=this.getDurationMSec();if(aN._$Do<0){aN._$Do=(aM<=0)?-1:aN._$z2+aM;}}var aI=this._$V0;var aH=(this._$dP==0)?1:A._$r2(((aL-aN._$bs)/(this._$dP)));var aK=(this._$eo==0||aN._$Do<0)?1:A._$r2(((aN._$Do-aL)/(this._$eo)));aI=aI*aH*aK;if(!((0<=aI&&aI<=1))){__NONECONSOLE.log("### assert!! ### ");}this.updateParamExe(aJ,aL,aI,aN);if(aN._$Do>0&&aN._$Do<aL){aN._$9L=true;}};ah.prototype.updateParamExe=function(aH,aI,aJ,aK){};function q(){}q._$8s=0;q._$fT=new Object();q.start=function(aI){var aH=q._$fT[aI];if(aH==null){aH=new af();aH._$r=aI;q._$fT[aI]=aH;}aH._$0S=P.getSystemTimeMSec();};q.dump=function(aJ){var aH=q._$fT[aJ];if(aH!=null){var aI=P.getSystemTimeMSec();var aK=aI-aH._$0S;__NONECONSOLE.log(aJ+" : "+aK+"ms");return aK;}else{return -1;}};q.end=function(aJ){var aH=q._$fT[aJ];if(aH!=null){var aI=P.getSystemTimeMSec();return aI-aH._$0S;}else{return -1;}};q._$li=function(aI,aH){__NONECONSOLE.log("_$li : "+aI+"\\n",aH);};q._$Ji=function(aI,aH){__NONECONSOLE.log(aI,aH);};q._$dL=function(aI,aH){__NONECONSOLE.log(aI,aH);__NONECONSOLE.log("\\n");};q._$KL=function(aJ,aI){for(var aH=0;aH<aI;aH++){if(aH%16==0&&aH>0){__NONECONSOLE.log("\\n");}else{if(aH%8==0&&aH>0){__NONECONSOLE.log(" ");}}__NONECONSOLE.log("%02X ",(aJ[aH]&255));}__NONECONSOLE.log("\\n");};q._$nr=function(aL,aI,aK){__NONECONSOLE.log("%s\\n",aL);var aH=aI.length;for(var aJ=0;aJ<aH;++aJ){__NONECONSOLE.log("%5d",aI[aJ]);__NONECONSOLE.log("%s\\n",aK);__NONECONSOLE.log(",");}__NONECONSOLE.log("\\n");};q._$Rb=function(aH){__NONECONSOLE.log("dump exception : "+aH);__NONECONSOLE.log("stack :: "+aH.stack);};function af(){this._$r=null;this._$0S=null;}function F(){if(j){return;}this.x=null;this.y=null;this.width=null;this.height=null;}F.prototype._$8P=function(){return 0.5*(this.x+this.x+this.width);};F.prototype._$6P=function(){return 0.5*(this.y+this.y+this.height);};F.prototype._$EL=function(){return this.x+this.width;};F.prototype._$5T=function(){return this.y+this.height;};F.prototype._$jL=function(aI,aK,aJ,aH){this.x=aI;this.y=aK;this.width=aJ;this.height=aH;};F.prototype._$jL=function(aH){this.x=aH.x;this.y=aH.y;this.width=aH.width;this.height=aH.height;};function i(aH){if(j){return;}ak.prototype.constructor.call(this,aH);}i.prototype=new ak();i._$tP=new Object();i._$27=function(){i._$tP.clear();};i.getID=function(aH){var aI=i._$tP[aH];if(aI==null){aI=new i(aH);i._$tP[aH]=aI;}return aI;};i.prototype._$3s=function(){return new i();};function S(){}function z(aH){if(j){return;}ak.prototype.constructor.call(this,aH);}z.prototype=new ak();z._$tP=new Object();z._$27=function(){z._$tP.clear();};z.getID=function(aH){var aI=z._$tP[aH];if(aI==null){aI=new z(aH);z._$tP[aH]=aI;}return aI;};z.prototype._$3s=function(){return new z();};function w(){if(j){return;}this._$vo=null;this._$F2=null;this._$ao=400;this._$1S=400;w._$42++;}w._$42=0;w.prototype._$zP=function(){if(this._$vo==null){this._$vo=new an();}if(this._$F2==null){this._$F2=new Array();}};w.prototype.getCanvasWidth=function(){return this._$ao;};w.prototype.getCanvasHeight=function(){return this._$1S;};w.prototype._$F0=function(aH){this._$vo=aH._$nP();this._$F2=aH._$nP();this._$ao=aH._$6L();this._$1S=aH._$6L();};w.prototype._$6S=function(aH){this._$F2.push(aH);};w.prototype._$Xr=function(){return this._$F2;};w.prototype._$E2=function(){return this._$vo;};function u(){if(j){return;}this.p1=new N();this.p2=new N();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(0.3,0.5,0.1);}u.prototype.setup=function(aJ,aI,aH){this._$ks=this._$Yb();this.p2._$xT();if(arguments.length==3){this._$Fo=aJ;this._$L2=aI;this.p1._$p=aH;this.p2._$p=aH;this.p2.y=aJ;this.setup();}};u.prototype.getPhysicsPoint1=function(){return this.p1;};u.prototype.getPhysicsPoint2=function(){return this.p2;};u.prototype._$qr=function(){return this._$Db;};u.prototype._$pr=function(aH){this._$Db=aH;};u.prototype._$5r=function(){return this._$M2;};u.prototype._$Cs=function(){return this._$9b;};u.prototype._$Yb=function(){return(-180*(Math.atan2(this.p1.x-this.p2.x,-(this.p1.y-this.p2.y)))/Math.PI);};u.prototype.addSrcParam=function(aJ,aH,aL,aI){var aK=new h(aJ,aH,aL,aI);this._$lL.push(aK);};u.prototype.addTargetParam=function(aJ,aH,aK,aI){var aL=new aF(aJ,aH,aK,aI);this._$qP.push(aL);};u.prototype.update=function(aI,aL){if(this._$iP==0){this._$iP=this._$iT=aL;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)));return;}var aK=(aL-this._$iT)/1000;if(aK!=0){for(var aJ=this._$lL.length-1;aJ>=0;--aJ){var aM=this._$lL[aJ];aM._$oP(aI,this);}this._$oo(aI,aK);this._$M2=this._$Yb();this._$9b=(this._$M2-this._$ks)/aK;this._$ks=this._$M2;}for(var aJ=this._$qP.length-1;aJ>=0;--aJ){var aH=this._$qP[aJ];aH._$YS(aI,this);}this._$iT=aL;};u.prototype._$oo=function(aN,aI){if(aI<0.033){aI=0.033;}var aU=1/aI;this.p1.vx=(this.p1.x-this.p1._$s0)*aU;this.p1.vy=(this.p1.y-this.p1._$70)*aU;this.p1.ax=(this.p1.vx-this.p1._$7L)*aU;this.p1.ay=(this.p1.vy-this.p1._$HL)*aU;this.p1.fx=this.p1.ax*this.p1._$p;this.p1.fy=this.p1.ay*this.p1._$p;this.p1._$xT();var aM=-(Math.atan2((this.p1.y-this.p2.y),this.p1.x-this.p2.x));var aL;var aV;var aR=Math.cos(aM);var aH=Math.sin(aM);var aW=9.8*this.p2._$p;var aQ=(this._$Db*aC._$bS);var aP=(aW*Math.cos(aM-aQ));aL=(aP*aH);aV=(aP*aR);var aK=(-this.p1.fx*aH*aH);var aT=(-this.p1.fy*aH*aR);var aJ=((-this.p2.vx*this._$L2));var aS=((-this.p2.vy*this._$L2));this.p2.fx=((aL+aK+aJ));this.p2.fy=((aV+aT+aS));this.p2.ax=this.p2.fx/this.p2._$p;this.p2.ay=this.p2.fy/this.p2._$p;this.p2.vx+=this.p2.ax*aI;this.p2.vy+=this.p2.ay*aI;this.p2.x+=this.p2.vx*aI;this.p2.y+=this.p2.vy*aI;var aO=(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)/aO;this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/aO;this.p2.vx=(this.p2.x-this.p2._$s0)*aU;this.p2.vy=(this.p2.y-this.p2._$70)*aU;this.p2._$xT();};function N(){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;}N.prototype._$xT=function(){this._$s0=this.x;this._$70=this.y;this._$7L=this.vx;this._$HL=this.vy;};function at(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}at.prototype._$oP=function(aI,aH){};function h(aJ,aK,aI,aH){at.prototype.constructor.call(this,aK,aI,aH);this._$tL=null;this._$tL=aJ;}h.prototype=new at();h.prototype._$oP=function(aJ,aH){var aK=this.scale*aJ.getParamFloat(this._$wL);var aL=aH.getPhysicsPoint1();switch(this._$tL){default:case u.Src.SRC_TO_X:aL.x=aL.x+(aK-aL.x)*this._$V0;break;case u.Src.SRC_TO_Y:aL.y=aL.y+(aK-aL.y)*this._$V0;break;case u.Src.SRC_TO_G_ANGLE:var aI=aH._$qr();aI=aI+(aK-aI)*this._$V0;aH._$pr(aI);break;}};function d(aJ,aI,aH){this._$wL=null;this.scale=null;this._$V0=null;this._$wL=aJ;this.scale=aI;this._$V0=aH;}d.prototype._$YS=function(aI,aH){};function aF(aI,aK,aJ,aH){d.prototype.constructor.call(this,aK,aJ,aH);this._$YP=null;this._$YP=aI;}aF.prototype=new d();aF.prototype._$YS=function(aI,aH){switch(this._$YP){default:case u.Target.TARGET_FROM_ANGLE:aI.setParamFloat(this._$wL,this.scale*aH._$5r(),this._$V0);break;case u.Target.TARGET_FROM_ANGLE_V:aI.setParamFloat(this._$wL,this.scale*aH._$Cs(),this._$V0);break;}};u.Src=function(){};u.Src.SRC_TO_X="SRC_TO_X";u.Src.SRC_TO_Y="SRC_TO_Y";u.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE";u.Target=function(){};u.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE";u.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V";function X(){if(j){return;}this._$fL=0;this._$gL=0;this._$B0=1;this._$z0=1;this._$qT=0;this.reflectX=false;this.reflectY=false;}X.prototype.init=function(aH){this._$fL=aH._$fL;this._$gL=aH._$gL;this._$B0=aH._$B0;this._$z0=aH._$z0;this._$qT=aH._$qT;this.reflectX=aH.reflectX;this.reflectY=aH.reflectY;};X.prototype._$F0=function(aH){this._$fL=aH._$_T();this._$gL=aH._$_T();this._$B0=aH._$_T();this._$z0=aH._$_T();this._$qT=aH._$_T();if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this.reflectX=aH._$po();this.reflectY=aH._$po();}};X.prototype._$e=function(){};var ad=function(){};ad._$ni=function(aL,aJ,aR,aQ,aK,aI,aH,aS,aN){var aM=(aH*aI-aS*aK);if(aM==0){return null;}else{var aO=((aL-aR)*aI-(aJ-aQ)*aK)/aM;var aP;if(aK!=0){aP=(aL-aR-aO*aH)/aK;}else{aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){aP=(aL-aR-aO*aH)/aK;if(isNaN(aP)){aP=(aJ-aQ-aO*aS)/aI;}if(isNaN(aP)){__NONECONSOLE.log("a is NaN @UtVector#_$ni() ");__NONECONSOLE.log("v1x : "+aK);__NONECONSOLE.log("v1x != 0 ? "+(aK!=0));}}if(aN==null){return new Array(aP,aO);}else{aN[0]=aP;aN[1]=aO;return aN;}}};function av(){if(j){return;}this.x=null;this.y=null;this.width=null;this.height=null;}av.prototype._$8P=function(){return this.x+0.5*this.width;};av.prototype._$6P=function(){return this.y+0.5*this.height;};av.prototype._$EL=function(){return this.x+this.width;};av.prototype._$5T=function(){return this.y+this.height;};av.prototype._$jL=function(aI,aK,aJ,aH){this.x=aI;this.y=aK;this.width=aJ;this.height=aH;};av.prototype._$jL=function(aH){this.x=aH.x;this.y=aH.y;this.width=aH.width;this.height=aH.height;};av.prototype.contains=function(aH,aI){return this.x<=this.x&&this.y<=this.y&&(this.x<=this.x+this.width)&&(this.y<=this.y+this.height);};av.prototype.expand=function(aH,aI){this.x-=aH;this.y-=aI;this.width+=aH*2;this.height+=aI*2;};function aG(){}aG._$Z2=function(bb,bo,bp,a2){var a1=bo._$Q2(bb,bp);var a3=bb._$vs();var ba=bb._$Tr();bo._$zr(a3,ba,a1);if(a1<=0){return a2[a3[0]];}else{if(a1==1){var bj=a2[a3[0]];var bi=a2[a3[1]];var a9=ba[0];return(bj+(bi-bj)*a9)|0;}else{if(a1==2){var bj=a2[a3[0]];var bi=a2[a3[1]];var a0=a2[a3[2]];var aZ=a2[a3[3]];var a9=ba[0];var a8=ba[1];var br=(bj+(bi-bj)*a9)|0;var bq=(a0+(aZ-a0)*a9)|0;return(br+(bq-br)*a8)|0;}else{if(a1==3){var aP=a2[a3[0]];var aO=a2[a3[1]];var bn=a2[a3[2]];var bm=a2[a3[3]];var aK=a2[a3[4]];var aJ=a2[a3[5]];var bg=a2[a3[6]];var bf=a2[a3[7]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var bj=(aP+(aO-aP)*a9)|0;var bi=(bn+(bm-bn)*a9)|0;var a0=(aK+(aJ-aK)*a9)|0;var aZ=(bg+(bf-bg)*a9)|0;var br=(bj+(bi-bj)*a8)|0;var bq=(a0+(aZ-a0)*a8)|0;return(br+(bq-br)*a6)|0;}else{if(a1==4){var aT=a2[a3[0]];var aS=a2[a3[1]];var bu=a2[a3[2]];var bt=a2[a3[3]];var aN=a2[a3[4]];var aM=a2[a3[5]];var bl=a2[a3[6]];var bk=a2[a3[7]];var be=a2[a3[8]];var bc=a2[a3[9]];var aX=a2[a3[10]];var aW=a2[a3[11]];var a7=a2[a3[12]];var a5=a2[a3[13]];var aR=a2[a3[14]];var aQ=a2[a3[15]];var a9=ba[0];var a8=ba[1];var a6=ba[2];var a4=ba[3];var aP=(aT+(aS-aT)*a9)|0;var aO=(bu+(bt-bu)*a9)|0;var bn=(aN+(aM-aN)*a9)|0;var bm=(bl+(bk-bl)*a9)|0;var aK=(be+(bc-be)*a9)|0;var aJ=(aX+(aW-aX)*a9)|0;var bg=(a7+(a5-a7)*a9)|0;var bf=(aR+(aQ-aR)*a9)|0;var bj=(aP+(aO-aP)*a8)|0;var bi=(bn+(bm-bn)*a8)|0;var a0=(aK+(aJ-aK)*a8)|0;var aZ=(bg+(bf-bg)*a8)|0;var br=(bj+(bi-bj)*a6)|0;var bq=(a0+(aZ-a0)*a6)|0;return(br+(bq-br)*a4)|0;}else{var aV=1<<a1;var aY=new Float32Array(aV);for(var bh=0;bh<aV;bh++){var aI=bh;var aH=1;for(var aL=0;aL<a1;aL++){aH*=(aI%2==0)?(1-ba[aL]):ba[aL];aI/=2;}aY[bh]=aH;}var bs=new Float32Array(aV);for(var aU=0;aU<aV;aU++){bs[aU]=a2[a3[aU]];}var bd=0;for(var aU=0;aU<aV;aU++){bd+=aY[aU]*bs[aU];}return(bd+0.5)|0;}}}}}};aG._$br=function(ba,bo,bp,bg){var a1=bo._$Q2(ba,bp);var a2=ba._$vs();var a9=ba._$Tr();bo._$zr(a2,a9,a1);if(a1<=0){return bg[a2[0]];}else{if(a1==1){var bj=bg[a2[0]];var bi=bg[a2[1]];var a8=a9[0];return bj+(bi-bj)*a8;}else{if(a1==2){var bj=bg[a2[0]];var bi=bg[a2[1]];var a0=bg[a2[2]];var aZ=bg[a2[3]];var a8=a9[0];var a7=a9[1];return(1-a7)*(bj+(bi-bj)*a8)+a7*(a0+(aZ-a0)*a8);}else{if(a1==3){var aP=bg[a2[0]];var aO=bg[a2[1]];var bn=bg[a2[2]];var bm=bg[a2[3]];var aK=bg[a2[4]];var aJ=bg[a2[5]];var bf=bg[a2[6]];var be=bg[a2[7]];var a8=a9[0];var a7=a9[1];var a5=a9[2];return(1-a5)*((1-a7)*(aP+(aO-aP)*a8)+a7*(bn+(bm-bn)*a8))+a5*((1-a7)*(aK+(aJ-aK)*a8)+a7*(bf+(be-bf)*a8));}else{if(a1==4){var aT=bg[a2[0]];var aS=bg[a2[1]];var bs=bg[a2[2]];var br=bg[a2[3]];var aN=bg[a2[4]];var aM=bg[a2[5]];var bl=bg[a2[6]];var bk=bg[a2[7]];var bd=bg[a2[8]];var bb=bg[a2[9]];var aX=bg[a2[10]];var aW=bg[a2[11]];var a6=bg[a2[12]];var a4=bg[a2[13]];var aR=bg[a2[14]];var aQ=bg[a2[15]];var a8=a9[0];var a7=a9[1];var a5=a9[2];var a3=a9[3];return(1-a3)*((1-a5)*((1-a7)*(aT+(aS-aT)*a8)+a7*(bs+(br-bs)*a8))+a5*((1-a7)*(aN+(aM-aN)*a8)+a7*(bl+(bk-bl)*a8)))+a3*((1-a5)*((1-a7)*(bd+(bb-bd)*a8)+a7*(aX+(aW-aX)*a8))+a5*((1-a7)*(a6+(a4-a6)*a8)+a7*(aR+(aQ-aR)*a8)));}else{var aV=1<<a1;var aY=new Float32Array(aV);for(var bh=0;bh<aV;bh++){var aI=bh;var aH=1;for(var aL=0;aL<a1;aL++){aH*=(aI%2==0)?(1-a9[aL]):a9[aL];aI/=2;}aY[bh]=aH;}var bq=new Float32Array(aV);for(var aU=0;aU<aV;aU++){bq[aU]=bg[a2[aU]];}var bc=0;for(var aU=0;aU<aV;aU++){bc+=aY[aU]*bq[aU];}return bc;}}}}}};aG._$Vr=function(bV,bW,a5,aI,bC,a3,bX,bH){var aN=bW._$Q2(bV,a5);var bw=bV._$vs();var a2=bV._$Tr();bW._$zr(bw,a2,aN);var aJ=aI*2;var aQ=bX;if(aN<=0){var bI=bw[0];var bq=bC[bI];if(bH==2&&bX==0){P._$jT(bq,0,a3,0,aJ);}else{for(var bt=0;bt<aJ;){a3[aQ]=bq[bt++];a3[aQ+1]=bq[bt++];aQ+=bH;}}}else{if(aN==1){var bq=bC[bw[0]];var bp=bC[bw[1]];var b3=a2[0];var bT=1-b3;for(var bt=0;bt<aJ;){a3[aQ]=bq[bt]*bT+bp[bt]*b3;++bt;a3[aQ+1]=bq[bt]*bT+bp[bt]*b3;++bt;aQ+=bH;}}else{if(aN==2){var bq=bC[bw[0]];var bp=bC[bw[1]];var aZ=bC[bw[2]];var aY=bC[bw[3]];var b3=a2[0];var b1=a2[1];var bT=1-b3;var bP=1-b1;var b2=bP*bT;var b0=bP*b3;var bM=b1*bT;var bL=b1*b3;for(var bt=0;bt<aJ;){a3[aQ]=b2*bq[bt]+b0*bp[bt]+bM*aZ[bt]+bL*aY[bt];++bt;a3[aQ+1]=b2*bq[bt]+b0*bp[bt]+bM*aZ[bt]+bL*aY[bt];++bt;aQ+=bH;}}else{if(aN==3){var ba=bC[bw[0]];var a9=bC[bw[1]];var aP=bC[bw[2]];var aO=bC[bw[3]];var a6=bC[bw[4]];var a4=bC[bw[5]];var aL=bC[bw[6]];var aK=bC[bw[7]];var b3=a2[0];var b1=a2[1];var bZ=a2[2];var bT=1-b3;var bP=1-b1;var bN=1-bZ;var b8=bN*bP*bT;var b7=bN*bP*b3;var bU=bN*b1*bT;var bS=bN*b1*b3;var b6=bZ*bP*bT;var b5=bZ*bP*b3;var bQ=bZ*b1*bT;var bO=bZ*b1*b3;for(var bt=0;bt<aJ;){a3[aQ]=b8*ba[bt]+b7*a9[bt]+bU*aP[bt]+bS*aO[bt]+b6*a6[bt]+b5*a4[bt]+bQ*aL[bt]+bO*aK[bt];++bt;a3[aQ+1]=b8*ba[bt]+b7*a9[bt]+bU*aP[bt]+bS*aO[bt]+b6*a6[bt]+b5*a4[bt]+bQ*aL[bt]+bO*aK[bt];++bt;aQ+=bH;}}else{if(aN==4){var bD=bC[bw[0]];var bB=bC[bw[1]];var bo=bC[bw[2]];var bm=bC[bw[3]];var by=bC[bw[4]];var bx=bC[bw[5]];var be=bC[bw[6]];var bd=bC[bw[7]];var bG=bC[bw[8]];var bE=bC[bw[9]];var bv=bC[bw[10]];var bu=bC[bw[11]];var bA=bC[bw[12]];var bz=bC[bw[13]];var bn=bC[bw[14]];var bl=bC[bw[15]];var b3=a2[0];var b1=a2[1];var bZ=a2[2];var bY=a2[3];var bT=1-b3;var bP=1-b1;var bN=1-bZ;var bK=1-bY;var bk=bK*bN*bP*bT;var bi=bK*bN*bP*b3;var aW=bK*bN*b1*bT;var aV=bK*bN*b1*b3;var bc=bK*bZ*bP*bT;var bb=bK*bZ*bP*b3;var aS=bK*bZ*b1*bT;var aR=bK*bZ*b1*b3;var bs=bY*bN*bP*bT;var br=bY*bN*bP*b3;var a1=bY*bN*b1*bT;var a0=bY*bN*b1*b3;var bh=bY*bZ*bP*bT;var bf=bY*bZ*bP*b3;var aU=bY*bZ*b1*bT;var aT=bY*bZ*b1*b3;for(var bt=0;bt<aJ;){a3[aQ]=bk*bD[bt]+bi*bB[bt]+aW*bo[bt]+aV*bm[bt]+bc*by[bt]+bb*bx[bt]+aS*be[bt]+aR*bd[bt]+bs*bG[bt]+br*bE[bt]+a1*bv[bt]+a0*bu[bt]+bh*bA[bt]+bf*bz[bt]+aU*bn[bt]+aT*bl[bt];++bt;a3[aQ+1]=bk*bD[bt]+bi*bB[bt]+aW*bo[bt]+aV*bm[bt]+bc*by[bt]+bb*bx[bt]+aS*be[bt]+aR*bd[bt]+bs*bG[bt]+br*bE[bt]+a1*bv[bt]+a0*bu[bt]+bh*bA[bt]+bf*bz[bt]+aU*bn[bt]+aT*bl[bt];++bt;aQ+=bH;}}else{var b4=1<<aN;var bJ=new Float32Array(b4);for(var bj=0;bj<b4;bj++){var aH=bj;var aM=1;for(var bF=0;bF<aN;bF++){aM*=(aH%2==0)?(1-a2[bF]):a2[bF];aH/=2;}bJ[bj]=aM;}var bg=new Float32Array(b4);for(var aX=0;aX<b4;aX++){bg[aX]=bC[bw[aX]];}for(var bt=0;bt<aJ;){var a8=0,a7=0;var bR=bt+1;for(var aX=0;aX<b4;aX++){a8+=bJ[aX]*bg[aX][bt];a7+=bJ[aX]*bg[aX][bR];}bt+=2;a3[aQ]=a8;a3[aQ+1]=a7;aQ+=bH;}}}}}}};function e(){if(j){return;}this.x=null;this.y=null;}e.prototype._$HT=function(aH,aI){this.x=aH;this.y=aI;};e.prototype._$HT=function(aH){this.x=aH.x;this.y=aH.y;};function ae(){if(j){return;}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();}ae._$ur=-2;ae._$ES=500;ae._$wb=2;ae._$8S=3;ae._$52=ae._$ES;ae._$R2=ae._$ES;ae._$or=function(){return ae._$52;};ae._$Pr=function(){return ae._$R2;};ae.prototype.convertClipIDForV2_11=function(aI){var aH=[];if(aI==null){return null;}if(aI.length==0){return null;}if(!/,/.test(aI)){aH.push(aI.id);return aH;}aH=aI.id.split(",");return aH;};ae.prototype._$F0=function(aH){this._$gP=aH._$nP();this._$dr=aH._$nP();this._$GS=aH._$nP();this._$qb=aH._$6L();this._$Lb=aH._$cS();this._$mS=aH._$Tb();if(aH.getFormatVersion()>=ay._$T7){this.clipID=aH._$nP();this.clipIDList=this.convertClipIDForV2_11(this.clipID);}else{this.clipIDList=[];}this._$MS(this._$Lb);};ae.prototype.getClipIDList=function(){return this.clipIDList;};ae.prototype.init=function(aH){};ae.prototype._$Nr=function(aH,aI){aI._$IS[0]=false;aI._$Us=aG._$Z2(aH,this._$GS,aI._$IS,this._$Lb);if(Q._$Zs){}else{if(aI._$IS[0]){return;}}aI._$7s=aG._$br(aH,this._$GS,aI._$IS,this._$mS);};ae.prototype._$2b=function(aH,aI){};ae.prototype.getDrawDataID=function(){return this._$gP;};ae.prototype._$j2=function(aH){this._$gP=aH;};ae.prototype.getOpacity=function(aH,aI){return aI._$7s;};ae.prototype._$zS=function(aH,aI){return aI._$Us;};ae.prototype._$MS=function(aJ){for(var aI=aJ.length-1;aI>=0;--aI){var aH=aJ[aI];if(aH<ae._$52){ae._$52=aH;}else{if(aH>ae._$R2){ae._$R2=aH;}}}};ae.prototype.getTargetBaseDataID=function(){return this._$dr;};ae.prototype._$gs=function(aH){this._$dr=aH;};ae.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};ae.prototype.preDraw=function(aJ,aH,aI){};ae.prototype.draw=function(aJ,aH,aI){};ae.prototype.getType=function(){};ae.prototype._$B2=function(aI,aH,aJ){};function ax(){if(j){return;}this._$Eb=ax._$ps;this._$lT=1;this._$C0=1;this._$tT=1;this._$WL=1;this.culling=false;this.matrix4x4=new Float32Array(16);this.premultipliedAlpha=false;this.anisotropy=0;this.clippingProcess=ax.CLIPPING_PROCESS_NONE;this.clipBufPre_clipContextMask=null;this.clipBufPre_clipContextDraw=null;this.CHANNEL_COLORS=new Array();}ax._$ps=32;ax.CLIPPING_PROCESS_NONE=0;ax.CLIPPING_PROCESS_OVERWRITE_ALPHA=1;ax.CLIPPING_PROCESS_MULTIPLY_ALPHA=2;ax.CLIPPING_PROCESS_DRAW=3;ax.CLIPPING_PROCESS_CLEAR_ALPHA=4;ax.prototype.setChannelFlagAsColor=function(aH,aI){this.CHANNEL_COLORS[aH]=aI;};ax.prototype.getChannelFlagAsColor=function(aH){return this.CHANNEL_COLORS[aH];};ax.prototype._$ZT=function(){};ax.prototype._$Uo=function(aM,aK,aJ,aL,aN,aI,aH){};ax.prototype._$Rs=function(){return -1;};ax.prototype._$Ds=function(aH){};ax.prototype.setBaseColor=function(aK,aJ,aI,aH){if(aK<0){aK=0;}else{if(aK>1){aK=1;}}if(aJ<0){aJ=0;}else{if(aJ>1){aJ=1;}}if(aI<0){aI=0;}else{if(aI>1){aI=1;}}if(aH<0){aH=0;}else{if(aH>1){aH=1;}}this._$lT=aK;this._$C0=aJ;this._$tT=aI;this._$WL=aH;};ax.prototype._$WP=function(aH){this.culling=aH;};ax.prototype.setMatrix=function(aH){for(var aI=0;aI<16;aI++){this.matrix4x4[aI]=aH[aI];}};ax.prototype._$IT=function(){return this.matrix4x4;};ax.prototype.setPremultipliedAlpha=function(aH){this.premultipliedAlpha=aH;};ax.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha;};ax.prototype.setAnisotropy=function(aH){this.anisotropy=aH;};ax.prototype.getAnisotropy=function(){return this.anisotropy;};ax.prototype.getClippingProcess=function(){return this.clippingProcess;};ax.prototype.setClippingProcess=function(aH){this.clippingProcess=aH;};ax.prototype.setClipBufPre_clipContextForMask=function(aH){this.clipBufPre_clipContextMask=aH;};ax.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask;};ax.prototype.setClipBufPre_clipContextForDraw=function(aH){this.clipBufPre_clipContextDraw=aH;};ax.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw;};function o(){if(j){return;}this.a=1;this.r=1;this.g=1;this.b=1;this.scale=1;this._$ho=1;this.blendMode=Q.L2D_COLOR_BLEND_MODE_MULT;}function c(){if(j){return;}this._$kP=null;this._$dr=null;this._$Ai=true;this._$mS=null;}c._$ur=-2;c._$c2=1;c._$_b=2;c.prototype._$F0=function(aH){this._$kP=aH._$nP();this._$dr=aH._$nP();};c.prototype.readV2_opacity=function(aH){if(aH.getFormatVersion()>=ay.LIVE2D_FORMAT_VERSION_V2_10_SDK2){this._$mS=aH._$Tb();}};c.prototype.init=function(aH){};c.prototype._$Nr=function(aI,aH){};c.prototype.interpolateOpacity=function(aJ,aK,aI,aH){if(this._$mS==null){aI.setInterpolatedOpacity(1);}else{aI.setInterpolatedOpacity(aG._$br(aJ,aK,aH,this._$mS));}};c.prototype._$2b=function(aI,aH){};c.prototype._$nb=function(aL,aK,aM,aH,aI,aJ,aN){};c.prototype.getType=function(){};c.prototype._$gs=function(aH){this._$dr=aH;};c.prototype._$a2=function(aH){this._$kP=aH;};c.prototype.getTargetBaseDataID=function(){return this._$dr;};c.prototype.getBaseDataID=function(){return this._$kP;};c.prototype._$32=function(){return(this._$dr!=null&&(this._$dr!=n._$2o()));};function P(){}P._$W2=0;P._$CS=P._$W2;P._$Mo=function(){return true;};P._$XP=function(aI){try{var aJ=getTimeMSec();while(getTimeMSec()-aJ<aI){}}catch(aH){aH._$Rb();}};P.getUserTimeMSec=function(){return(P._$CS==P._$W2)?P.getSystemTimeMSec():P._$CS;};P.setUserTimeMSec=function(aH){P._$CS=aH;};P.updateUserTimeMSec=function(){return(P._$CS=P.getSystemTimeMSec());};P.getTimeMSec=function(){return new Date().getTime();};P.getSystemTimeMSec=function(){return new Date().getTime();};P._$Q=function(aH){};P._$jT=function(aM,aJ,aI,aL,aH){for(var aK=0;aK<aH;aK++){aI[aL+aK]=aM[aJ+aK];}};function aA(){if(j){return;}this._$VP=0;this._$wL=null;this._$GP=null;this._$8o=aA._$ds;this._$2r=-1;this._$O2=0;this._$ri=0;}aA._$ds=-2;aA.prototype._$F0=function(aH){this._$wL=aH._$nP();this._$VP=aH._$6L();this._$GP=aH._$nP();};aA.prototype.getParamIndex=function(aH){if(this._$2r!=aH){this._$8o=aA._$ds;}return this._$8o;};aA.prototype._$Pb=function(aI,aH){this._$8o=aI;this._$2r=aH;};aA.prototype.getParamID=function(){return this._$wL;};aA.prototype._$yP=function(aH){this._$wL=aH;};aA.prototype._$N2=function(){return this._$VP;};aA.prototype._$d2=function(){return this._$GP;};aA.prototype._$t2=function(aI,aH){this._$VP=aI;this._$GP=aH;};aA.prototype._$Lr=function(){return this._$O2;};aA.prototype._$wr=function(aH){this._$O2=aH;};aA.prototype._$SL=function(){return this._$ri;};aA.prototype._$AL=function(aH){this._$ri=aH;};function G(){}G.startsWith=function(aJ,aL,aK){var aH=aL+aK.length;if(aH>=aJ.length){return false;}for(var aI=aL;aI<aH;aI++){if(G.getChar(aJ,aI)!=aK.charAt(aI-aL)){return false;}}return true;};G.getChar=function(aI,aH){return String.fromCharCode(aI.getUint8(aH));};G.createString=function(aM,aL,aJ){var aH=new ArrayBuffer(aJ*2);var aK=new Uint16Array(aH);for(var aI=0;aI<aJ;aI++){aK[aI]=aM.getUint8(aL+aI);}return String.fromCharCode.apply(null,aK);};G._$LS=function(aP,aM,aR,aK){if(aP instanceof ArrayBuffer){aP=new DataView(aP);}var aL=aR;var aJ=false;var aQ=false;var aS=0;var aO=G.getChar(aP,aL);if(aO=="-"){aJ=true;aL++;}var aN=false;for(;aL<aM;aL++){aO=G.getChar(aP,aL);switch(aO){case"0":aS=aS*10;break;case"1":aS=aS*10+1;break;case"2":aS=aS*10+2;break;case"3":aS=aS*10+3;break;case"4":aS=aS*10+4;break;case"5":aS=aS*10+5;break;case"6":aS=aS*10+6;break;case"7":aS=aS*10+7;break;case"8":aS=aS*10+8;break;case"9":aS=aS*10+9;break;case".":aQ=true;aL++;aN=true;break;default:aN=true;break;}if(aN){break;}}if(aQ){var aI=0.1;var aH=false;for(;aL<aM;aL++){aO=G.getChar(aP,aL);switch(aO){case"0":break;case"1":aS+=aI*1;break;case"2":aS+=aI*2;break;case"3":aS+=aI*3;break;case"4":aS+=aI*4;break;case"5":aS+=aI*5;break;case"6":aS+=aI*6;break;case"7":aS+=aI*7;break;case"8":aS+=aI*8;break;case"9":aS+=aI*9;break;default:aH=true;break;}aI*=0.1;if(aH){break;}}}if(aJ){aS=-aS;}aK[0]=aL;return aS;};function g(){if(j){return;}this._$Ob=null;}g.prototype._$zP=function(){this._$Ob=new Array();};g.prototype._$F0=function(aH){this._$Ob=aH._$nP();};g.prototype._$Ur=function(aK){if(aK._$WS()){return true;}var aH=aK._$v2();for(var aJ=this._$Ob.length-1;aJ>=0;--aJ){var aI=this._$Ob[aJ].getParamIndex(aH);if(aI==aA._$ds){aI=aK.getParamIndex(this._$Ob[aJ].getParamID());}if(aK._$Xb(aI)){return true;}}return false;};g.prototype._$Q2=function(aL,aV){var aX=this._$Ob.length;var aJ=aL._$v2();var aN=0;var aI;var aQ;for(var aK=0;aK<aX;aK++){var aH=this._$Ob[aK];aI=aH.getParamIndex(aJ);if(aI==aA._$ds){aI=aL.getParamIndex(aH.getParamID());aH._$Pb(aI,aJ);}if(aI<0){throw new Exception("err 23242 : "+aH.getParamID());}var aU=aI<0?0:aL.getParamFloat(aI);aQ=aH._$N2();var aM=aH._$d2();var aP=-1;var aT=0;var aS;var aR;if(aQ<1){}else{if(aQ==1){aS=aM[0];if(aS-aw._$J<aU&&aU<aS+aw._$J){aP=0;aT=0;}else{aP=0;aV[0]=true;}}else{aS=aM[0];if(aU<aS-aw._$J){aP=0;aV[0]=true;}else{if(aU<aS+aw._$J){aP=0;}else{var aW=false;for(var aO=1;aO<aQ;++aO){aR=aM[aO];if(aU<aR+aw._$J){if(aR-aw._$J<aU){aP=aO;}else{aP=aO-1;aT=(aU-aS)/(aR-aS);aN++;}aW=true;break;}aS=aR;}if(!aW){aP=aQ-1;aT=0;aV[0]=true;}}}}}aH._$wr(aP);aH._$AL(aT);}return aN;};g.prototype._$zr=function(aN,aT,aP){var aR=1<<aP;if(aR+1>aw._$Qb){__NONECONSOLE.log("err 23245\\n");}var aS=this._$Ob.length;var aK=1;var aH=1;var aJ=0;for(var aQ=0;aQ<aR;++aQ){aN[aQ]=0;}for(var aL=0;aL<aS;++aL){var aI=this._$Ob[aL];if(aI._$SL()==0){var aO=aI._$Lr()*aK;if(aO<0&&Q._$3T){throw new Exception("err 23246");}for(var aQ=0;aQ<aR;++aQ){aN[aQ]+=aO;}}else{var aO=aK*aI._$Lr();var aM=aK*(aI._$Lr()+1);for(var aQ=0;aQ<aR;++aQ){aN[aQ]+=((aQ/aH|0)%2==0)?aO:aM;}aT[aJ++]=aI._$SL();aH*=2;}aK*=aI._$N2();}aN[aR]=65535;aT[aJ]=-1;};g.prototype._$h2=function(aJ,aH,aK){var aM=new Float32Array(aH);for(var aL=0;aL<aH;++aL){aM[aL]=aK[aL];}var aI=new aA();aI._$yP(aJ);aI._$t2(aH,aM);this._$Ob.push(aI);};g.prototype._$J2=function(aO){var aN=aO;var aM=this._$Ob.length;for(var aK=0;aK<aM;++aK){var aI=this._$Ob[aK];var aH=aI._$N2();var aJ=aN%aI._$N2();var aL=aI._$d2()[aJ];__NONECONSOLE.log("%s[%d]=%7.2f / ",aI.getParamID(),aJ,aL);aN/=aH;}__NONECONSOLE.log("\\n");};g.prototype.getParamCount=function(){return this._$Ob.length;};g.prototype._$zs=function(){return this._$Ob;};function ac(){this.m=new Float32Array(16);this.identity();}ac.prototype.identity=function(){for(var aH=0;aH<16;aH++){this.m[aH]=((aH%5)==0)?1:0;}};ac.prototype.getArray=function(){return this.m;};ac.prototype.getCopyMatrix=function(){return new Float32Array(this.m);};ac.prototype.setMatrix=function(aI){if(aI==null||aI.length!=16){return;}for(var aH=0;aH<16;aH++){this.m[aH]=aI[aH];}};ac.prototype.mult=function(aH,aJ,aI){if(aJ==null){return null;}if(this==aJ){this.mult_safe(this.m,aH.m,aJ.m,aI);}else{this.mult_fast(this.m,aH.m,aJ.m,aI);}return aJ;};ac.prototype.mult_safe=function(aI,aH,aM,aJ){if(aI==aM){var aL=new Array(16);this.mult_fast(aI,aH,aL,aJ);for(var aK=15;aK>=0;--aK){aM[aK]=aL[aK];}}else{this.mult_fast(aI,aH,aM,aJ);}};ac.prototype.mult_fast=function(aI,aH,aK,aJ){if(aJ){aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14];aK[3]=aK[7]=aK[11]=0;aK[15]=1;}else{aK[0]=aI[0]*aH[0]+aI[4]*aH[1]+aI[8]*aH[2]+aI[12]*aH[3];aK[4]=aI[0]*aH[4]+aI[4]*aH[5]+aI[8]*aH[6]+aI[12]*aH[7];aK[8]=aI[0]*aH[8]+aI[4]*aH[9]+aI[8]*aH[10]+aI[12]*aH[11];aK[12]=aI[0]*aH[12]+aI[4]*aH[13]+aI[8]*aH[14]+aI[12]*aH[15];aK[1]=aI[1]*aH[0]+aI[5]*aH[1]+aI[9]*aH[2]+aI[13]*aH[3];aK[5]=aI[1]*aH[4]+aI[5]*aH[5]+aI[9]*aH[6]+aI[13]*aH[7];aK[9]=aI[1]*aH[8]+aI[5]*aH[9]+aI[9]*aH[10]+aI[13]*aH[11];aK[13]=aI[1]*aH[12]+aI[5]*aH[13]+aI[9]*aH[14]+aI[13]*aH[15];aK[2]=aI[2]*aH[0]+aI[6]*aH[1]+aI[10]*aH[2]+aI[14]*aH[3];aK[6]=aI[2]*aH[4]+aI[6]*aH[5]+aI[10]*aH[6]+aI[14]*aH[7];aK[10]=aI[2]*aH[8]+aI[6]*aH[9]+aI[10]*aH[10]+aI[14]*aH[11];aK[14]=aI[2]*aH[12]+aI[6]*aH[13]+aI[10]*aH[14]+aI[14]*aH[15];aK[3]=aI[3]*aH[0]+aI[7]*aH[1]+aI[11]*aH[2]+aI[15]*aH[3];aK[7]=aI[3]*aH[4]+aI[7]*aH[5]+aI[11]*aH[6]+aI[15]*aH[7];aK[11]=aI[3]*aH[8]+aI[7]*aH[9]+aI[11]*aH[10]+aI[15]*aH[11];aK[15]=aI[3]*aH[12]+aI[7]*aH[13]+aI[11]*aH[14]+aI[15]*aH[15];}};ac.prototype.translate=function(aH,aJ,aI){this.m[12]=this.m[0]*aH+this.m[4]*aJ+this.m[8]*aI+this.m[12];this.m[13]=this.m[1]*aH+this.m[5]*aJ+this.m[9]*aI+this.m[13];this.m[14]=this.m[2]*aH+this.m[6]*aJ+this.m[10]*aI+this.m[14];this.m[15]=this.m[3]*aH+this.m[7]*aJ+this.m[11]*aI+this.m[15];};ac.prototype.scale=function(aJ,aI,aH){this.m[0]*=aJ;this.m[4]*=aI;this.m[8]*=aH;this.m[1]*=aJ;this.m[5]*=aI;this.m[9]*=aH;this.m[2]*=aJ;this.m[6]*=aI;this.m[10]*=aH;this.m[3]*=aJ;this.m[7]*=aI;this.m[11]*=aH;};ac.prototype.rotateX=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[4];this.m[4]=aI*aK+this.m[8]*aJ;this.m[8]=aI*-aJ+this.m[8]*aK;aI=this.m[5];this.m[5]=aI*aK+this.m[9]*aJ;this.m[9]=aI*-aJ+this.m[9]*aK;aI=this.m[6];this.m[6]=aI*aK+this.m[10]*aJ;this.m[10]=aI*-aJ+this.m[10]*aK;aI=this.m[7];this.m[7]=aI*aK+this.m[11]*aJ;this.m[11]=aI*-aJ+this.m[11]*aK;};ac.prototype.rotateY=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[8]*-aJ;this.m[8]=aI*aJ+this.m[8]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[9]*-aJ;this.m[9]=aI*aJ+this.m[9]*aK;aI=m[2];this.m[2]=aI*aK+this.m[10]*-aJ;this.m[10]=aI*aJ+this.m[10]*aK;aI=m[3];this.m[3]=aI*aK+this.m[11]*-aJ;this.m[11]=aI*aJ+this.m[11]*aK;};ac.prototype.rotateZ=function(aH){var aK=aC.fcos(aH);var aJ=aC._$9(aH);var aI=this.m[0];this.m[0]=aI*aK+this.m[4]*aJ;this.m[4]=aI*-aJ+this.m[4]*aK;aI=this.m[1];this.m[1]=aI*aK+this.m[5]*aJ;this.m[5]=aI*-aJ+this.m[5]*aK;aI=this.m[2];this.m[2]=aI*aK+this.m[6]*aJ;this.m[6]=aI*-aJ+this.m[6]*aK;aI=this.m[3];this.m[3]=aI*aK+this.m[7]*aJ;this.m[7]=aI*-aJ+this.m[7]*aK;};function Z(aH){if(j){return;}ak.prototype.constructor.call(this,aH);}Z.prototype=new ak();Z._$tP=new Object();Z._$27=function(){Z._$tP.clear();};Z.getID=function(aH){var aI=Z._$tP[aH];if(aI==null){aI=new Z(aH);Z._$tP[aH]=aI;}return aI;};Z.prototype._$3s=function(){return new Z();};function aD(){if(j){return;}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;}aD._$kS=-1;aD._$pS=0;aD._$hb=1;aD.STATE_IDENTITY=0;aD._$gb=1;aD._$fo=2;aD._$go=4;aD.prototype.transform=function(aK,aI,aH){var aT,aS,aR,aM,aL,aJ;var aQ=0;var aN=0;switch(this._$hi){default:return;case (aD._$go|aD._$fo|aD._$gb):aT=this._$7;aS=this._$H;aR=this._$k;aM=this._$f;aL=this._$g;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO+aR);aI[aN++]=(aM*aP+aL*aO+aJ);}return;case (aD._$go|aD._$fo):aT=this._$7;aS=this._$H;aM=this._$f;aL=this._$g;while(--aH>=0){var aP=aK[aQ++];var aO=aK[aQ++];aI[aN++]=(aT*aP+aS*aO);aI[aN++]=(aM*aP+aL*aO);}return;case (aD._$go|aD._$gb):aS=this._$H;aR=this._$k;aM=this._$f;aJ=this._$w;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]+aR);aI[aN++]=(aM*aP+aJ);}return;case (aD._$go):aS=this._$H;aM=this._$f;while(--aH>=0){var aP=aK[aQ++];aI[aN++]=(aS*aK[aQ++]);aI[aN++]=(aM*aP);}return;case (aD._$fo|aD._$gb):aT=this._$7;aR=this._$k;aL=this._$g;aJ=this._$w;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]+aR);aI[aN++]=(aL*aK[aQ++]+aJ);}return;case (aD._$fo):aT=this._$7;aL=this._$g;while(--aH>=0){aI[aN++]=(aT*aK[aQ++]);aI[aN++]=(aL*aK[aQ++]);}return;case (aD._$gb):aR=this._$k;aJ=this._$w;while(--aH>=0){aI[aN++]=(aK[aQ++]+aR);aI[aN++]=(aK[aQ++]+aJ);}return;case (aD.STATE_IDENTITY):if(aK!=aI||aQ!=aN){P._$jT(aK,aQ,aI,aN,aH*2);}return;}};aD.prototype.update=function(){if(this._$H==0&&this._$f==0){if(this._$7==1&&this._$g==1){if(this._$k==0&&this._$w==0){this._$hi=aD.STATE_IDENTITY;this._$Z=aD._$pS;}else{this._$hi=aD._$gb;this._$Z=aD._$hb;}}else{if(this._$k==0&&this._$w==0){this._$hi=aD._$fo;this._$Z=aD._$kS;}else{this._$hi=(aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}else{if(this._$7==0&&this._$g==0){if(this._$k==0&&this._$w==0){this._$hi=aD._$go;this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$gb);this._$Z=aD._$kS;}}else{if(this._$k==0&&this._$w==0){this._$hi=(aD._$go|aD._$fo);this._$Z=aD._$kS;}else{this._$hi=(aD._$go|aD._$fo|aD._$gb);this._$Z=aD._$kS;}}}};aD.prototype._$RT=function(aK){this._$IT(aK);var aJ=aK[0];var aH=aK[2];var aN=aK[1];var aM=aK[3];var aI=Math.sqrt(aJ*aJ+aN*aN);var aL=aJ*aM-aH*aN;if(aI==0){if(Q._$so){__NONECONSOLE.log("affine._$RT() / rt==0");}}else{aK[0]=aI;aK[1]=aL/aI;aK[2]=(aN*aM+aJ*aH)/aL;aK[3]=Math.atan2(aN,aJ);}};aD.prototype._$ho=function(aN,aM,aI,aH){var aL=new Float32Array(6);var aK=new Float32Array(6);aN._$RT(aL);aM._$RT(aK);var aJ=new Float32Array(6);aJ[0]=aL[0]+(aK[0]-aL[0])*aI;aJ[1]=aL[1]+(aK[1]-aL[1])*aI;aJ[2]=aL[2]+(aK[2]-aL[2])*aI;aJ[3]=aL[3]+(aK[3]-aL[3])*aI;aJ[4]=aL[4]+(aK[4]-aL[4])*aI;aJ[5]=aL[5]+(aK[5]-aL[5])*aI;aH._$CT(aJ);};aD.prototype._$CT=function(aJ){var aI=Math.cos(aJ[3]);var aH=Math.sin(aJ[3]);this._$7=aJ[0]*aI;this._$f=aJ[0]*aH;this._$H=aJ[1]*(aJ[2]*aI-aH);this._$g=aJ[1]*(aJ[2]*aH+aI);this._$k=aJ[4];this._$w=aJ[5];this.update();};aD.prototype._$IT=function(aH){aH[0]=this._$7;aH[1]=this._$f;aH[2]=this._$H;aH[3]=this._$g;aH[4]=this._$k;aH[5]=this._$w;};function Y(){if(j){return;}ah.prototype.constructor.call(this);this.motions=new Array();this._$7r=null;this._$7r=Y._$Co++;this._$D0=30;this._$yT=0;this._$E=true;this.loopFadeIn=true;this._$AS=-1;_$a0();}Y.prototype=new ah();Y._$cs="VISIBLE:";Y._$ar="LAYOUT:";Y._$Co=0;Y._$D2=[];Y._$1T=1;Y.loadMotion=function(aR){var aM=new Y();var aI=[0];var aP=aR.length;aM._$yT=0;for(var aJ=0;aJ<aP;++aJ){var aQ=(aR[aJ]&255);if(aQ=="\\n"||aQ=="\\r"){continue;}if(aQ=="#"){for(;aJ<aP;++aJ){if(aR[aJ]=="\\n"||aR[aJ]=="\\r"){break;}}continue;}if(aQ=="$"){var aT=aJ;var aK=-1;for(;aJ<aP;++aJ){aQ=(aR[aJ]&255);if(aQ=="\\r"||aQ=="\\n"){break;}if(aQ=="="){aK=aJ;break;}}var aO=false;if(aK>=0){if(aK==aT+4&&aR[aT+1]=="f"&&aR[aT+2]=="p"&&aR[aT+3]=="s"){aO=true;}for(aJ=aK+1;aJ<aP;++aJ){aQ=(aR[aJ]&255);if(aQ=="\\r"||aQ=="\\n"){break;}if(aQ==","||aQ==" "||aQ==" "){continue;}var aL=G._$LS(aR,aP,aJ,aI);if(aI[0]>0){if(aO&&5<aL&&aL<121){aM._$D0=aL;}}aJ=aI[0];}}for(;aJ<aP;++aJ){if(aR[aJ]=="\\n"||aR[aJ]=="\\r"){break;}}continue;}if(("a"<=aQ&&aQ<="z")||("A"<=aQ&&aQ<="Z")||aQ=="_"){var aT=aJ;var aK=-1;for(;aJ<aP;++aJ){aQ=(aR[aJ]&255);if(aQ=="\\r"||aQ=="\\n"){break;}if(aQ=="="){aK=aJ;break;}}if(aK>=0){var aN=new t();if(G.startsWith(aR,aT,Y._$cs)){aN._$RP=t._$hs;aN._$4P=new String(aR,aT,aK-aT);}else{if(G.startsWith(aR,aT,Y._$ar)){aN._$4P=new String(aR,aT+7,aK-aT-7);if(G.startsWith(aR,aT+7,"ANCHOR_X")){aN._$RP=t._$xs;}else{if(G.startsWith(aR,aT+7,"ANCHOR_Y")){aN._$RP=t._$us;}else{if(G.startsWith(aR,aT+7,"SCALE_X")){aN._$RP=t._$qs;}else{if(G.startsWith(aR,aT+7,"SCALE_Y")){aN._$RP=t._$Ys;}else{if(G.startsWith(aR,aT+7,"X")){aN._$RP=t._$ws;}else{if(G.startsWith(aR,aT+7,"Y")){aN._$RP=t._$Ns;}}}}}}}else{aN._$RP=t._$Fr;aN._$4P=new String(aR,aT,aK-aT);}}aM.motions.push(aN);var aS=0;Y._$D2.clear();for(aJ=aK+1;aJ<aP;++aJ){aQ=(aR[aJ]&255);if(aQ=="\\r"||aQ=="\\n"){break;}if(aQ==","||aQ==" "||aQ==" "){continue;}var aL=G._$LS(aR,aP,aJ,aI);if(aI[0]>0){Y._$D2.push(aL);aS++;var aH=aI[0];if(aH<aJ){__NONECONSOLE.log("_$n0 _$hi . @Live2DMotion loadMotion()\\n");break;}aJ=aH;}}aN._$I0=Y._$D2._$BL();if(aS>aM._$yT){aM._$yT=aS;}}}}aM._$AS=((1000*aM._$yT)/aM._$D0)|0;return aM;};Y.prototype.getDurationMSec=function(){return this._$AS;};Y.prototype.dump=function(){for(var aJ=0;aJ<this.motions.length;aJ++){var aH=this.motions[aJ];__NONECONSOLE.log("_$wL[%s] [%d]. ",aH._$4P,aH._$I0.length);for(var aI=0;aI<aH._$I0.length&&aI<10;aI++){__NONECONSOLE.log("%5.2f ,",aH._$I0[aI]);}__NONECONSOLE.log("\\n");}};Y.prototype.updateParamExe=function(aH,aL,aO,aX){var aM=aL-aX._$z2;var aV=aM*this._$D0/1000;var aJ=aV|0;var aP=aV-aJ;for(var aU=0;aU<this.motions.length;aU++){var aS=this.motions[aU];var aK=aS._$I0.length;var aQ=aS._$4P;if(aS._$RP==t._$hs){var aT=aS._$I0[(aJ>=aK?aK-1:aJ)];aH.setParamFloat(aQ,aT);}else{if(t._$ws<=aS._$RP&&aS._$RP<=t._$Ys){}else{var aR=aH.getParamFloat(aQ);var aY=aS._$I0[(aJ>=aK?aK-1:aJ)];var aW=aS._$I0[(aJ+1>=aK?aK-1:aJ+1)];var aI=aY+(aW-aY)*aP;var aN=aR+(aI-aR)*aO;aH.setParamFloat(aQ,aN);}}}if(aJ>=this._$yT){if(this._$E){aX._$z2=aL;if(this.loopFadeIn){aX._$bs=aL;}}else{aX._$9L=true;}}};Y.prototype._$r0=function(){return this._$E;};Y.prototype._$aL=function(aH){this._$E=aH;};Y.prototype.isLoopFadeIn=function(){return this.loopFadeIn;};Y.prototype.setLoopFadeIn=function(aH){this.loopFadeIn=aH;};function aE(){this._$P=new Float32Array(100);this.size=0;}aE.prototype.clear=function(){this.size=0;};aE.prototype.add=function(aI){if(this._$P.length<=this.size){var aH=new Float32Array(this.size*2);P._$jT(this._$P,0,aH,0,this.size);