},reset:function(){this.list.length=0,this.total=0},remove:function(a){varb=this.list.indexOf(a);returnb>-1?(this.list.splice(b,1),this.total--,a):void0},setAll:function(a,b){for(varc=this.list.length;c--;)this.list[c]&&this.list[c][a]&&(this.list[c][a]=b)},callAll:function(a){for(varb=Array.prototype.splice.call(arguments,1),c=this.list.length;c--;)this.list[c]&&this.list[c][a]&&this.list[c][a].apply(this.list[c],b)}},Object.defineProperty(b.ArrayList.prototype,"first",{get:function(){returnthis.position=0,this.total>0?this.list[0]:null}}),Object.defineProperty(b.ArrayList.prototype,"next",{get:function(){returnthis.position<this.total?(this.position++,this.list[this.position]):null}}),b.ArrayList.prototype.constructor=b.ArrayList,b.Signal=function(){this._bindings=[],this._prevParams=null;vara=this;this.dispatch=function(){b.Signal.prototype.dispatch.apply(a,arguments)}},b.Signal.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(a,b){if("function"!=typeofa)thrownewError("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",b))},_registerListener:function(a,c,d,e){varf,g=this._indexOfListener(a,d);if(-1!==g){if(f=this._bindings[g],f.isOnce()!==c)thrownewError("You cannot add"+(c?"":"Once")+"() then add"+(c?"Once":"")+"() the same listener without removing the relationship first.")}elsef=newb.SignalBinding(this,a,c,d,e),this._addBinding(f);returnthis.memorize&&this._prevParams&&f.execute(this._prevParams),f},_addBinding:function(a){varb=this._bindings.length;dob--;while(this._bindings[b]&&a._priority<=this._bindings[b]._priority);this._bindings.splice(b+1,0,a)},_indexOfListener:function(a,b){for(varc,d=this._bindings.length;d--;)if(c=this._bindings[d],c._listener===a&&c.context===b)returnd;return-1},has:function(a,b){return-1!==this._indexOfListener(a,b)},add:function(a,b,c){returnthis.validateListener(a,"add"),this._registerListener(a,!1,b,c)},addOnce:function(a,b,c){returnthis.validateListener(a,"addOnce"),this._registerListener(a,!0,b,c)},remove:function(a,b){this.validateListener(a,"remove");varc=this._indexOfListener(a,b);return-1!==c&&(this._bindings[c]._destroy(),this._bindings.splice(c,1)),a},removeAll:function(a){"undefined"==typeofa&&(a=null);for(varb=this._bindings.length;b--;)a?this._bindings[b].context===a&&(this._bindings[b]._destroy(),this._bindings.splice(b,1)):this._bindings[b]._destroy();a||(this._bindings.length=0)},getNumListeners:function(){returnthis._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){vara,b=Array.prototype.slice.call(arguments),c=this._bindings.length;if(this.memorize&&(this._prevParams=b),c){a=this._bindings.slice(),this._shouldPropagate=!0;doc--;while(a[c]&&this._shouldPropagate&&a[c].execute(b)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),deletethis._bindings,deletethis._prevParams},toString:function(){return"[Phaser.Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}},b.Signal.prototype.constructor=b.Signal,b.SignalBinding=function(a,b,c,d,e){this._listener=b,this._isOnce=c,this.context=d,this._signal=a,this._priority=e||0},b.SignalBinding.prototype={active:!0,params:null,execute:function(a){varb,c;returnthis.active&&this._listener&&(c=this.params?this.params.concat(a):a,b=this._listener.apply(this.context,c),this._isOnce&&this.detach()),b},detach:function(){returnthis.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){returnthis._isOnce},getListener:function(){returnthis._listener},getSignal:function(){returnthis._signal},_destroy:function(){deletethis._signal,deletethis._listener,deletethis.context},toString:function(){return"[Phaser.SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},b.SignalBinding.prototype.constructor=b.SignalBinding,b.Filter=function(a,c,d){this.game=a,this.type=b.WEBGL_FILTER,this.passes=[this],this.shaders=
},b.BitmapData.prototype.constructor=b.BitmapData,b.Sprite=function(a,c,d,e,f){c=c||0,d=d||0,e=e||null,f=f||null,this.game=a,this.name="",this.type=b.SPRITE,this.z=0,this.events=newb.Events(this),this.animations=newb.AnimationManager(this),this.key=e,PIXI.Sprite.call(this,PIXI.TextureCache.__default),this.position.set(c,d),this.world=newb.Point(c,d),this.autoCull=!1,this.input=null,this.body=null,this.alive=!0,this.health=1,this.lifespan=0,this.checkWorldBounds=!1,this.outOfBoundsKill=!1,this.debug=!1,this.cameraOffset=newb.Point,this.cropRect=null,this._cache=[0,0,0,0,1,0,1,0],this._crop=null,this._frame=null,this._bounds=newb.Rectangle,this.loadTexture(e,f)},b.Sprite.prototype=Object.create(PIXI.Sprite.prototype),b.Sprite.prototype.constructor=b.Sprite,b.Sprite.prototype.preUpdate=function(){if(1===this._cache[4]&&this.exists)returnthis.world.setTo(this.parent.position.x+this.position.x,this.parent.position.y+this.position.y),this.worldTransform.tx=this.world.x,this.worldTransform.ty=this.world.y,this._cache[0]=this.world.x,this._cache[1]=this.world.y,this._cache[2]=this.rotation,this.body&&this.body.preUpdate(),this._cache[4]=0,!1;if(this._cache[0]=this.world.x,this._cache[1]=this.world.y,this._cache[2]=this.rotation,!this.exists||!this.parent.exists)returnthis._cache[3]=-1,!1;if(this.lifespan>0&&(this.lifespan-=this.game.time.elapsed,this.lifespan<=0))returnthis.kill(),!1;if((this.autoCull||this.checkWorldBounds)&&this._bounds.copyFrom(this.getBounds()),this.autoCull&&(this.renderable=this.game.world.camera.screenView.intersects(this._bounds)),this.checkWorldBounds)if(1===this._cache[5]&&this.game.world.bounds.intersects(this._bounds))this._cache[5]=0,this.events.onEnterBounds.dispatch(this);elseif(0===this._cache[5]&&!this.game.world.bounds.intersects(this._bounds)&&(this._cache[5]=1,this.events.onOutOfBounds.dispatch(this),this.outOfBoundsKill))returnthis.kill(),!1;this.world.setTo(this.game.camera.x+this.worldTransform.tx,this.game.camera.y+this.worldTransform.ty),this.visible&&(this._cache[3]=this.game.stage.currentRenderOrderID++),this.animations.update(),this.body&&this.body.preUpdate();for(vara=0,b=this.children.length;b>a;a++)this.children[a].preUpdate();return!0},b.Sprite.prototype.update=function(){},b.Sprite.prototype.postUpdate=function(){this.keyinstanceofb.BitmapData&&this.key.render(),this.exists&&this.body&&this.body.postUpdate(),1===this._cache[7]&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y);for(vara=0,c=this.children.length;c>a;a++)this.children[a].postUpdate()},b.Sprite.prototype.loadTexture=function(a,c,d){c=c||0,(d||"undefined"==typeofd)&&this.animations.stop(),this.key=a;vare=!0,f=this.smoothed;ainstanceofb.RenderTexture?(this.key=a.key,this.setTexture(a)):ainstanceofb.BitmapData?(this.setTexture(a.texture),this.game.cache.getFrameData(a.key,b.Cache.BITMAPDATA)&&(e=!this.animations.loadFrameData(this.game.cache.getFrameData(a.key,b.Cache.BITMAPDATA),c))):ainstanceofPIXI.Texture?this.setTexture(a):null===a||"undefined"==typeofa?(this.key="__default",this.setTexture(PIXI.TextureCache[this.key])):"string"!=typeofa||this.game.cache.checkImageKey(a)?(this.setTexture(newPIXI.Texture(PIXI.BaseTextureCache[a])),e=!this.animations.loadFrameData(this.game.cache.getFrameData(a),c)):(console.warn("Texture with key '"+a+"' not found."),this.key="__missing",this.setTexture(PIXI.TextureCache[this.key])),this.texture.baseTexture.dirty(),e&&(this._frame=b.Rectangle.clone(this.texture.frame)),f||(this.smoothed=!1)},b.Sprite.prototype.setFrame=function(a){this._frame=a,this.texture.frame.x=a.x,this.texture.frame.y=a.y,this.texture.frame.width=a.width,this.texture.frame.height=a.height,this.texture.crop.x=a.x,this.texture.crop.y=a.y,this.texture.crop.width=a.width,this.texture.crop.height=a.height,a.trimmed?(this.texture.trim?(this.texture.trim.x=a.spriteSourceSizeX,this.texture.trim.y=a.spriteSourceSizeY,this.texture.trim.width=a.sourceSizeW,this.texture.trim
},b.Loader.TEXTURE_ATLAS_JSON_ARRAY=0,b.Loader.TEXTURE_ATLAS_JSON_HASH=1,b.Loader.TEXTURE_ATLAS_XML_STARLING=2,b.Loader.PHYSICS_LIME_CORONA_JSON=3,b.Loader.PHYSICS_PHASER_JSON=4,b.Loader.prototype={setPreloadSprite:function(a,c){c=c||0,this.preloadSprite={sprite:a,direction:c,width:a.width,height:a.height,rect:null},this.preloadSprite.rect=0===c?newb.Rectangle(0,0,1,a.height):newb.Rectangle(0,0,a.width,1),a.crop(this.preloadSprite.rect),a.visible=!0},checkKeyExists:function(a,b){if(this._fileList.length>0)for(varc=0;c<this._fileList.length;c++)if(this._fileList[c].type===a&&this._fileList[c].key===b)return!0;return!1},getAssetIndex:function(a,b){if(this._fileList.length>0)for(varc=0;c<this._fileList.length;c++)if(this._fileList[c].type===a&&this._fileList[c].key===b)returnc;return-1},getAsset:function(a,b){if(this._fileList.length>0)for(varc=0;c<this._fileList.length;c++)if(this._fileList[c].type===a&&this._fileList[c].key===b)return{index:c,file:this._fileList[c]};return!1},reset:function(){this.preloadSprite=null,this.isLoading=!1,this._packList.length=0,this._packIndex=0,this._fileList.length=0,this._fileIndex=0},addToFileList:function(a,b,c,d){vare={type:a,key:b,url:c,data:null,error:!1,loaded:!1};if("undefined"!=typeofd)for(varfind)e[f]=d[f];this.checkKeyExists(a,b)===!1&&this._fileList.push(e)},replaceInFileList:function(a,b,c,d){vare={type:a,key:b,url:c,data:null,error:!1,loaded:!1};if("undefined"!=typeofd)for(varfind)e[f]=d[f];varg=this.getAssetIndex(a,b);-1===g?this._fileList.push(e):this._fileList[g]=e},pack:function(a,b,c,d){return"undefined"==typeofb&&(b=null),"undefined"==typeofc&&(c=null),"undefined"==typeofd&&(d=this),null===b&&null===c?(console.warn("Phaser.Loader.pack - Both url and data are null. One must be set."),this):(c&&"string"==typeofc&&(c=JSON.parse(c)),this._packList.push({key:a,url:b,data:c,loaded:!1,error:!1,callbackContext:d}),this)},image:function(a,b,c){return"undefined"==typeofc&&(c=!1),c?this.replaceInFileList("image",a,b):this.addToFileList("image",a,b),this},text:function(a,b,c){return"undefined"==typeofc&&(c=!1),c?this.replaceInFileList("text",a,b):this.addToFileList("text",a,b),this},json:function(a,b,c){return"undefined"==typeofc&&(c=!1),c?this.replaceInFileList("json",a,b):this.addToFileList("json",a,b),this},xml:function(a,b,c){return"undefined"==typeofc&&(c=!1),c?this.replaceInFileList("xml",a,b):this.addToFileList("xml",a,b),this},script:function(a,b,c,d){return"undefined"==typeofc&&(c=!1),c!==!1&&"undefined"==typeofd&&(d=c),this.addToFileList("script",a,b,{callback:c,callbackContext:d}),this},binary:function(a,b,c,d){return"undefined"==typeofc&&(c=!1),c!==!1&&"undefined"==typeofd&&(d=c),this.addToFileList("binary",a,b,{callback:c,callbackContext:d}),this},spritesheet:function(a,b,c,d,e,f,g){return"undefined"==typeofe&&(e=-1),"undefined"==typeoff&&(f=0),"undefined"==typeofg&&(g=0),this.addToFileList("spritesheet",a,b,{frameWidth:c,frameHeight:d,frameMax:e,margin:f,spacing:g}),this},audio:function(a,b,c){return"undefined"==typeofc&&(c=!0),this.addToFileList("audio",a,b,{buffer:null,autoDecode:c}),this},audiosprite:function(a,b,c){returnthis.audio(a,b),this.json(a+"-audioatlas",c),this},tilemap:function(a,c,d,e){if("undefined"==typeofc&&(c=null),"undefined"==typeofd&&(d=null),"undefined"==typeofe&&(e=b.Tilemap.CSV),null==c&&null==d)returnconsole.warn("Phaser.Loader.tilemap - Both url and data are null. One must be set."),this;if(d){switch(e){caseb.Tilemap.CSV:break;caseb.Tilemap.TILED_JSON:"string"==typeofd&&(d=JSON.parse(d))}this.game.cache.addTilemap(a,null,d,e)}elsethis.addToFileList("tilemap",a,c,{format:e});returnthis},physics:function(a,c,d,e){return"undefined"==typeofc&&(c=null),"undefined"==typeofd&&(d=null),"undefined"==typeofe&&(e=b.Physics.LIME_CORONA_JSON),null==c&&null==d?(console.warn("Phaser.Loader.physics - Both url and data are null. One must be set."),this):(d?("string"==typeofd&&(d=JSON.parse(d)),this.game.cache.addPhysicsData(a,null,d,e)):this.addToFileList("physics",a,c,{format:e}),this)},bitmapFont:function(a,b,
b.exports.toByteArray=a,b.exports.fromByteArray=c}()},{}],4:[function(a,b,c){functiond(a){if(L&&K){varb,c=L(a);for(b=0;b<c.length;b+=1)K(a,c[b],{value:a[c[b]],writable:!1,enumerable:!1,configurable:!1})}}functione(a){functionb(b){K(a,b,{get:function(){returna._getter(b)},set:function(c){a._setter(b,c)},enumerable:!0,configurable:!1})}if(K){if(a.length>B)thrownewRangeError("Array too large for polyfill");varc;for(c=0;c<a.length;c+=1)b(c)}}functionf(a,b){varc=32-b;returna<<c>>c}functiong(a,b){varc=32-b;returna<<c>>>c}functionh(a){return[255&a]}functioni(a){returnf(a[0],8)}functionj(a){return[255&a]}functionk(a){returng(a[0],8)}functionl(a){returna=J(Number(a)),[0>a?0:a>255?255:255&a]}functionm(a){return[a>>8&255,255&a]}functionn(a){returnf(a[0]<<8|a[1],16)}functiono(a){return[a>>8&255,255&a]}functionp(a){returng(a[0]<<8|a[1],16)}functionq(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}functionr(a){returnf(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}functions(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}functiont(a){returng(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}functionu(a,b,c){functiond(a){varb=F(a),c=a-b;return.5>c?b:c>.5?b+1:b%2?b+1:b}vare,f,g,h,i,j,k,l=(1<<b-1)-1;for(a!==a?(f=(1<<b)-1,g=I(2,c-1),e=0):1/0===a||a===-1/0?(f=(1<<b)-1,g=0,e=0>a?1:0):0===a?(f=0,g=0,e=1/a===-1/0?1:0):(e=0>a,a=E(a),a>=I(2,1-l)?(f=H(F(G(a)/D),1023),g=d(a/I(2,f)*I(2,c)),g/I(2,c)>=2&&(f+=1,g=1),f>l?(f=(1<<b)-1,g=0):(f+=l,g-=I(2,c))):(f=0,g=d(a/I(2,1-l-c)))),i=[],h=c;h;h-=1)i.push(g%2?1:0),g=F(g/2);for(h=b;h;h-=1)i.push(f%2?1:0),f=F(f/2);for(i.push(e?1:0),i.reverse(),j=i.join(""),k=[];j.length;)k.push(parseInt(j.substring(0,8),2)),j=j.substring(8);returnk}functionv(a,b,c){vard,e,f,g,h,i,j,k,l=[];for(d=a.length;d;d-=1)for(f=a[d-1],e=8;e;e-=1)l.push(f%2?1:0),f>>=1;returnl.reverse(),g=l.join(""),h=(1<<b-1)-1,i=parseInt(g.substring(0,1),2)?-1:1,j=parseInt(g.substring(1,1+b),2),k=parseInt(g.substring(1+b),2),j===(1<<b)-1?0!==k?0/0:1/0*i:j>0?i*I(2,j-h)*(1+k/I(2,c)):0!==k?i*I(2,-(h-1))*(k/I(2,c)):0>i?-0:0}functionw(a){returnv(a,11,52)}functionx(a){returnu(a,11,52)}functiony(a){returnv(a,8,23)}functionz(a){returnu(a,8,23)}varA=void0,B=1e5,C=function(){vara=Object.prototype.toString,b=Object.prototype.hasOwnProperty;return{Class:function(b){returna.call(b).replace(/^\[object *|\]$/g,"")},HasProperty:function(a,b){returnbina},HasOwnProperty:function(a,c){returnb.call(a,c)},IsCallable:function(a){return"function"==typeofa},ToInt32:function(a){returna>>0},ToUint32:function(a){returna>>>0}}}(),D=Math.LN2,E=Math.abs,F=Math.floor,G=Math.log,H=Math.min,I=Math.pow,J=Math.round,K=Object.defineProperty||function(a,b,c){if(!a===Object(a))thrownewTypeError("Object.defineProperty called on non-object");returnC.HasProperty(c,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(a,b,c.get),C.HasProperty(c,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(a,b,c.set),C.HasProperty(c,"value")&&(a[b]=c.value),a},L=Object.getOwnPropertyNames||function(a){if(a!==Object(a))thrownewTypeError("Object.getOwnPropertyNames called on non-object");varb,c=[];for(bina)C.HasOwnProperty(a,b)&&c.push(b);returnc};!function(){functiona(a,c,g){varh;returnh=function(a,c,f){varg,i,j,k;if(arguments.length&&"number"!=typeofarguments[0])if("object"==typeofarguments[0]&&arguments[0].constructor===h)for(g=arguments[0],this.length=g.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=newb(this.byteLength),this.byteOffset=0,j=0;j<this.length;j+=1)this._setter(j,g._getter(j));elseif("object"!=typeofarguments[0]||(arguments[0]instanceofb||"ArrayBuffer"===C.Class(arguments[0]))){if("object"!=typeofarguments[0]||!(arguments[0]instanceofb||"ArrayBuffer"===C.Class(arguments[0])))thrownewTypeError("Unexpected argument type(s)");if(this.buffer=a,this.byteOffset=C.ToUint32(c),this.byteOffset>this.buffer.byteLength)thrownewRangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)thrownewRangeError("ArrayBufferlengthminusthebyteOffset
}},{"../math/vec2":31,"../objects/Body":32,"../utils/Utils":50,__browserify_Buffer:1,__browserify_process:2}],24:[function(a,b){functionc(a,b,c){e.call(this,a,b,-c,c),this.contactPointA=d.create(),this.contactPointB=d.create(),this.t=d.create(),this.contactEquations=[],this.shapeA=null,this.shapeB=null,this.frictionCoefficient=.3}{vard=(a("__browserify_process"),a("__browserify_Buffer"),a("../math/vec2")),e=a("./Equation");a("../utils/Utils")}b.exports=c,c.prototype=newe,c.prototype.constructor=c,c.prototype.setSlipForce=function(a){this.maxForce=a,this.minForce=-a},c.prototype.getSlipForce=function(){returnthis.maxForce},c.prototype.computeB=function(a,b,c){vare=(this.bodyA,this.bodyB,this.contactPointA),f=this.contactPointB,g=this.t,h=this.G;h[0]=-g[0],h[1]=-g[1],h[2]=-d.crossLength(e,g),h[3]=g[0],h[4]=g[1],h[5]=d.crossLength(f,g);vari=this.computeGW(),j=this.computeGiMf(),k=-i*b-c*j;returnk}},{"../math/vec2":31,"../utils/Utils":50,"./Equation":23,__browserify_Buffer:1,__browserify_process:2}],25:[function(a,b){functionc(a,b,c){c=c||{},d.call(this,a,b,-Number.MAX_VALUE,Number.MAX_VALUE),this.angle=c.angle||0;vare=this.G;e[2]=1,e[5]=-1}vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Equation")),e=a("../math/vec2");b.exports=c,c.prototype=newd,c.prototype.constructor=c;varf=e.create(),g=e.create(),h=e.fromValues(1,0),i=e.fromValues(0,1);c.prototype.computeGq=function(){returne.rotate(f,h,this.bodyA.angle+this.angle),e.rotate(g,i,this.bodyB.angle),e.dot(f,g)}},{"../math/vec2":31,"./Equation":23,__browserify_Buffer:1,__browserify_process:2}],26:[function(a,b){functionc(a,b){d.call(this,a,b,-Number.MAX_VALUE,Number.MAX_VALUE),this.relativeVelocity=1,this.ratio=1}{vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Equation"));a("../math/vec2")}b.exports=c,c.prototype=newd,c.prototype.constructor=c,c.prototype.computeB=function(a,b,c){vard=this.G;d[2]=-1,d[5]=this.ratio;vare=this.computeGiMf(),f=this.computeGW(),g=-f*b-c*e;returng}},{"../math/vec2":31,"./Equation":23,__browserify_Buffer:1,__browserify_process:2}],27:[function(a,b){varc=(a("__browserify_process"),a("__browserify_Buffer"),function(){});b.exports=c,c.prototype={constructor:c,on:function(a,b,c){b.context=c||this,void0===this._listeners&&(this._listeners={});vard=this._listeners;returnvoid0===d[a]&&(d[a]=[]),-1===d[a].indexOf(b)&&d[a].push(b),this},has:function(a,b){if(void0===this._listeners)return!1;varc=this._listeners;if(b){if(void0!==c[a]&&-1!==c[a].indexOf(b))return!0}elseif(void0!==c[a])return!0;return!1},off:function(a,b){if(void0===this._listeners)returnthis;varc=this._listeners,d=c[a].indexOf(b);return-1!==d&&c[a].splice(d,1),this},emit:function(a){if(void0===this._listeners)returnthis;varb=this._listeners,c=b[a.type];if(void0!==c){a.target=this;for(vard=0,e=c.length;e>d;d++){varf=c[d];f.call(f.context,a)}}returnthis}}},{__browserify_Buffer:1,__browserify_process:2}],28:[function(a,b){functionc(a,b,f){if(f=f||{},!(ainstanceofd&&binstanceofd))thrownewError("First two arguments must be Material instances.");this.id=c.idCounter++,this.materialA=a,this.materialB=b,this.friction="undefined"!=typeoff.friction?Number(f.friction):.3,this.restitution="undefined"!=typeoff.restitution?Number(f.restitution):0,this.stiffness="undefined"!=typeoff.stiffness?Number(f.stiffness):e.DEFAULT_STIFFNESS,this.relaxation="undefined"!=typeoff.relaxation?Number(f.relaxation):e.DEFAULT_RELAXATION,this.frictionStiffness="undefined"!=typeoff.frictionStiffness?Number(f.frictionStiffness):e.DEFAULT_STIFFNESS,this.frictionRelaxation="undefined"!=typeoff.frictionRelaxation?Number(f.frictionRelaxation):e.DEFAULT_RELAXATION,this.surfaceVelocity="undefined"!=typeoff.surfaceVelocity?Number(f.surfaceVelocity):0,this.contactSkinSize=.005}vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Material")),e=a("../equations/Equation");b.exports=c,c.idCounter=0},{"../equations/Equation":23,"./Material":29,__browserify_Buffer:1,__browserify_process:2}],29:[function(a,b){functionc(a){this.id=a||c.idCounter++}a("
b.exports=c,c.prototype=newd,c.prototype.solve=function(){thrownewError("Solver.solve should be implemented by subclasses!")};vare={bodies:[]};c.prototype.solveIsland=function(a,b){this.removeAllEquations(),b.equations.length&&(this.addEquations(b.equations),e.bodies.length=0,b.getBodies(e.bodies),e.bodies.length&&this.solve(a,e))},c.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},c.prototype.addEquation=function(a){a.enabled&&this.equations.push(a)},c.prototype.addEquations=function(a){for(varb=0,c=a.length;b!==c;b++){vard=a[b];d.enabled&&this.equations.push(d)}},c.prototype.removeEquation=function(a){varb=this.equations.indexOf(a);-1!==b&&this.equations.splice(b,1)},c.prototype.removeAllEquations=function(){this.equations.length=0},c.GS=1,c.ISLAND=2},{"../events/EventEmitter":27,"../utils/Utils":50,__browserify_Buffer:1,__browserify_process:2}],48:[function(a,b){functionc(){this.overlappingShapesLastState=newe,this.overlappingShapesCurrentState=newe,this.recordPool=[],this.tmpDict=newe,this.tmpArray1=[]}functiond(a,b,c,d){this.shapeA=b,this.shapeB=d,this.bodyA=a,this.bodyB=c}{vare=(a("__browserify_process"),a("__browserify_Buffer"),a("./TupleDictionary"));a("./Utils")}b.exports=c,c.prototype.tick=function(){for(vara=this.overlappingShapesLastState,b=this.overlappingShapesCurrentState,c=a.keys.length;c--;){vard=a.keys[c],e=a.getByKey(d),f=b.getByKey(d);e&&!f&&this.recordPool.push(e)}a.reset(),a.copy(b),b.reset()},c.prototype.setOverlapping=function(a,b,c,e){varf=(this.overlappingShapesLastState,this.overlappingShapesCurrentState);if(!f.get(b.id,e.id)){varg;this.recordPool.length?(g=this.recordPool.pop(),g.set(a,b,c,e)):g=newd(a,b,c,e),f.set(b.id,e.id,g)}},c.prototype.getNewOverlaps=function(a){returnthis.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,a)},c.prototype.getEndOverlaps=function(a){returnthis.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,a)},c.prototype.bodiesAreOverlapping=function(a,b){for(varc=this.overlappingShapesCurrentState,d=c.keys.length;d--;){vare=c.keys[d],f=c.data[e];if(f.bodyA===a&&f.bodyB===b||f.bodyA===b&&f.bodyB===a)return!0}return!1},c.prototype.getDiff=function(a,b,c){varc=c||[],d=a,e=b;c.length=0;for(varf=e.keys.length;f--;){varg=e.keys[f],h=e.data[g];if(!h)thrownewError("Key "+g+" had no data!");vari=d.data[g];i||c.push(h)}returnc},c.prototype.isNewOverlap=function(a,b){varc=0|a.id,d=0|b.id,e=this.overlappingShapesLastState,f=this.overlappingShapesCurrentState;return!e.get(c,d)&&!!f.get(c,d)},c.prototype.getNewBodyOverlaps=function(a){this.tmpArray1.length=0;varb=this.getNewOverlaps(this.tmpArray1);returnthis.getBodyDiff(b,a)},c.prototype.getEndBodyOverlaps=function(a){this.tmpArray1.length=0;varb=this.getEndOverlaps(this.tmpArray1);returnthis.getBodyDiff(b,a)},c.prototype.getBodyDiff=function(a,b){b=b||[];for(varc=this.tmpDict,d=a.length;d--;){vare=a[d];c.set(0|e.bodyA.id,0|e.bodyB.id,e)}for(d=c.keys.length;d--;){vare=c.getByKey(c.keys[d]);e&&b.push(e.bodyA,e.bodyB)}returnc.reset(),b},d.prototype.set=function(a,b,c,e){d.call(this,a,b,c,e)}},{"./TupleDictionary":49,"./Utils":50,__browserify_Buffer:1,__browserify_process:2}],49:[function(a,b){functionc(){this.data={},this.keys=[]}vard=(a("__browserify_process"),a("__browserify_Buffer"),a("./Utils"));b.exports=c,c.prototype.getKey=function(a,b){returna=0|a,b=0|b,(0|a)===(0|b)?-1:0|((0|a)>(0|b)?a<<16|65535&b:b<<16|65535&a)},c.prototype.getByKey=function(a){returna=0|a,this.data[a]},c.prototype.get=function(a,b){returnthis.data[this.getKey(a,b)]},c.prototype.set=function(a,b,c){if(!c)thrownewError("No data!");vard=this.getKey(a,b);returnthis.data[d]||this.keys.push(d),this.data[d]=c,d},c.prototype.reset=function(){for(vara=this.data,b=this.keys,c=b.length;c--;)deletea[b[c]];b.length=0},c.prototype.copy=function(a){this.reset(),d.appendArray(this.keys,a.keys);for(varb=a.keys.length;b--;){varc=a.keys[b];this.data[c]=a.data[c]}}},{"./Utils":50,__browserify_Buffer:1,__browserify_
},getBodies:function(){for(vara=[],b=this.world.bodies.length;b--;)a.push(this.world.bodies[b].parent);returna},getBody:function(a){returnainstanceofp2.Body?a:ainstanceofPhaser.Physics.P2.Body?a.data:a.body&&a.body.type===Phaser.Physics.P2JS?a.body.data:null},getSprings:function(){for(vara=[],b=this.world.springs.length;b--;)a.push(this.world.springs[b].parent);returna},getConstraints:function(){for(vara=[],b=this.world.constraints.length;b--;)a.push(this.world.constraints[b].parent);returna},hitTest:function(a,b,c,d){"undefined"==typeofb&&(b=this.world.bodies),"undefined"==typeofc&&(c=5),"undefined"==typeofd&&(d=!1);for(vare=[this.pxmi(a.x),this.pxmi(a.y)],f=[],g=b.length;g--;)b[g]instanceofPhaser.Physics.P2.Body&&(!d||b[g].data.type!==p2.Body.STATIC)?f.push(b[g].data):b[g]instanceofp2.Body&&b[g].parent&&(!d||b[g].type!==p2.Body.STATIC)?f.push(b[g]):b[g]instanceofPhaser.Sprite&&b[g].hasOwnProperty("body")&&(!d||b[g].body.data.type!==p2.Body.STATIC)&&f.push(b[g].body.data);returnthis.world.hitTest(e,f,c)},toJSON:function(){returnthis.world.toJSON()},createCollisionGroup:function(a){varb=Math.pow(2,this._collisionGroupID);this.walls.left&&(this.walls.left.shapes[0].collisionMask=this.walls.left.shapes[0].collisionMask|b),this.walls.right&&(this.walls.right.shapes[0].collisionMask=this.walls.right.shapes[0].collisionMask|b),this.walls.top&&(this.walls.top.shapes[0].collisionMask=this.walls.top.shapes[0].collisionMask|b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionMask=this.walls.bottom.shapes[0].collisionMask|b),this._collisionGroupID++;varc=newPhaser.Physics.P2.CollisionGroup(b);returnthis.collisionGroups.push(c),a&&this.setCollisionGroup(a,c),c},setCollisionGroup:function(a,b){if(ainstanceofPhaser.Group)for(varc=0;c<a.total;c++)a.children[c].body&&a.children[c].body.type===Phaser.Physics.P2JS&&a.children[c].body.setCollisionGroup(b);elsea.body.setCollisionGroup(b)},createSpring:function(a,b,c,d,e,f,g,h,i){returna=this.getBody(a),b=this.getBody(b),a&&b?this.addSpring(newPhaser.Physics.P2.Spring(this,a,b,c,d,e,f,g,h,i)):voidconsole.warn("Cannot create Spring, invalid body objects given")},createRotationalSpring:function(a,b,c,d,e){returna=this.getBody(a),b=this.getBody(b),a&&b?this.addSpring(newPhaser.Physics.P2.RotationalSpring(this,a,b,c,d,e)):voidconsole.warn("Cannot create Rotational Spring, invalid body objects given")},createBody:function(a,b,c,d,e,f){"undefined"==typeofd&&(d=!1);varg=newPhaser.Physics.P2.Body(this.game,null,a,b,c);if(f){varh=g.addPolygon(e,f);if(!h)return!1}returnd&&this.world.addBody(g.data),g},createParticle:function(a,b,c,d,e,f){"undefined"==typeofd&&(d=!1);varg=newPhaser.Physics.P2.Body(this.game,null,a,b,c);if(f){varh=g.addPolygon(e,f);if(!h)return!1}returnd&&this.world.addBody(g.data),g},convertCollisionObjects:function(a,b,c){"undefined"==typeofc&&(c=!0);for(vard=[],e=0,f=a.collision[b].length;f>e;e++){varg=a.collision[b][e],h=this.createBody(g.x,g.y,0,c,{},g.polyline);h&&d.push(h)}returnd},clearTilemapLayerBodies:function(a,b){b=a.getLayer(b);for(varc=a.layers[b].bodies.length;c--;)a.layers[b].bodies[c].destroy();a.layers[b].bodies.length=0},convertTilemap:function(a,b,c,d){b=a.getLayer(b),"undefined"==typeofc&&(c=!0),"undefined"==typeofd&&(d=!0),this.clearTilemapLayerBodies(a,b);for(vare=0,f=0,g=0,h=0,i=a.layers[b].height;i>h;h++){e=0;for(varj=0,k=a.layers[b].width;k>j;j++){varl=a.layers[b].data[h][j];if(l&&l.index>-1&&l.collides)if(d){varm=a.getTileRight(b,j,h);if(0===e&&(f=l.x*l.width,g=l.y*l.height,e=l.width),m&&m.collides)e+=l.width;else{varn=this.createBody(f,g,0,!1);n.addRectangle(e,l.height,e/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n),e=0}}else{varn=this.createBody(l.x*l.width,l.y*l.height,0,!1);n.addRectangle(l.width,l.height,l.width/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n)}}}returna.layers[b].bodies},mpx:function(a){returna*=20},pxm:function(a){return.05*a},mpxi:function(a){returna*=-20},pxmi:function(a){returna*-.05}},Object.defineProperty(Phaser.Physics.P2.prototype,