UNPKG

use-on-demand

Version:
2 lines 164 kB
/*! https://github.com/xiazeyu/live2d-widget.js built@2020-8-22 14:53:39 */ !function(t,e){for(var i in e)t[i]=e[i]}(exports,function(t){var e={};function i(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=9)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.L2Dwidget=void 0;var r,o=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(5),s=(r=n,r&&r.__esModule?r:{default:r}),a=i(1),_=i(6);var h=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,_.EventEmitter);function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.config=a.config,t}return o(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.configApplyer)(e),this.emit("config",this.config),!a.config.mobile.show&&s.default.mobile()||new Promise(function(t){t()}).then(i.bind(null,12)).then(function(e){t.coreApp=e,t.live2DMgr=t.coreApp.theRealInit(t)}).catch(function(t){console.error(t)})}},{key:"captureFrame",value:function(t){return this.coreApp.captureFrame(t)}},{key:"downloadFrame",value:function(){this.captureFrame(function(t){var e=document.createElement("a");document.body.appendChild(e),e.setAttribute("type","hidden"),e.href=t,e.download="live2d.png",e.click()})}}]),e}());e.L2Dwidget=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.config=e.configApplyer=void 0;var r=n(i(10)),o=n(i(11));function n(t){return t&&t.__esModule?t:{default:t}}var s={};e.configApplyer=function(t){(0,o.default)(s,t,r.default)},e.config=s},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=!0;function r(){i||(this._$MT=null,this._$5S=null,this._$NP=0,r._$42++,this._$5S=new U(this))}r._$0s=1,r._$4s=2,r._$42=0,r._$62=function(t,e){try{if(e instanceof ArrayBuffer&&(e=new DataView(e)),!(e instanceof DataView))throw new ht("_$SS#loadModel(b) / b _$x be DataView or ArrayBuffer");var i,o=new vt(e),n=o._$ST(),s=o._$ST(),_=o._$ST();if(109!=n||111!=s||99!=_)throw new ht("_$gi _$C _$li , _$Q0 _$P0.");if(i=o._$ST(),o._$gr(i),i>G._$T7){t._$NP|=r._$4s;throw new ht("_$gi _$C _$li , _$n0 _$_ version _$li ( SDK : "+G._$T7+" < _$f0 : "+i+" )@_$SS#loadModel()\n")}var h=o._$nP();if(i>=G._$s7){var l=o._$9T(),u=o._$9T();if(-30584!=l||-30584!=u)throw t._$NP|=r._$0s,new ht("_$gi _$C _$li , _$0 _$6 _$Ui.")}t._$KS(h);var $=t.getModelContext();$.setDrawParam(t.getDrawParam()),$.init()}catch(t){a._$Rb(t)}},r.prototype._$KS=function(t){this._$MT=t},r.prototype.getModelImpl=function(){return null==this._$MT&&(this._$MT=new u,this._$MT._$zP()),this._$MT},r.prototype.getCanvasWidth=function(){return null==this._$MT?0:this._$MT.getCanvasWidth()},r.prototype.getCanvasHeight=function(){return null==this._$MT?0:this._$MT.getCanvasHeight()},r.prototype.getParamFloat=function(t){return"number"!=typeof t&&(t=this._$5S.getParamIndex(l.getID(t))),this._$5S.getParamFloat(t)},r.prototype.setParamFloat=function(t,e,i){"number"!=typeof t&&(t=this._$5S.getParamIndex(l.getID(t))),arguments.length<3&&(i=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1-i)+e*i)},r.prototype.addToParamFloat=function(t,e,i){"number"!=typeof t&&(t=this._$5S.getParamIndex(l.getID(t))),arguments.length<3&&(i=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)+e*i)},r.prototype.multParamFloat=function(t,e,i){"number"!=typeof t&&(t=this._$5S.getParamIndex(l.getID(t))),arguments.length<3&&(i=1),this._$5S.setParamFloat(t,this._$5S.getParamFloat(t)*(1+(e-1)*i))},r.prototype.getParamIndex=function(t){return this._$5S.getParamIndex(l.getID(t))},r.prototype.loadParam=function(){this._$5S.loadParam()},r.prototype.saveParam=function(){this._$5S.saveParam()},r.prototype.init=function(){this._$5S.init()},r.prototype.update=function(){this._$5S.update()},r.prototype._$Rs=function(){return a._$li("_$60 _$PT _$Rs()"),-1},r.prototype._$Ds=function(t){a._$li("_$60 _$PT _$SS#_$Ds() \n")},r.prototype._$K2=function(){},r.prototype.draw=function(){},r.prototype.getModelContext=function(){return this._$5S},r.prototype._$s2=function(){return this._$NP},r.prototype._$P7=function(t,e,i,r){var o=-1,n=0;if(0!=i)if(1==t.length){$=t[0];var s=0!=this.getParamFloat($),a=(p=e[0],this.getPartsOpacity(p)),_=i/r;s?(a+=_)>1&&(a=1):(a-=_)<0&&(a=0),this.setPartsOpacity(p,a)}else{for(u=0;u<t.length;u++){$=t[u];if(c=0!=this.getParamFloat($)){if(o>=0)break;o=u;p=e[u];n=this.getPartsOpacity(p),(n+=i/r)>1&&(n=1)}}o<0&&(console.log("No _$wi _$q0/ _$U default[%s]",t[0]),o=0,n=1,this.loadParam(),this.setParamFloat(t[o],n),this.saveParam());for(u=0;u<t.length;u++){p=e[u];if(o==u)this.setPartsOpacity(p,n);else{var h,l=this.getPartsOpacity(p);(1-(h=n<.5?-.5*n/.5+1:.5*(1-n)/.5))*(1-n)>.15&&(h=1-.15/(1-n)),l>h&&(l=h),this.setPartsOpacity(p,l)}}}else for(var u=0;u<t.length;u++){var $=t[u],p=e[u],c=0!=this.getParamFloat($);this.setPartsOpacity(p,c?1:0)}},r.prototype.setPartsOpacity=function(t,e){"number"!=typeof t&&(t=this._$5S.getPartsDataIndex(h.getID(t))),this._$5S.setPartsOpacity(t,e)},r.prototype.getPartsDataIndex=function(t){return t instanceof h||(t=h.getID(t)),this._$5S.getPartsDataIndex(t)},r.prototype.getPartsOpacity=function(t){return"number"!=typeof t&&(t=this._$5S.getPartsDataIndex(h.getID(t))),t<0?0:this._$5S.getPartsOpacity(t)},r.prototype.getDrawParam=function(){},r.prototype.getDrawDataIndex=function(t){return this._$5S.getDrawDataIndex(D.getID(t))},r.prototype.getDrawData=function(t){return this._$5S.getDrawData(t)},r.prototype.getTransformedPoints=function(t){var e=this._$5S._$C2(t);return e instanceof ut?e.getTransformedPoints():null},r.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()==j._$wb&&e instanceof lt?e.getIndexArray():null};function o(t){if(!i){this.clipContextList=new Array,this.glcontext=t.gl,this.dp_webgl=t,this.curFrameNo=0,this.firstError_clipInNotUpdate=!0,this.colorBuffer=0,this.isInitGLFBFunc=!1,this.tmpBoundsOnModel=new v,at.glContext.length>at.frameBuffers.length&&(this.curFrameNo=this.getMaskRenderTexture()),this.tmpModelToViewMatrix=new O,this.tmpMatrix2=new O,this.tmpMatrixForMask=new O,this.tmpMatrixForDraw=new O,this.CHANNEL_COLORS=new Array;var e=new w;(e=new w).r=0,e.g=0,e.b=0,e.a=1,this.CHANNEL_COLORS.push(e),(e=new w).r=1,e.g=0,e.b=0,e.a=0,this.CHANNEL_COLORS.push(e),(e=new w).r=0,e.g=1,e.b=0,e.a=0,this.CHANNEL_COLORS.push(e),(e=new w).r=0,e.g=0,e.b=1,e.a=0,this.CHANNEL_COLORS.push(e);for(var r=0;r<this.CHANNEL_COLORS.length;r++)this.dp_webgl.setChannelFlagAsColor(r,this.CHANNEL_COLORS[r])}}o.CHANNEL_COUNT=4,o.RENDER_TEXTURE_USE_MIPMAP=!1,o.NOT_USED_FRAME=-100,o.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()},o.prototype.releaseShader=function(){for(var t=at.frameBuffers.length,e=0;e<t;e++)this.gl.deleteFramebuffer(at.frameBuffers[e].framebuffer);at.frameBuffers=[],at.glContext=[]},o.prototype.init=function(t,e,i){for(var r=0;r<e.length;r++){var o=e[r].getClipIDList();if(null!=o){var s=this.findSameClip(o);null==s&&(s=new n(this,t,o),this.clipContextList.push(s));var a=e[r].getDrawDataID(),_=t.getDrawDataIndex(a);s.addClippedDrawData(a,_);i[r].clipBufPre_clipContext=s}}},o.prototype.getMaskRenderTexture=function(){var t=null;return t=this.dp_webgl.createFramebuffer(),at.frameBuffers[this.dp_webgl.glno]=t,this.dp_webgl.glno},o.prototype.setupClip=function(t,e){for(var i=0,r=0;r<this.clipContextList.length;r++){var o=this.clipContextList[r];this.calcClippedDrawTotalBounds(t,o),o.isUsing&&i++}if(i>0){var n=e.gl.getParameter(e.gl.FRAMEBUFFER_BINDING),s=new Array(4);s[0]=0,s[1]=0,s[2]=e.gl.canvas.width,s[3]=e.gl.canvas.height,e.gl.viewport(0,0,at.clippingMaskBufferSize,at.clippingMaskBufferSize),this.setupLayoutBounds(i),e.gl.bindFramebuffer(e.gl.FRAMEBUFFER,at.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=(o=this.clipContextList[r]).allClippedDrawRect,_=(o.layoutChannelNo,o.layoutBounds);this.tmpBoundsOnModel._$jL(a),this.tmpBoundsOnModel.expand(.05*a.width,.05*a.height);var h=_.width/this.tmpBoundsOnModel.width,l=_.height/this.tmpBoundsOnModel.height;this.tmpMatrix2.identity(),this.tmpMatrix2.translate(-1,-1,0),this.tmpMatrix2.scale(2,2,1),this.tmpMatrix2.translate(_.x,_.y,0),this.tmpMatrix2.scale(h,l,1),this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x,-this.tmpBoundsOnModel.y,0),this.tmpMatrixForMask.setMatrix(this.tmpMatrix2.m),this.tmpMatrix2.identity(),this.tmpMatrix2.translate(_.x,_.y,0),this.tmpMatrix2.scale(h,l,1),this.tmpMatrix2.translate(-this.tmpBoundsOnModel.x,-this.tmpBoundsOnModel.y,0),this.tmpMatrixForDraw.setMatrix(this.tmpMatrix2.m);for(var u=this.tmpMatrixForMask.getArray(),$=0;$<16;$++)o.matrixForMask[$]=u[$];var p=this.tmpMatrixForDraw.getArray();for($=0;$<16;$++)o.matrixForDraw[$]=p[$];for(var c=o.clippingMaskDrawIndexList.length,f=0;f<c;f++){var d=o.clippingMaskDrawIndexList[f],g=t.getDrawData(d),y=t._$C2(d);e.setClipBufPre_clipContextForMask(o),g.draw(e,t,y)}}e.gl.bindFramebuffer(e.gl.FRAMEBUFFER,n),e.setClipBufPre_clipContextForMask(null),e.gl.viewport(s[0],s[1],s[2],s[3])}},o.prototype.getColorBuffer=function(){return this.colorBuffer},o.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 o=0,n=0;n<r;n++)for(var s=i.clipIDList[n],a=0;a<r;a++)if(t[a]==s){o++;break}if(o==r)return i}}return null},o.prototype.calcClippedDrawTotalBounds=function(t,e){for(var i=t._$Ri.getModelImpl().getCanvasWidth(),r=t._$Ri.getModelImpl().getCanvasHeight(),o=i>r?i:r,n=o,s=o,a=0,_=0,h=e.clippedDrawContextList.length,l=0;l<h;l++){var u=e.clippedDrawContextList[l].drawDataIndex,$=t._$C2(u);if($._$yo()){for(var p=$.getTransformedPoints(),c=p.length,f=[],d=[],g=0,y=B._$i2;y<c;y+=B._$No)f[g]=p[y],d[g]=p[y+1],g++;var m=Math.min.apply(null,f),T=Math.min.apply(null,d),v=Math.max.apply(null,f),P=Math.max.apply(null,d);m<n&&(n=m),T<s&&(s=T),v>a&&(a=v),P>_&&(_=P)}}if(n==o)e.allClippedDrawRect.x=0,e.allClippedDrawRect.y=0,e.allClippedDrawRect.width=0,e.allClippedDrawRect.height=0,e.isUsing=!1;else{var S=a-n,L=_-s;e.allClippedDrawRect.x=n,e.allClippedDrawRect.y=s,e.allClippedDrawRect.width=S,e.allClippedDrawRect.height=L,e.isUsing=!0}},o.prototype.setupLayoutBounds=function(t){var e=t/o.CHANNEL_COUNT,i=t%o.CHANNEL_COUNT;e=~~e,i=~~i;for(var r=0,n=0;n<o.CHANNEL_COUNT;n++){var s=e+(n<i?1:0);if(0==s);else if(1==s){(u=this.clipContextList[r++]).layoutChannelNo=n,u.layoutBounds.x=0,u.layoutBounds.y=0,u.layoutBounds.width=1,u.layoutBounds.height=1}else if(2==s)for(var _=0;_<s;_++){var h=0;l=~~(l=_%2);(u=this.clipContextList[r++]).layoutChannelNo=n,u.layoutBounds.x=.5*l,u.layoutBounds.y=0,u.layoutBounds.width=.5,u.layoutBounds.height=1}else if(s<=4)for(_=0;_<s;_++){l=~~(l=_%2),h=~~(h=_/2);(u=this.clipContextList[r++]).layoutChannelNo=n,u.layoutBounds.x=.5*l,u.layoutBounds.y=.5*h,u.layoutBounds.width=.5,u.layoutBounds.height=.5}else if(s<=9)for(_=0;_<s;_++){var l;l=~~(l=_%3),h=~~(h=_/3);var u;(u=this.clipContextList[r++]).layoutChannelNo=n,u.layoutBounds.x=l/3,u.layoutBounds.y=h/3,u.layoutBounds.width=1/3,u.layoutBounds.height=1/3}else a._$li("_$6 _$0P mask count : %d",s)}};function n(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 v,this.allClippedDrawRect=new v,this.matrixForMask=new Float32Array(16),this.matrixForDraw=new Float32Array(16),this.owner=t}n.prototype.addClippedDrawData=function(t,e){var i=new function(t,e){this._$gP=t,this.drawDataIndex=e}(t,e);this.clippedDrawContextList.push(i)};function s(){i||(this._$dP=null,this._$eo=null,this._$V0=null,this._$dP=1e3,this._$eo=1e3,this._$V0=1,this._$a0())}s._$JT=function(t,e,i){var r=t/e,o=i/e,n=1-(1-o)*(1-o),s=1-(1-o)*(1-o),a=1/3*(1-o)*n+(o*(2/3)+1/3*(1-o))*(1-n),_=(o+2/3*(1-o))*s+(o*(1/3)+2/3*(1-o))*(1-s),h=1-3*_+3*a-0,l=3*_-6*a+0,u=3*a-0;if(r<=0)return 0;if(r>=1)return 1;var $=r*r;return h*(r*$)+l*$+u*r+0},s.prototype._$a0=function(){},s.prototype.setFadeIn=function(t){this._$dP=t},s.prototype.setFadeOut=function(t){this._$eo=t},s.prototype._$pT=function(t){this._$V0=t},s.prototype.getFadeOut=function(){return this._$eo},s.prototype._$4T=function(){return this._$eo},s.prototype._$mT=function(){return this._$V0},s.prototype.getDurationMSec=function(){return-1},s.prototype.getLoopDurationMSec=function(){return-1},s.prototype.updateParam=function(t,e){if(e._$AT&&!e._$9L){var i=x.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 o=this._$V0;0<=(o=o*(0==this._$dP?1:_t._$r2((i-e._$bs)/this._$dP))*(0==this._$eo||e._$Do<0?1:_t._$r2((e._$Do-i)/this._$eo)))&&o<=1||console.log("### assert!! ### "),this.updateParamExe(t,i,o,e),e._$Do>0&&e._$Do<i&&(e._$9L=!0)}},s.prototype.updateParamExe=function(t,e,i,r){};function a(){}a._$8s=0,a._$fT=new Object,a.start=function(t){var e=a._$fT[t];null==e&&((e=new function(){this._$r=null,this._$0S=null})._$r=t,a._$fT[t]=e),e._$0S=x.getSystemTimeMSec()},a.dump=function(t){var e=a._$fT[t];if(null!=e){var i=x.getSystemTimeMSec()-e._$0S;return console.log(t+" : "+i+"ms"),i}return-1},a.end=function(t){var e=a._$fT[t];if(null!=e){return x.getSystemTimeMSec()-e._$0S}return-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,o=0;o<r;++o)console.log("%5d",e[o]),console.log("%s\n",i),console.log(",");console.log("\n")},a._$Rb=function(t){console.log("dump exception : "+t),console.log("stack :: "+t.stack)};function _(){i||(this.x=null,this.y=null,this.width=null,this.height=null)}_.prototype._$8P=function(){return.5*(this.x+this.x+this.width)},_.prototype._$6P=function(){return.5*(this.y+this.y+this.height)},_.prototype._$EL=function(){return this.x+this.width},_.prototype._$5T=function(){return this.y+this.height},_.prototype._$jL=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},_.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height};function h(t){i||it.prototype.constructor.call(this,t)}h.prototype=new it,h._$tP=new Object,h._$27=function(){h._$tP.clear()},h.getID=function(t){var e=h._$tP[t];return null==e&&(e=new h(t),h._$tP[t]=e),e},h.prototype._$3s=function(){return new h};function l(t){i||it.prototype.constructor.call(this,t)}l.prototype=new it,l._$tP=new Object,l._$27=function(){l._$tP.clear()},l.getID=function(t){var e=l._$tP[t];return null==e&&(e=new l(t),l._$tP[t]=e),e},l.prototype._$3s=function(){return new l};function u(){i||(this._$vo=null,this._$F2=null,this._$ao=400,this._$1S=400,u._$42++)}u._$42=0,u.prototype._$zP=function(){null==this._$vo&&(this._$vo=new rt),null==this._$F2&&(this._$F2=new Array)},u.prototype.getCanvasWidth=function(){return this._$ao},u.prototype.getCanvasHeight=function(){return this._$1S},u.prototype._$F0=function(t){this._$vo=t._$nP(),this._$F2=t._$nP(),this._$ao=t._$6L(),this._$1S=t._$6L()},u.prototype._$6S=function(t){this._$F2.push(t)},u.prototype._$Xr=function(){return this._$F2},u.prototype._$E2=function(){return this._$vo};function $(){i||(this.p1=new p,this.p2=new p,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))}$.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())},$.prototype.getPhysicsPoint1=function(){return this.p1},$.prototype.getPhysicsPoint2=function(){return this.p2},$.prototype._$qr=function(){return this._$Db},$.prototype._$pr=function(t){this._$Db=t},$.prototype._$5r=function(){return this._$M2},$.prototype._$Cs=function(){return this._$9b},$.prototype._$Yb=function(){return-180*Math.atan2(this.p1.x-this.p2.x,-(this.p1.y-this.p2.y))/Math.PI},$.prototype.addSrcParam=function(t,e,i,r){var o=new f(t,e,i,r);this._$lL.push(o)},$.prototype.addTargetParam=function(t,e,i,r){var o=new g(t,e,i,r);this._$qP.push(o)},$.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},$.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,o,n=-Math.atan2(this.p1.y-this.p2.y,this.p1.x-this.p2.x),s=Math.cos(n),a=Math.sin(n),_=9.8*this.p2._$p,h=this._$Db*St._$bS,l=_*Math.cos(n-h);r=l*a,o=l*s;var u=-this.p1.fx*a*a,$=-this.p1.fy*a*s,p=-this.p2.vx*this._$L2,c=-this.p2.vy*this._$L2;this.p2.fx=r+u+p,this.p2.fy=o+$+c,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 f=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)/f,this.p2.y=this.p1.y+this._$Fo*(this.p2.y-this.p1.y)/f,this.p2.vx=(this.p2.x-this.p2._$s0)*i,this.p2.vy=(this.p2.y-this.p2._$70)*i,this.p2._$xT()};function p(){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}p.prototype._$xT=function(){this._$s0=this.x,this._$70=this.y,this._$7L=this.vx,this._$HL=this.vy};function c(t,e,i){this._$wL=null,this.scale=null,this._$V0=null,this._$wL=t,this.scale=e,this._$V0=i}c.prototype._$oP=function(t,e){};function f(t,e,i,r){c.prototype.constructor.call(this,e,i,r),this._$tL=null,this._$tL=t}f.prototype=new c,f.prototype._$oP=function(t,e){var i=this.scale*t.getParamFloat(this._$wL),r=e.getPhysicsPoint1();switch(this._$tL){default:case $.Src.SRC_TO_X:r.x=r.x+(i-r.x)*this._$V0;break;case $.Src.SRC_TO_Y:r.y=r.y+(i-r.y)*this._$V0;break;case $.Src.SRC_TO_G_ANGLE:var o=e._$qr();o+=(i-o)*this._$V0,e._$pr(o)}};function d(t,e,i){this._$wL=null,this.scale=null,this._$V0=null,this._$wL=t,this.scale=e,this._$V0=i}d.prototype._$YS=function(t,e){};function g(t,e,i,r){d.prototype.constructor.call(this,e,i,r),this._$YP=null,this._$YP=t}g.prototype=new d,g.prototype._$YS=function(t,e){switch(this._$YP){default:case $.Target.TARGET_FROM_ANGLE:t.setParamFloat(this._$wL,this.scale*e._$5r(),this._$V0);break;case $.Target.TARGET_FROM_ANGLE_V:t.setParamFloat(this._$wL,this.scale*e._$Cs(),this._$V0)}},$.Src=function(){},$.Src.SRC_TO_X="SRC_TO_X",$.Src.SRC_TO_Y="SRC_TO_Y",$.Src.SRC_TO_G_ANGLE="SRC_TO_G_ANGLE",$.Target=function(){},$.Target.TARGET_FROM_ANGLE="TARGET_FROM_ANGLE",$.Target.TARGET_FROM_ANGLE_V="TARGET_FROM_ANGLE_V";function y(){i||(this._$fL=0,this._$gL=0,this._$B0=1,this._$z0=1,this._$qT=0,this.reflectX=!1,this.reflectY=!1)}y.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},y.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())},y.prototype._$e=function(){};var T=function(){};T._$ni=function(t,e,i,r,o,n,s,a,_){var h=s*n-a*o;if(0==h)return null;var l,u=((t-i)*n-(e-r)*o)/h;return l=0!=o?(t-i-u*s)/o:(e-r-u*a)/n,isNaN(l)&&(l=(t-i-u*s)/o,isNaN(l)&&(l=(e-r-u*a)/n),isNaN(l)&&(console.log("a is NaN @UtVector#_$ni() "),console.log("v1x : "+o),console.log("v1x != 0 ? "+(0!=o)))),null==_?new Array(l,u):(_[0]=l,_[1]=u,_)};function v(){i||(this.x=null,this.y=null,this.width=null,this.height=null)}v.prototype._$8P=function(){return this.x+.5*this.width},v.prototype._$6P=function(){return this.y+.5*this.height},v.prototype._$EL=function(){return this.x+this.width},v.prototype._$5T=function(){return this.y+this.height},v.prototype._$jL=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},v.prototype._$jL=function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},v.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},v.prototype.expand=function(t,e){this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e};function P(){}P._$Z2=function(t,e,i,r){var o=e._$Q2(t,i),n=t._$vs(),s=t._$Tr();if(e._$zr(n,s,o),o<=0)return r[n[0]];if(1==o){return(a=r[n[0]])+((_=r[n[1]])-a)*(u=s[0])|0}if(2==o){var a=r[n[0]],_=r[n[1]],h=r[n[2]],l=r[n[3]],u=s[0],$=s[1];return(P=a+(_-a)*u|0)+((h+(l-h)*u|0)-P)*$|0}if(3==o){var p=r[n[0]],c=r[n[1]],f=r[n[2]],d=r[n[3]],g=r[n[4]],y=r[n[5]],m=r[n[6]],T=r[n[7]],v=(u=s[0],$=s[1],s[2]);return(P=(a=p+(c-p)*u|0)+((_=f+(d-f)*u|0)-a)*$|0)+(((h=g+(y-g)*u|0)+((l=m+(T-m)*u|0)-h)*$|0)-P)*v|0}if(4==o){var P,S=r[n[0]],L=r[n[1]],E=r[n[2]],w=r[n[3]],M=r[n[4]],x=r[n[5]],A=r[n[6]],b=r[n[7]],I=r[n[8]],O=r[n[9]],D=r[n[10]],R=r[n[11]],F=r[n[12]],C=r[n[13]],N=r[n[14]],B=r[n[15]],G=(u=s[0],$=s[1],v=s[2],s[3]);return(P=(a=(p=S+(L-S)*u|0)+((c=E+(w-E)*u|0)-p)*$|0)+((_=(f=M+(x-M)*u|0)+((d=A+(b-A)*u|0)-f)*$|0)-a)*v|0)+(((h=(g=I+(O-I)*u|0)+((y=D+(R-D)*u|0)-g)*$|0)+((l=(m=F+(C-F)*u|0)+((T=N+(B-N)*u|0)-m)*$|0)-h)*v|0)-P)*G|0}for(var U=1<<o,k=new Float32Array(U),Y=0;Y<U;Y++){for(var V=Y,X=1,z=0;z<o;z++)X*=V%2==0?1-s[z]:s[z],V/=2;k[Y]=X}for(var H=new Float32Array(U),j=0;j<U;j++)H[j]=r[n[j]];var W=0;for(j=0;j<U;j++)W+=k[j]*H[j];return W+.5|0},P._$br=function(t,e,i,r){var o=e._$Q2(t,i),n=t._$vs(),s=t._$Tr();if(e._$zr(n,s,o),o<=0)return r[n[0]];if(1==o){return(a=r[n[0]])+((_=r[n[1]])-a)*(u=s[0])}if(2==o){var a=r[n[0]],_=r[n[1]],h=r[n[2]],l=r[n[3]],u=s[0];return(1-(T=s[1]))*(a+(_-a)*u)+T*(h+(l-h)*u)}if(3==o){var $=r[n[0]],p=r[n[1]],c=r[n[2]],f=r[n[3]],d=r[n[4]],g=r[n[5]],y=r[n[6]],m=r[n[7]],T=(u=s[0],s[1]);return(1-(N=s[2]))*((1-T)*($+(p-$)*u)+T*(c+(f-c)*u))+N*((1-T)*(d+(g-d)*u)+T*(y+(m-y)*u))}if(4==o){var v=r[n[0]],P=r[n[1]],S=r[n[2]],L=r[n[3]],E=r[n[4]],w=r[n[5]],M=r[n[6]],x=r[n[7]],A=r[n[8]],b=r[n[9]],I=r[n[10]],O=r[n[11]],D=r[n[12]],R=r[n[13]],F=r[n[14]],C=r[n[15]],N=(u=s[0],T=s[1],s[2]),B=s[3];return(1-B)*((1-N)*((1-T)*(v+(P-v)*u)+T*(S+(L-S)*u))+N*((1-T)*(E+(w-E)*u)+T*(M+(x-M)*u)))+B*((1-N)*((1-T)*(A+(b-A)*u)+T*(I+(O-I)*u))+N*((1-T)*(D+(R-D)*u)+T*(F+(C-F)*u)))}for(var G=1<<o,U=new Float32Array(G),k=0;k<G;k++){for(var Y=k,V=1,X=0;X<o;X++)V*=Y%2==0?1-s[X]:s[X],Y/=2;U[k]=V}for(var z=new Float32Array(G),H=0;H<G;H++)z[H]=r[n[H]];var j=0;for(H=0;H<G;H++)j+=U[H]*z[H];return j},P._$Vr=function(t,e,i,r,o,n,s,a){var _=e._$Q2(t,i),h=t._$vs(),l=t._$Tr();e._$zr(h,l,_);var u=2*r,$=s;if(_<=0){var p=o[h[0]];if(2==a&&0==s)x._$jT(p,0,n,0,u);else for(var c=0;c<u;)n[$]=p[c++],n[$+1]=p[c++],$+=a}else if(1==_){p=o[h[0]];var f=o[h[1]],d=1-(m=l[0]);for(c=0;c<u;)n[$]=p[c]*d+f[c]*m,++c,n[$+1]=p[c]*d+f[c]*m,++c,$+=a}else if(2==_){p=o[h[0]],f=o[h[1]];var g=o[h[2]],y=o[h[3]],m=l[0],T=(Y=1-(D=l[1]))*(d=1-m),v=Y*m,P=D*d,S=D*m;for(c=0;c<u;)n[$]=T*p[c]+v*f[c]+P*g[c]+S*y[c],++c,n[$+1]=T*p[c]+v*f[c]+P*g[c]+S*y[c],++c,$+=a}else if(3==_){var L=o[h[0]],E=o[h[1]],w=o[h[2]],M=o[h[3]],A=o[h[4]],b=o[h[5]],I=o[h[6]],O=o[h[7]],D=(m=l[0],l[1]),R=(V=1-(st=l[2]))*(Y=1-D)*(d=1-m),F=V*Y*m,C=V*D*d,N=V*D*m,B=st*Y*d,G=st*Y*m,U=st*D*d,k=st*D*m;for(c=0;c<u;)n[$]=R*L[c]+F*E[c]+C*w[c]+N*M[c]+B*A[c]+G*b[c]+U*I[c]+k*O[c],++c,n[$+1]=R*L[c]+F*E[c]+C*w[c]+N*M[c]+B*A[c]+G*b[c]+U*I[c]+k*O[c],++c,$+=a}else if(4==_){var Y,V,X=o[h[0]],z=o[h[1]],H=o[h[2]],j=o[h[3]],W=o[h[4]],q=o[h[5]],J=o[h[6]],Q=o[h[7]],Z=o[h[8]],K=o[h[9]],tt=o[h[10]],et=o[h[11]],it=o[h[12]],rt=o[h[13]],ot=o[h[14]],nt=o[h[15]],st=(m=l[0],D=l[1],l[2]),at=l[3],_t=1-at,ht=_t*(V=1-st)*(Y=1-D)*(d=1-m),lt=_t*V*Y*m,ut=_t*V*D*d,$t=_t*V*D*m,pt=_t*st*Y*d,ct=_t*st*Y*m,ft=_t*st*D*d,dt=_t*st*D*m,gt=at*V*Y*d,yt=at*V*Y*m,mt=at*V*D*d,Tt=at*V*D*m,vt=at*st*Y*d,Pt=at*st*Y*m,St=at*st*D*d,Lt=at*st*D*m;for(c=0;c<u;)n[$]=ht*X[c]+lt*z[c]+ut*H[c]+$t*j[c]+pt*W[c]+ct*q[c]+ft*J[c]+dt*Q[c]+gt*Z[c]+yt*K[c]+mt*tt[c]+Tt*et[c]+vt*it[c]+Pt*rt[c]+St*ot[c]+Lt*nt[c],++c,n[$+1]=ht*X[c]+lt*z[c]+ut*H[c]+$t*j[c]+pt*W[c]+ct*q[c]+ft*J[c]+dt*Q[c]+gt*Z[c]+yt*K[c]+mt*tt[c]+Tt*et[c]+vt*it[c]+Pt*rt[c]+St*ot[c]+Lt*nt[c],++c,$+=a}else{for(var Et=1<<_,wt=new Float32Array(Et),Mt=0;Mt<Et;Mt++){for(var xt=Mt,At=1,bt=0;bt<_;bt++)At*=xt%2==0?1-l[bt]:l[bt],xt/=2;wt[Mt]=At}for(var It=new Float32Array(Et),Ot=0;Ot<Et;Ot++)It[Ot]=o[h[Ot]];for(c=0;c<u;){var Dt=0,Rt=0,Ft=c+1;for(Ot=0;Ot<Et;Ot++)Dt+=wt[Ot]*It[Ot][c],Rt+=wt[Ot]*It[Ot][Ft];c+=2,n[$]=Dt,n[$+1]=Rt,$+=a}}};function S(){i||(this.x=null,this.y=null)}S.prototype._$HT=function(t,e){this.x=t,this.y=e},S.prototype._$HT=function(t){this.x=t.x,this.y=t.y};function L(){i||(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)}L._$ur=-2,L._$ES=500,L._$wb=2,L._$8S=3,L._$52=L._$ES,L._$R2=L._$ES,L._$or=function(){return L._$52},L._$Pr=function(){return L._$R2},L.prototype.convertClipIDForV2_11=function(t){var e=[];return null==t?null:0==t.length?null:/,/.test(t)?e=t.id.split(","):(e.push(t.id),e)},L.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)},L.prototype.getClipIDList=function(){return this.clipIDList},L.prototype.init=function(t){},L.prototype._$Nr=function(t,e){if(e._$IS[0]=!1,e._$Us=P._$Z2(t,this._$GS,e._$IS,this._$Lb),at._$Zs);else if(e._$IS[0])return;e._$7s=P._$br(t,this._$GS,e._$IS,this._$mS)},L.prototype._$2b=function(t,e){},L.prototype.getDrawDataID=function(){return this._$gP},L.prototype._$j2=function(t){this._$gP=t},L.prototype.getOpacity=function(t,e){return e._$7s},L.prototype._$zS=function(t,e){return e._$Us},L.prototype._$MS=function(t){for(var e=t.length-1;e>=0;--e){var i=t[e];i<L._$52?L._$52=i:i>L._$R2&&(L._$R2=i)}},L.prototype.getTargetBaseDataID=function(){return this._$dr},L.prototype._$gs=function(t){this._$dr=t},L.prototype._$32=function(){return null!=this._$dr&&this._$dr!=gt._$2o()},L.prototype.preDraw=function(t,e,i){},L.prototype.draw=function(t,e,i){},L.prototype.getType=function(){},L.prototype._$B2=function(t,e,i){};function E(){i||(this._$Eb=E._$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=E.CLIPPING_PROCESS_NONE,this.clipBufPre_clipContextMask=null,this.clipBufPre_clipContextDraw=null,this.CHANNEL_COLORS=new Array)}E._$ps=32,E.CLIPPING_PROCESS_NONE=0,E.CLIPPING_PROCESS_OVERWRITE_ALPHA=1,E.CLIPPING_PROCESS_MULTIPLY_ALPHA=2,E.CLIPPING_PROCESS_DRAW=3,E.CLIPPING_PROCESS_CLEAR_ALPHA=4,E.prototype.setChannelFlagAsColor=function(t,e){this.CHANNEL_COLORS[t]=e},E.prototype.getChannelFlagAsColor=function(t){return this.CHANNEL_COLORS[t]},E.prototype._$ZT=function(){},E.prototype._$Uo=function(t,e,i,r,o,n,s){},E.prototype._$Rs=function(){return-1},E.prototype._$Ds=function(t){},E.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},E.prototype._$WP=function(t){this.culling=t},E.prototype.setMatrix=function(t){for(var e=0;e<16;e++)this.matrix4x4[e]=t[e]},E.prototype._$IT=function(){return this.matrix4x4},E.prototype.setPremultipliedAlpha=function(t){this.premultipliedAlpha=t},E.prototype.isPremultipliedAlpha=function(){return this.premultipliedAlpha},E.prototype.setAnisotropy=function(t){this.anisotropy=t},E.prototype.getAnisotropy=function(){return this.anisotropy},E.prototype.getClippingProcess=function(){return this.clippingProcess},E.prototype.setClippingProcess=function(t){this.clippingProcess=t},E.prototype.setClipBufPre_clipContextForMask=function(t){this.clipBufPre_clipContextMask=t},E.prototype.getClipBufPre_clipContextMask=function(){return this.clipBufPre_clipContextMask},E.prototype.setClipBufPre_clipContextForDraw=function(t){this.clipBufPre_clipContextDraw=t},E.prototype.getClipBufPre_clipContextDraw=function(){return this.clipBufPre_clipContextDraw};function w(){i||(this.a=1,this.r=1,this.g=1,this.b=1,this.scale=1,this._$ho=1,this.blendMode=at.L2D_COLOR_BLEND_MODE_MULT)}function M(){i||(this._$kP=null,this._$dr=null,this._$Ai=!0,this._$mS=null)}M._$ur=-2,M._$c2=1,M._$_b=2,M.prototype._$F0=function(t){this._$kP=t._$nP(),this._$dr=t._$nP()},M.prototype.readV2_opacity=function(t){t.getFormatVersion()>=G.LIVE2D_FORMAT_VERSION_V2_10_SDK2&&(this._$mS=t._$Tb())},M.prototype.init=function(t){},M.prototype._$Nr=function(t,e){},M.prototype.interpolateOpacity=function(t,e,i,r){null==this._$mS?i.setInterpolatedOpacity(1):i.setInterpolatedOpacity(P._$br(t,e,r,this._$mS))},M.prototype._$2b=function(t,e){},M.prototype._$nb=function(t,e,i,r,o,n,s){},M.prototype.getType=function(){},M.prototype._$gs=function(t){this._$dr=t},M.prototype._$a2=function(t){this._$kP=t},M.prototype.getTargetBaseDataID=function(){return this._$dr},M.prototype.getBaseDataID=function(){return this._$kP},M.prototype._$32=function(){return null!=this._$dr&&this._$dr!=gt._$2o()};function x(){}x._$W2=0,x._$CS=x._$W2,x._$Mo=function(){return!0},x._$XP=function(t){try{for(var e=getTimeMSec();getTimeMSec()-e<t;);}catch(t){t._$Rb()}},x.getUserTimeMSec=function(){return x._$CS==x._$W2?x.getSystemTimeMSec():x._$CS},x.setUserTimeMSec=function(t){x._$CS=t},x.updateUserTimeMSec=function(){return x._$CS=x.getSystemTimeMSec()},x.getTimeMSec=function(){return(new Date).getTime()},x.getSystemTimeMSec=function(){return(new Date).getTime()},x._$Q=function(t){},x._$jT=function(t,e,i,r,o){for(var n=0;n<o;n++)i[r+n]=t[e+n]};function A(){i||(this._$VP=0,this._$wL=null,this._$GP=null,this._$8o=A._$ds,this._$2r=-1,this._$O2=0,this._$ri=0)}A._$ds=-2,A.prototype._$F0=function(t){this._$wL=t._$nP(),this._$VP=t._$6L(),this._$GP=t._$nP()},A.prototype.getParamIndex=function(t){return this._$2r!=t&&(this._$8o=A._$ds),this._$8o},A.prototype._$Pb=function(t,e){this._$8o=t,this._$2r=e},A.prototype.getParamID=function(){return this._$wL},A.prototype._$yP=function(t){this._$wL=t},A.prototype._$N2=function(){return this._$VP},A.prototype._$d2=function(){return this._$GP},A.prototype._$t2=function(t,e){this._$VP=t,this._$GP=e},A.prototype._$Lr=function(){return this._$O2},A.prototype._$wr=function(t){this._$O2=t},A.prototype._$SL=function(){return this._$ri},A.prototype._$AL=function(t){this._$ri=t};function b(){}b.startsWith=function(t,e,i){var r=e+i.length;if(r>=t.length)return!1;for(var o=e;o<r;o++)if(b.getChar(t,o)!=i.charAt(o-e))return!1;return!0},b.getChar=function(t,e){return String.fromCharCode(t.getUint8(e))},b.createString=function(t,e,i){for(var r=new ArrayBuffer(2*i),o=new Uint16Array(r),n=0;n<i;n++)o[n]=t.getUint8(e+n);return String.fromCharCode.apply(null,o)},b._$LS=function(t,e,i,r){t instanceof ArrayBuffer&&(t=new DataView(t));var o=i,n=!1,s=!1,a=0,_=b.getChar(t,o);"-"==_&&(n=!0,o++);for(var h=!1;o<e;o++){switch(_=b.getChar(t,o)){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".":s=!0,o++,h=!0;break;default:h=!0}if(h)break}if(s)for(var l=.1,u=!1;o<e;o++){switch(_=b.getChar(t,o)){case"0":break;case"1":a+=1*l;break;case"2":a+=2*l;break;case"3":a+=3*l;break;case"4":a+=4*l;break;case"5":a+=5*l;break;case"6":a+=6*l;break;case"7":a+=7*l;break;case"8":a+=8*l;break;case"9":a+=9*l;break;default:u=!0}if(l*=.1,u)break}return n&&(a=-a),r[0]=o,a};function I(){i||(this._$Ob=null)}I.prototype._$zP=function(){this._$Ob=new Array},I.prototype._$F0=function(t){this._$Ob=t._$nP()},I.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==A._$ds&&(r=t.getParamIndex(this._$Ob[i].getParamID())),t._$Xb(r))return!0}return!1},I.prototype._$Q2=function(t,e){for(var i,r,o=this._$Ob.length,n=t._$v2(),s=0,a=0;a<o;a++){var _=this._$Ob[a];if((i=_.getParamIndex(n))==A._$ds&&(i=t.getParamIndex(_.getParamID()),_._$Pb(i,n)),i<0)throw new Exception("err 23242 : "+_.getParamID());var h=i<0?0:t.getParamFloat(i);r=_._$N2();var l,u,$=_._$d2(),p=-1,c=0;if(r<1);else if(1==r)(l=$[0])-B._$J<h&&h<l+B._$J?(p=0,c=0):(p=0,e[0]=!0);else if(h<(l=$[0])-B._$J)p=0,e[0]=!0;else if(h<l+B._$J)p=0;else{for(var f=!1,d=1;d<r;++d){if(h<(u=$[d])+B._$J){u-B._$J<h?p=d:(p=d-1,c=(h-l)/(u-l),s++),f=!0;break}l=u}f||(p=r-1,c=0,e[0]=!0)}_._$wr(p),_._$AL(c)}return s},I.prototype._$zr=function(t,e,i){var r=1<<i;r+1>B._$Qb&&console.log("err 23245\n");for(var o=this._$Ob.length,n=1,s=1,a=0,_=0;_<r;++_)t[_]=0;for(var h=0;h<o;++h){var l=this._$Ob[h];if(0==l._$SL()){if((u=l._$Lr()*n)<0&&at._$3T)throw new Exception("err 23246");for(_=0;_<r;++_)t[_]+=u}else{var u=n*l._$Lr(),$=n*(l._$Lr()+1);for(_=0;_<r;++_)t[_]+=(_/s|0)%2==0?u:$;e[a++]=l._$SL(),s*=2}n*=l._$N2()}t[r]=65535,e[a]=-1},I.prototype._$h2=function(t,e,i){for(var r=new Float32Array(e),o=0;o<e;++o)r[o]=i[o];var n=new A;n._$yP(t),n._$t2(e,r),this._$Ob.push(n)},I.prototype._$J2=function(t){for(var e=t,i=this._$Ob.length,r=0;r<i;++r){var o=this._$Ob[r],n=o._$N2(),s=e%o._$N2(),a=o._$d2()[s];console.log("%s[%d]=%7.2f / ",o.getParamID(),s,a),e/=n}console.log("\n")},I.prototype.getParamCount=function(){return this._$Ob.length},I.prototype._$zs=function(){return this._$Ob};function O(){this.m=new Float32Array(16),this.identity()}O.prototype.identity=function(){for(var t=0;t<16;t++)this.m[t]=t%5==0?1:0},O.prototype.getArray=function(){return this.m},O.prototype.getCopyMatrix=function(){return new Float32Array(this.m)},O.prototype.setMatrix=function(t){if(null!=t&&16==t.length)for(var e=0;e<16;e++)this.m[e]=t[e]},O.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)},O.prototype.mult_safe=function(t,e,i,r){if(t==i){var o=new Array(16);this.mult_fast(t,e,o,r);for(var n=15;n>=0;--n)i[n]=o[n]}else this.mult_fast(t,e,i,r)},O.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])},O.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]},O.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},O.prototype.rotateX=function(t){var e=St.fcos(t),i=St._$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},O.prototype.rotateY=function(t){var e=St.fcos(t),i=St._$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},O.prototype.rotateZ=function(t){var e=St.fcos(t),i=St._$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};function D(t){i||it.prototype.constructor.call(this,t)}D.prototype=new it,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};function R(){i||(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)}R._$kS=-1,R._$pS=0,R._$hb=1,R.STATE_IDENTITY=0,R._$gb=1,R._$fo=2,R._$go=4,R.prototype.transform=function(t,e,i){var r,o,n,s,a,_,h=0,l=0;switch(this._$hi){default:return;case R._$go|R._$fo|R._$gb:for(r=this._$7,o=this._$H,n=this._$k,s=this._$f,a=this._$g,_=this._$w;--i>=0;){var u=t[h++],$=t[h++];e[l++]=r*u+o*$+n,e[l++]=s*u+a*$+_}return;case R._$go|R._$fo:for(r=this._$7,o=this._$H,s=this._$f,a=this._$g;--i>=0;){u=t[h++],$=t[h++];e[l++]=r*u+o*$,e[l++]=s*u+a*$}return;case R._$go|R._$gb:for(o=this._$H,n=this._$k,s=this._$f,_=this._$w;--i>=0;){u=t[h++];e[l++]=o*t[h++]+n,e[l++]=s*u+_}return;case R._$go:for(o=this._$H,s=this._$f;--i>=0;){u=t[h++];e[l++]=o*t[h++],e[l++]=s*u}return;case R._$fo|R._$gb:for(r=this._$7,n=this._$k,a=this._$g,_=this._$w;--i>=0;)e[l++]=r*t[h++]+n,e[l++]=a*t[h++]+_;return;case R._$fo:for(r=this._$7,a=this._$g;--i>=0;)e[l++]=r*t[h++],e[l++]=a*t[h++];return;case R._$gb:for(n=this._$k,_=this._$w;--i>=0;)e[l++]=t[h++]+n,e[l++]=t[h++]+_;return;case R.STATE_IDENTITY:return void(t==e&&h==l||x._$jT(t,h,e,l,2*i))}},R.prototype.update=function(){0==this._$H&&0==this._$f?1==this._$7&&1==this._$g?0==this._$k&&0==this._$w?(this._$hi=R.STATE_IDENTITY,this._$Z=R._$pS):(this._$hi=R._$gb,this._$Z=R._$hb):0==this._$k&&0==this._$w?(this._$hi=R._$fo,this._$Z=R._$kS):(this._$hi=R._$fo|R._$gb,this._$Z=R._$kS):0==this._$7&&0==this._$g?0==this._$k&&0==this._$w?(this._$hi=R._$go,this._$Z=R._$kS):(this._$hi=R._$go|R._$gb,this._$Z=R._$kS):0==this._$k&&0==this._$w?(this._$hi=R._$go|R._$fo,this._$Z=R._$kS):(this._$hi=R._$go|R._$fo|R._$gb,this._$Z=R._$kS)},R.prototype._$RT=function(t){this._$IT(t);var e=t[0],i=t[2],r=t[1],o=t[3],n=Math.sqrt(e*e+r*r),s=e*o-i*r;0==n?at._$so&&console.log("affine._$RT() / rt==0"):(t[0]=n,t[1]=s/n,t[2]=(r*o+e*i)/s,t[3]=Math.atan2(r,e))},R.prototype._$ho=function(t,e,i,r){var o=new Float32Array(6),n=new Float32Array(6);t._$RT(o),e._$RT(n);var s=new Float32Array(6);s[0]=o[0]+(n[0]-o[0])*i,s[1]=o[1]+(n[1]-o[1])*i,s[2]=o[2]+(n[2]-o[2])*i,s[3]=o[3]+(n[3]-o[3])*i,s[4]=o[4]+(n[4]-o[4])*i,s[5]=o[5]+(n[5]-o[5])*i,r._$CT(s)},R.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()},R.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};function F(){i||(s.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())}F.prototype=new s,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 o=0;o<r;++o){var n=255&t[o];if("\n"!=n&&"\r"!=n)if("#"!=n)if("$"!=n){if("a"<=n&&n<="z"||"A"<=n&&n<="Z"||"_"==n){for(h=o,l=-1;o<r&&("\r"!=(n=255&t[o])&&"\n"!=n);++o)if("="==n){l=o;break}if(l>=0){var s=new N;b.startsWith(t,h,F._$cs)?(s._$RP=N._$hs,s._$4P=new String(t,h,l-h)):b.startsWith(t,h,F._$ar)?(s._$4P=new String(t,h+7,l-h-7),b.startsWith(t,h+7,"ANCHOR_X")?s._$RP=N._$xs:b.startsWith(t,h+7,"ANCHOR_Y")?s._$RP=N._$us:b.startsWith(t,h+7,"SCALE_X")?s._$RP=N._$qs:b.startsWith(t,h+7,"SCALE_Y")?s._$RP=N._$Ys:b.startsWith(t,h+7,"X")?s._$RP=N._$ws:b.startsWith(t,h+7,"Y")&&(s._$RP=N._$Ns)):(s._$RP=N._$Fr,s._$4P=new String(t,h,l-h)),e.motions.push(s);var a=0;for(F._$D2.clear(),o=l+1;o<r&&("\r"!=(n=255&t[o])&&"\n"!=n);++o)if(","!=n&&" "!=n&&"\t"!=n){$=b._$LS(t,r,o,i);if(i[0]>0){F._$D2.push($),a++;var _=i[0];if(_<o){console.log("_$n0 _$hi . @Live2DMotion loadMotion()\n");break}o=_}}s._$I0=F._$D2._$BL(),a>e._$yT&&(e._$yT=a)}}}else{for(var h=o,l=-1;o<r&&("\r"!=(n=255&t[o])&&"\n"!=n);++o)if("="==n){l=o;break}var u=!1;if(l>=0)for(l==h+4&&"f"==t[h+1]&&"p"==t[h+2]&&"s"==t[h+3]&&(u=!0),o=l+1;o<r&&("\r"!=(n=255&t[o])&&"\n"!=n);++o)if(","!=n&&" "!=n&&"\t"!=n){var $=b._$LS(t,r,o,i);i[0]>0&&u&&5<$&&$<121&&(e._$D0=$),o=i[0]}for(;o<r&&("\n"!=t[o]&&"\r"!=t[o]);++o);}else for(;o<r&&("\n"!=t[o]&&"\r"!=t[o]);++o);}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 o=(e-r._$z2)*this._$D0/1e3,n=0|o,s=o-n,a=0;a<this.motions.length;a++){var _=this.motions[a],h=_._$I0.length,l=_._$4P;if(_._$RP==N._$hs){var u=_._$I0[n>=h?h-1:n];t.setParamFloat(l,u)}else if(N._$ws<=_._$RP&&_._$RP<=N._$Ys);else{var $=t.getParamFloat(l),p=_._$I0[n>=h?h-1:n],c=$+(p+(_._$I0[n+1>=h?h-1:n+1]-p)*s-$)*i;t.setParamFloat(l,c)}}n>=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};function C(){this._$P=new Float32Array(100),this.size=0}C.prototype.clear=function(){this.size=0},C.prototype.add=function(t){if(this._$P.length<=this.size){var e=new Float32Array(2*this.size);x._$jT(this._$P,0,e,0,this.size),this._$P=e}this._$P[this.size++]=t},C.prototype._$BL=function(){var t=new Float32Array(this.size);return x._$jT(this._$P,0,t,0,this.size),t};function N(){this._$4P=null,this._$I0=null,this._$RP=null}N._$Fr=0,N._$hs=1,N._$ws=100,N._$Ns=101,N._$xs=102,N._$us=103,N._$qs=104,N._$Ys=105;function B(){}B._$Ms=1,B._$Qs=2,B._$i2=0,B._$No=2,B._$do=B._$Ms,B._$Ls=!0,B._$1r=5,B._$Qb=65,B._$J=1e-4,B._$FT=.001,B._$Ss=3;function G(){}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 Z;case 66:return new I;case 67:return new A;case 68:return new z;case 69:return new y;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 tt;case 136:return new u;case 137:return new rt;case 142:return new W}return G._$uT(t),null};function U(t){i||(this._$QT=!0,this._$co=-1,this._$qo=0,this._$pb=new Array(U._$is),this._$_2=new Float32Array(U._$is),this._$vr=new Float32Array(U._$is),this._$Rr=new Float32Array(U._$is),this._$Or=new Float32Array(U._$is),this._$fs=new Float32Array(U._$is),this._$Js=new Array(U._$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(B._$Qb),this._$ZP=new Float32Array(2*B._$1r),this._$Ri=t,this._$b0=U._$HP++,this.clipManager=null,this.dp_webgl=null)}U._$HP=0,U._$_0=!0,U._$V2=-1,U._$W0=-1,U._$jr=!1,U._$ZS=!0,U._$tr=-1e6,U._$lr=1e6,U._$is=32,U._$e=!1,U.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},U.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],o=r.getDrawDataID();null!=o&&(this._$Bo[o]=r)}}return this._$Bo[id]}return t<this._$aS.length?this._$aS[t]:null},U.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()},U.prototype.init=function(){this._$co++,this._$F2.length>0&&this.release();for(var t=this._$Ri.getModelImpl(),e=t._$Xr(),i=e.length,r=new Array,n=new Array,s=0;s<i;++s){var a=e[s];this._$F2.push(a),this._$Hr.push(a.init(this));for(var _=a.getBaseData(),h=_.length,l=0;l<h;++l)r.push(_[l]);for(l=0;l<h;++l){var u=_[l].init(this);u._$l2(s),n.push(u)}var $=a.getDrawData(),p=$.length;for(l=0;l<p;++l){var c=$[l],f=c.init(this);f._$IP=s,this._$aS.push(c),this._$8b.push(f)}}for(var d=r.length,g=gt._$2o();;){var y=!1;for(s=0;s<d;++s){var m=r[s];if(null!=m){var T=m.getTargetBaseDataID();(null==T||T==g||this.getBaseDataIndex(T)>=0)&&(this._$3S.push(m),this._$db.push(n[s]),r[s]=null,y=!0)}}if(!y)break}var v=t._$E2();if(null!=v){var P=v._$1s();if(null!=P){var S=P.length;for(s=0;s<S;++s){var L=P[s];null!=L&&this._$02(L.getParamID(),L.getDefaultValue(),L.getMinValue(),L.getMaxValue())}}}this.clipManager=new o(this.dp_webgl),this.clipManager.init(this,this._$aS,this._$8b),this._$QT=!0},U.prototype.update=function(){U._$e&&a.start("_$zL");for(var t=this._$_2.length,e=0;e<t;e++)this._$_2[e]!=this._$vr[e]&&(this._$Js[e]=U._$ZS,this._$vr[e]=this._$_2[e]);var i=this._$3S.length,r=this._$aS.length,o=j._$or(),n=j._$Pr()-o+1;(null==this._$Ws||this._$Ws.length<n)&&(this._$Ws=new Int16Array(n),this._$Vs=new Int16Array(n));for(e=0;e<n;e++)this._$Ws[e]=U._$V2,this._$Vs[e]=U._$V2;(null==this._$Er||this._$Er.length<r)&&(this._$Er=new Int16Array(r));for(e=0;e<r;e++)this._$Er[e]=U._$W0;U._$e&&a.dump("_$zL"),U._$e&&a.start("_$UL");for(var s=null,_=0;_<i;++_){var h=this._$3S[_],l=this._$db[_];try{h._$Nr(this,l),h._$2b(this,l)}catch(t){null==s&&(s=t)}}null!=s&&U._$_0&&a._$Rb(s),U._$e&&a.dump("_$UL"),U._$e&&a.start("_$DL");for(var u=null,$=0;$<r;++$){var p=this._$aS[$],c=this._$8b[$];try{if(p._$Nr(this,c),c._$u2())continue;p._$2b(this,c);var f,d=Math.floor(p._$zS(this,c)-o);try{f=this._$Vs[d]}catch(t){console.log("_$li :: %s / %s @@_$fS\n",t.toString(),p.getDrawDataID().toString()),d=Math.floor(p._$zS(this,c)-o);continue}f==U._$V2?this._$Ws[d]=$:this._$Er[f]=$,this._$Vs[d]=$}catch(t){null==u&&(u=t,at._$sT(at._$H7))}}null!=u&&U._$_0&&a._$Rb(u),U._$e&&a.dump("_$DL"),U._$e&&a.start("_$eL");for(e=this._$Js.length-1;e>=0;e--)this._$Js[e]=U._$jr;return this._$QT=!1,U._$e&&a.dump("_$eL"),!1},U.prototype.preDraw=function(t){null!=this.clipManager&&(t._$ZT(),this.clipManager.setupClip(this,t))},U.prototype.draw=function(t){if(null!=this._$Ws){var e=this._$Ws.length;t._$ZT();for(var i=0;i<e;++i){var r=this._$Ws[i];if(r!=U._$V2)for(;;){var o=this._$aS[r],n=this._$8b[r];if(n._$yo()){var s=n._$IP,_=this._$Hr[s];n._$VS=_.getPartsOpacity(),o.draw(t,this,n)}var h=this._$Er[r];if(h<=r||h==U._$W0)break;r=h}}}else a._$li("call _$Ri.update() before _$Ri.draw() ")},U.prototype.getParamIndex=function(t){for(var e=this._$pb.length-1;e>=0;--e)if(this._$pb[e]==t)return e;