text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexslider=e()}(this,function(){"use strict";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 d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(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 i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}function s(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&&r(t,e)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=p(n);if(r){var i=p(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}(this,t)}}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}function y(t,e,i){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=l(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function o(t,e,i,n){return(o="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,i,n){var r,s,o,h,a=l(t,e);if(a){if((r=Object.getOwnPropertyDescriptor(a,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 h=i,(o=e)in(s=n)?Object.defineProperty(s,o,{value:h,enumerable:!0,configurable:!0,writable:!0}):s[o]=h;return!0})(t,e,i,n)}function e(t,e,i,n,r){if(!o(t,e,i,n||t)&&r)throw new Error("failed to set property");return i}function h(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var t=Phaser.GameObjects.Zone,c=Phaser.Utils.Array.Add,g=Phaser.Utils.Array.Remove,m=function(){s(h,t);var o=v(h);function h(t,e,i,n,r){var s;return d(this,h),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=1),(s=o.call(this,t,e,i,n,r)).children=[],s}return i(h,[{key:"destroy",value:function(t){if(this.scene){if(t)for(var e,i=this.children.length-1;0<=i;i--)(e=this.children[i]).parentContainer||e.displayList||e.destroy(t);this.clear(!t),y(p(h.prototype),"destroy",this).call(this,t)}}},{key:"contains",value:function(t){return-1!==this.children.indexOf(t)}},{key:"add",value:function(t){var e=this;return c(this.children,t,0,function(t){t.once("destroy",e.onChildDestroy,e)},this),this}},{key:"remove",value:function(t,e){var i=this;return g(this.children,t,function(t){t.off("destroy",i.onChildDestroy,i),e&&t.destroy()}),this}},{key:"onChildDestroy",value:function(t){this.remove(t,!1)}},{key:"clear",value:function(t){for(var e,i=0,n=this.children.length;i<n;i++)(e=this.children[i]).off("destroy",this.onChildDestroy,this),t&&e.destroy();return this.children.length=0,this}}]),h}(),C=Phaser.GameObjects.Components;Phaser.Class.mixin(m,[C.Alpha,C.Flip]);function b(t){var e;return t.hasOwnProperty("rexContainer")&&(e=t.rexContainer.parent),e}function k(t){return t.hasOwnProperty("rexContainer")||(t.rexContainer={}),t.rexContainer}function S(t){return this.setParent(t),this.resetChildState(t).updateChildVisible(t).updateChildActive(t).updateChildScrollFactor(t).updateChildMask(t),_.call(this,t),this}function P(t){this.setParent(t);var e=k(t);return e.x=t.x,e.y=t.y,e.rotation=t.rotation,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.flipX=t.flipX,e.flipY=t.flipY,e.alpha=t.alpha,e.visible=t.visible,e.active=t.active,this.updateChildPosition(t).updateChildAlpha(t).updateChildVisible(t).updateChildActive(t).updateChildScrollFactor(t).updateChildMask(t),_.call(this,t),this}function E(t,e){return t===e?1:t/e}function x(t){return"[object Array]"===Object.prototype.toString.call(t)}function w(t){var e=this.getAllChildren([this]);return function(t,e){if(0===t.length)return;void 0===e&&(e=!1);var i=t[0].scene.sys.displayList;i.depthSort(),e?t.sort(function(t,e){return i.getIndex(e)-i.getIndex(t)}):t.sort(function(t,e){return i.getIndex(t)-i.getIndex(e)})}(e),t.add(e),this}var O={setParent:function(t,e){void 0===e&&(e=this);var i=k(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),b(t)},getTopmostParent:function(t){return void 0===t&&(t=this),function(t){for(var e=b(t);e;)e=b(t=e);return t}(t)}},_=m.prototype.add,z={add:function(t){return Array.isArray(t)?this.addMultiple(t):S.call(this,t),this},addMultiple:function(t){for(var e=0,i=t.length;e<i;e++)S.call(this,t[e]);return this},addLocal:function(t){return Array.isArray(t)?this.addMultiple(t):P.call(this,t),this},addLocalMultiple:function(t){for(var e=0,i=t.length;e<i;e++)P.call(this,t[e]);return this}},R=m.prototype.remove,T=m.prototype.clear,M={remove:function(t,e){return b(t)!==this||(this.setParent(t,null),R.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 T.call(this,t),this}},X={getLocalState:function(t){return k(t)},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}},Y=Phaser.Math.RotateAround,A={worldToLocal:function(t){return t.x-=this.x,t.y-=this.y,Y(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,Y(t,0,0,this.rotation),t.x+=this.x,t.y+=this.y,t}},L={updateChildPosition:function(t){t.isRexContainerLite&&(t.syncChildrenEnable=!1);var e=k(t),i=e.parent;return t.x=e.x,t.y=e.y,i.localToWorld(t),t.scaleX=e.scaleX*i.scaleX,t.scaleY=e.scaleY*i.scaleY,void 0!==t.flipX&&(t.flipX=i.flipX?!e.flipX:e.flipX,t.flipY=i.flipY?!e.flipY:e.flipY),t.rotation=e.rotation+i.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=k(t),i=e.parent;return e.x=t.x,e.y=t.y,i.worldToLocal(e),e.scaleX=E(t.scaleX,i.scaleX),e.scaleY=E(t.scaleY,i.scaleY),void 0!==t.flipX&&(e.flipX=t.flipX,e.flipY=t.flipY),e.rotation=t.rotation-i.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=k(t);return n.x=e,n.y=i,this.updateChildPosition(t),this},resetLocalPositionState:function(){var t=k(this).parent;return t&&t.resetChildPositionState(this),this}},V={updateChildRotation:function(t){var e=k(t),i=e.parent;return t.rotation=i.rotation+e.rotation,this},syncRotation:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildRotation,this),this},resetChildRotationState:function(t){var e=k(t),i=e.parent;return e.rotation=t.rotation-i.rotation,this},setChildRotation:function(t,e){return t.rotation=e,this.resetChildRotationState(t),this},setChildLocalRotation:function(t,e){return k(t).rotation=e,this.updateChildRotation(t),this},resetLocalRotationState:function(){var t=k(this).parent;return t&&t.resetChildRotationState(this),this}},D={updateChildScale:function(t){var e=k(t),i=e.parent;return t.scaleX=i.scaleX*e.scaleX,t.scaleY=i.scaleY*e.scaleY,this},syncScale:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildScale,this),this},resetChildScaleState:function(t){var e=k(t),i=e.parent;return e.scaleX=E(t.scaleX,i.scaleX),e.scaleY=E(t.scaleY,i.scaleY),this},setChildScale:function(t,e,i){return void 0===i&&(i=e),t.scaleX=e,t.scaleY=i,this.resetChildScaleState(t),this},setChildLocalScale:function(t,e,i){void 0===i&&(i=e);var n=k(t);return n.scaleX=e,n.scaleY=i,this.updateChildScale(t),this},setChildDisplaySize:function(t,e,i){return t.setDisplaySize(e,i),this.resetChildScaleState(t),this},resetLocalScaleState:function(){var t=k(this).parent;return t&&t.resetChildScaleState(this),this}},F={updateChildVisible:function(t){var e=k(t),i=e.parent,n=!e.hasOwnProperty("maskVisible")||e.maskVisible;return t.visible=i.visible&&e.visible&&n,this},syncVisible:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildVisible,this),this},resetChildVisibleState:function(t){var e=k(t);return e.hasOwnProperty("maskVisible")&&delete e.maskVisible,e.visible=t.visible,this},setChildVisible:function(t,e){return this.setChildLocalVisible(t,e),this},setChildLocalVisible:function(t,e){return void 0===e&&(e=!0),k(t).visible=e,this.updateChildVisible(t),this},setChildMaskVisible:function(t,e){return void 0===e&&(e=!0),k(t).maskVisible=e,this.updateChildVisible(t),this},resetLocalVisibleState:function(){var t=k(this).parent;return t&&t.resetChildVisibleState(this),this}},j={updateChildAlpha:function(t){var e=k(t),i=e.parent;return t.alpha=i.alpha*e.alpha,this},syncAlpha:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildAlpha,this),this},resetChildAlphaState:function(t){var e=k(t),i=e.parent;return e.alpha=E(t.alpha,i.alpha),this},setChildAlpha:function(t,e){return t.alpha=e,this.resetChildAlphaState(t),this},setChildLocalAlpha:function(t,e){return k(t).alpha=e,this.updateChildAlpha(t),this},resetLocalAlphaState:function(){var t=k(this).parent;return t&&t.resetChildAlphaState(this),this}},W={updateChildActive:function(t){var e=k(t),i=e.parent;return t.active=i.active&&e.active,this},syncActive:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildActive,this),this},resetChildActiveState:function(t){return k(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),k(t).active=e,this.updateChildActive(t),this},resetLocalActiveState:function(){var t=k(this).parent;return t&&t.resetChildActiveState(this),this}},N={updateChildScrollFactor:function(t){var e=k(t).parent;return t.setScrollFactor(e.scrollFactorX,e.scrollFactorY),this},syncScrollFactor:function(){return this.syncChildrenEnable&&this.children.forEach(this.updateChildScrollFactor,this),this}},H={updateChildMask:function(t){return null==this.mask||(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}},G=Phaser.Utils.Array,I={getChildren:function(t){if(t)for(var e=0,i=this.children.length;e<i;e++)t.push(this.children[e]);else t=this.children;return t},getAllChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,n=0,r=i.length;n<r;n++){if(e=i[n],t.push(e),e.hasOwnProperty("isRexContainerLite"))t.push.apply(t,h(e.getAllChildren()))}return t},getAllVisibleChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,n=0,r=i.length;n<r;n++){if((e=i[n]).visible)if(t.push(e),e.hasOwnProperty("isRexContainerLite"))t.push.apply(t,h(e.getAllVisibleChildren()))}return t},contains:function(t){var e=b(t);return!!e&&(e===this||this.contains(e))},getByName:function(t,e){if(e){for(var i,n,r=[this];r.length;)for(var s=0,o=(i=r.shift()).children.length;s<o;s++){if((n=i.children[s]).name===t)return n;n.isRexContainerLite&&r.push(n)}return null}return G.GetFirst(this.children,"name",t)},getRandom:function(t,e){return G.GetRandom(this.children,t,e)},getFirst:function(t,e,i,n){return G.GetFirstElement(this.children,t,e,i,n)},getAll:function(t,e,i,n){return G.GetAll(this.children,t,e,i,n)},count:function(t,e,i,n){return G.CountAllMatching(this.children,t,e,i,n)},swap:function(t,e){return G.Swap(this.children,t,e),this},setAll:function(t,e,i,n){return G.SetAll(this.children,t,e,i,n),this}},U={tweenChild:function(t){var e=t.targets;x(e)||(e=[e]);for(var i,n,r=[],s=0,o=e.length;s<o;s++)(n=e[s]).hasOwnProperty("rexContainer")&&(i=n.scene,r.push(n.rexContainer));if(i){t.targets=r;var h=i.tweens.add(t);return h.on("update",function(t,e,i){var n=i.parent,r=i.self;switch(e){case"x":case"y":n.updateChildPosition(r);break;case"angle":case"rotation":n.updateChildRotation(r);break;case"scaleX":case"scaleY":n.updateChildScale(r);break;case"alpha":n.updateChildAlpha(r)}}),h}},tween:function(t){var e=this.scene;return t.targets||(t.targets=this),e.tweens.add(t)}},B={addToLayer:w,addToContainer:w},J=Phaser.Math.RotateAround,K={changeOrigin:function(t,e){this.syncChildrenEnable=!1,function(t,e,i){void 0===i&&(i=e);var n={x:(e-t.originX)*t.displayWidth,y:(i-t.originY)*t.displayHeight};J(n,0,0,t.rotation),t.originX=e,t.originY=i,t.x=t.x+n.x,t.y=t.y+n.y}(this,t,e),this.syncChildrenEnable=!0;for(var i=this.getAllChildren(),n=0,r=i.length;n<r;n++)this.resetChildPositionState(i[n]);return this}};Object.assign(K,O,z,M,X,A,L,V,D,F,j,W,N,H,{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}},I,U,B);var Z=function(){s(a,m);var h=v(a);function a(t,e,i,n,r,s){var o;return d(this,a),(o=h.call(this,t,e,i,n,r)).type="rexContainerLite",o.isRexContainerLite=!0,o.syncChildrenEnable=!0,o._active=!0,o._mask=null,o._scrollFactorX=1,o._scrollFactorY=1,s&&o.add(s),o}return i(a,[{key:"destroy",value:function(t){this.scene&&(this.syncChildrenEnable=!1,y(p(a.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 y(p(a.prototype),"rotation",this)},set:function(t){this.rotation!==t&&(e(p(a.prototype),"rotation",t,this,!0),this.syncPosition())}},{key:"scaleX",get:function(){return y(p(a.prototype),"scaleX",this)},set:function(t){this.scaleX!==t&&(e(p(a.prototype),"scaleX",t,this,!0),this.syncPosition())}},{key:"scaleY",get:function(){return y(p(a.prototype),"scaleY",this)},set:function(t){this.scaleY!==t&&(e(p(a.prototype),"scaleY",t,this,!0),this.syncPosition())}},{key:"flipX",get:function(){return y(p(a.prototype),"flipX",this)},set:function(t){y(p(a.prototype),"flipX",this)!==t&&(e(p(a.prototype),"flipX",t,this,!0),this.syncPosition())}},{key:"flipY",get:function(){return y(p(a.prototype),"flipY",this)},set:function(t){y(p(a.prototype),"flipY",this)!==t&&(e(p(a.prototype),"flipY",t,this,!0),this.syncPosition())}},{key:"visible",get:function(){return y(p(a.prototype),"visible",this)},set:function(t){y(p(a.prototype),"visible",this)!==t&&(e(p(a.prototype),"visible",t,this,!0),this.syncVisible())}},{key:"alpha",get:function(){return y(p(a.prototype),"alpha",this)},set:function(t){y(p(a.prototype),"alpha",this)!==t&&(e(p(a.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}}]),a}();Object.assign(Z.prototype,K);function q(t){return t.hasOwnProperty("rexSizer")||(t.rexSizer={}),t.rexSizer}function $(){}var Q,tt=Phaser.Display.Align,et={center:tt.CENTER,left:tt.LEFT_CENTER,right:tt.RIGHT_CENTER,top:tt.TOP_CENTER,bottom:tt.BOTTOM_CENTER,"left-top":tt.TOP_LEFT,"left-center":tt.LEFT_CENTER,"left-bottom":tt.BOTTOM_LEFT,"center-top":tt.TOP_CENTER,"center-center":tt.CENTER,"center-bottom":tt.BOTTOM_CENTER,"right-top":tt.TOP_RIGHT,"right-center":tt.RIGHT_CENTER,"right-bottom":tt.BOTTOM_RIGHT},it=new Phaser.GameObjects.Zone({sys:{queueDepthSort:$,events:{once:$}}},0,0,1,1);it.setOrigin(0);function nt(t){return void 0!==t.displayWidth?t.displayWidth:t.width}function rt(t){return void 0!==t.displayHeight?t.displayHeight:t.height}function st(t){var e=rt(t);return t.y+e-e*t.originY}function ot(t){var e=nt(t);return t.x-e*t.originX+.5*e}function ht(t,e){var i=rt(t);return t.y=e-i+i*t.originY,t}function at(t,e){var i=nt(t),n=i*t.originX;return t.x=e+n-.5*i,t}function lt(t){var e=nt(t);return t.x-e*t.originX}function ut(t,e){var i=nt(t);return t.x=e+i*t.originX,t}function ct(t){var e=nt(t);return t.x+e-e*t.originX}function dt(t,e){var i=nt(t);return t.x=e-i+i*t.originX,t}function pt(t,e){var i=rt(t),n=i*t.originY;return t.y=e+n-.5*i,t}function ft(t){var e=rt(t);return t.y-e*t.originY+.5*e}function vt(t){var e=rt(t);return t.y-e*t.originY}function yt(t,e){var i=rt(t);return t.y=e+i*t.originY,t}var gt=0,mt=1,Ct=2,bt=4,kt=6,St=8,Pt=10,Et=12,xt=[];xt[11]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),at(t,ot(e)+i),ht(t,st(e)+n),t},xt[Pt]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ut(t,lt(e)-i),ht(t,st(e)+n),t},xt[Et]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),dt(t,ct(e)+i),ht(t,st(e)+n),t},xt[kt]=function(t,e,i,n){var r,s,o;return void 0===i&&(i=0),void 0===n&&(n=0),r=t,s=ot(e)+i,o=ft(e)+n,at(r,s),pt(r,o),t},xt[bt]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ut(t,lt(e)-i),pt(t,ft(e)+n),t},xt[St]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),dt(t,ct(e)+i),pt(t,ft(e)+n),t},xt[mt]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),at(t,ot(e)+i),yt(t,vt(e)-n),t},xt[gt]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ut(t,lt(e)-i),yt(t,vt(e)-n),t},xt[Ct]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),dt(t,ct(e)+i),yt(t,vt(e)-n),t};function wt(t,e,i,n,r){return xt[i](t,e,n,r)}function Ot(t,e,i,n,r,s){it.setPosition(e,i).setSize(n,r),wt(t,it,s)}function _t(t,e){return void 0===e&&(e={}),"number"==typeof t?(e.left=t,e.right=t,e.top=t,e.bottom=t):(e.left=Wt(t,"left",0),e.right=Wt(t,"right",0),e.top=Wt(t,"top",0),e.bottom=Wt(t,"bottom",0)),e}function zt(t){return Nt.call(this,t),this.sizerEventsEnable&&(t.emit("sizer.add",t,this),this.emit("add",t,this)),this}function Rt(t,e){return void 0===this.childrenMap&&(this.childrenMap={}),this.childrenMap[t]=e,this}function Tt(t,e){return void 0===e?t:t[e]}function Mt(t,e,i){var n=u(e);"string"===n?t[e]=i:"number"===n?(t.left=e,t.right=e,t.top=e,t.bottom=e):(t.left=Ut(e,"left",0),t.right=Ut(e,"right",0),t.top=Ut(e,"top",0),t.bottom=Ut(e,"bottom",0))}function Xt(t){var e=Math.max(this.childrenWidth,this.minWidth);return void 0===t&&(t=e),t}function Yt(t){var e=Math.max(this.childrenHeight,this.minHeight);return void 0===t&&(t=e),t}function At(){this._childrenWidth=void 0,this._childrenHeight=void 0;for(var t,e=this.getChildrenSizers(),i=0,n=e.length;i<n;i++)(t=e[i]).ignoreLayout||t.preLayout()}function Lt(t){return t instanceof Zt}var Vt=Phaser.Utils.Objects.GetValue,Dt=Phaser.GameObjects.Group,Ft=function(t){return t.add.text(0,0,"")},jt=new Phaser.Geom.Rectangle,Wt=Phaser.Utils.Objects.GetValue,Nt=Z.prototype.add,Ht=Z.prototype.add,Gt={pin:function(t){return Ht.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),zt.call(this,t),this.backgroundChildren.push(t),this.getSizerConfig(t).padding=_t(e),void 0!==i&&this.addChildrenMap(i,t),this},isBackground:function(t){return void 0!==this.backgroundChildren&&-1!==this.backgroundChildren.indexOf(t)}},It=/(\S+)\[(\d+)\]/i,Ut=Phaser.Utils.Objects.GetValue,Bt={getInnerPadding:function(t){return Tt(this.space,t)},setInnerPadding:function(t,e){return Mt(this.space,t,e),this},getOutterPadding:function(t){return Tt(this.getSizerConfig(this).padding,t)},setOuterPadding:function(t,e){return Mt(this.getSizerConfig(this).padding,t,e),this},getChildOutterPadding:function(t,e){return"string"==typeof t&&(t=this.getElement(t)),Tt(this.getSizerConfig(t).padding,e)},setChildOuterPadding:function(t,e,i){return"string"==typeof t&&(t=this.getElement(t)),Mt(this.getSizerConfig(t).padding,e,i),this}},Jt={getShownChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,n=0,r=i.length;n<r;n++)(e=i[n]).rexSizer&&e.rexSizer.hidden||t.push(e);return t},getAllShownChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,n=0,r=i.length;n<r;n++){if(!(e=i[n]).rexSizer||!e.rexSizer.hidden)if(t.push(e),e.hasOwnProperty("isRexContainerLite"))t.push.apply(t,h(e.getAllShownChildren()))}return t}},Kt={setEventEmitter:function(t,e){return void 0===e&&(e=Phaser.Events.EventEmitter),this._privateEE=!0===t||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):[]},eventNames:function(){return this._eventEmitter?this._eventEmitter.eventNames.apply(this._eventEmitter,arguments):[]}},Zt=Phaser.Scene,qt=Phaser.Utils.Objects.GetValue,$t=function(){function n(t,e){var i;d(this,n),this.parent=t,this.scene=null==(i=t)||"object"!==u(i)?null:Lt(i)?i:i.scene&&Lt(i.scene)?i.scene:i.parent&&i.parent.scene&&Lt(i.parent.scene)?i.parent.scene:void 0,this.isShutdown=!1,this.setEventEmitter(qt(e,"eventEmitter",!0)),this.parent&&this.parent===this.scene?this.scene.events.once("shutdown",this.onSceneDestroy,this):this.parent&&this.parent.once&&this.parent.once("destroy",this.onParentDestroy,this)}return i(n,[{key:"shutdown",value:function(){this.isShutdown||(this.parent&&this.parent===this.scene?this.scene.events.off("shutdown",this.onSceneDestroy,this):this.parent&&this.parent.once&&this.parent.off("destroy",this.onParentDestroy,this),this.destroyEventEmitter(),this.parent=void 0,this.scene=void 0,this.isShutdown=!0)}},{key:"destroy",value:function(t){this.shutdown(t)}},{key:"onSceneDestroy",value:function(){this.destroy(!0)}},{key:"onParentDestroy",value:function(t,e){this.destroy(e)}}]),n}();Object.assign($t.prototype,Kt);var Qt=Phaser.Geom.Rectangle;Phaser.Scale.Center;function te(t){return i=t,n="complete",new Promise(function(t,e){i.once(n,function(){t()})});var i,n}function ee(e,t){t.completeEventName=void 0,t.on("complete",function(){t.completeEventName&&(e.emit(t.completeEventName,e),t.completeEventName=void 0)}),t.on("update",function(){var t=e.getParentSizer();t&&t.resetChildPositionState(e)})}function ie(e,t){t.completeEventName=void 0,t.on("complete",function(){t.completeEventName&&(e.emit(t.completeEventName,e),t.completeEventName=void 0)}),t.on("update",function(){var t=e.getParentSizer();t&&t.resetChildAlphaState(e)})}function ne(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}}function re(e,t){t.completeEventName=void 0,t.on("complete",function(){t.completeEventName&&(e.emit(t.completeEventName,e),t.completeEventName=void 0)}),t.on("update",function(){var t=e.getParentSizer();t&&t.resetChildPositionState(e)})}function se(t,e,i,n,r){return!(!t||!t.getBounds)&&(!(n&&!n(t,e,i))&&(!!(ti=t.getBounds(ti)).contains(e,i)&&!(r&&!r(t,e,i))))}function oe(t,e,i,n,r){return se(t,e,i,ei(n),ii(r))}function he(t){return!(t.rexSizer&&t.rexSizer.hidden)}function ae(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 le(t){var e,i;this.sizerEventsEnable&&(e=t,void 0===(i=this.getChildPrevState(t))?i={}:!0===i&&(i=ni),i.x=e.x,i.y=e.y,i.scaleX=e.scaleX,i.scaleY=e.scaleY,i.width=e.width,i.height=e.height,i.displayWidth=e.displayWidth,i.displayHeight=e.displayHeight,this.layoutedChildren.push(t))}function ue(t,e,i,n,r,s){Ot(t,e,i,n,r,s),this.resetChildPositionState(t),this.sizerEventsEnable&&t.emit("sizer.postlayout",t,this)}var ce=new Qt,de=function(){s(r,$t);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,{eventEmitter:!1})).viewport=void 0,i.resetFromJSON(e),i.boot(),i}return i(r,[{key:"resetFromJSON",value:function(t){var e,i,n,r,s,o,h,a;void 0===t&&(t={}),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("%"),s=parseFloat(i[0])/100,o=""===i[1]?0:parseFloat(i[1])),void 0!==r&&(r=r.replace("top","0%").replace("bottom","100%").replace("center","50%").split("%"),h=parseFloat(r[0])/100,a=""===r[1]?0:parseFloat(r[1]));var l,u,c=t.width;void 0!==c&&(c=c.split("%"),l=parseFloat(c[0])/100,u=""===c[1]?0:parseFloat(c[1]));var d,p,f=t.height;void 0!==f&&(f=f.split("%"),d=parseFloat(f[0])/100,p=""===f[1]?0:parseFloat(f[1])),this.setAlign(e,n),this.setPercentage(s,h),this.setOffset(o,a),this.setSizePercentage(l,d),this.setSizePadding(u,p);var v=t.onResizeCallback,y=t.onResizeCallbackScope;void 0!==v&&this.setResizeCallback(v,y);var g=t.onUpdateViewportCallback,m=t.onUpdateViewportCallbackScope;return void 0!==g&&this.setUpdateViewportCallback(g,m),this}},{key:"boot",value:function(){this.scene.scale.on("resize",this.anchor,this),this.anchor()}},{key:"shutdown",value:function(t){this.isShutdown||(this.scene.scale.off("resize",this.anchor,this),y(p(r.prototype),"shutdown",this).call(this,t),this.viewport=void 0)}},{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:"setSizePercentage",value:function(t,e){return this.percentageWidth=t,this.percentageHeight=e,this}},{key:"setSizePadding",value:function(t,e){return this.paddingWidth=t,this.paddingHeight=e,this}},{key:"setResizeCallback",value:function(t,e){return this.onResizeCallback=t,this.onResizeCallbackScope=e,this}},{key:"setUpdateViewportCallback",value:function(t,e){return this.onUpdateViewportCallback=t,this.onUpdateViewportCallbackScope=e,this}},{key:"anchor",value:function(){return this.updateViewport(),this.updateSize(),this.updatePosition(),this}},{key:"updateSize",value:function(){var t=this.onResizeCallback,e=this.onResizeCallbackScope,i=this.anchorWidth,n=this.anchorHeight;if((void 0!==i||void 0!==n)&&t){var r=this.parent;void 0===i&&(i=r.width),void 0===n&&(n=r.height),e?t.call(e,i,n,r,this):t(i,n,r,this)}}},{key:"updatePosition",value:function(){var t=this.parent;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?t.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}},{key:"anchorWidth",get:function(){if(void 0!==this.percentageWidth)return this.viewport.width*this.percentageWidth+this.paddingWidth}},{key:"anchorHeight",get:function(){if(void 0!==this.percentageHeight)return this.viewport.height*this.percentageHeight+this.paddingHeight}},{key:"updateViewport",value:function(){this.viewport=function(t,e){void 0===e?e=new Qt:!0===e&&(e=ce);var i,n,r=t.scale,s=r.baseSize,o=r.parentSize,h=r.canvasBounds,a=r.displayScale,l=0<=h.x?0:-(h.x*a.x),u=0<=h.y?0:-(h.y*a.y);return i=o.width>=h.width?s.width:s.width-(h.width-o.width)*a.x,n=o.height>=h.height?s.height:s.height-(h.height-o.height)*a.y,e.setTo(l,u,i,n),e}(this.scene,!this.viewport||this.viewport);var t=this.onUpdateViewportCallback,e=this.onUpdateViewportCallbackScope;t&&(e?t.call(e,this.viewport,this.parent,this):t(this.viewport,this.parent,this))}}]),r}(),pe=Phaser.Utils.Objects.GetValue,fe=function(){s(r,$t);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,e))._isRunning=!1,i.isPaused=!1,i.tickingState=!1,i.setTickingMode(pe(e,"tickingMode",1)),i}return i(r,[{key:"boot",value:function(){2!==this.tickingMode||this.tickingState||this.startTicking()}},{key:"shutdown",value:function(t){this.isShutdown||(this.stop(),this.tickingState&&this.stopTicking(),y(p(r.prototype),"shutdown",this).call(this,t))}},{key:"setTickingMode",value:function(t){"string"==typeof t&&(t=ve[t]),this.tickingMode=t}},{key:"startTicking",value:function(){this.tickingState=!0}},{key:"stopTicking",value:function(){this.tickingState=!1}},{key:"isRunning",get:function(){return this._isRunning},set:function(t){this._isRunning!==t&&(this._isRunning=t,1===this.tickingMode&&t!=this.tickingState&&(t?this.startTicking():this.stopTicking()))}},{key:"start",value:function(){return this.isPaused=!1,this.isRunning=!0,this}},{key:"pause",value:function(){return this.isRunning&&(this.isPaused=!0,this.isRunning=!1),this}},{key:"resume",value:function(){return this.isPaused&&(this.isRunning=!0),this}},{key:"stop",value:function(){return this.isPaused=!1,this.isRunning=!1,this}},{key:"complete",value:function(){this.isPaused=!1,this.isRunning=!1,this.emit("complete",this.parent,this)}}]),r}(),ve={no:0,lazy:1,always:2},ye=function(){s(e,fe);var t=v(e);function e(){return d(this,e),t.apply(this,arguments)}return i(e,[{key:"startTicking",value:function(){y(p(e.prototype),"startTicking",this).call(this),this.scene.events.on("update",this.update,this)}},{key:"stopTicking",value:function(){y(p(e.prototype),"stopTicking",this).call(this),this.scene&&this.scene.events.off("update",this.update,this)}}]),e}(),ge=Phaser.Utils.Objects.GetValue,me=Phaser.Math.Clamp,Ce=function(){function e(t){d(this,e),this.resetFromJSON(t)}return i(e,[{key:"resetFromJSON",value:function(t){this.state=ge(t,"state",be),this.timeScale=ge(t,"timeScale",1),this.delay=ge(t,"delay",0),this.repeat=ge(t,"repeat",0),this.repeatCounter=ge(t,"repeatCounter",0),this.duration=ge(t,"duration",0),this.nowTime=ge(t,"nowTime",0),this.justRestart=ge(t,"justRestart",!1)}},{key:"toJSON",value:function(){return{state:this.state,timeScale:this.timeScale,delay:this.delay,repeat:this.repeat,repeatCounter:this.repeatCounter,duration:this.duration,nowTime:this.nowTime,justRestart:this.justRestart}}},{key:"destroy",value:function(){}},{key:"setTimeScale",value:function(t){return this.timeScale=t,this}},{key:"setDelay",value:function(t){return void 0===t&&(t=0),this.delay=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"setRepeat",value:function(t){return this.repeat=t,this}},{key:"setRepeatInfinity",value:function(){return this.repeat=-1,this}},{key:"start",value:function(){return this.nowTime=0<this.delay?-this.delay:0,this.state=0<=this.nowTime?Se:ke,this.repeatCounter=0,this}},{key:"stop",value:function(){return this.state=be,this}},{key:"update",value:function(t,e){this.state!==be&&this.state!==Pe&&0!==e&&0!==this.timeScale&&(this.nowTime+=e*this.timeScale,this.state=0<=this.nowTime?Se:ke,this.justRestart=!1,this.nowTime>=this.duration&&(-1===this.repeat||this.repeatCounter<this.repeat?(this.repeatCounter++,this.justRestart=!0,this.nowTime-=this.duration):(this.nowTime=this.duration,this.state=Pe)))}},{key:"t",get:function(){var t;switch(this.state){case be:case ke:t=0;break;case Se:t=this.nowTime/this.duration;break;case Pe:t=1}return me(t,0,1)},set:function(t){(t=me(t,-1,1))<0?(this.state=ke,this.nowTime=-this.delay*t):(this.state=Se,this.nowTime=this.duration*t,1===t&&0!==this.repeat&&this.repeatCounter++)}},{key:"isIdle",get:function(){return this.state===be}},{key:"isDelay",get:function(){return this.state===ke}},{key:"isCountDown",get:function(){return this.state===Se}},{key:"isRunning",get:function(){return this.state===ke||this.state===Se}},{key:"isDone",get:function(){return this.state===Pe}},{key:"isOddIteration",get:function(){return 1==(1&this.repeatCounter)}},{key:"isEvenIteration",get:function(){return 0==(1&this.repeatCounter)}}]),e}(),be=0,ke=1,Se=2,Pe=-1,Ee=function(){s(r,ye);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,e)).timer=new Ce,i}return i(r,[{key:"shutdown",value:function(t){this.isShutdown||(y(p(r.prototype),"shutdown",this).call(this,t),this.timer.destroy(),this.timer=void 0)}},{key:"start",value:function(){return this.timer.start(),y(p(r.prototype),"start",this).call(this),this}},{key:"stop",value:function(){return this.timer.stop(),y(p(r.prototype),"stop",this).call(this),this}},{key:"complete",value:function(){return this.timer.stop(),y(p(r.prototype),"complete",this).call(this),this}}]),r}(),xe=Phaser.Utils.Objects.GetValue,we=Phaser.Utils.Objects.GetAdvancedValue,Oe=Phaser.Tweens.Builders.GetEaseFunction,_e=function(){s(e,Ee);var t=v(e);function e(){return d(this,e),t.apply(this,arguments)}return i(e,[{key:"resetFromJSON",value:function(t){return this.timer.resetFromJSON(xe(t,"timer")),this.setEnable(xe(t,"enable",!0)),this.setDelay(we(t,"delay",0)),this.setDuration(we(t,"duration",1e3)),this.setEase(xe(t,"ease","Linear")),this.setRepeat(xe(t,"repeat",0)),this}},{key:"setEnable",value:function(t){return null==t&&(t=!0),this.enable=t,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.easeFn=Oe(t),this}},{key:"setRepeat",value:function(t){return this.repeat=t,this}},{key:"start",value:function(){return this.timer.isRunning||y(p(e.prototype),"start",this).call(this),this}},{key:"restart",value:function(){return this.timer.stop(),this.start.apply(this,arguments),this}},{key:"update",value:function(t,e){if(!this.isRunning||!this.enable)return this;var i=this.parent;if(!i.active)return this;var n=this.timer;return n.update(t,e),n.isDelay||this.updateGameObject(i,n),this.emit("update",i,this),n.isDone&&this.complete(),this}},{key:"updateGameObject",value:function(){}}]),e}(),ze=Phaser.Utils.Objects.GetValue,Re=Phaser.Utils.Objects.GetAdvancedValue,Te=Phaser.Math.Linear,Me=function(){s(r,_e);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,e)).scaleStart={},i.scaleEnd={},i.resetFromJSON(e),i.boot(),i}return i(r,[{key:"resetFromJSON",value:function(t){return y(p(r.prototype),"resetFromJSON",this).call(this,t),this.setMode(ze(t,"mode",0)),this.setScaleRange(Re(t,"start",void 0),Re(t,"end",0)),this}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=Xe[t]),this.mode=t,this}},{key:"setScaleRange",value:function(t,e){return"number"==typeof t?(this.startX=t,this.startY=t):(this.startX=Re(t,"x",this.parent.scaleX),this.startY=Re(t,"y",this.parent.scaleY)),"number"==typeof e?(this.endX=e,this.endY=e):(this.endX=Re(e,"x",void 0),this.endY=Re(e,"y",void 0)),this.hasScaleX=void 0!==this.startX&&void 0!==this.endX,this.hasScaleY=void 0!==this.startY&&void 0!==this.endY,this}},{key:"start",value:function(){if(this.timer.isRunning)return this;var t=this.parent;return this.hasScaleX&&(t.scaleX=this.startX),this.hasScaleY&&(t.scaleY=this.startY),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(2===this.mode?-1:0),y(p(r.prototype),"start",this).call(this),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;e.isOddIteration&&(i=1-i),i=this.easeFn(i),this.hasScaleX&&(t.scaleX=Te(this.startX,this.endX,i)),this.hasScaleY&&(t.scaleY=Te(this.startY,this.endY,i))}},{key:"complete",value:function(){return y(p(r.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),r}(),Xe={stop:0,destroy:1,yoyo:2},Ye=Phaser.Utils.Objects.IsPlainObject,Ae={popUp:function(t,e,i){if(Ye(t)){var n=t;t=n.duration,e=n.orientation,i=n.ease}var r=void 0===this._scale;return this._scale=function(t,e,i,n,r){var s;switch(i){case 0:case"x":s={x:0};break;case 1:case"y":s={y:0};break;default:s=0}var o={mode:0,start:s,end:1,duration:e,ease:void 0===n?"Cubic":n};return void 0===r?r=new Me(t,o):r.resetFromJSON(o),r.restart(),r}(this,t,e,i,this._scale),r&&ee(this,this._scale),this._scale.completeEventName="popup.complete",this},popUpPromise:function(t,e,i){return this.popUp(t,e,i),te(this._scale)},scaleDownDestroy:function(t,e,i,n){if(Ye(t)){var r=t;t=r.duration,e=r.orientation,i=r.ease,n=r.destroy}var s=void 0===this._scale;return this._scale=function(t,e,i,n,r,s){r instanceof Me&&(s=r,r=void 0),void 0===r&&(r=!0);var o={};switch(o.mode=r?1:0,i){case 0:case"x":o.end={x:0};break;case 1:case"y":o.end={y:0};break;default:o.end=0}return o.duration=e,o.ease=void 0===n?"Linear":n,void 0===s?s=new Me(t,o):s.resetFromJSON(o),s.restart(),s}(this,t,e,i,n,this._scale),s&&ee(this,this._scale),this._scale.completeEventName="scaledown.complete",this},scaleDownDestroyPromise:function(t,e,i,n){return this.scaleDownDestroy(t,e,i,n),te(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),te(this._scale)}},Le=Phaser.Utils.Objects.GetValue,Ve=Phaser.Utils.Objects.GetAdvancedValue,De=Phaser.Math.Linear,Fe=function(){s(r,_e);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,e)).resetFromJSON(e),i.boot(),i}return i(r,[{key:"resetFromJSON",value:function(t){return y(p(r.prototype),"resetFromJSON",this).call(this,t),this.setMode(Le(t,"mode",0)),this.setAlphaRange(Ve(t,"start",this.parent.alpha),Ve(t,"end",0)),this}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=je[t]),this.mode=t,this}},{key:"setAlphaRange",value:function(t,e){return this.alphaStart=t,this.alphaEnd=e,this}},{key:"start",value:function(){return this.timer.isRunning||(this.parent.setAlpha(this.alphaStart),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(2===this.mode?-1:0),y(p(r.prototype),"start",this).call(this)),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;e.isOddIteration&&(i=1-i),t.alpha=De(this.alphaStart,this.alphaEnd,i)}},{key:"complete",value:function(){return y(p(r.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),r}(),je={stop:0,destroy:1,yoyo:2},We=Phaser.Utils.Objects.IsPlainObject,Ne=Phaser.Utils.Objects.IsPlainObject,He={fadeIn:function(t,e){Ne(t)&&(t=t.duration);var i=void 0===this._fade;return this._fade=function(t,e,i,n){var r,s;s=We(i)?(r=i.start,i.end):i,void 0===r&&(r=0),void 0===s&&(s=t.alpha);var o={mode:0,start:r,end:s,duration:e};return void 0===n?n=new Fe(t,o):n.resetFromJSON(o),n.restart(),n}(this,t,e,this._fade),i&&ie(this,this._fade),this._fade.completeEventName="fadein.complete",this},fadeInPromoise:function(t,e){return this.fadeIn(t,e),te(this._fade)},fadeOutDestroy:function(t,e){if(Ne(t)){var i=t;t=i.duration,e=i.destroy}var n=void 0===this._fade;return this._fade=function(t,e,i,n){i instanceof Fe&&(n=i,i=void 0),void 0===i&&(i=!0);var r={mode:i?1:0,end:0,duration:e};return void 0===n?n=new Fe(t,r):n.resetFromJSON(r),n.restart(),n}(this,t,e,this._fade),n&&ie(this,this._fade),this._fade.completeEventName="fadeout.complete",this},fadeOutDestroyPromise:function(t,e){return this.fadeOutDestroy(t,e),te(this._fade)},fadeOut:function(t){return this.fadeOutDestroy(t,!1),this},fadeOutPromise:function(t){return this.fadeOut(t),te(this._fade)}},Ge=Phaser.Utils.Objects.GetValue,Ie=Phaser.Utils.Objects.GetAdvancedValue,Ue=Phaser.Math.Linear,Be=function(){s(r,_e);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,e)).resetFromJSON(e),i.boot(),i}return i(r,[{key:"resetFromJSON",value:function(t){if(y(p(r.prototype),"resetFromJSON",this).call(this,t),this.setMode(Ge(t,"mode",0)),t&&(t.hasOwnProperty("x")||t.hasOwnProperty("y"))){var e=Ie(t,"x",void 0),i=Ie(t,"y",void 0);this.setTargetPosition(e,i)}else this.setTargetPosition(t);return this}},{key:"setMode",value:function(t){return"string"==typeof t&&(t=Je[t]),this.mode=t,this}},{key:"setTargetPosition",value:function(t,e){if("number"==typeof t||"number"==typeof e)this.startX=this.parent.x,this.startY=this.parent.y,this.endX=t,this.endY=e;else{var i=t;this.startX=Ie(i,"startX",void 0),this.startY=Ie(i,"startY",void 0),this.endX=Ie(i,"endX",void 0),this.endY=Ie(i,"endY",void 0)}return this.hasMoveX=void 0!==this.startX&&void 0!==this.endX,this.hasMoveY=void 0!==this.startY&&void 0!==this.endY,this}},{key:"start",value:function(){if(this.timer.isRunning)return this;var t=this.parent;return this.hasMoveX&&(t.x=this.startX),this.hasMoveY&&(t.y=this.startY),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(2===this.mode?-1:0),y(p(r.prototype),"start",this).call(this),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;e.isOddIteration&&(i=1-i),i=this.easeFn(i),this.hasMoveX&&(t.x=Ue(this.startX,this.endX,i)),this.hasMoveY&&(t.y=Ue(this.startY,this.endY,i))}},{key:"complete",value:function(){return y(p(r.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),r}(),Je={stop:0,destroy:1,yoyo:2},Ke=Phaser.Utils.Objects.IsPlainObject,Ze=Phaser.Math.Distance.Between,qe={moveFrom:function(t,e,i,n,r){if(Ke(t)){var s=t;e=s.x,i=s.y,t=s.hasOwnProperty("speed")?1e3*Ze(e,i,this.x,this.y)/s.speed:s.duration,n=s.ease}var o=void 0===this._easeMove;return this._easeMove=function(t,e,i,n,r,s,o){s instanceof Be&&(o=s,s=void 0),void 0===s&&(s=!1);var h={};return h.mode=s?1:0,void 0!==i&&(h.startX=ne(i,t.x),h.endX=t.x),void 0!==n&&(h.startY=ne(n,t.y),h.endY=t.y),h.duration=e,h.ease=void 0===r?"Linear":r,void 0===o?o=new Be(t,h):o.resetFromJSON(h),o.restart(),o}(this,t,e,i,n,r,this._easeMove),o&&re(this,this._easeMove),this._easeMove.completeEventName="movefrom.complete",this},moveFromPromise:function(t,e,i,n,r){return this.moveFrom(t,e,i,n,r),te(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),te(this._easeMove)},moveTo:function(t,e,i,n,r){if(Ke(t)){var s=t;e=s.x,i=s.y,t=s.hasOwnProperty("speed")?1e3*Ze(e,i,this.x,this.y)/s.speed:s.duration,n=s.ease}var o=void 0===this._easeMove;return this._easeMove=function(t,e,i,n,r,s,o){s instanceof Be&&(o=s,s=void 0),void 0===s&&(s=!1);var h={};return h.mode=s?1:0,void 0!==i&&(h.startX=t.x,h.endX=ne(i,t.x)),void 0!==n&&(h.startY=t.y,h.endY=ne(n,t.y)),h.duration=e,h.ease=void 0===r?"Linear":r,void 0===o?o=new Be(t,h):o.resetFromJSON(h),o.restart(),o}(this,t,e,i,n,r,this._easeMove),o&&re(this,this._easeMove),this._easeMove.completeEventName="moveto.complete",this},moveToPromise:function(t,e,i,n,r){return this.moveTo(t,e,i,n,r),te(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),te(this._easeMove)}},$e=function(t,e){t&&(q(t).hidden=e,t.rexContainer.parent.setChildVisible(t,!e))},Qe={show:function(t){return void 0===t&&(t=this),$e(t,!1),this},hide:function(t){return void 0===t&&(t=this),$e(t,!0),this},isShow:function(t){return void 0===t&&(t=this),!!(e=t)&&!q(e).hidden;var e}},ti=void 0,ei=function(n){return n?function(t,e,i){return!!he(t)&&(n(t,e,i),!0)}:he},ii=function(t){return t},ni={},ri=Phaser.Display.Align.CENTER,si={getSizerConfig:q,getChildPrevState:function(t){var e=q(t);return e.hasOwnProperty("prevState")||(e.prevState={}),e.prevState},pushIntoBounds:function(t){return void 0===t&&(t=function(t,e){void 0===e&&(void 0===Q&&(Q=new Phaser.Geom.Rectangle),e=Q);var i=t.game.config;return e.setTo(0,0,i.width,i.height),e}(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},drawBounds:function(t,e){var i,n,r,s,o=t.scene;if("number"==typeof e)i=e;else{i=Vt(e,"color",16777215);var h=Vt(e,"name",!1);h&&(n=Vt(h,"createTextCallback",Ft),r=Vt(h,"createTextCallbackScope",void 0),"string"==typeof(s=Vt(h,"align","left-top"))&&(s=et[s]))}if(n&&!t.children){t.children=new Dt(o),t.once("destroy",function(t,e){t.children.destroy(!e),t.children=void 0});var a=t.clear.bind(t);t.clear=function(){a(),t.children.clear(!1,!0)}}for(var l,u,c=this.getAllShownChildren([this]),d=0,p=c.length;d<p;d++)(l=c[d]).getBounds&&(i&&t.lineStyle(1,i).strokeRectShape(l.getBounds(jt)),l.name&&n&&(u=r?n.call(r,o):n(o))&&(u.setText(l.name),t.children.add(u),Ot(u,jt.x,jt.y,jt.width,jt.height,s)));return this},resolveWidth:Xt,resolveChildrenWidth:function(t){var e,i;for(var n in this.sizerChildren)(e=this.sizerChildren[n])&&e.isRexSizer&&!e.ignoreLayout&&(i=this.getExpandedChildWidth(e,t),i=e.resolveWidth(i),e.resolveChildrenWidth(i))},resolveHeight:Yt,getChildWidth:function(t){return t.isRexSizer?Math.max(t.minWidth,t.childrenWidth):void 0!==t.minWidth?t.minWidth:nt(t)},getChildHeight:function(t){return t.isRexSizer?Math.max(t.minHeight,t.childrenHeight):void 0!==t.minHeight?t.minHeight:rt(t)},getExpandedChildWidth:function(t,e){return e},getExpandedChildHeight:function(t,e){return e},getChildrenWidth:function(){return 0},getChildrenHeight:function(){return 0},addChildrenMap:Rt,addElement:Rt,getElement:function(t,e){if("string"==typeof t&&(t=t.split(".")),0!==t.length){var i=t.shift(),n=null;if("#"===i.charAt(0))i=i.substring(1),n=this.getByName(i,e);else if(-1===i.indexOf("["))this.childrenMap&&(n=this.childrenMap[i]);else{var r=i.match(It);if(null!=r&&this.childrenMap){var s=this.childrenMap[r[1]];s&&(n=s[r[2]])}}return 0===t.length?n:n&&n.childrenMap?n.getElement(t):null}},getAllChildrenSizers: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},getChildrenSizers:function(t){return void 0===t&&(t=[]),t},preLayout:At,layout:function(){return this.runLayout(),this},runLayout:function(t,e,i){if(this.ignoreLayout)return this;var n=!t;return n&&this.preLayout(),e=this.resolveWidth(e),n&&(this.resolveChildrenWidth(e),this.runWidthWrap(e)),i=this.resolveHeight(i),this.resize(e,i),this.sizerEventsEnable&&void 0===this.layoutedChildren&&(this.layoutedChildren=[]),this.layoutChildren(),this.layoutBackgrounds(),this.sizerEventsEnable&&(this.emit("postlayout",this.layoutedChildren,this),this.layoutedChildren.length=0),this.postLayout()},layoutChildren:function(){},runWidthWrap:function(t){var e,i;for(var n in this.sizerChildren)!(e=this.sizerChildren[n])||e.isRexSizer&&e.ignoreLayout||(void 0===(i=this.getExpandedChildWidth(e,t))&&(i=this.resolveWidth(i)),e.runWidthWrap&&e.runWidthWrap(i));return this},layoutBackgrounds:function(){if(void 0!==this.backgroundChildren)for(var t,e,i,n,r,s,o,h=this.backgroundChildren,a=this.left,l=this.top,u=this.width,c=this.height,d=0,p=h.length;d<p;d++)(e=(t=h[d]).rexSizer).hidden||(i=e.padding,le.call(this,t),n=a+i.left,r=l+i.top,s=u-i.left-i.right,o=c-i.top-i.bottom,ae(t,s,o),ue.call(this,t,n,r,s,o,ri))},postLayout:function(){return this._anchor&&this._anchor.updatePosition(),this},setAnchor:function(t){void 0===t&&(t={});var n=t.hasOwnProperty("width"),r=t.hasOwnProperty("height"),e=t.hasOwnProperty("onResizeCallback");return!n&&!r||e||(t.onResizeCallback=function(t,e,i){n&&i.setMinWidth(t),r&&i.setMinHeight(e),i.layout()}),void 0===this._anchor?this._anchor=new de(this,t):this._anchor.resetFromJSON(t),this},isInTouching:function(t,e){return void 0===e&&(e=this),function(t,e,i,n){if(e)return se(t,e.x,e.y,i,n);for(var r=t.scene.input.manager,s=r.pointersTotal,o=r.pointers,h=0;h<s;h++)if(e=o[h],se(t,e.x,e.y,i,n))return!0;return!1}(e,t)},pointToChild:function(t,e,i,n,r){var s;if((s=i)&&"function"==typeof s||(r=i,n=i=void 0),void 0===r&&(r=this.sizerChildren?this.sizerChildren:this.children),x(r)){for(var o,h=0,a=r.length;h<a;h++)if(o=r[h],oe(o,t,e,i,n))return o}else for(var l in r)if(o=r[l],oe(o,t,e,i,n))return o;return null},setDraggable:function(r,t){var e=u(r);return"string"===e?r=this.getElement(r):void 0!==r&&"object"==e||(t=r,r=this),void 0===t&&(t=!0),r.input&&r.input.hasOwnProperty("draggable")?r.input.draggable=t:t&&(r.setInteractive(),r.scene.input.setDraggable(r),r.on("drag",function(t,e,i){var n=this.getTopmostSizer();n.x+=e-r.x,n.y+=i-r.y},this)),this},broadcastEvent:function(){for(var t=this.getAllChildren([this]),e=0,i=t.length;e<i;e++){var n=t[e];n.emit.apply(n,arguments)}return this}};Object.assign(si,Bt,Gt,{getParentSizer:function(t){return this.getParent(t)},getTopmostSizer:function(t){return this.getTopmostParent(t)}},Ae,He,qe,Qe,Jt);var oi=Phaser.Utils.Objects.GetValue,hi=function(){s(l,Z);var a=v(l);function l(t,e,i,n,r,s){var o;d(this,l),(o=a.call(this,t,e,i,2,2)).isRexSizer=!0,o.setMinSize(n,r),o.setName(oi(s,"name","")),o.rexSizer={},o.space={},o.backgroundChildren=void 0,o.sizerChildren=void 0,o.layoutedChildren=void 0;var h=oi(s,"anchor",void 0);return h&&o.setAnchor(h),o.setInnerPadding(oi(s,"space",0)),o.setDraggable(oi(s,"draggable",!1)),o.setSizerEventsEnable(oi(s,"sizerEvents",!1)),o.setDirty(!0),o}return i(l,[{key:"destroy",value:function(t){if(this.scene){if(t)for(var e=this.getAllChildrenSizers([this]),i=0,n=e.length;i<n;i++)e[i].sizerEventsEnable=!1;y(p(l.prototype),"destroy",this).call(this,t),this.backgroundChildren=void 0,this.sizerChildren=void 0,this.childrenMap=void 0,this.space=void 0,this.rexSizer=void 0,this.layoutedChildren=void 0}}},{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:"setDirty",value:function(t){return void 0===t&&(t=!0),this.dirty=t,this}},{key:"setSizerEventsEnable",value:function(t){return void 0===t&&(t=!0),this.sizerEventsEnable=t,this}},{key:"ignoreLayout",get:function(){return this.rexSizer.hidden||!this.dirty}},{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-nt(this)*this.originX},set:function(t){this.x+=t-this.left}},{key:"alignLeft",value:function(t){return this.left=t,this}},{key:"right",get:function(){return this.left+nt(this)},set:function(t){this.x+=t-this.right}},{key:"alignRight",value:function(t){return this.right=t,this}},{key:"centerX",get:function(){return this.left+nt(this)/2},set:function(t){this.x+=t-this.centerX}},{key:"alignCenterX",value:function(t){return this.centerX=t,this}},{key:"top",get:function(){return this.y-rt(this)*this.originY},set:function(t){this.y+=t-this.top}},{key:"alignTop",value:function(t){return this.top=t,this}},{key:"bottom",get:function(){return this.top+rt(this)},set:function(t){this.y+=t-this.bottom}},{key:"alignBottom",value:function(t){return this.bottom=t,this}},{key:"centerY",get:function(){return this.top+rt(this)/2},set:function(t){this.y+=t-this.centerY}},{key:"alignCenterY",value:function(t){return this.centerY=t,this}},{key:"innerLeft",get:function(){return this.left+this.space.left}},{key:"innerRight",get:function(){return this.right-this.space.right}},{key:"innerTop",get:function(){return this.top+this.space.top}},{key:"innerBottom",get:function(){return this.bottom-this.space.bottom}},{key:"innerWidth",get:function(){return this.width-this.space.left-this.space.right}},{key:"innerHeight",get:function(){return this.height-this.space.top-this.space.bottom}},{key:"minInnerWidth",get:function(){var t=this.minWidth-this.space.left-this.space.right;return Math.max(t,0)}},{key:"minInnerHeight",get:function(){var t=this.minHeight-this.space.top-this.space.bottom;return Math.max(t,0)}}]),l}();Object.assign(hi.prototype,si);function ai(t,e,i,n,r,s,o,h){zt.call(this,t);var a=u(e);if(null===e)return this;if("number"!==a)if("string"===a)e=pi[e];else if(ui(e)){var l;e=ci(l=e,"proportion",0),i=ci(l,"align",di),n=ci(l,"padding",0),r=ci(l,"expand",!1),s=ci(l,"key",void 0),o=ci(l,"index",void 0),t.isRexSizer||(h=0===this.orientation?ci(l,"minWidth",void 0):ci(l,"minHeight",void 0))}return"string"==typeof i&&(i=et[i]),void 0===e&&(e=0),void 0===i&&(i=di),void 0===n&&(n=0),void 0===r&&(r=!1),t.isRexSizer||void 0!==h||(h=0===this.orientation?t._minWidth:t._minHeight),(l=this.getSizerConfig(t)).proportion=e,l.align=i,l.padding=_t(n),l.expand=r,void 0===o||o>=this.sizerChildren.length?this.sizerChildren.push(t):this.sizerChildren.splice(o,0,t),!t.isRexSizer&&0<e&&(0===this.orientation?(t.minWidth=void 0===h?nt(t):h,t.minHeight=void 0):(t.minWidth=void 0,t.minHeight=void 0===h?rt(t):h)),void 0!==s&&this.addChildrenMap(s,t),this}var li=Phaser.GameObjects.Zone,ui=Phaser.Utils.Objects.IsPlainObject,ci=Phaser.Utils.Objects.GetValue,di=Phaser.Display.Align.CENTER,pi={min:0,full:-1},fi={add:ai,addSpace:function(t){var e,i;return void 0===t&&(t=1),ai.call(this,(e=this.scene,(i=new li(e,0,0,1,1)).isRexSpace=!0,i),{proportion:t,minWidth:0,minHeight:0}),this},insert:function(t,e,i,n,r,s,o){return ai.call(this,e,i,n,r,s,o,t),this}},vi=Phaser.Utils.Array.Remove,yi=Z.prototype.remove,gi=Z.prototype.clear,mi=Phaser.Utils.Array.Remove,Ci={remove:function(t,e){return this.getParentSizer(t)!==this||(mi(this.sizerChildren,t),function(t,e){return this.isBackground(t)&&vi(this.backgroundChildren,t),yi.call(this,t,e),!e&&this.sizerEventsEnable&&(t.emit("sizer.remove",t,this),this.emit("remove",t,this)),this}.call(this,t,e)),this},removeAll:function(t){for(var e=this.sizerChildren.length-1;0<=e;e--)this.remove(this.sizerChildren[e],t);return this},clear:function(t){return this.sizerChildren.length=0,function(t){this.backgroundChildren&&(this.backgroundChildren.length=0);var e,i=!t&&this.sizerEventsEnable;if(i&&(e=this.getChildren([])),gi.call(this,t),i)for(var n,r=0,s=e.length;r<s;r++)(n=e[r]).emit("sizer.remove",n,this),this.emit("remove",n,this);return this}.call(this,t),this}},bi={getChildrenWidth:function(t){if(this.rexSizer.hidden)return 0;void 0===t&&(t=!0);var e,i,n,r=0,s=this.sizerChildren;if(0===this.orientation)for(var o=0,h=s.length;o<h;o++)(e=s[o]).rexSizer.hidden||(n=0===e.rexSizer.proportion||t&&0<e.rexSizer.proportion?this.getChildWidth(e):0,n+=(i=e.rexSizer.padding).left+i.right,0<o&&(n+=this.space.item),r+=n);else for(o=0,h=s.length;o<h;o++)(e=s[o]).hasOwnProperty("rexSizer")&&(e.rexSizer.hidden||(i=e.rexSizer.padding,n=this.getChildWidth(e)+i.left+i.right,r=Math.max(n,r)));return r+this.space.left+this.space.right},getChildrenHeight:function(t){if(this.rexSizer.hidden)return 0;void 0===t&&(t=!0);var e,i,n,r=0,s=this.sizerChildren;if(0===this.orientation)for(var o=0,h=s.length;o<h;o++)(e=s[o]).rexSizer.hidden||(i=e.rexSizer.padding,n=this.getChildHeight(e)+i.top+i.bottom,r=Math.max(n,r));else for(o=0,h=s.length;o<h;o++)(e=s[o]).hasOwnProperty("rexSizer")&&(e.rexSizer.hidden||(i=e.rexSizer.padding,n=0===e.rexSizer.proportion||t&&0<e.rexSizer.proportion?this.getChildHeight(e):0,n+=i.top+i.bottom,0<o&&(n+=this.space.item),r+=n));return r+this.space.top+this.space.bottom},getExpandedChildWidth:function(t,e){var i;void 0===e&&(e=this.width);var n=t.rexSizer,r=n.padding;0===this.orientation?0<n.proportion&&0<this.proportionLength&&(i=n.proportion*this.proportionLength):n.expand&&(i=e-this.space.left-this.space.right-r.left-r.right);return i},getExpandedChildHeight:function(t,e){var i;void 0===e&&(e=this.height);var n=t.rexSizer,r=n.padding;0===this.orientation?n.expand&&(i=e-this.space.top-this.space.bottom-r.top-r.bottom):0<n.proportion&&0<this.proportionLength&&(i=n.proportion*this.proportionLength);return i},getChildrenSizers: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},preLayout:function(){return this._childrenProportion=void 0,this.proportionLength=void 0,At.call(this),this},layoutChildren:function(){for(var t,e,i,n,r,s,o,h,a,l=this.sizerChildren,u=this.innerLeft,c=this.innerTop,d=this.innerWidth,p=this.innerHeight,f=u,v=c,y=0,g=l.length;y<g;y++)(t=l[y]).rexSizer.hidden||(i=(e=t.rexSizer).padding,le.call(this,t),h=this.getExpandedChildWidth(t),a=this.getExpandedChildHeight(t),t.isRexSizer?t.runLayout(this,h,a):ae(t,h,a),void 0===h&&(h=nt(t)),void 0===a&&(a=rt(t)),o=0===this.orientation?(n=f+i.left,s=0===e.proportion||0===this.proportionLength?h:e.proportion*this.proportionLength,r=v+i.top,p-i.top-i.bottom):(n=f+i.left,s=d-i.left-i.right,r=v+i.top,0===e.proportion||0===this.proportionLength?a:e.proportion*this.proportionLength),ue.call(this,t,n,r,s,o,e.align),0===this.orientation?f+=s+i.left+i.right+this.space.item:v+=o+i.top+i.bottom+this.space.item)},resolveWidth:function(t){t=Xt.call(this,t);if(void 0===this.proportionLength&&0===this.orientation){var e=t-this.childrenWidth;0<e?(e=t-this.getChildrenWidth(!1),this.proportionLength=e/this.childrenProportion):this.proportionLength=0}return t},resolveHeight:function(t,e){e=Yt.call(this,t,e);if(void 0===this.proportionLength&&1===this.orientation){var i=e-this.childrenHeight;0<i?(i=e-this.getChildrenHeight(!1),this.proportionLength=i/this.childrenProportion):this.proportionLength=0}return e}};Object.assign(bi,fi,Ci);var ki={x:0,h:0,horizontal:0,"left-to-right":0,y:1,v:1,vertical:1,"top-to-bottom":1},Si=Phaser.Utils.Objects.IsPlainObject,Pi=Phaser.Utils.Objects.GetValue,Ei=function(){s(l,hi);var a=v(l);function l(t,e,i,n,r,s,o){var h;return d(this,l),Si(e)?(e=Pi(o=e,"x",0),i=Pi(o,"y",0),n=Pi(o,"width",void 0),r=Pi(o,"height",void 0),s=Pi(o,"orientation",0)):Si(n)?(n=Pi(o=n,"width",void 0),r=Pi(o,"height",void 0),s=Pi(o,"orientation",0)):Si(s)&&(s=Pi(o=s,"orientation",0)),void 0===s&&(s=0),(h=a.call(this,t,e,i,n,r,o)).type="rexSizer",h.sizerChildren=[],h.setOrientation(s),h.setItemSpacing(Pi(o,"space.item",0)),h.addChildrenMap("items",h.sizerChildren),h}return i(l,[{key:"setOrientation",value:function(t){var e;return this.orientation=("string"==typeof(e=t)&&(e=ki[e]),e),this}},{key:"setItemSpacing",value:function(t){return this.space.item=t,this}},{key:"childrenProportion",get:function(){return void 0===this._childrenProportion&&(this._childrenProportion=function(){for(var t,e,i=0,n=this.sizerChildren,r=0,s=n.length;r<s;r++)(t=n[r]).rexSizer.hidden||0<(e=t.rexSizer.proportion)&&(i+=e);return i}.call(this)),this._childrenProportion}}]),l}();Object.assign(Ei.prototype,bi);function xi(t,e,i){var n,r,s;return t.y===e.y?(n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),s=zi(i.x,n,r)):t.x===e.x&&(n=Math.min(t.y,e.y),r=Math.max(t.y,e.y),s=zi(i.y,n,r)),s}function wi(t,e,i){this.enable&&(Ri.x=e,Ri.y=i,this.value=xi(this.getStartPoint(),this.getEndPoint(),Ri))}function Oi(t){if(this.enable&&t.isDown){Ti.x=t.worldX,Ti.y=t.worldY;var e=xi(this.getStartPoint(),this.getEndPoint(),Ti);this.stopEaseValue(),0===this.easeValueDuration||Math.abs(this.value-e)<.1?this.value=e:this.easeValueTo(e)}}function _i(t,e){void 0===e&&(e=Mi);var i=this.childrenMap.thumb,n=i.x,r=i.y;return Ot(i,this.innerLeft,this.innerTop,this.innerWidth,this.innerHeight,t),e.x=i.x,e.y=i.y,i.x=n,i.y=r,e}var zi=Phaser.Math.Percent,Ri={},Ti={},Mi={},Xi=Phaser.Display.Align.LEFT_CENTER,Yi=Phaser.Display.Align.TOP_CENTER,Ai={},Li=Phaser.Display.Align.RIGHT_CENTER,Vi=Phaser.Display.Align.BOTTOM_CENTER,Di={},Fi=Phaser.Math.Linear,ji={},Wi=Phaser.Display.Align.LEFT_CENTER,Ni=Phaser.Display.Align.TOP_CENTER,Hi=Phaser.Utils.Objects.GetValue,Gi=Phaser.Math.Linear,Ii=function(){s(r,_e);var n=v(r);function r(t,e){var i;return d(this,r),(i=n.call(this,t,e)).resetFromJSON(),i.boot(),i}return i(r,[{key:"start",value:function(t){if(this.timer.isRunning)return this;var e=this.parent;this.propertyKey=Hi(t,"key","value");var i=e[this.propertyKey];return this.fromValue=Hi(t,"from",i),this.toValue=Hi(t,"to",i),this.setEase(Hi(t,"ease",this.ease)),this.setDuration(Hi(t,"duration",this.duration)),this.timer.setDuration(this.duration),e[this.propertyKey]=this.fromValue,y(p(r.prototype),"start",this).call(this),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;i=this.easeFn(i),t[this.propertyKey]=Gi(this.fromValue,this.toValue,i)}}]),r}(),Ui={setEaseValuePropName:function(t){return this.easeValuePropName=t,this},setEaseValueDuration:function(t){return this.easeValueDuration=t,this},setEaseValueFunction:function(t){return this.easeFunction=t,this},stopEaseValue:function(){return this.easeValueTask&&this.easeValueTask.stop(),this},easeValueTo:function(t,e,i){return null==t||(void 0!==e&&(t=Percent(t,e,i)),void 0===this.easeValueTask&&(this.easeValueTask=new Ii(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,to:t,duration:this.easeValueDuration,ease:this.easeFunction})),this}},Bi=Phaser.Utils.Objects.GetValue,Ji=Phaser.Math.Clamp,Ki=Phaser.Math.Linear,Zi=Phaser.Math.Percent,qi=Phaser.Math.Snap.To,$i=function(){s(c,Ei);var u=v(c);function c(t,e){var i;d(this,c),(i=u.call(this,t,e)).type="rexSlider",i.eventEmitter=Bi(e,"eventEmitter",f(i));var n=Bi(e,"background",void 0),r=Bi(e,"track",void 0),s=Bi(e,"indicator",void 0),o=Bi(e,"thumb",void 0);n&&i.addBackground(n),r&&i.add(r,{proportion:1,expand:!0,minWidth:0,minHeight:0}),s&&i.pin(s),o&&i.pin(o);var h=Bi(e,"input",0);switch("string"==typeof h&&(h=Qi[h]),h){case 0:o&&(o.setInteractive(),i.scene.input.setDraggable(o),o.on("drag",wi,f(i)));break;case 1:i.setInteractive().on("pointerdown",Oi,f(i)).on("pointermove",Oi,f(i))}i.addChildrenMap("background",n),i.addChildrenMap("track",r),i.addChildrenMap("indicator",s),i.addChildrenMap("thumb",o);var a=Bi(e,"valuechangeCallback",null);if(null!==a){var l=Bi(e,"valuechangeCallbackScope",void 0);i.eventEmitter.on("valuechange",a,l)}return i.setEnable(Bi(e,"enable",void 0)),i.setGap(Bi(e,"gap",void 0)),i.setValue(Bi(e,"value",0),Bi(e,"min",void 0),Bi(e,"max",void 0)),i.setEaseValuePropName("value").setEaseValueDuration(Bi(e,"easeValue.duration",0)).setEaseValueFunction(Bi(e,"easeValue.ease","Linear")),i}return i(c,[{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"setGap",value:function(t){return this.gap=t,this}},{key:"value",get:function(){return this._value},set:function(t){void 0!==this.gap&&(t=qi(t,this.gap));var e=this._value;this._value=Ji(t,0,1),e!==this._value&&(this.updateThumb(this._value),this.updateIndicator(this._value),this.eventEmitter.emit("valuechange",this._value,e,this.eventEmitter))}},{key:"setValue",value:function(t,e,i){return null==t||(void 0!==e&&(t=Zi(t,e,i)),this.value=t),this}},{key:"addValue",value:function(t,e,i){return void 0!==e&&(t=Zi(t,e,i)),this.value+=t,this}},{key:"getValue",value:function(t,e){var i=this.value;return void 0!==t&&(i=Ki(t,e,i)),i}},{key:"runLayout",value:function(t,e,i){return this.ignoreLayout||(y(p(c.prototype),"runLayout",this).call(this,t,e,i),this.updateThumb(),this.updateIndicator()),this}}]),c}(),Qi={pan:0,drag:0,click:1,none:-1},tn={getStartPoint:function(t){if(void 0===t&&(t=Ai),this.childrenMap.thumb){var e=0===this.orientation?Xi:Yi;_i.call(this,e,t)}else 0===this.orientation?(t.x=this.innerLeft+1,t.y=this.centerY):(t.x=this.centerX,t.y=this.innerTop+1);return t},getEndPoint:function(t){if(void 0===t&&(t=Di),this.childrenMap.thumb){var e=0===this.orientation?Li:Vi;_i.call(this,e,t)}else 0===this.orientation?(t.x=this.innerRight-1,t.y=this.centerY):(t.x=this.centerX,t.y=this.innerBottom-1);return t},updateThumb:function(t){var e,i,n,r,s=this.childrenMap.thumb;return void 0===s||(void 0===t&&(t=this.value),e=t,i=this.getStartPoint(),n=this.getEndPoint(),void 0===(r=s)&&(r=ji),r.x=Fi(i.x,n.x,e),r.y=Fi(i.y,n.y,e),this.resetChildPositionState(s)),this},updateIndicator:function(t){var e,i,n=this.childrenMap.indicator;if(void 0===n)return this;void 0===t&&(t=this.value);var r=this.childrenMap.thumb;if(r)if(0===this.orientation){var s=nt(r);e=r.x-s*r.originX+s-this.left}else{var o=rt(r);i=r.y-o*r.originY+o-this.top}else 0===this.orientation?e=this.width*t:i=this.height*t;ae(n,e,i);var h=0===this.orientation?Wi:Ni;wt(n,this,h),this.resetChildPositionState(n)}};return Object.assign($i.prototype,tn,Ui),$i});
  