!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rexmenu=e():t.rexmenu=e()}(window,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=174)}([,function(t,e,i){"use strict";e.a={setEventEmitter:function(t,e){return void 0===e&&(e=Phaser.Events.EventEmitter),this._privateEE=void 0===t,this._eventEmitter=this._privateEE?new e:t,this},destroyEventEmitter:function(){return this._eventEmitter&&this._privateEE&&this._eventEmitter.shutdown(),this},getEventEmitter:function(){return this._eventEmitter},on:function(){return this._eventEmitter&&this._eventEmitter.on.apply(this._eventEmitter,arguments),this},once:function(){return this._eventEmitter&&this._eventEmitter.once.apply(this._eventEmitter,arguments),this},off:function(){return this._eventEmitter&&this._eventEmitter.off.apply(this._eventEmitter,arguments),this},emit:function(t){return this._eventEmitter&&t&&this._eventEmitter.emit.apply(this._eventEmitter,arguments),this},addListener:function(){return this._eventEmitter&&this._eventEmitter.addListener.apply(this._eventEmitter,arguments),this},removeListener:function(){return this._eventEmitter&&this._eventEmitter.removeListener.apply(this._eventEmitter,arguments),this},removeAllListeners:function(){return this._eventEmitter&&this._eventEmitter.removeAllListeners.apply(this._eventEmitter,arguments),this},listenerCount:function(){return this._eventEmitter?this._eventEmitter.listenerCount.apply(this._eventEmitter,arguments):0},listeners:function(){return this._eventEmitter?this._eventEmitter.listeners.apply(this._eventEmitter,arguments):[]}}},function(t,e,i){"use strict";var n=Phaser.Scene;e.a=function(t){return t instanceof n}},function(t,e,i){"use strict";var n=i(2);e.a=function(t){return Object(n.a)(t)?t:t.scene&&Object(n.a)(t.scene)?t.scene:t.parent&&t.parent.scene&&Object(n.a)(t.parent.scene)?t.parent.scene:void 0}},,function(t,e,i){"use strict";var n=i(8),r=new Phaser.GameObjects.Zone({sys:{queueDepthSort:n.a,events:{once:n.a}}},0,0,1,1);r.setOrigin(0),e.a=r},,function(t,e,i){var n=i(55),r=[];r[n.BOTTOM_CENTER]=i(56),r[n.BOTTOM_LEFT]=i(57),r[n.BOTTOM_RIGHT]=i(58),r[n.CENTER]=i(59),r[n.LEFT_CENTER]=i(61),r[n.RIGHT_CENTER]=i(62),r[n.TOP_CENTER]=i(63),r[n.TOP_LEFT]=i(64),r[n.TOP_RIGHT]=i(65);t.exports=function(t,e,i,n,o){return r[i](t,e,n,o)}},function(t,e,i){"use strict";e.a=function(){}},,function(t,e,i){"use strict";var n=i(1),r=i(3);function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=Phaser.Utils.Objects.GetValue,a=Phaser.Utils.Objects.GetAdvancedValue,h=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gameObject=e,this.scene=Object(r.a)(e),this.alphaStart=void 0,this.alphaEnd=void 0,this.tween=void 0,this.resetFromJSON(i),this.boot()}var e,i,n;return e=t,(i=[{key:"resetFromJSON",value:function(t){return this.setMode(s(t,"mode",0)),this.setAlphaRange(a(t,"start",this.gameObject.alpha),a(t,"end",0)),this.setDelay(a(t,"delay",0)),this.setDuration(a(t,"duration",1e3)),this}},{key:"toJSON",value:function(){return{mode:this.mode,start:this.alphaStart,end:this.alphaEnd,delay:this.delay,duration:this.duration}}},{key:"boot",value:function(){this.gameObject.once&&this.gameObject.once("destroy",this.destroy,this)}},{key:"shutdown",value:function(){return this.stop(),this.gameObject=void 0,this.scene=void 0,this}},{key:"destroy",value:function(){return this.shutdown(),this}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=c[t]),this.mode=t,this}},{key:"setAlphaRange",value:function(t,e){return this.alphaStart=t,this.alphaEnd=e,this}},{key:"setDelay",value:function(t){return this.delay=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"start",value:function(){return this.tween?this:0===this.duration?(this.gameObject.setAlpha(this.alphaEnd),this.complete(),this):(this.gameObject.setAlpha(this.alphaStart),this.tween=this.scene.tweens.add({targets:this.gameObject,alpha:this.alphaEnd,delay:this.delay,duration:this.duration,ease:"Linear",yoyo:2==this.mode,repeat:2==this.mode?-1:0,onComplete:this.complete,onCompleteScope:this}),this.setEventEmitter(this.tween),this)}},{key:"restart",value:function(){return this.stop().start(),this}},{key:"stop",value:function(){return this.tween?(this.setEventEmitter(!1),this.tween.remove(),this.tween=void 0,this):this}},{key:"complete",value:function(){return this.stop(),1===this.mode&&this.gameObject.destroy(),this}}])&&o(e.prototype,i),n&&o(e,n),t}();Object.assign(h.prototype,n.a);var c={stop:0,destroy:1,yoyo:2},u=h;e.a=u},function(t,e,i){"use strict";e.a=function(t,e,i){!t||void 0===e&&void 0===i||(t.resize?(void 0===e&&(e=t.width),void 0===i&&(i=t.height),t.resize(e,i)):(void 0!==e&&(t.displayWidth=e),void 0!==i&&(t.displayHeight=i)))}},function(t,e,i){"use strict";var n=i(1),r=i(3);function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=Phaser.Utils.Objects.GetValue,a=Phaser.Utils.Objects.GetAdvancedValue,h=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gameObject=e,this.scene=Object(r.a)(e),this.scaleStart={},this.scaleEnd={},this.tween=void 0,this.resetFromJSON(i),this.boot()}var e,i,n;return e=t,(i=[{key:"resetFromJSON",value:function(t){return this.setMode(s(t,"mode",0)),this.setScaleRange(a(t,"start",void 0),a(t,"end",0)),this.setDelay(a(t,"delay",0)),this.setDuration(a(t,"duration",1e3)),this.setEase(s(t,"ease",void 0)),this}},{key:"toJSON",value:function(){return{mode:this.mode,start:this.scaleStart,end:this.scaleEnd,delay:this.delay,duration:this.duration}}},{key:"boot",value:function(){this.gameObject.once&&this.gameObject.once("destroy",this.destroy,this)}},{key:"shutdown",value:function(){return this.stop(),this.gameObject=void 0,this.scene=void 0,this}},{key:"destroy",value:function(){return this.shutdown(),this}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=c[t]),this.mode=t,this}},{key:"setScaleRange",value:function(t,e){return"number"==typeof t?(this.scaleStart.x=t,this.scaleStart.y=t):(this.scaleStart.x=s(t,"x",this.gameObject.scaleX),this.scaleStart.y=s(t,"y",this.gameObject.scaleY)),"number"==typeof e?(this.scaleEnd.x=e,this.scaleEnd.y=e):(this.scaleEnd.x=s(e,"x",this.scaleStart.x),this.scaleEnd.y=s(e,"y",this.scaleStart.y)),this}},{key:"setDelay",value:function(t){return this.delay=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"setEase",value:function(t){return void 0===t&&(t="Linear"),this.ease=t,this}},{key:"start",value:function(){return this.tween?this:0===this.duration?(this.gameObject.setScale(this.scaleEnd.x,this.scaleEnd.y),this.complete(),this):(this.gameObject.setScale(this.scaleStart.x,this.scaleStart.y),this.tween=this.scene.tweens.add({targets:this.gameObject,scaleX:this.scaleEnd.x,scaleY:this.scaleEnd.y,duration:this.duration,ease:this.ease,yoyo:2==this.mode,repeat:2==this.mode?-1:0,onComplete:this.complete,onCompleteScope:this}),this.setEventEmitter(this.tween),this)}},{key:"restart",value:function(){return this.stop().start(),this}},{key:"stop",value:function(){return this.tween?(this.setEventEmitter(!1),this.tween.remove(),this.tween=void 0,this):this}},{key:"complete",value:function(){return this.stop(),1===this.mode&&this.gameObject.destroy(),this}}])&&o(e.prototype,i),n&&o(e,n),t}();Object.assign(h.prototype,n.a);var c={stop:0,destroy:1,yoyo:2},u=h;e.a=u},function(t,e,i){"use strict";var n=i(14);e.a=function(t){return Object(n.a)(t).parent}},function(t,e,i){"use strict";e.a=function(t){return t.hasOwnProperty("rexSizer")||(t.rexSizer={}),t.rexSizer}},function(t,e,i){"use strict";var n=Phaser.Display.Align;e.a={center:n.CENTER,left:n.LEFT_CENTER,right:n.RIGHT_CENTER,top:n.TOP_CENTER,bottom:n.BOTTOM_CENTER,"left-top":n.TOP_LEFT,"left-center":n.LEFT_CENTER,"left-bottom":n.BOTTOM_LEFT,"center-top":n.TOP_CENTER,"center-center":n.CENTER,"center-bottom":n.BOTTOM_CENTER,"right-top":n.TOP_RIGHT,"right-center":n.RIGHT_CENTER,"right-bottom":n.BOTTOM_RIGHT}},,,function(t,e,i){"use strict";i.r(e);var n=i(32),r=function(t){if(this.rexSizer.hidden)return 0;void 0===t&&(t=!0);var e,i,n,r=0,o=this.sizerChildren;if(0===this.orientation)for(var s=0,a=o.length;s<a;s++)(e=o[s]).rexSizer.hidden||(n=0===e.rexSizer.proportion||t&&!e.isRexSpace&&e.rexSizer.proportion>0?e.isRexSizer?Math.max(e.minWidth,e.childrenWidth):e.displayWidth:0,r+=n+=(i=e.rexSizer.padding).left+i.right);else for(s=0,a=o.length;s<a;s++)(e=o[s]).hasOwnProperty("rexSizer")&&(e.rexSizer.hidden||(n=e.isRexSizer?Math.max(e.minWidth,e.childrenWidth):e.displayWidth,n+=(i=e.rexSizer.padding).left+i.right,r=Math.max(n,r)));return r},o=function(t){if(this.rexSizer.hidden)return 0;void 0===t&&(t=!0);var e,i,n,r=0,o=this.sizerChildren;if(0===this.orientation)for(var s=0,a=o.length;s<a;s++)(e=o[s]).rexSizer.hidden||(n=e.isRexSizer?Math.max(e.minHeight,e.childrenHeight):e.displayHeight,n+=(i=e.rexSizer.padding).top+i.bottom,r=Math.max(n,r));else for(s=0,a=o.length;s<a;s++)(e=o[s]).hasOwnProperty("rexSizer")&&(e.rexSizer.hidden||(n=0===e.rexSizer.proportion||t&&!e.isRexSpace&&e.rexSizer.proportion>0?e.isRexSizer?Math.max(e.minHeight,e.childrenHeight):e.displayHeight:0,r+=n+=(i=e.rexSizer.padding).top+i.bottom));return r},s=function(){for(var t,e,i=0,n=this.sizerChildren,r=0,o=n.length;r<o;r++)(t=n[r]).rexSizer.hidden||(e=t.rexSizer.proportion)>0&&(i+=e);return i},a=function(t){void 0===t&&(t=[]);for(var e,i=this.sizerChildren,n=0,r=i.length;n<r;n++)(e=i[n]).isRexSizer&&t.push(e);return t},h=function(t,e){var i,n=e.rexSizer,r=n.padding;return 0===t.orientation?n.proportion>0&&t.proportionLength>0&&(i=n.proportion*t.proportionLength):n.expand&&(i=t.width-r.left-r.right),i},c=function(t,e){var i,n=e.rexSizer,r=n.padding;return 0===t.orientation?n.expand&&(i=t.height-r.top-r.bottom):n.proportion>0&&t.proportionLength>0&&(i=n.proportion*t.proportionLength),i},u=i(11),l=i(5),d=i(7),f=i.n(d),p={getChildrenWidth:r,getChildrenHeight:o,getChildrenProportion:s,getChildrenSizers:a,layout:function(t,e,i){if(this.rexSizer.hidden)return this;var n;if(this.preLayout(t),void 0===e&&(e=Math.max(this.childrenWidth,this.minWidth)),void 0===i&&(i=Math.max(this.childrenHeight,this.minHeight)),this.resize(e,i),this.childrenProportion>0){var r=0===this.orientation?this.width-this.childrenWidth:this.height-this.childrenHeight;n=r>0?(r=0===this.orientation?this.width-this.getChildrenWidth(!1):this.height-this.getChildrenHeight(!1))/this.childrenProportion:0}else n=0;this.proportionLength=n;for(var o,s,a,d,p,y,v,g,b,m=this.sizerChildren,O=this.left,k=this.top,S=0,C=m.length;S<C;S++)(o=m[S]).rexSizer.hidden||(a=(s=o.rexSizer).padding,g=h(this,o),b=c(this,o),o.isRexSizer?o.layout(this,g,b):Object(u.a)(o,g,b),void 0===g&&(g=o.displayWidth),void 0===b&&(b=o.displayHeight),0===this.orientation?(d=O+a.left,y=0===s.proportion||0===n?g:s.proportion*n,p=k+a.top,v=this.height-a.top-a.bottom):(d=O+a.left,y=this.width-a.left-a.right,p=k+a.top,v=0===s.proportion||0===n?b:s.proportion*n),l.a.setPosition(d,p).setSize(y,v),f()(o,l.a,s.align),this.resetChildPositionState(o),0===this.orientation?O+=y+a.left+a.right:k+=v+a.top+a.bottom);return this.layoutBackgrounds(),this.postLayout()},_layoutInit:function(){this._childrenWidth=void 0,this._childrenHeight=void 0,this._childrenProportion=void 0}},y=i(33),v=i(48),g=i(15),b=function(t){var e=t.add.zone(0,0,1,1);return e.isRexSpace=!0,e};function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function k(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function S(t,e,i){return(S="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var E=Phaser.Utils.Objects.IsPlainObject,x=Phaser.Utils.Objects.GetValue,j=Phaser.Utils.Array.Remove,P=Phaser.Display.Align.CENTER,w=function(t){function e(t,i,n,r,o,s,a){var h;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),E(i)?(i=x(a=i,"x",0),n=x(a,"y",0),r=x(a,"width",void 0),o=x(a,"height",void 0)):E(r)?(r=x(a=r,"width",void 0),o=x(a,"height",void 0)):E(s)&&(a=s),void 0!==a&&(s=x(a,"orientation",0)),void 0===s&&(s=0),(h=k(this,C(e).call(this,t,i,n,r,o,a))).type="rexSizer",h.sizerChildren=[],h.setOrientation(s),h}var i,r,o;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_(t,e)}(e,n["a"]),i=e,(r=[{key:"destroy",value:function(t){this.scene&&(this.sizerChildren.length=0,S(C(e.prototype),"destroy",this).call(this,t))}},{key:"setOrientation",value:function(t){return"string"==typeof t&&(t=v.a[t]),this.orientation=t,this}},{key:"add",value:function(t,i,n,r,o,s){S(C(e.prototype),"add",this).call(this,t);var a=m(i);if(null===i)return this;if("number"===a);else if("string"===a)i=T[i];else if(E(i)){var h;i=x(h=i,"proportion",0),n=x(h,"align",P),r=x(h,"padding",0),o=x(h,"expand",!1),s=x(h,"key",void 0)}return"string"==typeof n&&(n=g.a[n]),void 0===i&&(i=0),void 0===n&&(n=P),void 0===r&&(r=0),void 0===o&&(o=!1),(h=this.getSizerConfig(t)).parent=this,h.proportion=i,h.align=n,h.padding=Object(y.a)(r),h.expand=o,this.sizerChildren.push(t),void 0!==s&&this.addChildrenMap(s,t),this}},{key:"addSpace",value:function(t){return void 0===t&&(t=1),this.add(b(this.scene),t),this}},{key:"insert",value:function(t,e,i,n,r,o){return this.add(e,i,n,r,o),this.moveTo(e,t),this}},{key:"remove",value:function(t){var i=this.getSizerConfig(t);return i.parent!==this?this:(i.parent=void 0,j(this.sizerChildren,t),S(C(e.prototype),"remove",this).call(this,t),this)}},{key:"clear",value:function(t){for(var i=0,n=this.sizerChildren.length;i<n;i++)this.getSizerConfig(this.sizerChildren[i]).parent=void 0;return this.sizerChildren.length=0,S(C(e.prototype),"clear",this).call(this,t),this}},{key:"childrenProportion",get:function(){return void 0===this._childrenProportion&&(this._childrenProportion=this.getChildrenProportion()),this._childrenProportion}}])&&O(i.prototype,r),o&&O(i,o),e}();Object.assign(w.prototype,p);var T={min:0,full:-1};e.default=w},function(t,e){t.exports=function(t){return t.y+t.displayHeight-t.displayHeight*t.originY}},function(t,e){t.exports=function(t){return t.x-t.displayWidth*t.originX+.5*t.displayWidth}},function(t,e){t.exports=function(t,e){return t.y=e-t.displayHeight+t.displayHeight*t.originY,t}},function(t,e){t.exports=function(t,e){var i=t.displayWidth*t.originX;return t.x=e+i-.5*t.displayWidth,t}},function(t,e){t.exports=function(t){return t.x-t.displayWidth*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e+t.displayWidth*t.originX,t}},function(t,e){t.exports=function(t){return t.x+t.displayWidth-t.displayWidth*t.originX}},function(t,e){t.exports=function(t,e){return t.x=e-t.displayWidth+t.displayWidth*t.originX,t}},function(t,e){t.exports=function(t,e){var i=t.displayHeight*t.originY;return t.y=e+i-.5*t.displayHeight,t}},function(t,e){t.exports=function(t){return t.y-t.displayHeight*t.originY+.5*t.displayHeight}},function(t,e){t.exports=function(t){return t.y-t.displayHeight*t.originY}},function(t,e){t.exports=function(t,e){return t.y=e+t.displayHeight*t.originY,t}},function(t,e,i){"use strict";var n={add:function(t){return Array.isArray(t)?this.addMultiple(t):this._add(t),this},addMultiple:function(t){return t.forEach(this._add,this),this},_add:function(t){return this.children.add(t),this.resetChildState(t).updateChildVisible(t).updateChildActive(t).updateChildScrollFactor(t).updateChildMask(t),this}},r=Phaser.Math.RotateAround,o={worldToLocal:function(t){return t.x-=this.x,t.y-=this.y,r(t,0,0,-this.rotation),t.x/=this.scaleX,t.y/=this.scaleY,t.x*=this.flipX?-1:1,t.y*=this.flipY?-1:1,t},localToWorld:function(t){return t.x*=this.flipX?-1:1,t.y*=this.flipY?-1:1,t.x*=this.scaleX,t.y*=this.scaleY,r(t,0,0,this.rotation),t.x+=this.x,t.y+=this.y,t}},s=function(t,e){return t===e?1:t/e},a={updateChildPosition:function(t){t.isRexContainerLite&&(t.syncChildrenEnable=!1);var e=this.getLocalState(t);return t.x=e.x,t.y=e.y,this.localToWorld(t),t.scaleX=e.scaleX*this.scaleX,t.scaleY=e.scaleY*this.scaleY,void 0!==t.flipX&&(t.flipX=this.flipX?!e.flipX:e.flipX,t.flipY=this.flipY?!e.flipY:e.flipY),t.rotation=e.rotation+this.rotation,t.isRexContainerLite&&(t.syncChildrenEnable=!0,t.syncPosition()),this},syncPosition:function(){return this.children&&this.syncChildrenEnable&&this.children.getChildren().forEach(this.updateChildPosition,this),this},resetChildPositionState:function(t){var e=this.getLocalState(t);return e.x=t.x,e.y=t.y,this.worldToLocal(e),e.scaleX=s(t.scaleX,this.scaleX),e.scaleY=s(t.scaleY,this.scaleY),void 0!==t.flipX&&(e.flipX=t.flipX,e.flipY=t.flipY),e.rotation=t.rotation-this.rotation,this},setChildPosition:function(t,e,i){return t.x=e,t.y=i,this.resetChildPositionState(t),this},setChildLocalPosition:function(t,e,i){var n=this.getLocalState(t);return n.x=e,n.y=i,this.updateChildPosition(t),this}},h={updateChildVisible:function(t){return t.visible=this.visible&&this.getLocalState(t).visible,this},syncVisible:function(){return this.children&&this.syncChildrenEnable&&this.children.getChildren().forEach(this.updateChildVisible,this),this},resetChildVisibleState:function(t){return this.getLocalState(t).visible=t.visible,this},setChildVisible:function(t,e){return t.visible=e,this.resetChildVisibleState(t),this},setChildLocalVisible:function(t,e){return void 0===e&&(e=!0),this.getLocalState(t).visible=e,this.updateChildVisible(t),this}},c={updateChildAlpha:function(t){return t.alpha=this.alpha*this.getLocalState(t).alpha,this},syncAlpha:function(){return this.children&&this.syncChildrenEnable&&this.children.getChildren().forEach(this.updateChildAlpha,this),this},resetChildAlphaState:function(t){return this.getLocalState(t).alpha=s(t.alpha,this.alpha),this},setChildAlpha:function(t,e){return t.alpha=e,this.resetChildAlphaState(t),this._add},setChildLocalAlpha:function(t,e){return this.getLocalState(t).alpha=e,this.updateChildAlpha(t),this}},u={updateChildActive:function(t){return t.active=this.active&&this.getLocalState(t).active,this},syncActive:function(){return this.children&&this.syncChildrenEnable&&this.children.getChildren().forEach(this.updateChildActive,this),this},resetChildActiveState:function(t){return this.getLocalState(t).active=t.active,this},setChildActive:function(t,e){return t.active=e,this.resetChildActiveState(t),this},setChildLocalActive:function(t,e){return void 0===e&&(e=!0),this.getLocalState(t).active=e,this.updateChildActive(t),this}},l={updateChildMask:function(t){return null==this.mask?this:((this.mask.hasOwnProperty("geometryMask")?this.mask.geometryMask:this.mask.bitmapMask)!==t&&(t.mask=this.mask),this)},syncMask:function(){return this.children&&this.syncChildrenEnable&&this.children.getChildren().forEach(this.updateChildMask,this),this},setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this}};function d(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var f=Phaser.Utils.Array,p={getChildren:function(){return this.children.getChildren()},getAllChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children.getChildren(),n=0,r=i.length;n<r;n++){var o;if(e=i[n],t.push(e),e.hasOwnProperty("isRexContainerLite"))(o=t).push.apply(o,d(e.getAllChildren()))}return t},contains:function(t){if(this.children.contains(t))return!0;for(var e,i=this.children.getChildren(),n=0,r=i.length;n<r;n++)if((e=i[n]).isRexContainerLite&&e.contains(t))return!0;return!1},getByName:function(t){return f.GetFirst(this.list,"name",t)},getRandom:function(t,e){return f.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return f.GetFirstElement(this.list,t,e,i,n)},getAll:function(t,e,i,n){return f.GetAll(this.list,t,e,i,n)},count:function(t,e,i,n){return f.CountAllMatching(this.list,t,e,i,n)},swap:function(t,e){return f.Swap(this.list,t,e),this},moveTo:function(t,e){return f.MoveTo(this.list,t,e),this},setAll:function(t,e,i,n){return f.SetAll(this.list,t,e,i,n),this}};function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function b(t,e,i,n){return(b="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,i,n){var r,o=k(t,e);if(o){if((r=Object.getOwnPropertyDescriptor(o,e)).set)return r.set.call(n,i),!0;if(!r.writable)return!1}if(r=Object.getOwnPropertyDescriptor(n,e)){if(!r.writable)return!1;r.value=i,Object.defineProperty(n,e,r)}else!function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(n,e,i);return!0})(t,e,i,n)}function m(t,e,i,n,r){if(!b(t,e,i,n||t)&&r)throw new Error("failed to set property");return i}function O(t,e,i){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=k(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function k(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var _=Phaser.GameObjects.Zone,E=Phaser.GameObjects.Components,x=function(t){function e(t,i,n,r,o,s){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Array.isArray(r)&&(s=r,r=void 0),void 0===r&&(r=1),void 0===o&&(o=1),(a=g(this,S(e).call(this,t,i,n,r,o))).children=t.add.group(),a.type="rexContainerLite",a.isRexContainerLite=!0,a.syncChildrenEnable=!0,a._flipX=!1,a._flipY=!1,a._alpha=1,a._active=!0,a._mask=null,a._scrollFactorX=1,a._scrollFactorY=1,s&&a.add(s),a}var i,n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(e,_),i=e,(n=[{key:"destroy",value:function(t){this.scene&&(this.children.destroy(!t),this.children=void 0,O(S(e.prototype),"destroy",this).call(this,t))}},{key:"resize",value:function(t,e){return this.setSize(t,e),this}},{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.syncPosition())}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.syncPosition())}},{key:"rotation",get:function(){return O(S(e.prototype),"rotation",this)},set:function(t){this.rotation!==t&&(m(S(e.prototype),"rotation",t,this,!0),this.syncPosition())}},{key:"scaleX",get:function(){return O(S(e.prototype),"scaleX",this)},set:function(t){this.scaleX!==t&&(m(S(e.prototype),"scaleX",t,this,!0),this.syncPosition())}},{key:"scaleY",get:function(){return O(S(e.prototype),"scaleY",this)},set:function(t){this.scaleY!==t&&(m(S(e.prototype),"scaleY",t,this,!0),this.syncPosition())}},{key:"flipX",get:function(){return this._flipX},set:function(t){this._flipX!==t&&(this._flipX=t,this.syncPosition())}},{key:"flipY",get:function(){return this._flipY},set:function(t){this._flipY!==t&&(this._flipY=t,this.syncPosition())}},{key:"visible",get:function(){return O(S(e.prototype),"visible",this)},set:function(t){this.visible!==t&&(m(S(e.prototype),"visible",t,this,!0),this.syncVisible())}},{key:"alpha",get:function(){return this._alpha},set:function(t){this._alpha!==t&&(this._alpha=t,this.syncAlpha())}},{key:"active",get:function(){return this._active},set:function(t){this._active!==t&&(this._active=t,this.syncActive())}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask!==t&&(this._mask=t,this.syncMask())}},{key:"scrollFactorX",get:function(){return this._scrollFactorX},set:function(t){this._scrollFactorX!==t&&(this._scrollFactorX=t,this.syncScrollFactor())}},{key:"scrollFactorY",get:function(){return this._scrollFactorY},set:function(t){this._scrollFactorY!==t&&(this._scrollFactorY=t,this.syncScrollFactor())}},{key:"list",get:function(){return this.children.getChildren()}}])&&v(i.prototype,n),r&&v(i,r),e}();Object.assign(x.prototype,n,{remove:function(t,e){return this.children.remove(t,!1,e),this},clear:function(t){return this.children.clear(!1,t),this}},{getLocalState:function(t){return t.hasOwnProperty("rexContainer")||(t.rexContainer={}),t.rexContainer},resetChildState:function(t){return this.resetChildPositionState(t).resetChildVisibleState(t).resetChildAlphaState(t).resetChildActiveState(t),this},resetChildrenState:function(t){for(var e=0,i=t.length;e<i;e++)this.resetChildState(t[e]);return this},syncProperties:function(){return this.syncPosition().syncVisible().syncAlpha().syncActive().syncScrollFactor().syncMask(),this}},o,a,h,c,{updateChildScrollFactor:function(t){return t.setScrollFactor(this.scrollFactorX,this.scrollFactorY),this},syncScrollFactor:function(){return this.children&&this.syncChildrenEnable&&this.children.getChildren().forEach(this.updateChildScrollFactor,this),this}},u,l,{setDepth:function(t){if(this.depth=t,this.children)for(var e=this.getAllChildren(),i=0,n=e.length;i<n;i++)e[i].depth=t;return this},swapDepth:function(t){var e=this.depth,i=t.depth;return this.setDepth(i),t.setDepth(e),this},incDepth:function(t){if(this.depth+=t,this.children)for(var e=this.getAllChildren(),i=0,n=e.length;i<n;i++)e[i].depth+=t;return this}},p,E.Alpha,E.Flip);e.a=x},function(t,e,i){"use strict";var n=i(41),r=i(14),o=i(37),s=function(t){return void 0===t&&(t=Object(o.a)(this.scene)),this.left=Math.max(this.left,t.left),this.right=Math.min(this.right,t.right),this.top=Math.max(this.top,t.top),this.bottom=Math.min(this.bottom,t.bottom),this},a=i(15),h=i(5),c=i(7),u=i.n(c),l=Phaser.Utils.Objects.GetValue,d=function(t,e,i){return t.add.text(0,0,"")},f=new Phaser.Geom.Rectangle,p=function(t,e){var i,n,r,o,s=t.scene;if("number"==typeof e)i=e;else{i=l(e,"color",16777215);var c=l(e,"name",!1);c&&(n=l(c,"createTextCallback",d),r=l(c,"createTextCallbackScope",void 0),"string"==typeof(o=l(c,"align","left-top"))&&(o=a.a[o]))}if(n&&!t.children){t.children=s.add.group(),t.once("destroy",function(){t.children.destroy(),t.children=void 0});var p=t.clear.bind(t);t.clear=function(){p(),t.children.clear(!1,!0)}}for(var y,v,g=this.getAllChildren([this]),b=0,m=g.length;b<m;b++)(y=g[b]).getBounds&&(i&&t.lineStyle(1,i).strokeRectShape(y.getBounds(f)),y.name&&n&&(v=r?n.call(r,s):n(s))&&(v.setText(y.name),t.children.add(v),h.a.setPosition(f.x,f.y).setSize(f.width,f.height),u()(v,h.a,o)));return this},y=function(t,e){return void 0===this.childrenMap&&(this.childrenMap={}),this.childrenMap[t]=e,this},v=function t(e,i){var n;for(var r in void 0===i&&(i=[]),e)void 0!==(n=e[r]).name?i.push(n):t(n,i);return i},g=/(\S+)\[(\d+)\]/i,b=[],m=function(t){if(void 0!==this.childrenMap&&("string"==typeof t&&(t=t.split(".")),0!==t.length)){var e,i=t.shift();if("#"===i.charAt(0)){i=i.substring(1);for(var n=0,r=(o=v(this.childrenMap,b)).length;n<r;n++)if(o[n].name===i){e=o[n];break}b.length=0}else if(-1===i.indexOf("["))e=this.childrenMap[i];else{var o,s=i.match(g);null!=s&&(o=this.childrenMap[s[1]])&&(e=o[s[2]])}return 0===t.length?e:e&&e.childrenMap?e.getElement(t):null}},O=function(){return 0},k=function(){return 0},S=function(t){void 0===t&&(t=[]);for(var e=t.length,i=this.getChildrenSizers(t),n=t.length,r=e;r<n;r++)i[r].getAllChildrenSizers(t);return t},C=function(t){return void 0===t&&(t=[]),t},_=function(t){if(!t)for(var e,i=this.getAllChildrenSizers([this]),n=0,r=i.length;n<r;n++)(e=i[n]).rexSizer&&e._layoutInit()},E=function(t,e,i){return this.rexSizer.hidden?this:(this.preLayout(),this.postLayout())},x=function(t,e,i){return this._anchor&&this._anchor.updatePosition(),this},j=function(){},P=i(44),w=function(t){return void 0===this._anchor?this._anchor=new P.a(this,t):this._anchor.resetFromJSON(t),this},T=i(43),M=Phaser.Utils.Objects.IsPlainObject,R=Phaser.Utils.Objects.GetValue,z=i(42),A=Phaser.Utils.Objects.IsPlainObject,L=Phaser.Utils.Objects.GetValue,X=i(10),Y={},B=function(t,e,i,n){return void 0===i&&(i=t.alpha),Y.mode=0,Y.start=0,Y.end=i,Y.duration=e,void 0===n?n=new X.a(t,Y):n.resetFromJSON(Y),n.restart(),n},F=Phaser.Utils.Objects.IsPlainObject,H=Phaser.Utils.Objects.GetValue,N=i(39),I=Phaser.Utils.Objects.IsPlainObject,G=Phaser.Utils.Objects.GetValue,W=i(40),D=i(13),V=i(46),U=i(11),J=Phaser.Display.Align.CENTER,Z=function(){if(void 0!==this.backgroundChildren)for(var t,e=this.backgroundChildren,i=this.left,n=this.top,r=this.width,o=this.height,s=0,a=e.length;s<a;s++)(t=e[s]).rexSizer.hidden||(Object(U.a)(t,r,o),h.a.setPosition(i,n).setSize(r,o),u()(t,h.a,J),this.resetChildPositionState(t))};function q(t){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var K=function(t,e,i){var n=this.getTopmostSizer();n.x+=e-this.x,n.y+=i-this.y},Q=function(t,e){var i=q(t);return"string"===i?t=this.getElement(t):void 0!==t&&"object"==i||(e=t,t=this),void 0===e&&(e=!0),t.input&&t.input.hasOwnProperty("draggable")?t.input.draggable=e:e&&(t.setInteractive(),t.scene.input.setDraggable(t),t.on("drag",K,this)),this},$={getSizerConfig:r.a,pushIntoBounds:s,drawBounds:p,getChildrenWidth:O,getChildrenHeight:k,addChildrenMap:y,addElement:y,getElement:m,getAllChildrenSizers:S,getChildrenSizers:C,preLayout:_,_layoutInit:j,layout:E,layoutBackgrounds:Z,postLayout:x,setAnchor:w,popUp:function(t,e,i){if(M(t)){var n=t;t=R(n,"duration",void 0),e=R(n,"orientation",void 0),i=R(n,"ease",void 0)}return this._scale=Object(T.a)(this,t,e,i,this._scale),this},scaleDownDestroy:function(t,e,i,n){if(A(t)){var r=t;t=L(r,"duration",void 0),e=L(r,"orientation",void 0),i=L(r,"ease",void 0),n=L(r,"destroy",void 0)}return this._scale=Object(z.a)(this,t,e,i,n,this._scale),this},fadeIn:function(t){F(t)&&(t=H(t,"duration",void 0));return this._fade=B(this,t,this._fade),this},fadeOutDestroy:function(t,e){if(I(t)){var i=t;t=G(i,"duration",void 0),e=G(i,"destroy",void 0)}return this._fade=Object(N.a)(this,t,e,this._fade),this},isInTouching:function(t){return Object(W.a)(this,t)},getParentSizer:function(){return Object(D.a)(this)},getTopmostSizer:function(){return Object(V.a)(this)},setDraggable:Q};function tt(t){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function it(t,e){return!e||"object"!==tt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function nt(t,e,i){return(nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rt(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function rt(t){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ot(t,e){return(ot=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var st=Phaser.Utils.Objects.GetValue,at=function(t){function e(t,i,n,r,o,s){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=it(this,rt(e).call(this,t,i,n,2,2))).isRexSizer=!0,a.setMinSize(r,o),a.setName(st(s,"name","")),a.rexSizer={},a.backgroundChildren=void 0;var h=st(s,"anchor",void 0);return h&&a.setAnchor(h),a.setDraggable(st(s,"draggable",!1)),a}var i,r,o;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ot(t,e)}(e,n["a"]),i=e,(r=[{key:"destroy",value:function(t){this.scene&&(void 0!==this.backgroundChildren&&(this.backgroundChildren.length=0),nt(rt(e.prototype),"destroy",this).call(this,t))}},{key:"setMinSize",value:function(t,e){return this.setMinWidth(t).setMinHeight(e),this}},{key:"setMinWidth",value:function(t){return null==t&&(t=0),this.minWidth=t,this}},{key:"setMinHeight",value:function(t){return null==t&&(t=0),this.minHeight=t,this}},{key:"alignLeft",value:function(t){return this.left=t,this}},{key:"alignRight",value:function(t){return this.right=t,this}},{key:"alignCenterX",value:function(t){return this.centerX=t,this}},{key:"alignTop",value:function(t){return this.top=t,this}},{key:"alignBottom",value:function(t){return this.bottom=t,this}},{key:"alignCenterY",value:function(t){return this.centerY=t,this}},{key:"pin",value:function(t){return nt(rt(e.prototype),"add",this).call(this,t),this}},{key:"addBackground",value:function(t,i){return void 0===this.backgroundChildren&&(this.backgroundChildren=[]),nt(rt(e.prototype),"add",this).call(this,t),this.getSizerConfig(t).parent=this,this.backgroundChildren.push(t),void 0!==i&&this.addChildrenMap(i,t),this}},{key:"childrenWidth",get:function(){return void 0===this._childrenWidth&&(this._childrenWidth=this.getChildrenWidth()),this._childrenWidth}},{key:"childrenHeight",get:function(){return void 0===this._childrenHeight&&(this._childrenHeight=this.getChildrenHeight()),this._childrenHeight}},{key:"left",get:function(){return this.x-this.displayWidth*this.originX},set:function(t){this.x+=t-this.left}},{key:"right",get:function(){return this.left+this.displayWidth},set:function(t){this.x+=t-this.right}},{key:"centerX",get:function(){return this.left+this.displayWidth/2},set:function(t){this.x+=t-this.centerX}},{key:"top",get:function(){return this.y-this.displayHeight*this.originY},set:function(t){this.y+=t-this.top}},{key:"bottom",get:function(){return this.top+this.displayHeight},set:function(t){this.y+=t-this.bottom}},{key:"centerY",get:function(){return this.top+this.displayHeight/2},set:function(t){this.y+=t-this.centerY}}])&&et(i.prototype,r),o&&et(i,o),e}();Object.assign(at.prototype,$);e.a=at},function(t,e,i){"use strict";var n=Phaser.Utils.Objects.GetValue;e.a=function(t,e){return void 0===e&&(e={}),"number"==typeof t?(e.left=t,e.right=t,e.top=t,e.bottom=t):(e.left=n(t,"left",0),e.right=n(t,"right",0),e.top=n(t,"top",0),e.bottom=n(t,"bottom",0)),e}},,,,function(t,e,i){"use strict";var n;e.a=function(t,e){void 0===e&&(void 0===n&&(n=new Phaser.Geom.Rectangle),e=n);var i=t.game.config;return e.setTo(0,0,i.width,i.height),e}},,function(t,e,i){"use strict";var n=i(10),r={};e.a=function(t,e,i,o){return i instanceof n.a&&(o=i,i=void 0),void 0===i&&(i=!0),r.mode=i?1:0,r.end=0,r.duration=e,void 0===o?o=new n.a(t,r):o.resetFromJSON(r),o.restart(),o}},function(t,e,i){"use strict";var n=void 0;e.a=function(t,e,i,r){if(void 0===n&&(n=new Phaser.Geom.Rectangle),t.getBounds(n),e)return!(i&&!i(t,e)||!n.contains(e.x,e.y)||r&&!r(t,e));for(var o=t.scene.input.manager,s=o.pointersTotal,a=o.pointers,h=0;h<s;h++)if(e=a[h],(!i||i(t,e))&&n.contains(e.x,e.y)&&(!r||r(t,e)))return!0;return!1}},function(t,e,i){"use strict";var n=i(31);e.a=n.a},function(t,e,i){"use strict";var n=i(12),r={};e.a=function(t,e,i,o,s,a){switch(s instanceof n.a&&(a=s,s=void 0),void 0===s&&(s=!0),r.mode=s?1:0,i){case 0:case"x":r.end={x:0};break;case 1:case"y":r.end={y:0};break;default:r.end=0}return r.duration=e,r.ease=void 0===o?"Linear":o,void 0===a?a=new n.a(t,r):a.resetFromJSON(r),a.restart(),a}},function(t,e,i){"use strict";var n=i(12),r={};e.a=function(t,e,i,o,s){switch(r.mode=0,i){case 0:case"x":r.start={x:0};break;case 1:case"y":r.start={y:0};break;default:r.start=0}return r.end=1,r.duration=e,r.ease=void 0===o?"Cubic":o,void 0===s?s=new n.a(t,r):s.resetFromJSON(r),s.restart(),s}},function(t,e,i){"use strict";var n=Phaser.Geom.Rectangle,r=function(t,e){void 0===e&&(e=new n);var i=t.canvasBounds,r=t.displayScale,o=t.autoCenter;return e.x=i.x>=0?0:-i.x*r.x,e.y=i.y>=0?0:-i.y*r.y,e.width=i.width*r.x-e.x,e.height=i.height*r.y-e.y,1!==o&&2!==o||(e.width-=e.x),1!==o&&3!==o||(e.height-=e.y),e};function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=Phaser.Geom.Rectangle,a=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gameObject=e,this.viewport=new s,this.resetFromJSON(i),this.boot()}var e,i,n;return e=t,(i=[{key:"resetFromJSON",value:function(t){var e,i,n,r,o,s,a,h;return void 0!==t.x?(e=null,i=t.x):void 0!==t.left?(e=0,i=t.left):void 0!==t.right?(e=1,i=t.right):void 0!==t.centerX&&(e=.5,i=t.centerX),void 0!==t.y?(n=null,r=t.y):void 0!==t.top?(n=0,r=t.top):void 0!==t.bottom?(n=1,r=t.bottom):void 0!==t.centerY&&(n=.5,r=t.centerY),void 0!==i&&(i=i.replace("left","0%").replace("right","100%").replace("center","50%").split("%"),o=parseFloat(i[0])/100,s=""===i[1]?0:parseFloat(i[1])),void 0!==r&&(r=r.replace("top","0%").replace("bottom","100%").replace("center","50%").split("%"),a=parseFloat(r[0])/100,h=""===r[1]?0:parseFloat(r[1])),this.setAlign(e,n),this.setPercentage(o,a),this.setOffset(s,h),this}},{key:"boot",value:function(){this.scaleManamger.on("resize",this.anchor,this),this.gameObject.once("destroy",this.destroy,this),this.anchor()}},{key:"shutdown",value:function(){this.scaleManamger.off("resize",this.anchor,this),this.gameObject=void 0}},{key:"destroy",value:function(){this.shutdown()}},{key:"setAlign",value:function(t,e){return this.alignX=t,this.alignY=e,this}},{key:"setPercentage",value:function(t,e){return this.percentageX=t,this.percentageY=e,this}},{key:"setOffset",value:function(t,e){return this.offsetX=t,this.offsetY=e,this}},{key:"anchor",value:function(){return r(this.scaleManamger,this.viewport),this.updatePosition(),this}},{key:"updatePosition",value:function(){var t=this.gameObject;return null===this.alignX?t.x=this.anchorX:void 0!==this.alignX&&(t.x=this.anchorX+t.displayWidth*(t.originX-this.alignX)),null===this.alignY?this.gameObject.y=this.anchorY:void 0!==this.alignY&&(t.y=this.anchorY+t.displayHeight*(t.originY-this.alignY)),this}},{key:"scaleManamger",get:function(){return this.gameObject.scene.scale}},{key:"anchorX",get:function(){return this.viewport.x+this.viewport.width*this.percentageX+this.offsetX}},{key:"anchorY",get:function(){return this.viewport.y+this.viewport.height*this.percentageY+this.offsetY}}])&&o(e.prototype,i),n&&o(e,n),t}();e.a=a},function(t,e,i){"use strict";i.d(e,"c",function(){return r}),i.d(e,"a",function(){return o}),i.d(e,"b",function(){return s});var n=i(14),r=function(t){a(t,!1)},o=function(t){a(t,!0)},s=function(t){return!!t&&!Object(n.a)(t).hidden},a=function(t,e){t&&(Object(n.a)(t).hidden=e,t.setVisible(!e))}},function(t,e,i){"use strict";var n=i(13);e.a=function(t){for(var e=Object(n.a)(t);e;)t=e,e=Object(n.a)(e);return t}},,function(t,e,i){"use strict";e.a={x:0,h:0,horizontal:0,"left-to-right":0,y:1,v:1,vertical:1,"top-to-bottom":1}},,,,,,,function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(19),r=i(20),o=i(21),s=i(22);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(19),r=i(23),o=i(21),s=i(24);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(19),r=i(25),o=i(21),s=i(26);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(60),r=i(20),o=i(28);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),n(t,r(e)+i,o(e)+s),t}},function(t,e,i){var n=i(22),r=i(27);t.exports=function(t,e,i){return n(t,e),r(t,i)}},function(t,e,i){var n=i(28),r=i(23),o=i(27),s=i(24);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(28),r=i(25),o=i(27),s=i(26);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(20),r=i(29),o=i(22),s=i(30);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),s(t,r(e)-a),t}},function(t,e,i){var n=i(23),r=i(29),o=i(24),s=i(30);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),s(t,r(e)-a),t}},function(t,e,i){var n=i(25),r=i(29),o=i(26),s=i(30);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),s(t,r(e)-a),t}},,function(t,e,i){"use strict";i.r(e);var n=i(18),r=i(74),o=function(t,e){t._buttonBehavior=new r.a(t,e),t._buttonBehavior.on("click",function(e,i,n,r){s.call(this,"button.click",t,n,r)},this),t.on("pointerover",function(e,i,n,r){s.call(this,"button.over",t,e,r)},this).on("pointerout",function(e,i){s.call(this,"button.out",t,e,i)},this)},s=function(t,e,i,n){var r;if("number"==typeof e){if(r=e,!(e=this.childrenMap.buttons[r]))return}else if(-1===(r=this.childrenMap.buttons.indexOf(e)))return;void 0!==this.groupName?this.eventEmitter.emit(t,e,this.groupName,r,i,n):this.eventEmitter.emit(t,e,r,i,n)},a=i(45),h={getButton:function(t){var e;return"number"==typeof t?e=this.childrenMap.buttons[t]:(e=t,-1===this.childrenMap.buttons.indexOf(e)&&(e=void 0)),e},emitButtonClick:function(t){return s.call(this,"button.click",t),this},showButton:function(t){return Object(a.c)(this.getButton(t)),this},hideButton:function(t){return Object(a.a)(this.getButton(t)),this},isButtonShown:function(t){return Object(a.b)(this.getButton(t)),this},forEachButtton:function(t,e){for(var i=this.childrenMap.buttons,n=0,r=i.length;n<r;n++)e?t.call(e,i[n],n,i):t(i[n],n,i);return this}};function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=Phaser.Utils.Objects.GetValue,p=function(t){function e(t,i){var n,r,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),void 0===i&&(i={}),r=this,(n=!(s=u(e).call(this,t,i))||"object"!==c(s)&&"function"!=typeof s?l(r):s).type="rexButtons",n.eventEmitter=f(i,"eventEmitter",l(n)),n.groupName=f(i,"groupName",void 0);var a=f(i,"background",void 0),h=f(i,"buttons",void 0);h&&0===h.length&&(h=void 0);var d=f(i,"space",0);if(a&&n.addBackground(a),h){var p,y,v=f(i,"align",void 0),g=f(i,"click",void 0);"right"!==v&&"bottom"!==v&&"center"!==v||n.addSpace();for(var b=0,m=h.length;b<m;b++)p=h[b],y=0===n.orientation?{left:b>=1?d:0,right:0,top:0,bottom:0}:{left:0,right:0,top:b>=1?d:0,bottom:0},n.add(p,0,"center",y,!0),o.call(l(n),p,g);"center"===v&&n.addSpace()}return n.addChildrenMap("background",a),n.addChildrenMap("buttons",h||[]),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(e,n["default"]),e}();Object.assign(p.prototype,h);e.default=p},,,,,,,function(t,e,i){"use strict";var n=i(1),r=i(3);function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=Phaser.Utils.Objects.GetValue,a=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gameObject=e,this.scene=Object(r.a)(e),this.setEventEmitter(s(i,"eventEmitter",void 0)),e.setInteractive(s(i,"inputConfig",void 0)),this.resetFromJSON(i),this.boot()}var e,i,n;return e=t,(i=[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.lastClickTime=void 0,this.setEnable(s(t,"enable",!0)),this.setMode(s(t,"mode",1)),this.setClickInterval(s(t,"clickInterval",100)),this.setDragThreshold(s(t,"threshold",void 0)),this}},{key:"boot",value:function(){this.gameObject.on("pointerdown",this.onPress,this),this.gameObject.on("pointerup",this.onRelease,this),this.gameObject.on("pointerout",this.onPointOut,this),this.gameObject.on("pointermove",this.onMove,this),this.gameObject.once("destroy",this.destroy,this)}},{key:"shutdown",value:function(){this.destroyEventEmitter(),this.pointer=void 0,this.gameObject=void 0,this.scene=void 0}},{key:"destroy",value:function(){this.shutdown()}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable===t?this:(t||this.cancel(),this.enable=t,this.gameObject.input.enabled=t,this)}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=h[t]),this.mode=t,this}},{key:"setClickInterval",value:function(t){return this.clickInterval=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"onPress",value:function(t,e,i,n){void 0===this.pointer&&(this.pointer=t,0===this.mode&&this.click(t.downTime,t,n))}},{key:"onRelease",value:function(t,e,i,n){this.pointer===t&&(1===this.mode&&this.click(t.upTime,t,n),this.pointer=void 0)}},{key:"onPointOut",value:function(t,e){this.pointer===t&&this.cancel()}},{key:"onMove",value:function(t,e,i,n){this.pointer===t&&void 0!==this.dragThreshold&&t.getDistance()>=this.dragThreshold&&this.cancel()}},{key:"click",value:function(t,e,i){if(void 0===t)return this.emit("click",this,this.gameObject,e,i),this;this.pointer=void 0;var n=this.lastClickTime;return void 0!==n&&t-n<=this.clickInterval?this:(this.lastClickTime=t,this.emit("click",this,this.gameObject,e,i),this)}},{key:"cancel",value:function(){return this.pointer=void 0,this}}])&&o(e.prototype,i),n&&o(e,n),t}();Object.assign(a.prototype,n.a);var h={press:0,pointerdown:0,release:1,pointerup:1};e.a=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";i.r(e);var n=i(67),r=function(t,e){return e.orientation=t.orientation,e},o={expandSubMenu:function(t,e){var i;this.collapseSubMenu(),i=this.root.toggleOrientation?0===this.orientation?1:0:this.orientation;var n=new this.constructor(this.scene,{items:e,orientation:i,createBackgroundCallback:this.root.createBackgroundCallback,createBackgroundCallbackScope:this.root.createBackgroundCallbackScope,createButtonCallback:this.root.createButtonCallback,createButtonCallbackScope:this.root.createButtonCallbackScope,easeIn:this.root.easeIn,easeOut:this.root.easeOut,_rootMenu:this.root,_parentMenu:this,_parentButton:t});return this.pin(n),this.childrenMap.subMenu=n,this.root.emit("expand",n,t,this),this},collapse:function(){return this.root.emit("collapse",this,this.parentButton,this.parentMenu),this.scaleDownDestroy(r(this,this.root.easeOut)),this.collapseSubMenu(),this},collapseSubMenu:function(){if(void 0===this.childrenMap.subMenu)return this;var t=this.childrenMap.subMenu;return this.childrenMap.subMenu=void 0,this.remove(t),t.collapse(),this}},s=function(t,e,i,n){var r;return i&&(e.scene=t,r=n?i.call(n,e):i(e),e.scene=void 0),r},a=function(t,e,i,n){var r,o,s=[];if(e&&i)for(var a=0,h=e.length;a<h;a++)(r=e[a]).scene=t,o=n?i.call(n,r,a,e):i(r,a,e),r.scene=void 0,s.push(o);return s},h=i(37),c=function(t){t.on(t.root.expandEventName,function(t,e){if(!this._isPassedEvent){var i=this.items[e].children;i&&this.expandSubMenu(t,i)}},t).on("button.click",function(t,e,i,n){this!==this.root&&(this.root._isPassedEvent=!0,this.root.emit("button.click",t,e,i,n),this.root._isPassedEvent=!1)},t).on("button.over",function(t,e,i,n){this!==this.root&&(this.root._isPassedEvent=!0,this.root.emit("button.over",t,e,i,n),this.root._isPassedEvent=!1)},t).on("button.out",function(t,e,i,n){this!==this.root&&(this.root._isPassedEvent=!0,this.root.emit("button.out",t,e,i,n),this.root._isPassedEvent=!1)},t)};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e,i){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var v=Phaser.Utils.Objects.GetValue,g=function(t){function e(t,i){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),void 0===i&&(i={}),i.hasOwnProperty("orientation")||(i.orientation=1);var o=i._rootMenu,l=i._parentMenu,f=i._parentButton,y=v(i,"items",void 0),g=v(i,"createBackgroundCallback",void 0),b=v(i,"createBackgroundCallbackScope",void 0);i.background=s(t,y,g,b);var m,O,k=v(i,"createButtonCallback",void 0),S=v(i,"createButtonCallbackScope",void 0);i.buttons=a(t,y,k,S),m=this,(n=!(O=p(e).call(this,t,i))||"object"!==u(O)&&"function"!=typeof O?d(m):O).type="rexMenu",n.items=y,n.root=void 0===o?d(n):o,n.parentMenu=l,n.parentButton=f;var C=n.root===d(n);C&&(void 0===(_=i.bounds)&&(_=Object(h.a)(t)),n.bounds=_,n.expandEventName=v(i,"expandEvent","button.click"),n.toggleOrientation=v(i,"toggleOrientation",!1),n.easeIn=v(i,"easeIn",0),"number"==typeof n.easeIn&&(n.easeIn={duration:n.easeIn}),n.easeOut=v(i,"easeOut",0),"number"==typeof n.easeOut&&(n.easeOut={duration:n.easeOut}),n.createBackgroundCallback=g,n.createBackgroundCallbackScope=b,n.createButtonCallback=k,n.createButtonCallbackScope=S,n._isPassedEvent=!1);n.setOrigin(0).layout();var _=n.root.bounds;if(C)n.expandOrientation=[n.y<_.centerY?1:3,n.x<_.centerX?0:2];else switch(n.root.expandOrientation[l.orientation]){case 0:n.alignTop(f.top).alignLeft(f.right);break;case 1:n.alignLeft(f.left).alignTop(f.bottom);break;case 2:n.alignTop(f.top).alignRight(f.left);break;case 3:n.alignLeft(f.left).alignBottom(f.top)}return n.pushIntoBounds(_),c(d(n)),n.popUp(r(d(n),n.root.easeIn)),n}var i,o,g;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(e,n["default"]),i=e,(o=[{key:"isInTouching",value:function(t){return!!f(p(e.prototype),"isInTouching",this).call(this,t)||!!this.childrenMap.subMenu&&this.childrenMap.subMenu.isInTouching(t)}}])&&l(i.prototype,o),g&&l(i,g),e}();Object.assign(g.prototype,o);e.default=g}]).default});