text: (function e(t,r){if(typeof exports==="object"&&typeof module==="object")module.exports=r(require("Phaser"));else if(typeof define==="function"&&define.amd)define("craft",["Phaser"],r);else if(typeof exports==="object")exports["craft"]=r(require("Phaser"));else t["craft"]=r(t["Phaser"])})(this,function(e){return function(e){var t={};function r(i){if(t[i]){return t[i].exports}var n=t[i]={i:i,l:false,exports:{}};e[i].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{configurable:false,enumerable:true,get:i})}};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=7)}([function(e,t,r){"use strict";var i={};var n=r(3);var a=r(1);var o=a.game;i.colorCase=function(e){return e.indexOf("#")!=-1?"0x"+e.replace(/#/g,""):e};i.extend=n.Utils.extend.bind(null,true);i.colorShapeBmd=function(e,t){var r=arguments.length<=2||arguments[2]===undefined?undefined:arguments[2];var i=o.make.sprite(0,0,e,r);var a=n.Color.hexToColor(t);var s=o.make.bitmapData(i.width,i.height);s.fill(a.r,a.g,a.b);var u=s;u.blendDestinationAtop();u.draw(i,0,0,i.texture.crop.width,i.texture.crop.height);i.pendingDestroy=true;return u};e.exports=i},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";var i=r(0);var n=r(5);var a={$set:r(9),$scale:r(10),$tint:r(11),$into:r(12),$mid:r(13),$copyPos:r(14),$fixPos:r(15),$add:r(16),$align:r(17)};e.exports=function e(t){var r=arguments.length<=1||arguments[1]===undefined?"sprite":arguments[1];for(var i in n[r]){if(!n[r][i]||!a[i])continue;t[i]=a[i]}}},function(t,r){t.exports=e},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;e.exports=function e(t,r){if(typeof r=="string")r={frame:r};var a={x:0,y:0,frame:undefined,group:undefined};r=i.extend({},a,r);var s=o.add.sprite(r.x,r.y,t,r.frame,r.group);n(s,"sprite");return s}},function(e,t,r){"use strict";e.exports={sprite:{$set:true,$tint:true,$into:true,$mid:true,$scale:true,$atlasImg:true,$atlasAnims:true,$fixPos:true,$copyPos:true,$align:true},graphic:{$set:true,$tint:true,$into:true,$scale:true,$mid:true,$fixPos:true,$copyPos:true,$align:true},text:{$set:true,$tint:true,$into:true,$scale:true,$fixPos:true,$copyPos:true,$align:true},group:{$set:true,$into:true,$fixPos:true,$scale:true,$add:true,$copyPos:true,$align:true}}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;e.exports=function e(t){if(typeof t=="number")t={size:t};var r={x:0,y:0,group:undefined,fill:"#ff0000",size:10,alpha:1,stroke:{size:0,color:"#000",alpha:1}};t=i.extend({},r,t);var a=o.add.graphics(t.x,t.y,t.group);n(a,"graphic");if(t.fill)a.beginFill(i.colorCase(t.fill),t.alpha);if(t.stroke.size>0)a.lineStyle(t.stroke.size,i.colorCase(t.stroke.color),t.stroke.alpha);return a.drawCircle(0,0,t.size)}},function(e,t,r){"use strict";var i=r(5);var n=r(1);var a=r(3);var o=r(8);console.log("%c Craft v"+o+" ","background: #002874; color: #ffffff");e.exports=function e(t){var i={};n.game=t;return[{name:"$sprite",method:r(4),aliases:["$s"]},{name:"$tileSprite",method:r(18)},{name:"$text",method:r(19),aliases:["$t"]},{name:"$circle",method:r(6),aliases:["$t"]},{name:"$graphic",method:r(20),aliases:["$t"]},{name:"$dot",method:r(21),aliases:["$d"]},{name:"$rect",method:r(22),aliases:["$box"]},{name:"$group",method:r(23),aliases:["$g"]},{name:"$shape",method:r(24)},{name:"$stroke",method:r(25)}].reduce(function(e,t,r){var i=e[t.name]=t.method;if(t.aliases){t.aliases.forEach(function(t){e[t]=i})}return e},i)}},function(e,t,r){"use strict";e.exports="3.0.0"},function(e,t,r){"use strict";e.exports=function e(t,r){if(typeof t==="string"&&!!r){this[t]=r}else{for(var i in t)this[i]=t[i]}return this}},function(e,t,r){"use strict";e.exports=function e(){var t=arguments.length<=0||arguments[0]===undefined?null:arguments[0];var r=arguments.length<=1||arguments[1]===undefined?null:arguments[1];if(!this.scale)return this;var i=this.scale.set?this.scale.set:this.scale.setTo;if(t!==null&&r!==null){this.scale.setTo(t,r)}else if(t!==null){this.scale.setTo(t)}return this}},function(e,t,r){"use strict";var i=r(0);e.exports=function e(){var t=arguments.length<=0||arguments[0]===undefined?"ffffff":arguments[0];this.tint=i.colorCase(t);return this}},function(e,t,r){"use strict";e.exports=function e(t){t.add(this);return this}},function(e,t,r){"use strict";e.exports=function e(){this.anchor.setTo(.5);return this}},function(e,t,r){"use strict";e.exports=function(e){this.x=e.x;this.y=e.y;return this}},function(e,t,r){"use strict";e.exports=function e(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this}},function(e,t,r){"use strict";e.exports=function e(t){var r=this;if(!Array.isArray(t))t=[t];t.forEach(function(e){r.add(e)});return this}},function(e,t,r){"use strict";e.exports=function(){var e=arguments.length<=0||arguments[0]===undefined?null:arguments[0];var t=arguments.length<=1||arguments[1]===undefined?null:arguments[1];if(e){if(e=="left"){this.x=0}else if(e=="center"){this.x=~~(this.game.width*.5)-(!this.anchor||this.anchor.x==0?this.width*.5:0)}else if(e=="right"){this.x=this.game.width-this.width}}if(t){if(e=="top"){this.y=0}else if(e=="center"){this.y=~~(this.game.height*.5)-(!this.anchor||this.anchor.y==0?this.height*.5:0)}else if(e=="bot"){this.y=this.game.width-this.height}}return this}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(3);var o=r(1);var s=o.game;e.exports=function e(t,r,a,o){if(typeof r=="string")r={frame:r};var u={x:0,y:0,frame:undefined,group:undefined};r=i.extend({},u,r);var f=s.add.tileSprite(r.x,r.y,a,o,t,r.frame);n(f,"sprite");return f}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;e.exports=function e(t,r){if(typeof r=="string")r={frame:r};var a={x:0,y:0,bold:false,size:15,font:"'Helvetica Neue', Helvetica, Arial, sans-serif",stroke:{size:0,color:"#000000"},align:"center",color:"#000000"};r=i.extend({},a,r);var s=o.add.text(0,0,t,{font:[r.bold?"bold":"",r.size+"px",r.font].join(" "),align:r.align,fill:r.color,stroke:r.stroke.color,strokeThickness:r.stroke.size});n(s,"text");return s}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;e.exports=function e(t){var r={x:0,y:0,group:undefined};t=i.extend({},r,t);var a=o.add.graphics(t.x,t.y,t.group);n(a,"graphic");return a}},function(e,t,r){"use strict";var i=r(0);var n=r(6);e.exports=function e(t,r,a){if(t===undefined)t=5;if(r===undefined)r="#ff0000";var o={fill:r,size:t};a=i.extend({},o,a);return n(a)}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;e.exports=function e(t){if(typeof t=="number")t={size:t};var r={x:0,y:0,group:undefined,fill:"#ff0000",width:100,height:100,size:0,alpha:1,round:0,stroke:{size:0,color:"#000000",alpha:1}};t=i.extend({},r,t);var a=o.add.graphics(t.x,t.y,t.group);if(t.size)t.height=t.width=t.size;n(a,"graphic");if(t.fill)a.beginFill(i.colorCase(t.fill),t.alpha);if(t.stroke.size>0)a.lineStyle(t.stroke.size,i.colorCase(t.stroke.color),t.stroke.alpha);if(t.round===0){return a.drawRect(0,0,t.width,t.height)}else{return a.drawRoundedRect(0,0,t.width,t.height,t.round)}}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;e.exports=function e(t){var r={parent:undefined,name:undefined,addToStage:undefined,enableBody:undefined,physicsBodyType:undefined};t=i.extend({},t,r);var a=o.add.group(t.parent,t.name,t.addToStage,t.enableBody,t.physicsBodyType);n(a,"group");return a}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;var s=r(4);e.exports=function e(t,r,n){if(r===undefined)r=undefined;if(typeof r==="object"){var a=n;n=r?r:{};r=a}var u={frame:r,x:0,y:0,group:undefined,cache:true,color:"#FF0000"};n=i.extend({},u,n);var f=["$fill",t,n.frame].filter(Boolean).join("_");if(n.cache&&!o.cache.checkImageKey(f)){var c=i.colorShapeBmd(t,n.color,n.frame);c.generateTexture(f);f=c;c.pendingDestroy=true}else if(!n.cache){f=i.colorShapeBmd(t,n.color,n.frame)}var l=Object.assign({},n);delete l["cache"];delete l["frame"];return s(f,l)}},function(e,t,r){"use strict";var i=r(0);var n=r(2);var a=r(1);var o=a.game;var s=r(4);var u=function e(t,r){var n=o.make.sprite(0,0,t,r.frame);var a=r.size;var s=r.pixel;var u=o.make.bitmapData(n.width+a*2,n.height+a*2);var f=i.colorShapeBmd(t,r.color,r.frame);for(var c=0;c<a*2*(1/s)+1;c++){for(var l=0;l<a*2*(1/s)+1;l++){u.draw(f,c*s,l*s)}}if(r.inside)u.draw(n,a,a,n.texture.crop.width,n.texture.crop.height);n.pendingDestroy=true;return u};e.exports=function e(t,r,n){if(r===undefined)r=undefined;if(typeof r==="object"){var a=n;n=r?r:{};r=a}var f={frame:r,x:0,y:0,group:undefined,cache:true,size:1,pixel:1,inside:true,color:"#FF0000"};n=i.extend({},f,n);var c=["$stoke",t,n.frame].filter(Boolean).join("_");if(n.cache&&!o.cache.checkImageKey(c)){var l=u(t,n);l.generateTexture(c);l.pendingDestroy=true;c=l}else if(!n.cache){c=u(n)}var d=Object.assign({},n);["cache","color","pixel","inside","frame","size"].forEach(function(e){delete d[e]});return s(c,d)}}])});