text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rexfixwidthsizer=e():t.rexfixwidthsizer=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=155)}({0:function(t,e,i){"use strict";i.d(e,"b",function(){return n}),i.d(e,"a",function(){return r});var n=function(t){return void 0!==t.displayWidth?t.displayWidth:t.width},r=function(t){return void 0!==t.displayHeight?t.displayHeight:t.height}},11:function(t,e,i){"use strict";var n=i(28);e.a=n.a},12:function(t,e,i){"use strict";var n=i(3),r=i(7),o=i(20),s=i(2);function a(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 h=Phaser.Utils.Objects.GetValue,c=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.parent=e,this.scene=Object(r.a)(e);var n=h(i,"eventEmitter",!1);!0===n&&(n=void 0),this.setEventEmitter(n),this.boot()}var e,i,n;return e=t,(i=[{key:"boot",value:function(){Object(o.a)(this.parent)?this.parent.once&&this.parent.on("destroy",this.destroy,this):Object(s.a)(this.parent)&&this.parent.events.once("shutdown",this.destroy,this)}},{key:"shutdown",value:function(){return this.stop(),Object(s.a)(this.parent)&&this.parent.events.off("shutdown",this.destroy,this),this.destroyEventEmitter(),this.parent=void 0,this.scene=void 0,this}},{key:"destroy",value:function(){return this.shutdown(),this}},{key:"start",value:function(t){return this.isRunning?this:(this.tween=this.scene.tweens.add(t).on("complete",this.complete,this),!1===this.getEventEmitter()&&this.setEventEmitter(this.tween),this)}},{key:"restart",value:function(){return this.stop().start(),this}},{key:"stop",value:function(){return this.tween?(this.getEventEmitter()===this.tween&&this.setEventEmitter(!1),this.tween.remove(),this.tween=void 0,this):this}},{key:"complete",value:function(){return this.stop(),this.getEventEmitter()&&this.emit("complete"),this}},{key:"isRunning",get:function(){return!!this.tween}}])&&a(e.prototype,i),n&&a(e,n),t}();Object.assign(c.prototype,n.a),e.a=c},14:function(t,e,i){"use strict";var n=i(12);function r(t){return(r="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 s(t,e){return!e||"object"!==r(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 a(t,e,i){return(a="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=h(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 h(t){return(h=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 u=Phaser.Utils.Objects.GetValue,l=Phaser.Utils.Objects.GetAdvancedValue,f=function(t){function e(t,i){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,h(e).call(this,t))).gameObject=t,n.alphaStart=void 0,n.alphaEnd=void 0,n.resetFromJSON(i),n}var i,r,f;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,n["a"]),i=e,(r=[{key:"resetFromJSON",value:function(t){return this.setMode(u(t,"mode",0)),this.setAlphaRange(l(t,"start",this.gameObject.alpha),l(t,"end",0)),this.setDelay(l(t,"delay",0)),this.setDuration(l(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:"shutdown",value:function(){return a(h(e.prototype),"shutdown",this).call(this),this.gameObject=void 0,this}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=d[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.isRunning?this:(this.gameObject.setAlpha(this.alphaStart),a(h(e.prototype),"start",this).call(this,{targets:this.gameObject,alpha:this.alphaEnd,delay:this.delay,duration:this.duration,ease:"Linear",yoyo:2==this.mode,repeat:2==this.mode?-1:0}),this)}},{key:"complete",value:function(){return a(h(e.prototype),"complete",this).call(this),1===this.mode&&this.gameObject.destroy(),this}}])&&o(i.prototype,r),f&&o(i,f),e}(),d={stop:0,destroy:1,yoyo:2},p=f;e.a=p},15:function(t,e,i){"use strict";var n=i(12);function r(t){return(r="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 s(t,e){return!e||"object"!==r(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 a(t,e,i){return(a="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=h(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 h(t){return(h=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 u=Phaser.Utils.Objects.GetValue,l=Phaser.Utils.Objects.GetAdvancedValue,f=function(t){function e(t,i){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,h(e).call(this,t))).gameObject=t,n.scaleStart={},n.scaleEnd={},n.resetFromJSON(i),n}var i,r,f;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,n["a"]),i=e,(r=[{key:"resetFromJSON",value:function(t){return this.setMode(u(t,"mode",0)),this.setScaleRange(l(t,"start",void 0),l(t,"end",0)),this.setDelay(l(t,"delay",0)),this.setDuration(l(t,"duration",1e3)),this.setEase(u(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:"setMode",value:function(t){return"string"==typeof t&&(t=d[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=u(t,"x",this.gameObject.scaleX),this.scaleStart.y=u(t,"y",this.gameObject.scaleY)),"number"==typeof e?(this.scaleEnd.x=e,this.scaleEnd.y=e):(this.scaleEnd.x=u(e,"x",this.scaleStart.x),this.scaleEnd.y=u(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.isRunning?this:(this.gameObject.setScale(this.scaleStart.x,this.scaleStart.y),a(h(e.prototype),"start",this).call(this,{targets:this.gameObject,scaleX:this.scaleEnd.x,scaleY:this.scaleEnd.y,delay:this.delay,duration:this.duration,ease:this.ease,yoyo:2==this.mode,repeat:2==this.mode?-1:0}),this)}},{key:"complete",value:function(){return a(h(e.prototype),"complete",this).call(this),1===this.mode&&this.gameObject.destroy(),this}}])&&o(i.prototype,r),f&&o(i,f),e}(),d={stop:0,destroy:1,yoyo:2},p=f;e.a=p},155:function(t,e,i){"use strict";i.r(e);var n=i(29),r=function(){return this.rexSizer.hidden?0:(t=0===this.orientation?this.maxChildWidth:0,t=Math.max(t,this.minWidth));var t},o=function(){return this.rexSizer.hidden?0:(t=0===this.orientation?0:this.maxChildHeight,t=Math.max(t,this.minHeight));var t},s=function(t){void 0===t&&(t=[]);for(var e,i=this.sizerChildren,n=0,r=i.length;n<r;n++)"\n"!==(e=i[n])&&e.isRexSizer&&t.push(e);return t},a=i(0),h=function(t){var e=t.rexSizer.padding;return Object(a.b)(t)+e.left+e.right},c=function(t){var e=t.rexSizer.padding;return Object(a.a)(t)+e.top+e.bottom},u=function(t,e){return 0===e?h(t):c(t)},l=function(t,e){return 0===e?c(t):h(t)},f=function(t){for(var e,i,n,r,o={lines:[],width:0,height:0},s=this.sizerChildren,a=0,h=o.lines,c=0,f=s.length;c<f;c++){if("\n"===(e=s[c]))e=void 0,i=0,r=!0;else{if(e.rexSizer.hidden)continue;e.isRexSizer&&e.layout(),r=a<(i=u(e,this.orientation))}r&&(n&&(n.width=t-(a+this.itemSpacing),o.width=Math.max(o.width,n.width),o.height+=n.height+this.lineSpacing),n={children:[],height:0},h.push(n),a=t),a-=i+this.itemSpacing,e&&(n.children.push(e),n.height=Math.max(n.height,l(e,this.orientation)))}return n&&(n.width=t-(a+this.itemSpacing),o.width=Math.max(o.width,n.width),o.height+=n.height),o},d=i(5),p=i(9),y=function(t,e,i){return e/t<=.25?e/(i-1):0},v=function(t,e,i){if(this.rexSizer.hidden)return this;if(this.preLayout(t),void 0===e){var n=this.padding;e=Math.max(this.maxChildWidth+n.left+n.right,this.minWidth)}void 0===i&&(n=this.padding,i=Math.max(this.maxChildHeight+n.top+n.bottom,this.minHeight));var r;n=this.padding;r=0===this.orientation?e-n.left-n.right:i-n.top-n.bottom;var o=f.call(this,r);0===this.orientation?i=Math.max(i,o.height+n.top+n.bottom):e=Math.max(e,o.height+n.left+n.right),this.resize(e,i);var s,h,c,u,l,v,b,g,m,O,j,_=0,S=this.left,P=this.top,w=o.lines;0===this.orientation?(c=S,u=P+this.padding.top):(c=S+this.padding.left,u=P);for(var E=0,C=w.length;E<C;E++){switch(O=(m=w[E]).children,this.rtl&&O.reverse(),j=r-m.width,this.align){case 0:break;case 1:0===this.orientation?c+=j:u+=j;break;case 2:0===this.orientation?c+=j/2:u+=j/2;break;case 3:_=y(r,j,O.length);break;case 4:0===(_=y(r,j,O.length))&&(0===this.orientation?c+=j:u+=j);break;case 5:0===(_=y(r,j,O.length))&&(0===this.orientation?c+=j/2:u+=j/2)}for(var x=0,k=O.length;x<k;x++)n=(h=(s=O[x]).rexSizer).padding,0===this.orientation?(l=c+n.left,l+=0===x?this.padding.left:this.itemSpacing,v=u+n.top,b=Object(a.b)(s),g=Object(a.a)(s),c=l+b+n.right+_):(l=c+n.left,v=u+n.top,v+=0===x?this.padding.top:this.itemSpacing,b=Object(a.b)(s),u=v+(g=Object(a.a)(s))+n.bottom+_),d.a.setPosition(l,v).setSize(b,g),Object(p.a)(s,d.a,h.align),this.resetChildPositionState(s);0===this.orientation?(c=S,u+=m.height+this.lineSpacing):(c+=m.height+this.lineSpacing,u=P)}return this.layoutBackgrounds(),this.postLayout()},b=i(17),g=i(8),m=Phaser.Utils.Objects.IsPlainObject,O=Phaser.Utils.Objects.GetValue,j=Phaser.Display.Align.CENTER,_=function(t,e,i,n){if("\n"===t)return this.addNewLine(),this;var r;(this.pin(t),m(e))&&(e=O(r=e,"padding",0),i=O(r,"key",void 0));return void 0===e&&(e=0),(r=this.getSizerConfig(t)).align=j,r.padding=Object(b.a)(e),void 0===n||n>=this.sizerChildren.length?this.sizerChildren.push(t):this.sizerChildren.splice(n,0,t),void 0!==i&&this.addChildrenMap(i,t),this},S={add:function(t,e,i){if(Object(g.a)(t))for(var n=t,r=0,o=n.length;r<o;r++)_.call(this,n[r],e);else _.call(this,t,e,i);return this},addNewLine:function(){return this.sizerChildren.push("\n"),this},insert:function(t,e,i,n){return _.call(this,e,i,n,t),this}},P=i(11),w=Phaser.Utils.Array.Remove,E=P.a.prototype.remove,C=P.a.prototype.clear,x={remove:function(t){return this.getParentSizer(t)!==this?this:(w(this.sizerChildren,t),E.call(this,t),this)},clear:function(t){return this.sizerChildren.length=0,C.call(this,t),this}},k={getChildrenWidth:r,getChildrenHeight:o,getChildrenSizers:s,layout:v};Object.assign(k,S,x);var T=k,R=i(44),M=function(t){void 0===t&&(t=this.sizerChildren);for(var e,i=0,n=0,r=t.length;n<r;n++)"\n"!==(e=t[n])&&(i=Math.max(i,h(e)));return i},X=function(t){void 0===t&&(t=this.sizerChildren);for(var e,i=0,n=0,r=t.length;n<r;n++)"\n"!==(e=t[n])&&(i=Math.max(i,c(e)));return i};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 A(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 z(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 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=L(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 L(t){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function D(t,e){return(D=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var N=Phaser.Utils.Objects.IsPlainObject,G=Phaser.Utils.Objects.GetValue,H=function(t){function e(t,i,n,r,o,s,a,h){var c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),N(i)?(i=G(h=i,"x",0),n=G(h,"y",0),r=G(h,"width",void 0),o=G(h,"height",void 0),s=G(h,"orientation",0),a=G(h,"space",h)):N(r)?(r=G(h=r,"width",void 0),o=G(h,"height",void 0),s=G(h,"orientation",0),a=G(h,"space",h)):N(s)&&(s=G(h=s,"orientation",0),a=G(h,"space",h)),void 0===s&&(s=0),void 0===a&&(a=0),(c=z(this,L(e).call(this,t,i,n,r,o,h))).type="rexFixWidthSizer",c.sizerChildren=[],c.setOrientation(s),c.setPadding(a),c.setItemSpacing(G(a,"item",0)),c.setLineSpacing(G(a,"line",0)),c.setAlign(G(h,"align",0)),c.setRTL(G(h,"rtl",!1)),c.addChildrenMap("items",c.sizerChildren),c}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&&D(t,e)}(e,n["a"]),i=e,(r=[{key:"destroy",value:function(t){this.scene&&(this.sizerChildren.length=0,F(L(e.prototype),"destroy",this).call(this,t))}},{key:"setOrientation",value:function(t){return"string"==typeof t&&(t=R.a[t]),this.orientation=t,this}},{key:"setPadding",value:function(t){return this.padding=Object(b.a)(t,this.padding),this}},{key:"setItemSpacing",value:function(t){return this.itemSpacing=t,this}},{key:"setLineSpacing",value:function(t){return this.lineSpacing=t,this}},{key:"setAlign",value:function(t){return"string"==typeof t&&(t=I[t]),this.align=t,this}},{key:"setRTL",value:function(t){return void 0===t&&(t=!0),this.rtl=t,this}},{key:"maxChildWidth",get:function(){return void 0===this._maxChildWidth&&(this._maxChildWidth=M.call(this)),this._maxChildWidth}},{key:"maxChildHeight",get:function(){return void 0===this._maxChildHeight&&(this._maxChildHeight=X.call(this)),this._maxChildHeight}}])&&A(i.prototype,r),o&&A(i,o),e}(),I={left:0,top:0,right:1,bottom:1,center:2,justify:3,"justify-left":3,"justify-top":3,"justify-right":4,"justify-bottom":4,"justify-center":5};Object.assign(H.prototype,T);e.default=H},16: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)))}},17: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}},19:function(t,e,i){"use strict";e.a=function(){}},2:function(t,e,i){"use strict";var n=Phaser.Scene;e.a=function(t){return t instanceof n}},20:function(t,e,i){"use strict";var n=Phaser.GameObjects.GameObject;e.a=function(t){return t instanceof n}},21: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}},22:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r});var n=function(t){var e;return t.hasOwnProperty("rexContainer")&&(e=t.rexContainer.parent),e},r=function(t){for(var e=n(t);e;)t=e,e=n(e);return t}},25:function(t,e,i){"use strict";var n=i(12);function r(t){return(r="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 s(t,e){return!e||"object"!==r(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 a(t,e,i){return(a="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=h(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 h(t){return(h=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 u=Phaser.Utils.Objects.GetValue,l=Phaser.Utils.Objects.GetAdvancedValue,f=function(t){function e(t,i){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,h(e).call(this,t))).gameObject=t,n.resetFromJSON(i),n}var i,r,f;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,n["a"]),i=e,(r=[{key:"resetFromJSON",value:function(t){if(this.setMode(u(t,"mode",0)),t&&(t.hasOwnProperty("x")||t.hasOwnProperty("y"))){var e=l(t,"x",void 0),i=l(t,"y",void 0);this.setTargetPosition(e,i)}else this.setTargetPosition(t);return this.setDelay(l(t,"delay",0)),this.setDuration(l(t,"duration",1e3)),this.setEase(u(t,"ease",void 0)),this}},{key:"toJSON",value:function(){return{mode:this.mode,startX:this.startX,startY:this.startY,endX:this.endX,endY:this.endY,delay:this.delay,duration:this.duration}}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=d[t]),this.mode=t,this}},{key:"setTargetPosition",value:function(t,e){if("number"==typeof t||"number"==typeof e)this.startX=this.gameObject.x,this.startY=this.gameObject.y,this.endX=t,this.endY=e;else{var i=t;this.startX=l(i,"startX",void 0),this.startY=l(i,"startY",void 0),this.endX=l(i,"endX",void 0),this.endY=l(i,"endY",void 0)}return 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(){if(this.isRunning)return this;var t={targets:this.gameObject,delay:this.delay,duration:this.duration,ease:this.ease,yoyo:2==this.mode,repeat:2==this.mode?-1:0};return void 0!==this.startX&&void 0!==this.endX&&(this.gameObject.setX(this.startX),t.x=this.endX),void 0!==this.startY&&void 0!==this.endY&&(this.gameObject.setY(this.startY),t.y=this.endY),a(h(e.prototype),"start",this).call(this,t),this}},{key:"complete",value:function(){return a(h(e.prototype),"complete",this).call(this),1===this.mode&&this.gameObject.destroy(),this}}])&&o(i.prototype,r),f&&o(i,f),e}(),d={stop:0,destroy:1,yoyo:2},p=f;i.d(e,"d",function(){return y}),i.d(e,"e",function(){return v}),i.d(e,"b",function(){return b}),i.d(e,"c",function(){return g}),i.d(e,"a",function(){return p});var y=function(t,e,i,n,r,o,s){o instanceof p&&(s=o,o=void 0),void 0===o&&(o=!1);var a={};return a.mode=o?1:0,void 0!==i&&(a.startX=t.x,a.endX=m(i,t.x)),void 0!==n&&(a.startY=t.y,a.endY=m(n,t.y)),a.duration=e,a.ease=void 0===r?"Linear":r,void 0===s?s=new p(t,a):s.resetFromJSON(a),s.restart(),s},v=function(t,e,i,n,r,o){return y(t,e,i,n,r,!0,o)},b=function(t,e,i,n,r,o,s){o instanceof p&&(s=o,o=void 0),void 0===o&&(o=!1);var a={};return a.mode=o?1:0,void 0!==i&&(a.startX=m(i,t.x),a.endX=t.x),void 0!==n&&(a.startY=m(n,t.y),a.endY=t.y),a.duration=e,a.ease=void 0===r?"Linear":r,void 0===s?s=new p(t,a):s.resetFromJSON(a),s.restart(),s},g=function(t,e,i,n,r,o){return b(t,e,i,n,r,!0,o)},m=function(t,e){if("number"==typeof t)return t;var i=t[0],n=parseFloat(t.substr(2));switch(i){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n}}},26:function(t,e,i){"use strict";i.d(e,"b",function(){return n}),i.d(e,"a",function(){return r});var n=function(t,e){return new Promise(function(i,n){t.once(e,function(){i()})})},r=function(t){return n(t,"complete")}},28:function(t,e,i){"use strict";function n(t){return(n="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 r(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 o(t,e){return!e||"object"!==n(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=a(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 a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=Phaser.GameObjects.Zone,u=Phaser.Utils.Array.Add,l=Phaser.Utils.Array.Remove,f=function(t){function e(t,i,n,r,s){var h;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Array.isArray(r)&&(children=r,r=void 0),void 0===r&&(r=1),void 0===s&&(s=1),(h=o(this,a(e).call(this,t,i,n,r,s))).children=[],h}var i,n,f;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&&h(t,e)}(e,c),i=e,(n=[{key:"destroy",value:function(t){this.scene&&(this.clear(!t),s(a(e.prototype),"destroy",this).call(this,t))}},{key:"contains",value:function(t){return-1!==this.children.indexOf(t)}},{key:"add",value:function(t){return u(this.children,t,0,function(t){t.on("destroy",this.remove,this)},this),this}},{key:"remove",value:function(t,e){return l(this.children,t,function(t){t.off("destroy",this.remove,this),e&&t.destroy()}),this}},{key:"clear",value:function(t){for(var e,i=0,n=this.children.length;i<n;i++)(e=this.children[i]).off("destroy",this.remove,this),t&&e.destroy();return this.children.length=0,this}}])&&r(i.prototype,n),f&&r(i,f),e}(),d=Phaser.GameObjects.Components;Phaser.Class.mixin(f,[d.Alpha,d.Flip]);var p=f,y=i(22),v={setParent:function(t,e){void 0===e&&(e=this);var i=this.getLocalState(t);return e?(i.parent=e,i.self=t):(i.parent=null,i.self=null),this},getParent:function(t){return void 0===t&&(t=this),Object(y.a)(t)},getTopmostParent:function(t){return void 0===t&&(t=this),Object(y.b)(t)}},b=p.prototype.add,g=function(t){return this.setParent(t),this.resetChildState(t).updateChildVisible(t).updateChildActive(t).updateChildScrollFactor(t).updateChildMask(t),b.call(this,t),this},m={add:function(t){return Array.isArray(t)?this.addMultiple(t):g.call(this,t),this},addMultiple:function(t){for(var e=0,i=t.length;e<i;e++)g.call(this,t[e]);return this}},O=p.prototype.remove,j=p.prototype.clear,_={remove:function(t,e){return this.getParent(t)!==this?this:(this.setParent(t,null),O.call(this,t,e),this)},clear:function(t){for(var e=0,i=this.children.length;e<i;e++)this.setParent(this.children[e],null);return j.call(this,t),this}},S=Phaser.Math.RotateAround,P={worldToLocal:function(t){return t.x-=this.x,t.y-=this.y,S(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,S(t,0,0,this.rotation),t.x+=this.x,t.y+=this.y,t}},w=function(t,e){return t===e?1:t/e},E={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.syncChildrenEnable&&this.children.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=w(t.scaleX,this.scaleX),e.scaleY=w(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}},C={updateChildVisible:function(t){return t.visible=this.visible&&this.getLocalState(t).visible,this},syncVisible:function(){return this.syncChildrenEnable&&this.children.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}},x={updateChildAlpha:function(t){return t.alpha=this.alpha*this.getLocalState(t).alpha,this},syncAlpha:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildAlpha,this),this},resetChildAlphaState:function(t){return this.getLocalState(t).alpha=w(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}},k={updateChildActive:function(t){return t.active=this.active&&this.getLocalState(t).active,this},syncActive:function(){return this.syncChildrenEnable&&this.children.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}},T={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.syncChildrenEnable&&this.children.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 R(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 M=Phaser.Utils.Array,X={getChildren:function(){return this.children},getAllChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,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,R(e.getAllChildren()))}return t},contains:function(t){var e=this.getParent(t);return!!e&&(e===this||this.contains(e))},getByName:function(t){return M.GetFirst(this.children,"name",t)},getRandom:function(t,e){return M.GetRandom(this.children,t,e)},getFirst:function(t,e,i,n){return M.GetFirstElement(this.children,t,e,i,n)},getAll:function(t,e,i,n){return M.GetAll(this.children,t,e,i,n)},count:function(t,e,i,n){return M.CountAllMatching(this.children,t,e,i,n)},swap:function(t,e){return M.Swap(this.children,t,e),this},moveTo:function(t,e){return M.MoveTo(this.children,t,e),this},setAll:function(t,e,i,n){return M.SetAll(this.children,t,e,i,n),this}},Y=i(8),A={tweenChild:function(t){var e=t.targets;Object(Y.a)(e)||(e=[e]);for(var i,n,r=[],o=0,s=e.length;o<s;o++)(n=e[o]).hasOwnProperty("rexContainer")&&(i=n.scene,r.push(n.rexContainer));if(i){t.targets=r;var a=i.tweens.add(t);return a.on("update",function(t,e,i){for(var n,r,o=0,s=i.length;o<s;o++)switch(n=i.parent,r=i.self,e){case"x":case"y":case"angle":case"rotation":case"scaleX":case"scaleY":case"flipX":case"flipY":n.updateChildPosition(r);break;case"alpha":n.updateChildAlpha(r)}}),a}},tween:function(t){var e=this.scene;return t.targets||(t.targets=this),e.tweens.add(t)}},z={};Object.assign(z,v,m,_,{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}},P,E,C,x,k,{updateChildScrollFactor:function(t){return t.setScrollFactor(this.scrollFactorX,this.scrollFactorY),this},syncScrollFactor:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildScrollFactor,this),this}},T,{setDepth:function(t,e){if(this.depth=t,!e&&this.children)for(var i=this.getAllChildren(),n=0,r=i.length;n<r;n++)i[n].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}},X,A);var F=z;function L(t){return(L="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 D(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 N(t,e){return!e||"object"!==L(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 G(t,e,i,n){return(G="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,i,n){var r,o=W(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 H(t,e,i,n,r){if(!G(t,e,i,n||t)&&r)throw new Error("failed to set property");return i}function I(t,e,i){return(I="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=W(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function W(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=B(t)););return t}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function U(t,e){return(U=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var V=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),(a=N(this,B(e).call(this,t,i,n,r,o))).type="rexContainerLite",a.isRexContainerLite=!0,a.syncChildrenEnable=!0,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&&U(t,e)}(e,p),i=e,(n=[{key:"destroy",value:function(t){this.scene&&(this.syncChildrenEnable=!1,I(B(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 I(B(e.prototype),"rotation",this)},set:function(t){this.rotation!==t&&(H(B(e.prototype),"rotation",t,this,!0),this.syncPosition())}},{key:"scaleX",get:function(){return I(B(e.prototype),"scaleX",this)},set:function(t){this.scaleX!==t&&(H(B(e.prototype),"scaleX",t,this,!0),this.syncPosition())}},{key:"scaleY",get:function(){return I(B(e.prototype),"scaleY",this)},set:function(t){this.scaleY!==t&&(H(B(e.prototype),"scaleY",t,this,!0),this.syncPosition())}},{key:"flipX",get:function(){return I(B(e.prototype),"flipX",this)},set:function(t){I(B(e.prototype),"flipX",this)!==t&&(H(B(e.prototype),"flipX",t,this,!0),this.syncPosition())}},{key:"flipY",get:function(){return I(B(e.prototype),"flipY",this)},set:function(t){I(B(e.prototype),"flipY",this)!==t&&(H(B(e.prototype),"flipY",t,this,!0),this.syncPosition())}},{key:"visible",get:function(){return I(B(e.prototype),"visible",this)},set:function(t){I(B(e.prototype),"visible",this)!==t&&(H(B(e.prototype),"visible",t,this,!0),this.syncVisible())}},{key:"alpha",get:function(){return I(B(e.prototype),"alpha",this)},set:function(t){I(B(e.prototype),"alpha",this)!==t&&(H(B(e.prototype),"alpha",t,this,!0),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}}])&&D(i.prototype,n),r&&D(i,r),e}();Object.assign(V.prototype,F);e.a=V},29:function(t,e,i){"use strict";var n=i(11),r=i(30),o=i(32),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(21),h=i(5),c=i(9),u=Phaser.Utils.Objects.GetValue,l=Phaser.GameObjects.Group,f=function(t,e,i){return t.add.text(0,0,"")},d=new Phaser.Geom.Rectangle,p=function(t,e){var i,n,r,o,s=t.scene;if("number"==typeof e)i=e;else{i=u(e,"color",16777215);var p=u(e,"name",!1);p&&(n=u(p,"createTextCallback",f),r=u(p,"createTextCallbackScope",void 0),"string"==typeof(o=u(p,"align","left-top"))&&(o=a.a[o]))}if(n&&!t.children){t.children=new l(s),t.on("destroy",function(){t.children.destroy(!0),t.children=void 0});var y=t.clear.bind(t);t.clear=function(){y(),t.children.clear(!1,!0)}}for(var v,b,g=this.getAllChildren([this]),m=0,O=g.length;m<O;m++)(v=g[m]).getBounds&&(i&&t.lineStyle(1,i).strokeRectShape(v.getBounds(d)),v.name&&n&&(b=r?n.call(r,s):n(s))&&(b.setText(v.name),t.children.add(b),h.a.setPosition(d.x,d.y).setSize(d.width,d.height),Object(c.a)(b,h.a,o)));return this},y=i(17),v=n.a.prototype.add,b={pin:function(t){return v.call(this,t),this},addBackground:function(t,e,i){return void 0===this.backgroundChildren&&(this.backgroundChildren=[]),"string"==typeof e&&(i=e,e=void 0),void 0===e&&(e=0),this.pin(t),this.backgroundChildren.push(t),this.getSizerConfig(t).padding=Object(y.a)(e),void 0!==i&&this.addChildrenMap(i,t),this}},g=function(t,e){return void 0===this.childrenMap&&(this.childrenMap={}),this.childrenMap[t]=e,this},m=i(33),O=/(\S+)\[(\d+)\]/i,j=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),e=Object(m.a)(this.childrenMap,i);else if(-1===i.indexOf("["))e=this.childrenMap[i];else{var n=i.match(O);if(null!=n){var r=this.childrenMap[n[1]];r&&(e=r[n[2]])}}return 0===t.length?e:e&&e.childrenMap?e.getElement(t):null}},_=function(){return 0},S=function(){return 0},P=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},w=function(t){return void 0===t&&(t=[]),t},E=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()},C=function(t,e,i){return this.rexSizer.hidden?this:(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(this.minWidth,this.minHeight),this.layoutBackgrounds(),this.postLayout())},x=function(t,e,i){return this._anchor&&this._anchor.updatePosition(),this},k=function(){},T=i(40),R=function(t){return void 0===this._anchor?this._anchor=new T.a(this,t):this._anchor.resetFromJSON(t),this},M=i(39),X=i(38),Y=i(4),A=Phaser.Utils.Objects.IsPlainObject,z={popUp:function(t,e,i){if(A(t)){var n=t;t=n.duration,e=n.orientation,i=n.ease}this._scale=Object(M.a)(this,t,e,i,this._scale),this._scale.once("complete",function(){this.emit("popup.complete",this)},this);var r=this.getParentSizer();if(r){var o=this;this._scale.on("update",function(){r.resetChildPositionState(o)})}return this},popUpPromise:function(t,e,i){return this.popUp(t,e,i),Object(Y.a)(this._scale)},scaleDownDestroy:function(t,e,i,n){if(A(t)){var r=t;t=r.duration,e=r.orientation,i=r.ease,n=r.destroy}this._scale=Object(X.a)(this,t,e,i,n,this._scale),this._scale.once("complete",function(){this.emit("scaledown.complete",this)},this);var o=this.getParentSizer();if(o){var s=this;this._scale.on("update",function(){o.resetChildPositionState(s)})}return this},scaleDownDestroyPromise:function(t,e,i,n){return this.scaleDownDestroy(t,e,i,n),Object(Y.a)(this._scale)},scaleDown:function(t,e,i){return this.scaleDownDestroy(t,e,i,!1),this},scaleDownPromise:function(t,e,i){return this.scaleDown(t,e,i),Object(Y.a)(this._scale)}},F=i(14),L=Phaser.Utils.Objects.IsPlainObject,D={},N=function(t,e,i,n){var r,o;return L(i)?(r=i.start,o=i.end):o=i,void 0===r&&(r=0),void 0===o&&(o=t.alpha),D.mode=0,D.start=r,D.end=o,D.duration=e,void 0===n?n=new F.a(t,D):n.resetFromJSON(D),n.restart(),n},G=i(35),H=Phaser.Utils.Objects.IsPlainObject,I={fadeIn:function(t,e){H(t)&&(t=t.duration);this._fade=N(this,t,e,this._fade),this._fade.once("complete",function(){this.emit("fadein.complete",this)},this);var i=this.getParentSizer();if(i){var n=this;this._fade.on("update",function(){i.resetChildAlphaState(n)})}return this},fadeInPromoise:function(t,e){return this.fadeIn(t,e),Object(Y.a)(this._fade)},fadeOutDestroy:function(t,e){if(H(t)){var i=t;t=i.duration,e=i.destroy}this._fade=Object(G.a)(this,t,e,this._fade),this._fade.once("complete",function(){this.emit("fadeout.complete",this)},this);var n=this.getParentSizer();if(n){var r=this;this._fade.on("update",function(){n.resetChildAlphaState(r)})}return this},fadeOutDestroyPromise:function(t,e){return this.fadeOutDestroy(t,e),Object(Y.a)(this._fade)},fadeOut:function(t){return this.fadeOutDestroy(t,!1),this},fadeOutPromise:function(t){return this.fadeOut(t),Object(Y.a)(this._fade)}},W=i(25),B=Phaser.Utils.Objects.IsPlainObject,U={moveFrom:function(t,e,i,n,r){if(B(e)){var o=e;e=o.x,i=o.y,t=o.duration,n=o.ease}this._easeMove=Object(W.b)(this,t,e,i,n,r,this._easeMove),this._easeMove.once("complete",function(){this.emit("movefrom.complete",this)},this);var s=this.getParentSizer();if(s){var a=this;this._easeMove.on("update",function(){s.resetChildPositionState(a)})}return this},moveFromPromise:function(t,e,i,n,r){return this.moveFrom(t,e,i,n,r),Object(Y.a)(this._easeMove)},moveFromDestroy:function(t,e,i,n){return this.moveFrom(t,e,i,n,!0),this},moveFromDestroyPromise:function(t,e,i,n){return this.moveFromDestroy(t,e,i,n),Object(Y.a)(this._easeMove)},moveTo:function(t,e,i,n,r){if(B(e)){var o=e;e=o.x,i=o.y,t=o.duration,n=o.ease}this._easeMove=Object(W.d)(this,t,e,i,n,r,this._easeMove),this._easeMove.once("complete",function(){this.emit("moveto.complete",this)},this);var s=this.getParentSizer();if(s){var a=this;this._easeMove.on("update",function(){s.resetChildPositionState(a)})}return this},moveToPromise:function(t,e,i,n,r){return this.moveTo(t,e,i,n,r),Object(Y.a)(this._easeMove)},moveToDestroy:function(t,e,i,n){return this.moveTo(t,e,i,n,!0),this},moveToDestroyPromise:function(t,e,i,n){return this.moveToDestroy(t,e,i,n,!0),Object(Y.a)(this._easeMove)}},V=i(36),J=i(16),Z=Phaser.Display.Align.CENTER,q=function(){if(void 0!==this.backgroundChildren)for(var t,e,i,n,r,o,s,a=this.backgroundChildren,u=this.left,l=this.top,f=this.width,d=this.height,p=0,y=a.length;p<y;p++)(e=(t=a[p]).rexSizer).hidden||(n=u+(i=e.padding).left,r=l+i.top,o=f-i.left-i.right,s=d-i.top-i.bottom,Object(J.a)(t,o,s),h.a.setPosition(n,r).setSize(o,s),Object(c.a)(t,h.a,Z),this.resetChildPositionState(t))};function K(t){return(K="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 Q=function(t,e,i){var n=this.getTopmostSizer();n.x+=e-this.x,n.y+=i-this.y},$=function(t,e){var i=K(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",Q,this)),this},tt={getSizerConfig:r.a,pushIntoBounds:s,drawBounds:p,getChildrenWidth:_,getChildrenHeight:S,addChildrenMap:g,addElement:g,getElement:j,getAllChildrenSizers:P,getChildrenSizers:w,preLayout:E,_layoutInit:k,layout:C,layoutBackgrounds:q,postLayout:x,setAnchor:R,isInTouching:function(t,e){return void 0===e&&(e=this),Object(V.a)(e,t)},setDraggable:$};Object.assign(tt,b,{getParentSizer:function(t){return this.getParent(t)},getTopmostSizer:function(t){return this.getTopmostParent(t)}},z,I,U);var et=tt,it=i(0);function nt(t){return(nt="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 rt(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 ot(t,e){return!e||"object"!==nt(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 st(t,e,i){return(st="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=at(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 at(t){return(at=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ht(t,e){return(ht=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ct=Phaser.Utils.Objects.GetValue,ut=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=ot(this,at(e).call(this,t,i,n,2,2))).isRexSizer=!0,a.setMinSize(r,o),a.setName(ct(s,"name","")),a.rexSizer={},a.backgroundChildren=void 0;var h=ct(s,"anchor",void 0);return h&&a.setAnchor(h),a.setDraggable(ct(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&&ht(t,e)}(e,n["a"]),i=e,(r=[{key:"destroy",value:function(t){this.scene&&(void 0!==this.backgroundChildren&&(this.backgroundChildren.length=0),st(at(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:"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-Object(it.b)(this)*this.originX},set:function(t){this.x+=t-this.left}},{key:"right",get:function(){return this.left+Object(it.b)(this)},set:function(t){this.x+=t-this.right}},{key:"centerX",get:function(){return this.left+Object(it.b)(this)/2},set:function(t){this.x+=t-this.centerX}},{key:"top",get:function(){return this.y-Object(it.a)(this)*this.originY},set:function(t){this.y+=t-this.top}},{key:"bottom",get:function(){return this.top+Object(it.a)(this)},set:function(t){this.y+=t-this.bottom}},{key:"centerY",get:function(){return this.top+Object(it.a)(this)/2},set:function(t){this.y+=t-this.centerY}}])&&rt(i.prototype,r),o&&rt(i,o),e}();Object.assign(ut.prototype,et);e.a=ut},3: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):[]}}},30:function(t,e,i){"use strict";e.a=function(t){return t.hasOwnProperty("rexSizer")||(t.rexSizer={}),t.rexSizer}},32: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}},33:function(t,e,i){"use strict";var n=i(8),r=function(t,e){return t?t.hasOwnProperty("name")?t.name===e?t:null:GetElementByName(t,e):null},o=function(t,e){var i;if(Object(n.a)(t)){for(var o=0,s=t.length;o<s;o++)if(i=r(t[o],e))return i}else for(var a in t)if(i=r(t[a],e))return i};e.a=o},35:function(t,e,i){"use strict";var n=i(14),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}},36: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}},37:function(t,e,i){"use strict";var n=Phaser.Geom.Rectangle,r=new n;e.a=function(t,e){void 0===e?e=new n:!0===e&&(e=r);var i=t.scale,o=i.canvasBounds,s=i.displayScale,a=i.autoCenter;return e.x=o.x>=0?0:-o.x*s.x,e.y=o.y>=0?0:-o.y*s.y,e.width=o.width*s.x-e.x,e.height=o.height*s.y-e.y,1!==a&&2!==a||(e.width-=e.x),1!==a&&3!==a||(e.height-=e.y),e}},38:function(t,e,i){"use strict";var n=i(15),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}},39:function(t,e,i){"use strict";var n=i(15),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}},4:function(t,e,i){"use strict";var n=i(26);i.d(e,"b",function(){return n.b}),i.d(e,"a",function(){return n.a})},40:function(t,e,i){"use strict";var n=i(37);function r(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 o=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=e.scene,this.resetFromJSON(i),this.boot()}var e,i,o;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.scene.scale.on("resize",this.anchor,this),this.gameObject.on("destroy",this.destroy,this),this.anchor()}},{key:"shutdown",value:function(){this.scene.scale.off("resize",this.anchor,this),this.gameObject=void 0,this.scene=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 this.viewport=Object(n.a)(this.scene,!0),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:"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}}])&&r(e.prototype,i),o&&r(e,o),t}();e.a=o},44: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}},5:function(t,e,i){"use strict";var n=i(19),r=new Phaser.GameObjects.Zone({sys:{queueDepthSort:n.a,events:{once:n.a}}},0,0,1,1);r.setOrigin(0),e.a=r},7: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}},8:function(t,e,i){"use strict";e.a=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},9:function(t,e,i){"use strict";var n={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},r=i(0),o=function(t){var e=Object(r.a)(t);return t.y+e-e*t.originY},s=function(t){var e=Object(r.b)(t);return t.x-e*t.originX+.5*e},a=function(t,e){var i=Object(r.a)(t);return t.y=e-i+i*t.originY,t},h=function(t,e){var i=Object(r.b)(t),n=i*t.originX;return t.x=e+n-.5*i,t},c=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),h(t,s(e)+i),a(t,o(e)+n),t},u=function(t){var e=Object(r.b)(t);return t.x-e*t.originX},l=function(t,e){var i=Object(r.b)(t);return t.x=e+i*t.originX,t},f=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),l(t,u(e)-i),a(t,o(e)+n),t},d=function(t){var e=Object(r.b)(t);return t.x+e-e*t.originX},p=function(t,e){var i=Object(r.b)(t);return t.x=e-i+i*t.originX,t},y=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),p(t,d(e)+i),a(t,o(e)+n),t},v=function(t,e){var i=Object(r.a)(t),n=i*t.originY;return t.y=e+n-.5*i,t},b=function(t,e,i){return h(t,e),v(t,i)},g=function(t){var e=Object(r.a)(t);return t.y-e*t.originY+.5*e},m=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),b(t,s(e)+i,g(e)+n),t},O=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),l(t,u(e)-i),v(t,g(e)+n),t},j=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),p(t,d(e)+i),v(t,g(e)+n),t},_=function(t){var e=Object(r.a)(t);return t.y-e*t.originY},S=function(t,e){var i=Object(r.a)(t);return t.y=e+i*t.originY,t},P=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),h(t,s(e)+i),S(t,_(e)-n),t},w=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),l(t,u(e)-i),S(t,_(e)-n),t},E=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),p(t,d(e)+i),S(t,_(e)-n),t},C=[];C[n.BOTTOM_CENTER]=c,C[n.BOTTOM_LEFT]=f,C[n.BOTTOM_RIGHT]=y,C[n.CENTER]=m,C[n.LEFT_CENTER]=O,C[n.RIGHT_CENTER]=j,C[n.TOP_CENTER]=P,C[n.TOP_LEFT]=w,C[n.TOP_RIGHT]=E;e.a=function(t,e,i,n,r){return C[i](t,e,n,r)}}}).default});