!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(window,function(){return n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(l=e,u=s,f=d=void 0,f=(c=i)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(533),AlphaSingle:i(269),Animation:i(504),BlendMode:i(272),ComputedSize:i(552),Crop:i(553),Depth:i(273),Flip:i(554),GetBounds:i(555),Mask:i(277),Origin:i(572),PathFollower:i(573),Pipeline:i(156),ScrollFactor:i(280),Size:i(574),Texture:i(575),TextureCrop:i(576),Tint:i(577),ToJSON:i(281),Transform:i(282),TransformMatrix:i(29),Visible:i(283)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(281),r=i(113),o=i(10),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){var e;void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this),e=this.scene.sys,t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners())}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var s=i(170),r=i(6);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},function(t,e,i){var n=i(0),s=i(23),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,i){var u=i(7),c=function(){var t,e,i,n,s,r,o=arguments[0]||{},a=1,h=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[1]||{},a=2),h===a&&(o=this,--a);ar.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;u>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var d=i(142),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(275),r=i(153),o=i(47),a=i(154),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(891),DECODED:i(892),DECODED_ALL:i(893),DESTROY:i(894),DETUNE:i(895),GLOBAL_DETUNE:i(896),GLOBAL_MUTE:i(897),GLOBAL_RATE:i(898),GLOBAL_VOLUME:i(899),LOOP:i(900),LOOPED:i(901),MUTE:i(902),PAUSE_ALL:i(903),PAUSE:i(904),PLAY:i(905),RATE:i(906),RESUME_ALL:i(907),RESUME:i(908),SEEK:i(909),STOP_ALL:i(910),STOP:i(911),UNLOCKED:i(912),VOLUME:i(913)}},function(t,e,i){var n=i(0),h=i(17),l=i(21),s=i(8),u=i(2),c=i(6),d=i(7),r=new n({Extends:l,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=u(r=e,"key"),i=u(r,"url"),n=u(r,"xhrSettings"),o=u(r,"extension",o),s=u(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};l.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x)&&b(n,t)&&(i=n,d=h),n=n.next;return i}(t,e))&&v(i=E(e,t),i.next)}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return n}(t,e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)}(o,a)){var h=E(o,a);return o=v(o,o.next),h=v(h,h.next),m(o,e,i,n,s,r),m(h,e,i,n,s,r)}a=a.next}o=o.next}while(o!==t)}(t,e,i,n,s,r):m(v(t),e,i,n,s,r,1);break}}}function y(t,e){return t.x-e.x}function x(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function T(t,e,i,n,s,r,o,a){return 0<=(s-o)*(e-a)-(t-o)*(r-a)&&0<=(t-o)*(n-a)-(i-o)*(e-a)&&0<=(i-o)*(r-a)-(s-o)*(n-a)}function w(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function u(t,e){return t.x===e.x&&t.y===e.y}function c(t,e,i,n){return u(t,e)&&u(i,n)||u(t,n)&&u(i,e)||0=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t;this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0,e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t;this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0,e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t;this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(17),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(967),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var _=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/_),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/_),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(96),r=i(398),o=i(399),a=i(47),h=i(157),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(241),n=i(0),r=i(90),N=i(2),Y=i(6),s=i(7),X=i(392),o=i(133),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=N(i,"classType",a),this.name=N(i,"name",""),this.active=N(i,"active",!0),this.maxSize=N(i,"maxSize",-1),this.defaultKey=N(i,"defaultKey",null),this.defaultFrame=N(i,"defaultFrame",null),this.runChildUpdate=N(i,"runChildUpdate",!1),this.createCallback=N(i,"createCallback",null),this.removeCallback=N(i,"removeCallback",null),this.createMultipleCallback=N(i,"createMultipleCallback",null),this.internalCreateCallback=N(i,"internalCreateCallback",null),this.internalRemoveCallback=N(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&te.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1217),ANY_KEY_UP:i(1218),COMBO_MATCH:i(1219),DOWN:i(1220),KEY_DOWN:i(1221),KEY_UP:i(1222),UP:i(1223)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(217),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(220),CalculateFacesWithin:i(51),Copy:i(1313),CreateFromTiles:i(1314),CullTiles:i(1315),Fill:i(1316),FilterTiles:i(1317),FindByIndex:i(1318),FindTile:i(1319),ForEachTile:i(1320),GetTileAt:i(142),GetTileAtWorldXY:i(1321),GetTilesWithin:i(24),GetTilesWithinShape:i(1322),GetTilesWithinWorldXY:i(1323),HasTileAt:i(476),HasTileAtWorldXY:i(1324),IsInLayerBounds:i(101),PutTileAt:i(221),PutTileAtWorldXY:i(1325),PutTilesAt:i(1326),Randomize:i(1327),RemoveTileAt:i(477),RemoveTileAtWorldXY:i(1328),RenderDebug:i(1329),ReplaceByIndex:i(475),SetCollision:i(1330),SetCollisionBetween:i(1331),SetCollisionByExclusion:i(1332),SetCollisionByProperty:i(1333),SetCollisionFromCollisionGroup:i(1334),SetTileIndexCallback:i(1335),SetTileLocationCallback:i(1336),Shuffle:i(1337),SwapByIndex:i(1338),TileToWorldX:i(143),TileToWorldXY:i(1339),TileToWorldY:i(144),WeightedRandomize:i(1340),WorldToTileX:i(63),WorldToTileXY:i(1341),WorldToTileY:i(64)}},function(t,e,i){var r=i(101);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(230),L=i(15),k=i(88),D=i(69),F=i(145),I=i(498),B=i(228),N=i(6),Y=i(229),X=i(231),U=i(233);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=F(e,"delay",i.delay),o=F(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=D(N(e,"ease",i.ease),a),l=F(e,"hold",i.hold),u=F(e,"repeat",i.repeat),c=F(e,"repeatDelay",i.repeatDelay),d=k(e,"yoyo",i.yoyo),f=k(e,"flipX",i.flipX),p=k(e,"flipY",i.flipY),g=[],v=0;v=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(294),s=i(297),r=i(299),o=i(300);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(165);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l=i=Math.floor(i*=255),u=i,c=i,d=s%6;return 0==d?(u=h,c=o):1==d?(l=a,c=o):2==d?(l=o,c=h):3==d?(l=o,u=a):4==d?(l=h,u=o):5==d&&(u=o,c=a),n?n.setTo?n.setTo(l,u,c,n.alpha,!1):(n.r=l,n.g=u,n.b=c,n.color=f(l,u,c),n):{r:l,g:u,b:c,color:f(l,u,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)),this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o,a,h,l,u,c=255&(t>>16|0),d=255&(t>>8|0),f=255&(0|t),p=this.gl,g=this.frame;return this.camera.preRender(1,1),p?(o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch,this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l),(u=this.pipeline).projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),u.drawFillRect(i,n,s,r,v.getTintFromFloats(c/255,d/255,f/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)):(this.renderer.setContext(this.context),this.context.fillStyle="rgba("+c+","+d+","+f+","+e+")",this.context.fillRect(i+g.cutX,n+g.cutY,s,r),this.renderer.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl;return this.camera.preRender(1,1),u?(r=this.camera._cx,o=this.camera._cy,a=this.camera._cw,h=this.camera._ch,this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(r,o,a,h,h),(l=this.pipeline).projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),l.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),l.projOrtho(0,l.width,l.height,0,-1e3,1e3)):(this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.textureManager.getFrame(t,e);return d&&(this.camera.preRender(1,1),c?(o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch,this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l),(u=this.pipeline).projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(d,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(d,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delaythis.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,P,O){this.renderer.setPipeline(this,t);var R,L,k,D=this._tempMatrix1,F=this._tempMatrix2,I=this._tempMatrix3,B=m/i+A,N=y/n+C,Y=(m+x)/i+A,X=(y+T)/n+C,U=o,z=a,G=-g,W=-v;t.isCropped&&(U=(R=t._crop).width,z=R.height,o=R.width,a=R.height,L=m=R.x,k=y=R.y,c&&(L=x-R.x-R.width),d&&!e.isRenderTexture&&(k=T-R.y-R.height),B=L/i+A,N=k/n+C,Y=(L+R.width)/i+A,X=(k+R.height)/n+C,G=-g+m,W=-v+y),c&&(U*=-1,G+=o),(d^=!O&&e.isRenderTexture?1:0)&&(z*=-1,W+=a);var V=G+U,H=W+z;F.applyITRS(s,r,u,h,l),D.copyFrom(M.matrix),P?(D.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),F.e=s,F.f=r):(F.e-=M.scrollX*f,F.f-=M.scrollY*p),D.multiply(F,I);var j=I.getX(G,W),q=I.getY(G,W),K=I.getX(G,H),J=I.getY(G,H),Z=I.getX(V,H),Q=I.getY(V,H),$=I.getX(V,W),tt=I.getY(V,W);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,B,N,Y,X,w,b,E,S,_,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=Y.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=Y.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var u=i(42);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;re.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(152),a=i(112);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(664),Flash:i(665),Pan:i(666),Shake:i(699),RotateTo:i(700),Zoom:i(701)}},function(t,e,i){t.exports={In:i(667),Out:i(668),InOut:i(669)}},function(t,e,i){t.exports={In:i(670),Out:i(671),InOut:i(672)}},function(t,e,i){t.exports={In:i(673),Out:i(674),InOut:i(675)}},function(t,e,i){t.exports={In:i(676),Out:i(677),InOut:i(678)}},function(t,e,i){t.exports={In:i(679),Out:i(680),InOut:i(681)}},function(t,e,i){t.exports={In:i(682),Out:i(683),InOut:i(684)}},function(t,e,i){t.exports=i(685)},function(t,e,i){t.exports={In:i(686),Out:i(687),InOut:i(688)}},function(t,e,i){t.exports={In:i(689),Out:i(690),InOut:i(691)}},function(t,e,i){t.exports={In:i(692),Out:i(693),InOut:i(694)}},function(t,e,i){t.exports={In:i(695),Out:i(696),InOut:i(697)}},function(t,e,i){t.exports=i(698)},function(t,e,i){var n=i(0),a=i(33),h=i(315),l=i(2),u=i(6),c=i(7),d=i(170),f=i(1),p=i(175),g=i(164),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",2e3),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(117),browser:i(118),features:i(169),input:i(730),audio:i(731),video:i(732),fullscreen:i(733),canvasFeatures:i(316)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(339),l=a(26),u=a(33),c=a(169);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(505),n=a(508),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){var l=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(19),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(128),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(0this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1003),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(450),h=i(451),n=i(0),l=i(10),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),0=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(55),s=i(0),r=i(50),o=i(48),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-n*e.originY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,(t.body=this).gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(225);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(104),T=i(485),w=i(226);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(102),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;ov||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;0<=o;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;0<=o;o--)for(a=l-1;0<=a;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),S=v.getX(m,T),_=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),P=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P));var O=this.vertexViewF32[o],R=this.vertexViewU32[o];return O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,R[++t]=w,O[++t]=S,O[++t]=_,O[++t]=d,O[++t]=g,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,R[++t]=w,O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,R[++t]=w,O[++t]=M,O[++t]=P,O[++t]=p,O[++t]=f,O[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var u=i(506),p=i(40),n=i(0),s=i(33),r=i(507),o=i(92),a=i(29),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,l=n._ch,u=n.renderToTexture?n.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(o,a,h,l),u.clip()),this.currentContext=u;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(u.fillStyle=n.backgroundColor.rgba,u.fillRect(o,a,h,l)),u.globalAlpha=n.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(u);for(var d=0;d>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)}var i={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(n=i=e=t),this._tintTL=s(t),this._tintTR=s(e),this._tintBL=s(i),this._tintBR=s(n),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=s(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=s(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=s(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=s(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=i},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var r=i(38);t.exports=function(t,e,i,n,s){return r(t,"alpha",e,i,n,s)}},function(t,e,i){var r=i(38);t.exports=function(t,e,i,n,s){return r(t,"x",e,i,n,s)}},function(t,e,i){var a=i(38);t.exports=function(t,e,i,n,s,r,o){return null==i&&(i=e),a(t,"x",e,n,r,o),a(t,"y",i,s,r,o)}},function(t,e,i){var r=i(38);t.exports=function(t,e,i,n,s){return r(t,"y",e,i,n,s)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;othis.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001)))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(293),BaseCamera:i(91),CameraManager:i(702),Effects:i(301),Events:i(40)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(19),s=i(0),l=i(40),r=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(119);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(119);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=i)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new r([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),l=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(166);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(116);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(172),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(278),GeometryMask:i(279)}},function(t,e,i){var n={AddToDOM:i(122),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(178),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(820)}},function(t,e,i){var n=i(0),s=i(10),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(122),s=i(289),r=i(292),o=i(26),a=i(0),h=i(314),l=i(822),u=i(338),c=i(113),d=i(342),f=i(315),p=i(357),g=i(10),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),b=i(121),E=i(376),S=i(343),_=i(345),A=i(380),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(122);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(181);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush(),r.setTexture2D(l,0);for(var v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var r=i(11);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(168);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(11),s=i(135);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(39);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(148),r=(i(219),i(42));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(473),n=i(515),r=i(42);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(k=M,L=U.clamp(u.friction*P*i,-k,k));var D,F,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);O*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(D=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+O,0),O=x.normalImpulse-D),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(F=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-k,k),L=x.tangentImpulse-F),n.x=p.x*O+g.x*L,n.y=p.y*O+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(474),DefaultPlugins:i(175),PluginCache:i(23),PluginManager:i(370),ScenePlugin:i(1305)}},function(t,e,i){var n=i(474),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(18),s=i(177),r=n(!1,r={Center:i(359),Events:i(92),Orientation:i(360),ScaleManager:i(371),ScaleModes:i(361),Zoom:i(362)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(125),s=i(18)(!1,s={Events:i(22),SceneManager:i(373),ScenePlugin:i(1308),Settings:i(375),Systems:i(180)},n);t.exports=s},function(t,e,i){var n=i(19),s=i(0),a=i(22),h=i(2),r=i(23),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(129),Map:i(162),ProcessQueue:i(186),RTree:i(470),Set:i(133),Size:i(372)}},function(t,e,i){var n=i(18),s=i(1311),r=n(!1,r={CanvasTexture:i(377),Events:i(121),FilterMode:s,Frame:i(94),Parsers:i(379),Texture:i(182),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(141),Parsers:i(1342),Formats:i(32),ImageCollection:i(485),ParseToTilemap:i(227),Tile:i(74),Tilemap:i(494),TilemapCreator:i(1351),TilemapFactory:i(1352),Tileset:i(104),LayerData:i(102),MapData:i(103),ObjectLayer:i(488),DynamicTilemapLayer:i(495),StaticTilemapLayer:i(496)}},function(t,e,i){var p=i(24),g=i(51);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(51),l=i(222);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(18),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1377),GetValue:i(6),HasAll:i(1378),HasAny:i(407),HasValue:i(108),IsPlainObject:i(7),Merge:i(126),MergeRight:i(1379),Pick:i(486),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(19);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!S(P(t,e-1),P(t,e),P(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function P(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor))},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y