From 4d551548fc0616bedfbeee9dc40327320843f644 Mon Sep 17 00:00:00 2001 From: Rex Date: Thu, 12 Oct 2023 12:47:39 +0800 Subject: [PATCH] Scroll camera by cursor-at-bounds --- dist/rexcursoratboundsplugin.js | 2 + dist/rexcursoratboundsplugin.min.js | 2 +- dist/rexgameobjectshellplugin.js | 2348 ++++++++++------- dist/rexgameobjectshellplugin.min.js | 6 +- .../cursoratbounds/CursorAtBounds.d.ts | 2 + .../cursoratbounds/CursorAtBounds.js | 2 + .../cursoratbounds/Factory.d.ts | 5 + .../gameobjectshell/cursoratbounds/Factory.js | 13 + .../gameobjectshell-components.d.ts | 4 + .../gameobjectshell-components.js | 4 + .../gameobjectshell-plugin.d.ts | 7 + .../gameobjectshell/gameobjectshell-plugin.js | 2 + .../mousewheeltoupdown/Factory.d.ts | 5 + .../mousewheeltoupdown/Factory.js | 13 + .../MouseWheelToUpDown.d.ts | 2 + .../mousewheeltoupdown/MouseWheelToUpDown.js | 2 + templates/gameobjectshell/shell/Shell.js | 25 +- .../shell/methods/CreateBackground.js | 6 + .../shell/methods/CreateControlPoints.js | 6 + .../shell/methods/CreateLayerManager.js | 39 + .../shell/methods/CreatePropertiesPanel.js | 6 + .../shell/methods/LayerManagerMethods.js | 28 - .../CreateCameraController.js | 20 + .../CreateCursorAtBoundsCameraController.js | 55 + 24 files changed, 1541 insertions(+), 1063 deletions(-) create mode 100644 templates/gameobjectshell/cursoratbounds/CursorAtBounds.d.ts create mode 100644 templates/gameobjectshell/cursoratbounds/CursorAtBounds.js create mode 100644 templates/gameobjectshell/cursoratbounds/Factory.d.ts create mode 100644 templates/gameobjectshell/cursoratbounds/Factory.js create mode 100644 templates/gameobjectshell/mousewheeltoupdown/Factory.d.ts create mode 100644 templates/gameobjectshell/mousewheeltoupdown/Factory.js create mode 100644 templates/gameobjectshell/mousewheeltoupdown/MouseWheelToUpDown.d.ts create mode 100644 templates/gameobjectshell/mousewheeltoupdown/MouseWheelToUpDown.js create mode 100644 templates/gameobjectshell/shell/methods/CreateLayerManager.js create mode 100644 templates/gameobjectshell/shell/methods/cameracontrollers/CreateCameraController.js create mode 100644 templates/gameobjectshell/shell/methods/cameracontrollers/CreateCursorAtBoundsCameraController.js diff --git a/dist/rexcursoratboundsplugin.js b/dist/rexcursoratboundsplugin.js index fdbecc7d4a..484feaf9d4 100644 --- a/dist/rexcursoratboundsplugin.js +++ b/dist/rexcursoratboundsplugin.js @@ -283,6 +283,7 @@ key: "boot", value: function boot() { this.scene.input.on('pointermove', this.onPointerMove, this); + this.scene.input.on('gameout', this.clearAllKeysState, this); this.scene.sys.events.once('shutdown', this.destroy, this); } }, { @@ -292,6 +293,7 @@ return; } this.scene.input.off('pointermove', this.onPointerMove, this); + this.scene.input.off('gameout', this.clearAllKeysState, this); this.scene.sys.events.off('shutdown', this.destroy, this); this.scene = undefined; _get(_getPrototypeOf(CursorAtBounds.prototype), "shutdown", this).call(this); diff --git a/dist/rexcursoratboundsplugin.min.js b/dist/rexcursoratboundsplugin.min.js index abc7ac3803..8c4a80801b 100644 --- a/dist/rexcursoratboundsplugin.min.js +++ b/dist/rexcursoratboundsplugin.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).rexcursoratboundsplugin=t();}(undefined,(function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n=o&&t<=o+u,f=t<=r&&t>=r-u,y=n>=i&&n<=i+u,a=n<=s&&n>=s-u;this.clearAllKeysState(),this.setKeyState("left",c),this.setKeyState("right",f),this.setKeyState("up",y),this.setKeyState("down",a);}},{key:"up",get:function(){return this.upKeyDown}},{key:"down",get:function(){return this.downKeyDown}},{key:"left",get:function(){return this.leftKeyDown}},{key:"right",get:function(){return this.rightKeyDown}},{key:"noKey",get:function(){return this.noKeyDown}}]),s}(a);return function(t){o(i,Phaser.Plugins.BasePlugin);var r=u(i);function i(t){return e(this,i),r.call(this,t)}return n(i,[{key:"start",value:function(){this.game.events.on("destroy",this.destroy,this);}},{key:"add",value:function(e,t){return new b(e,t)}}]),i}()})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).rexcursoratboundsplugin=t();}(undefined,(function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n=o&&t<=o+u,f=t<=r&&t>=r-u,a=n>=i&&n<=i+u,y=n<=s&&n>=s-u;this.clearAllKeysState(),this.setKeyState("left",c),this.setKeyState("right",f),this.setKeyState("up",a),this.setKeyState("down",y);}},{key:"up",get:function(){return this.upKeyDown}},{key:"down",get:function(){return this.downKeyDown}},{key:"left",get:function(){return this.leftKeyDown}},{key:"right",get:function(){return this.rightKeyDown}},{key:"noKey",get:function(){return this.noKeyDown}}]),s}(y);return function(t){o(i,Phaser.Plugins.BasePlugin);var r=u(i);function i(t){return e(this,i),r.call(this,t)}return n(i,[{key:"start",value:function(){this.game.events.on("destroy",this.destroy,this);}},{key:"add",value:function(e,t){return new b(e,t)}}]),i}()})); diff --git a/dist/rexgameobjectshellplugin.js b/dist/rexgameobjectshellplugin.js index eab1bcf747..277b079022 100644 --- a/dist/rexgameobjectshellplugin.js +++ b/dist/rexgameobjectshellplugin.js @@ -499,7 +499,7 @@ } }; - var GetValue$25 = Phaser.Utils.Objects.GetValue; + var GetValue$27 = Phaser.Utils.Objects.GetValue; var BaseAdd = Base$2.prototype.add; var Add$8 = function Add(gameObject, config) { this.setParent(gameObject); @@ -554,11 +554,11 @@ state.syncAlpha = config; state.syncScrollFactor = config; } else { - state.syncPosition = GetValue$25(config, 'syncPosition', true); - state.syncRotation = GetValue$25(config, 'syncRotation', true); - state.syncScale = GetValue$25(config, 'syncScale', true); - state.syncAlpha = GetValue$25(config, 'syncAlpha', true); - state.syncScrollFactor = GetValue$25(config, 'syncScrollFactor', true); + state.syncPosition = GetValue$27(config, 'syncPosition', true); + state.syncRotation = GetValue$27(config, 'syncRotation', true); + state.syncScale = GetValue$27(config, 'syncScale', true); + state.syncAlpha = GetValue$27(config, 'syncAlpha', true); + state.syncScrollFactor = GetValue$27(config, 'syncScrollFactor', true); } }; var AddChild$3 = { @@ -1905,7 +1905,7 @@ return object instanceof GameObjectClass; }; - var GetValue$24 = Phaser.Utils.Objects.GetValue; + var GetValue$26 = Phaser.Utils.Objects.GetValue; var DynamicTexture = Phaser.Textures.DynamicTexture; var UUID$2 = Phaser.Utils.String.UUID; var Snapshot = function Snapshot(config) { @@ -1914,13 +1914,13 @@ } var gameObjects = config.gameObjects; var renderTexture = config.renderTexture; // renderTexture, or dynamicTexture - var x = GetValue$24(config, 'x', undefined); - var y = GetValue$24(config, 'y', undefined); - var width = GetValue$24(config, 'width', undefined); - var height = GetValue$24(config, 'height', undefined); - var originX = GetValue$24(config, 'originX', 0); - var originY = GetValue$24(config, 'originY', 0); - var padding = GetValue$24(config, 'padding', 0); + var x = GetValue$26(config, 'x', undefined); + var y = GetValue$26(config, 'y', undefined); + var width = GetValue$26(config, 'width', undefined); + var height = GetValue$26(config, 'height', undefined); + var originX = GetValue$26(config, 'originX', 0); + var originY = GetValue$26(config, 'originY', 0); + var padding = GetValue$26(config, 'padding', 0); var scrollX, scrollY; if (width === undefined || height === undefined || x === undefined || y === undefined) { // Union bounds of gameObjects @@ -2031,17 +2031,17 @@ } }; - var GetValue$23 = Phaser.Utils.Objects.GetValue; + var GetValue$25 = Phaser.Utils.Objects.GetValue; var DrawBounds$2 = function DrawBounds(gameObjects, graphics, config) { var strokeColor, lineWidth, fillColor, fillAlpha, padding; if (typeof config === 'number') { strokeColor = config; } else { - strokeColor = GetValue$23(config, 'color'); - lineWidth = GetValue$23(config, 'lineWidth'); - fillColor = GetValue$23(config, 'fillColor'); - fillAlpha = GetValue$23(config, 'fillAlpha', 1); - padding = GetValue$23(config, 'padding', 0); + strokeColor = GetValue$25(config, 'color'); + lineWidth = GetValue$25(config, 'lineWidth'); + fillColor = GetValue$25(config, 'fillColor'); + fillAlpha = GetValue$25(config, 'fillAlpha', 1); + padding = GetValue$25(config, 'padding', 0); } if (Array.isArray(gameObjects)) { for (var i = 0, cnt = gameObjects.length; i < cnt; i++) { @@ -2104,10 +2104,10 @@ y: 0 }]; - var GetValue$22 = Phaser.Utils.Objects.GetValue; + var GetValue$24 = Phaser.Utils.Objects.GetValue; var DrawBounds$1 = function DrawBounds(graphics, config) { - var drawContainer = GetValue$22(config, 'drawContainer', true); - var gameObjects = GetValue$22(config, 'children'); + var drawContainer = GetValue$24(config, 'drawContainer', true); + var gameObjects = GetValue$24(config, 'children'); if (gameObjects === undefined) { gameObjects = this.getAllVisibleChildren([this]); } @@ -2641,7 +2641,7 @@ }; Object.assign(Methods$9, MonitorTargetMethods$1); - var DefaultConfig$1 = { + var DefaultConfig$2 = { boundsRectangle: { color: 0x555555 }, @@ -2730,18 +2730,18 @@ return obj && typeof obj === 'function'; }; - var GetValue$21 = Phaser.Utils.Objects.GetValue; + var GetValue$23 = Phaser.Utils.Objects.GetValue; var GetDefaultCallback = function GetDefaultCallback(config) { - var color = GetValue$21(config, 'color'); - var alpha = GetValue$21(config, 'alpha', 0.5); - var strokeColor = GetValue$21(config, 'strokeColor'); - var strokeWidth = GetValue$21(config, 'strokeWidth', 2); + var color = GetValue$23(config, 'color'); + var alpha = GetValue$23(config, 'alpha', 0.5); + var strokeColor = GetValue$23(config, 'strokeColor'); + var strokeWidth = GetValue$23(config, 'strokeWidth', 2); return function (scene) { return scene.add.rectangle(0, 0, 0, 0, color, alpha).setStrokeStyle(strokeColor, strokeWidth); }; }; var AddBoundsRectangle = function AddBoundsRectangle(parent, config) { - var callback = GetValue$21(config, 'boundsRectangle'); + var callback = GetValue$23(config, 'boundsRectangle'); if (!IsFunction(callback)) { callback = GetDefaultCallback(callback); } @@ -2795,17 +2795,17 @@ }); }; - var GetValue$20 = Phaser.Utils.Objects.GetValue; + var GetValue$22 = Phaser.Utils.Objects.GetValue; var GetPointCallback = function GetPointCallback(config, key) { - var callback = GetValue$20(config, key); + var callback = GetValue$22(config, key); if (!IsFunction(callback)) { config = callback; - var color = GetValue$20(config, 'color'); - var alpha = GetValue$20(config, 'alpha', 1); - var strokeColor = GetValue$20(config, 'strokeColor'); - var strokeWidth = GetValue$20(config, 'strokeWidth', 2); - var size = GetValue$20(config, 'size', 20); - var shape = GetValue$20(config, 'shape', 'rectangle'); + var color = GetValue$22(config, 'color'); + var alpha = GetValue$22(config, 'alpha', 1); + var strokeColor = GetValue$22(config, 'strokeColor'); + var strokeWidth = GetValue$22(config, 'strokeWidth', 2); + var size = GetValue$22(config, 'size', 20); + var shape = GetValue$22(config, 'shape', 'rectangle'); if (shape === 'rectangle') { // Rectangle callback = function callback(scene) { @@ -2904,7 +2904,7 @@ var _this; _classCallCheck(this, ControlPoints); if (config === undefined) { - config = DeepClone(DefaultConfig$1); + config = DeepClone(DefaultConfig$2); } _this = _super.call(this, scene, 0, 0, 1, 1); _this.childrenMap = {}; @@ -2985,26 +2985,109 @@ }); SetValue(window, 'RexPlugins.GameObjectShell.ControlPoints', ControlPoints); - var GetSizerConfig$1 = function GetSizerConfig(gameObject) { - if (!gameObject.hasOwnProperty('rexSizer')) { - gameObject.rexSizer = {}; - } - return gameObject.rexSizer; - }; - - function GetSizerConfig (gameObject) { - if (gameObject === undefined) { - gameObject = this; - } - return GetSizerConfig$1(gameObject); - } - - var GetChildPrevState = function GetChildPrevState(child) { - var childConfig = GetSizerConfig$1(child); - if (!childConfig.hasOwnProperty('prevState')) { - childConfig.prevState = {}; + var Key = Phaser.Input.Keyboard.Key; + var KeyCodes = Phaser.Input.Keyboard.KeyCodes; + var CursorKeys = /*#__PURE__*/function () { + function CursorKeys(scene) { + _classCallCheck(this, CursorKeys); + // scene: scene instance, or undefined + this.cursorKeys = { + up: new Key(scene, KeyCodes.UP), + down: new Key(scene, KeyCodes.DOWN), + left: new Key(scene, KeyCodes.LEFT), + right: new Key(scene, KeyCodes.RIGHT) + }; + this.noKeyDown = true; } - return childConfig.prevState; + _createClass(CursorKeys, [{ + key: "shutdown", + value: function shutdown(fromScene) { + for (var key in this.cursorKeys) { + this.cursorKeys[key].destroy(); + } + this.cursorKeys = undefined; + } + }, { + key: "destroy", + value: function destroy(fromScene) { + shutdown(fromScene); + } + }, { + key: "createCursorKeys", + value: function createCursorKeys() { + return this.cursorKeys; + } + }, { + key: "setKeyState", + value: function setKeyState(keyName, isDown) { + var key = this.cursorKeys[keyName]; + if (!key.enabled) { + return this; + } + if (isDown) { + this.noKeyDown = false; + } + if (key.isDown !== isDown) { + FakeEvent.timeStamp = Date.now(); + FakeEvent.keyCode = key.keyCode; + if (isDown) { + key.onDown(FakeEvent); + } else { + key.onUp(FakeEvent); + } + } + return this; + } + }, { + key: "clearAllKeysState", + value: function clearAllKeysState() { + this.noKeyDown = true; + for (var keyName in this.cursorKeys) { + this.setKeyState(keyName, false); + } + return this; + } + }, { + key: "getKeyState", + value: function getKeyState(keyName) { + return this.cursorKeys[keyName]; + } + }, { + key: "upKeyDown", + get: function get() { + return this.cursorKeys.up.isDown; + } + }, { + key: "downKeyDown", + get: function get() { + return this.cursorKeys.down.isDown; + } + }, { + key: "leftKeyDown", + get: function get() { + return this.cursorKeys.left.isDown; + } + }, { + key: "rightKeyDown", + get: function get() { + return this.cursorKeys.right.isDown; + } + }, { + key: "anyKeyDown", + get: function get() { + return !this.noKeyDown; + } + }]); + return CursorKeys; + }(); + var FakeEvent = { + timeStamp: 0, + keyCode: 0, + altKey: false, + ctrlKey: false, + shiftKey: false, + metaKey: false, + location: 0 }; var CameraClass = Phaser.Cameras.Scene2D.BaseCamera; @@ -3031,6 +3114,126 @@ }; var globRect = new Rectangle$3(); + var GetValue$21 = Phaser.Utils.Objects.GetValue; + var CursorAtBounds = /*#__PURE__*/function (_CursorKeys) { + _inherits(CursorAtBounds, _CursorKeys); + var _super = _createSuper(CursorAtBounds); + function CursorAtBounds(scene, config) { + var _this; + _classCallCheck(this, CursorAtBounds); + _this = _super.call(this, scene); + _this.scene = scene; + _this.sensitiveDistance = GetValue$21(config, 'sensitiveDistance', 20); + var bounds = GetValue$21(config, 'bounds', undefined); + if (bounds === undefined) { + bounds = GetViewport(scene); + } + _this.bounds = bounds; + _this.boot(); + return _this; + } + _createClass(CursorAtBounds, [{ + key: "boot", + value: function boot() { + this.scene.input.on('pointermove', this.onPointerMove, this); + this.scene.input.on('gameout', this.clearAllKeysState, this); + this.scene.sys.events.once('shutdown', this.destroy, this); + } + }, { + key: "shutdown", + value: function shutdown() { + if (!this.scene) { + return; + } + this.scene.input.off('pointermove', this.onPointerMove, this); + this.scene.input.off('gameout', this.clearAllKeysState, this); + this.scene.sys.events.off('shutdown', this.destroy, this); + this.scene = undefined; + _get(_getPrototypeOf(CursorAtBounds.prototype), "shutdown", this).call(this); + } + }, { + key: "destroy", + value: function destroy() { + this.shutdown(); + } + }, { + key: "onPointerMove", + value: function onPointerMove(pointer) { + var cursorX = pointer.x, + cursorY = pointer.y; + var left = this.bounds.left, + right = this.bounds.right, + top = this.bounds.top, + bottom = this.bounds.bottom, + sensitiveDistance = this.sensitiveDistance; + var atLeftBound = cursorX >= left && cursorX <= left + sensitiveDistance, + atRightBound = cursorX <= right && cursorX >= right - sensitiveDistance, + atTopBound = cursorY >= top && cursorY <= top + sensitiveDistance, + atBottomBound = cursorY <= bottom && cursorY >= bottom - sensitiveDistance; + this.clearAllKeysState(); + this.setKeyState('left', atLeftBound); + this.setKeyState('right', atRightBound); + this.setKeyState('up', atTopBound); + this.setKeyState('down', atBottomBound); + } + }, { + key: "up", + get: function get() { + return this.upKeyDown; + } + }, { + key: "down", + get: function get() { + return this.downKeyDown; + } + }, { + key: "left", + get: function get() { + return this.leftKeyDown; + } + }, { + key: "right", + get: function get() { + return this.rightKeyDown; + } + }, { + key: "noKey", + get: function get() { + return this.noKeyDown; + } + }]); + return CursorAtBounds; + }(CursorKeys); + + ObjectFactory.register('cursorAtBounds', function (config) { + var cursorAtBounds = new CursorAtBounds(this.scene, config); + // cursorAtBounds is not a gameObject + return cursorAtBounds; + }); + SetValue(window, 'RexPlugins.GameObjectShell.CursorAtBounds', CursorAtBounds); + + var GetSizerConfig$1 = function GetSizerConfig(gameObject) { + if (!gameObject.hasOwnProperty('rexSizer')) { + gameObject.rexSizer = {}; + } + return gameObject.rexSizer; + }; + + function GetSizerConfig (gameObject) { + if (gameObject === undefined) { + gameObject = this; + } + return GetSizerConfig$1(gameObject); + } + + var GetChildPrevState = function GetChildPrevState(child) { + var childConfig = GetSizerConfig$1(child); + if (!childConfig.hasOwnProperty('prevState')) { + childConfig.prevState = {}; + } + return childConfig.prevState; + }; + var PushIntoBounds = function PushIntoBounds(bounds) { if (bounds === undefined) { bounds = GetViewport(this.scene); @@ -3388,7 +3591,7 @@ QuickSet(child, globZone, align); }; - var GetValue$1$ = Phaser.Utils.Objects.GetValue; + var GetValue$20 = Phaser.Utils.Objects.GetValue; var Group = Phaser.GameObjects.Group; var DrawBounds = function DrawBounds(graphics, config) { var scene = graphics.scene; @@ -3397,13 +3600,13 @@ if (typeof config === 'number') { color = config; } else { - color = GetValue$1$(config, 'color'); - lineWidth = GetValue$1$(config, 'lineWidth'); - var nameTextConfig = GetValue$1$(config, 'name', false); + color = GetValue$20(config, 'color'); + lineWidth = GetValue$20(config, 'lineWidth'); + var nameTextConfig = GetValue$20(config, 'name', false); if (nameTextConfig) { - createTextCallback = GetValue$1$(nameTextConfig, 'createTextCallback', DefaultCreateTextCallback); - createTextCallbackScope = GetValue$1$(nameTextConfig, 'createTextCallbackScope', undefined); - textAlign = GetValue$1$(nameTextConfig, 'align', 'left-top'); + createTextCallback = GetValue$20(nameTextConfig, 'createTextCallback', DefaultCreateTextCallback); + createTextCallbackScope = GetValue$20(nameTextConfig, 'createTextCallbackScope', undefined); + textAlign = GetValue$20(nameTextConfig, 'align', 'left-top'); if (typeof textAlign === 'string') { textAlign = AlignConst[textAlign]; } @@ -3460,7 +3663,7 @@ }; var GlobRect = undefined; - var GetValue$1_ = Phaser.Utils.Objects.GetValue; + var GetValue$1$ = Phaser.Utils.Objects.GetValue; var GetBoundsConfig = function GetBoundsConfig(config, out) { if (config === undefined) { config = 0; @@ -3474,10 +3677,10 @@ out.top = config; out.bottom = config; } else { - out.left = GetValue$1_(config, 'left', 0); - out.right = GetValue$1_(config, 'right', 0); - out.top = GetValue$1_(config, 'top', 0); - out.bottom = GetValue$1_(config, 'bottom', 0); + out.left = GetValue$1$(config, 'left', 0); + out.right = GetValue$1$(config, 'right', 0); + out.top = GetValue$1$(config, 'top', 0); + out.bottom = GetValue$1$(config, 'bottom', 0); } return out; }; @@ -3681,7 +3884,7 @@ } }; - var GetValue$1Z = Phaser.Utils.Objects.GetValue; + var GetValue$1_ = Phaser.Utils.Objects.GetValue; var GetPadding$1 = function GetPadding(padding, key) { if (key === undefined) { return padding; @@ -3704,10 +3907,10 @@ padding.top = key; padding.bottom = key; } else { - padding.left = GetValue$1Z(key, 'left', 0); - padding.right = GetValue$1Z(key, 'right', 0); - padding.top = GetValue$1Z(key, 'top', 0); - padding.bottom = GetValue$1Z(key, 'bottom', 0); + padding.left = GetValue$1_(key, 'left', 0); + padding.right = GetValue$1_(key, 'right', 0); + padding.top = GetValue$1_(key, 'top', 0); + padding.bottom = GetValue$1_(key, 'bottom', 0); } return padding; }; @@ -4146,7 +4349,7 @@ } }; - var GetValue$1Y = Phaser.Utils.Objects.GetValue; + var GetValue$1Z = Phaser.Utils.Objects.GetValue; var ComponentBase = /*#__PURE__*/function () { function ComponentBase(parent, config) { _classCallCheck(this, ComponentBase); @@ -4155,7 +4358,7 @@ this.isShutdown = false; // Event emitter, default is private event emitter - this.setEventEmitter(GetValue$1Y(config, 'eventEmitter', true)); + this.setEventEmitter(GetValue$1Z(config, 'eventEmitter', true)); // Register callback of parent destroy event, also see `shutdown` method if (this.parent) { @@ -4541,7 +4744,7 @@ return this; }; - var GetValue$1X = Phaser.Utils.Objects.GetValue; + var GetValue$1Y = Phaser.Utils.Objects.GetValue; var TickTask = /*#__PURE__*/function (_ComponentBase) { _inherits(TickTask, _ComponentBase); var _super = _createSuper(TickTask); @@ -4552,7 +4755,7 @@ _this._isRunning = false; _this.isPaused = false; _this.tickingState = false; - _this.setTickingMode(GetValue$1X(config, 'tickingMode', 1)); + _this.setTickingMode(GetValue$1Y(config, 'tickingMode', 1)); // boot() later return _this; } @@ -4669,7 +4872,7 @@ 'always': 2 }; - var GetValue$1W = Phaser.Utils.Objects.GetValue; + var GetValue$1X = Phaser.Utils.Objects.GetValue; var SceneUpdateTickTask = /*#__PURE__*/function (_TickTask) { _inherits(SceneUpdateTickTask, _TickTask); var _super = _createSuper(SceneUpdateTickTask); @@ -4683,7 +4886,7 @@ // If this.scene is not available, use game's 'step' event var defaultEventName = _this.scene ? 'update' : 'step'; - _this.tickEventName = GetValue$1W(config, 'tickEventName', defaultEventName); + _this.tickEventName = GetValue$1X(config, 'tickEventName', defaultEventName); _this.isSceneTicker = !IsGameUpdateEvent(_this.tickEventName); return _this; } @@ -4719,7 +4922,7 @@ return eventName === 'step' || eventName === 'poststep'; }; - var GetValue$1V = Phaser.Utils.Objects.GetValue; + var GetValue$1W = Phaser.Utils.Objects.GetValue; var Clamp$6 = Phaser.Math.Clamp; var Timer = /*#__PURE__*/function () { function Timer(config) { @@ -4729,15 +4932,15 @@ _createClass(Timer, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.state = GetValue$1V(o, 'state', IDLE$6); - this.timeScale = GetValue$1V(o, 'timeScale', 1); - this.delay = GetValue$1V(o, 'delay', 0); - this.repeat = GetValue$1V(o, 'repeat', 0); - this.repeatCounter = GetValue$1V(o, 'repeatCounter', 0); - this.repeatDelay = GetValue$1V(o, 'repeatDelay', 0); - this.duration = GetValue$1V(o, 'duration', 0); - this.nowTime = GetValue$1V(o, 'nowTime', 0); - this.justRestart = GetValue$1V(o, 'justRestart', false); + this.state = GetValue$1W(o, 'state', IDLE$6); + this.timeScale = GetValue$1W(o, 'timeScale', 1); + this.delay = GetValue$1W(o, 'delay', 0); + this.repeat = GetValue$1W(o, 'repeat', 0); + this.repeatCounter = GetValue$1W(o, 'repeatCounter', 0); + this.repeatDelay = GetValue$1W(o, 'repeatDelay', 0); + this.duration = GetValue$1W(o, 'duration', 0); + this.nowTime = GetValue$1W(o, 'nowTime', 0); + this.justRestart = GetValue$1W(o, 'justRestart', false); } }, { key: "toJSON", @@ -4966,7 +5169,7 @@ return TimerTickTask; }(SceneUpdateTickTask); - var GetValue$1U = Phaser.Utils.Objects.GetValue; + var GetValue$1V = Phaser.Utils.Objects.GetValue; var GetAdvancedValue$4 = Phaser.Utils.Objects.GetAdvancedValue; var GetEaseFunction = Phaser.Tweens.Builders.GetEaseFunction; var EaseValueTaskBase = /*#__PURE__*/function (_TimerTask) { @@ -4979,13 +5182,13 @@ _createClass(EaseValueTaskBase, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.timer.resetFromJSON(GetValue$1U(o, 'timer')); - this.setEnable(GetValue$1U(o, 'enable', true)); - this.setTarget(GetValue$1U(o, 'target', this.parent)); + this.timer.resetFromJSON(GetValue$1V(o, 'timer')); + this.setEnable(GetValue$1V(o, 'enable', true)); + this.setTarget(GetValue$1V(o, 'target', this.parent)); this.setDelay(GetAdvancedValue$4(o, 'delay', 0)); this.setDuration(GetAdvancedValue$4(o, 'duration', 1000)); - this.setEase(GetValue$1U(o, 'ease', 'Linear')); - this.setRepeat(GetValue$1U(o, 'repeat', 0)); + this.setEase(GetValue$1V(o, 'ease', 'Linear')); + this.setRepeat(GetValue$1V(o, 'repeat', 0)); return this; } }, { @@ -5105,7 +5308,7 @@ return EaseValueTaskBase; }(TimerTickTask); - var GetValue$1T = Phaser.Utils.Objects.GetValue; + var GetValue$1U = Phaser.Utils.Objects.GetValue; var GetAdvancedValue$3 = Phaser.Utils.Objects.GetAdvancedValue; var Linear$a = Phaser.Math.Linear; var Scale$1 = /*#__PURE__*/function (_EaseValueTaskBase) { @@ -5128,7 +5331,7 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(Scale.prototype), "resetFromJSON", this).call(this, o); - this.setMode(GetValue$1T(o, 'mode', 0)); + this.setMode(GetValue$1U(o, 'mode', 0)); this.setScaleRange(GetAdvancedValue$3(o, 'start', undefined), GetAdvancedValue$3(o, 'end', 0)); return this; } @@ -5467,7 +5670,7 @@ } }; - var GetValue$1S = Phaser.Utils.Objects.GetValue; + var GetValue$1T = Phaser.Utils.Objects.GetValue; var GetAdvancedValue$2 = Phaser.Utils.Objects.GetAdvancedValue; var Linear$9 = Phaser.Math.Linear; var Fade = /*#__PURE__*/function (_EaseValueTaskBase) { @@ -5488,7 +5691,7 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(Fade.prototype), "resetFromJSON", this).call(this, o); - this.setMode(GetValue$1S(o, 'mode', 0)); + this.setMode(GetValue$1T(o, 'mode', 0)); this.setAlphaRange(GetAdvancedValue$2(o, 'start', this.parent.alpha), GetAdvancedValue$2(o, 'end', 0)); return this; } @@ -5668,7 +5871,7 @@ } }; - var GetValue$1R = Phaser.Utils.Objects.GetValue; + var GetValue$1S = Phaser.Utils.Objects.GetValue; var GetAdvancedValue$1 = Phaser.Utils.Objects.GetAdvancedValue; var Linear$8 = Phaser.Math.Linear; var EaseMove = /*#__PURE__*/function (_EaseValueTaskBase) { @@ -5689,7 +5892,7 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(EaseMove.prototype), "resetFromJSON", this).call(this, o); - this.setMode(GetValue$1R(o, 'mode', 0)); + this.setMode(GetValue$1S(o, 'mode', 0)); if (o && (o.hasOwnProperty('x') || o.hasOwnProperty('y'))) { var endX = GetAdvancedValue$1(o, 'x', undefined); var endY = GetAdvancedValue$1(o, 'y', undefined); @@ -5954,7 +6157,7 @@ } }; - var GetValue$1Q = Phaser.Utils.Objects.GetValue; + var GetValue$1R = Phaser.Utils.Objects.GetValue; var ShakePosition = /*#__PURE__*/function (_TickTask) { _inherits(ShakePosition, _TickTask); var _super = _createSuper(ShakePosition); @@ -5972,16 +6175,16 @@ _createClass(ShakePosition, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.timer.resetFromJSON(GetValue$1Q(o, 'timer')); - this.setEnable(GetValue$1Q(o, 'enable', true)); - this.setMode(GetValue$1Q(o, 'mode', 1)); - this.isRunning = GetValue$1Q(o, 'isRunning', false); - this.setMagnitudeMode(GetValue$1Q(o, 'magnitudeMode', 1)); - this.setAxisMode(GetValue$1Q(o, "axis", 0)); - this.setDuration(GetValue$1Q(o, 'duration', 500)); - this.setMagnitude(GetValue$1Q(o, 'magnitude', 10)); - this.ox = GetValue$1Q(o, 'ox', undefined); - this.oy = GetValue$1Q(o, 'oy', undefined); + this.timer.resetFromJSON(GetValue$1R(o, 'timer')); + this.setEnable(GetValue$1R(o, 'enable', true)); + this.setMode(GetValue$1R(o, 'mode', 1)); + this.isRunning = GetValue$1R(o, 'isRunning', false); + this.setMagnitudeMode(GetValue$1R(o, 'magnitudeMode', 1)); + this.setAxisMode(GetValue$1R(o, "axis", 0)); + this.setDuration(GetValue$1R(o, 'duration', 500)); + this.setMagnitude(GetValue$1R(o, 'magnitude', 10)); + this.ox = GetValue$1R(o, 'ox', undefined); + this.oy = GetValue$1R(o, 'oy', undefined); return this; } }, { @@ -6094,8 +6297,8 @@ value: function start(duration, magnitude) { if (typeof duration !== 'number') { var config = duration; - magnitude = GetValue$1Q(config, 'magnitude', undefined); - duration = GetValue$1Q(config, 'duration', undefined); + magnitude = GetValue$1R(config, 'magnitude', undefined); + duration = GetValue$1R(config, 'duration', undefined); } if (magnitude !== undefined) { this.setMagnitude(magnitude); @@ -6248,7 +6451,7 @@ } }; - var GetValue$1P = Phaser.Utils.Objects.GetValue; + var GetValue$1Q = Phaser.Utils.Objects.GetValue; var Linear$7 = Phaser.Math.Linear; var EaseValueTask = /*#__PURE__*/function (_EaseValueTaskBase) { _inherits(EaseValueTask, _EaseValueTaskBase); @@ -6271,15 +6474,15 @@ return this; } var target = this.target; - this.propertyKey = GetValue$1P(config, 'key', 'value'); + this.propertyKey = GetValue$1Q(config, 'key', 'value'); var currentValue = target[this.propertyKey]; - this.fromValue = GetValue$1P(config, 'from', currentValue); - this.toValue = GetValue$1P(config, 'to', currentValue); - this.setEase(GetValue$1P(config, 'ease', this.ease)); - this.setDuration(GetValue$1P(config, 'duration', this.duration)); - this.setRepeat(GetValue$1P(config, 'repeat', 0)); - this.setDelay(GetValue$1P(config, 'delay', 0)); - this.setRepeatDelay(GetValue$1P(config, 'repeatDelay', 0)); + this.fromValue = GetValue$1Q(config, 'from', currentValue); + this.toValue = GetValue$1Q(config, 'to', currentValue); + this.setEase(GetValue$1Q(config, 'ease', this.ease)); + this.setDuration(GetValue$1Q(config, 'duration', this.duration)); + this.setRepeat(GetValue$1Q(config, 'repeat', 0)); + this.setDelay(GetValue$1Q(config, 'delay', 0)); + this.setRepeatDelay(GetValue$1Q(config, 'repeatDelay', 0)); this.timer.setDuration(this.duration).setRepeat(this.repeat).setDelay(this.delay).setRepeatDelay(this.repeatDelay); target[this.propertyKey] = this.fromValue; _get(_getPrototypeOf(EaseValueTask.prototype), "start", this).call(this); @@ -6968,7 +7171,7 @@ * * @return {*} The value of the requested key. */ - var GetValue$1O = function GetValue(source, key, defaultValue) { + var GetValue$1P = function GetValue(source, key, defaultValue) { if (!source || typeof source === 'number') { return defaultValue; } else if (source.hasOwnProperty(key)) { @@ -7022,13 +7225,13 @@ function FSM(config) { _classCallCheck(this, FSM); // Attach get-next-state function - var states = GetValue$1O(config, 'states', undefined); + var states = GetValue$1P(config, 'states', undefined); if (states) { this.addStates(states); } // Attach extend members - var extend = GetValue$1O(config, 'extend', undefined); + var extend = GetValue$1P(config, 'extend', undefined); if (extend) { for (var name in extend) { if (!this.hasOwnProperty(name) || this[name] === undefined) { @@ -7038,8 +7241,8 @@ } // Event emitter - var eventEmitter = GetValue$1O(config, 'eventEmitter', undefined); - var EventEmitterClass = GetValue$1O(config, 'EventEmitterClass', undefined); + var eventEmitter = GetValue$1P(config, 'eventEmitter', undefined); + var EventEmitterClass = GetValue$1P(config, 'EventEmitterClass', undefined); this.setEventEmitter(eventEmitter, EventEmitterClass); this._stateLock = false; this.resetFromJSON(config); @@ -7057,9 +7260,9 @@ }, { key: "resetFromJSON", value: function resetFromJSON(o) { - this.setEnable(GetValue$1O(o, 'enable', true)); - this.start(GetValue$1O(o, 'start', undefined)); - var init = GetValue$1O(o, 'init', undefined); + this.setEnable(GetValue$1P(o, 'enable', true)); + this.start(GetValue$1P(o, 'start', undefined)); + var init = GetValue$1P(o, 'init', undefined); if (init) { init.call(this); } @@ -7296,7 +7499,7 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(FSM.prototype), "resetFromJSON", this).call(this, o); - this._scene = GetValue$1O(o, 'scene', undefined); + this._scene = GetValue$1P(o, 'scene', undefined); return this; } }, { @@ -7635,7 +7838,7 @@ var methods$l = {}; Object.assign(methods$l, DelayCallMethods, ConfigurationMethods$1, OpenMethods, CloseMethods); - var GetValue$1N = Phaser.Utils.Objects.GetValue; + var GetValue$1O = Phaser.Utils.Objects.GetValue; var OpenCloseTransition = /*#__PURE__*/function (_ComponentBase) { _inherits(OpenCloseTransition, _ComponentBase); var _super = _createSuper(OpenCloseTransition); @@ -7646,15 +7849,15 @@ // this.parent = gameObject; // this.scene - _this.setTransitInTime(GetValue$1N(config, 'duration.in', 200)); - _this.setTransitOutTime(GetValue$1N(config, 'duration.out', 200)); - _this.setTransitInCallback(GetValue$1N(config, 'transitIn')); - _this.setTransitOutCallback(GetValue$1N(config, 'transitOut')); - _this.oneShotMode = GetValue$1N(config, 'destroy', false); + _this.setTransitInTime(GetValue$1O(config, 'duration.in', 200)); + _this.setTransitOutTime(GetValue$1O(config, 'duration.out', 200)); + _this.setTransitInCallback(GetValue$1O(config, 'transitIn')); + _this.setTransitOutCallback(GetValue$1O(config, 'transitOut')); + _this.oneShotMode = GetValue$1O(config, 'destroy', false); _this.delayCallTimer = undefined; _this._state = new State$1(_assertThisInitialized(_this), { eventEmitter: false, - initState: GetValue$1N(config, 'initState', 'IDLE') + initState: GetValue$1O(config, 'initState', 'IDLE') }); _this.openEventData = undefined; _this.closeEventData = undefined; @@ -7746,7 +7949,7 @@ return FullWindowRectangle; }(Rectangle$2); - var GetValue$1M = Phaser.Utils.Objects.GetValue; + var GetValue$1N = Phaser.Utils.Objects.GetValue; var TouchEventStop = /*#__PURE__*/function (_ComponentBase) { _inherits(TouchEventStop, _ComponentBase); var _super = _createSuper(TouchEventStop); @@ -7766,9 +7969,9 @@ _createClass(TouchEventStop, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.setHitAreaMode(GetValue$1M(o, 'hitAreaMode', 0)); - this.setEnable(GetValue$1M(o, 'enable', true)); - this.setStopMode(GetValue$1M(o, 'stopAllLevels', true)); + this.setHitAreaMode(GetValue$1N(o, 'hitAreaMode', 0)); + this.setEnable(GetValue$1N(o, 'enable', true)); + this.setStopMode(GetValue$1N(o, 'stopAllLevels', true)); return this; } }, { @@ -7855,15 +8058,15 @@ fullWindow: 1 }; - var GetValue$1L = Phaser.Utils.Objects.GetValue; + var GetValue$1M = Phaser.Utils.Objects.GetValue; var Cover = /*#__PURE__*/function (_FullWindowRectangle) { _inherits(Cover, _FullWindowRectangle); var _super = _createSuper(Cover); function Cover(scene, config) { var _this; _classCallCheck(this, Cover); - var fillColor = GetValue$1L(config, 'color', 0x0); - var fillAlpha = GetValue$1L(config, 'alpha', 0.8); + var fillColor = GetValue$1M(config, 'color', 0x0); + var fillAlpha = GetValue$1M(config, 'alpha', 0.8); _this = _super.call(this, scene, fillColor, fillAlpha); _this.touchEventStop = new TouchEventStop(_assertThisInitialized(_this), { hitAreaMode: 1 @@ -7952,7 +8155,7 @@ return true; }; - var GetValue$1K = Phaser.Utils.Objects.GetValue; + var GetValue$1L = Phaser.Utils.Objects.GetValue; var Modal$1 = /*#__PURE__*/function (_OpenCloseTransition) { _inherits(Modal, _OpenCloseTransition); var _super = _createSuper(Modal); @@ -7968,25 +8171,25 @@ if (config.transitOut == null) { config.transitOut = TransitionMode.scaleDown; } - config.destroy = GetValue$1K(config, 'destroy', true); + config.destroy = GetValue$1L(config, 'destroy', true); _this = _super.call(this, gameObject, config); // this.parent = gameObject; // this.scene // Cover : key of modal, to block touch input - var coverConfig = GetValue$1K(config, 'cover'); + var coverConfig = GetValue$1L(config, 'cover'); _this.cover = coverConfig !== false ? CreateCover(gameObject, coverConfig) : undefined; if (_this.cover) { - _this.setCoverTransitInCallback(GetValue$1K(coverConfig, 'transitIn', DefaultCoverTransitInCallback)); - _this.setCoverTransitOutCallback(GetValue$1K(coverConfig, 'transitOut', DefaultCoverTransitOutCallback)); + _this.setCoverTransitInCallback(GetValue$1L(coverConfig, 'transitIn', DefaultCoverTransitInCallback)); + _this.setCoverTransitOutCallback(GetValue$1L(coverConfig, 'transitOut', DefaultCoverTransitOutCallback)); } // Close conditions: - var touchOutsideClose = GetValue$1K(config, 'touchOutsideClose', false); - var timeOutDuration = GetValue$1K(config, 'duration.hold', -1); - var timeOutClose = GetValue$1K(config, 'timeOutClose', timeOutDuration >= 0); - var anyTouchClose = GetValue$1K(config, 'anyTouchClose', false); - var manualClose = GetValue$1K(config, 'manualClose', false); + var touchOutsideClose = GetValue$1L(config, 'touchOutsideClose', false); + var timeOutDuration = GetValue$1L(config, 'duration.hold', -1); + var timeOutClose = GetValue$1L(config, 'timeOutClose', timeOutDuration >= 0); + var anyTouchClose = GetValue$1L(config, 'anyTouchClose', false); + var manualClose = GetValue$1L(config, 'manualClose', false); if (manualClose) { touchOutsideClose = false; anyTouchClose = false; @@ -8007,7 +8210,7 @@ } else if (touchOutsideClose) { _this.once('open', _this.touchOutsideClose, _assertThisInitialized(_this)); } - if (GetValue$1K(config, 'openOnStart', true)) { + if (GetValue$1L(config, 'openOnStart', true)) { // Run this.requestOpen() next tick // User can register events before this.requestOpen() _this.delayCall(0, _this.requestOpen, _assertThisInitialized(_this)); @@ -8481,7 +8684,7 @@ return this; }; - var GetValue$1J = Phaser.Utils.Objects.GetValue; + var GetValue$1K = Phaser.Utils.Objects.GetValue; var Button = /*#__PURE__*/function (_ComponentBase) { _inherits(Button, _ComponentBase); var _super = _createSuper(Button); @@ -8492,7 +8695,7 @@ // this.parent = gameObject; _this._enable = undefined; - gameObject.setInteractive(GetValue$1J(config, "inputConfig", undefined)); + gameObject.setInteractive(GetValue$1K(config, "inputConfig", undefined)); _this.resetFromJSON(config); _this.boot(); return _this; @@ -8502,10 +8705,10 @@ value: function resetFromJSON(o) { this.pointer = undefined; this.lastClickTime = undefined; - this.setEnable(GetValue$1J(o, "enable", true)); - this.setMode(GetValue$1J(o, "mode", 1)); - this.setClickInterval(GetValue$1J(o, "clickInterval", 100)); - this.setDragThreshold(GetValue$1J(o, 'threshold', undefined)); + this.setEnable(GetValue$1K(o, "enable", true)); + this.setMode(GetValue$1K(o, "mode", 1)); + this.setClickInterval(GetValue$1K(o, "clickInterval", 100)); + this.setDragThreshold(GetValue$1K(o, 'threshold', undefined)); return this; } }, { @@ -8792,7 +8995,7 @@ }; var HitTestResult = []; - var GetValue$1I = Phaser.Utils.Objects.GetValue; + var GetValue$1J = Phaser.Utils.Objects.GetValue; var ClickOutside = /*#__PURE__*/function (_ComponentBase) { _inherits(ClickOutside, _ComponentBase); var _super = _createSuper(ClickOutside); @@ -8803,7 +9006,7 @@ // this.parent = gameObject; _this._enable = undefined; - var inputConfig = GetValue$1I(config, "inputConfig", undefined); + var inputConfig = GetValue$1J(config, "inputConfig", undefined); if (inputConfig) { gameObject.setInteractive(inputConfig); } @@ -8816,10 +9019,10 @@ value: function resetFromJSON(o) { this.pointer = undefined; this.lastClickTime = undefined; - this.setEnable(GetValue$1I(o, "enable", true)); - this.setMode(GetValue$1I(o, "mode", 1)); - this.setClickInterval(GetValue$1I(o, "clickInterval", 100)); - this.setDragThreshold(GetValue$1I(o, 'threshold', undefined)); + this.setEnable(GetValue$1J(o, "enable", true)); + this.setMode(GetValue$1J(o, "mode", 1)); + this.setClickInterval(GetValue$1J(o, "clickInterval", 100)); + this.setDragThreshold(GetValue$1J(o, 'threshold', undefined)); return this; } }, { @@ -9111,7 +9314,7 @@ return Cooldown; }(FSM); - var GetValue$1H = Phaser.Utils.Objects.GetValue; + var GetValue$1I = Phaser.Utils.Objects.GetValue; var InTouching = /*#__PURE__*/function (_ComponentBase) { _inherits(InTouching, _ComponentBase); var _super = _createSuper(InTouching); @@ -9123,7 +9326,7 @@ _this._enable = undefined; _this.cooldown = new Cooldown(); - _this.parent.setInteractive(GetValue$1H(config, 'inputConfig', undefined)); + _this.parent.setInteractive(GetValue$1I(config, 'inputConfig', undefined)); _this.resetFromJSON(config); _this.boot(); return _this; @@ -9134,8 +9337,8 @@ this.pointer = undefined; this.prevIsInTouch = false; this.isInTouching = false; - this.setEnable(GetValue$1H(o, 'enable', true)); - this.setCooldown(GetValue$1H(o, 'cooldown', undefined)); + this.setEnable(GetValue$1I(o, 'enable', true)); + this.setCooldown(GetValue$1I(o, 'cooldown', undefined)); return this; } }, { @@ -9366,9 +9569,9 @@ eventEmitter.emit(eventName, child, pointer, event); }; - var GetValue$1G = Phaser.Utils.Objects.GetValue; + var GetValue$1H = Phaser.Utils.Objects.GetValue; var DownChild = function DownChild(config) { - var downConfig = GetValue$1G(config, 'down', undefined); + var downConfig = GetValue$1H(config, 'down', undefined); if (downConfig === false) { return; } else if (downConfig === true) { @@ -9381,9 +9584,9 @@ EmitChildEvent(childrenInteractive.eventEmitter, "".concat(childrenInteractive.eventNamePrefix, "down"), childrenInteractive.targetSizers, pointer.worldX, pointer.worldY, pointer, event); }; - var GetValue$1F = Phaser.Utils.Objects.GetValue; + var GetValue$1G = Phaser.Utils.Objects.GetValue; var UpChild = function UpChild(config) { - var upConfig = GetValue$1F(config, 'up', undefined); + var upConfig = GetValue$1G(config, 'up', undefined); if (upConfig === false) { return; } else if (upConfig === true) { @@ -9396,9 +9599,9 @@ EmitChildEvent(childrenInteractive.eventEmitter, "".concat(childrenInteractive.eventNamePrefix, "up"), childrenInteractive.targetSizers, pointer.worldX, pointer.worldY, pointer, event); }; - var GetValue$1E = Phaser.Utils.Objects.GetValue; + var GetValue$1F = Phaser.Utils.Objects.GetValue; var OverChild = function OverChild(config) { - var overConfig = GetValue$1E(config, 'over', undefined); + var overConfig = GetValue$1F(config, 'over', undefined); if (overConfig === false) { return; } else if (overConfig === true) { @@ -9425,9 +9628,9 @@ EmitChildEvent(childrenInteractive.eventEmitter, "".concat(childrenInteractive.eventNamePrefix, "out"), childrenInteractive.targetSizers, child, undefined, pointer, event); }; - var GetValue$1D = Phaser.Utils.Objects.GetValue; + var GetValue$1E = Phaser.Utils.Objects.GetValue; var ClickChild = function ClickChild(config) { - var clickConfig = GetValue$1D(config, 'click', undefined); + var clickConfig = GetValue$1E(config, 'click', undefined); if (clickConfig === false) { return; } else if (clickConfig === true) { @@ -9446,7 +9649,7 @@ }, this); }; - var GetValue$1C = Phaser.Utils.Objects.GetValue; + var GetValue$1D = Phaser.Utils.Objects.GetValue; var OnePointerTracer = /*#__PURE__*/function (_TickTask) { _inherits(OnePointerTracer, _TickTask); var _super = _createSuper(OnePointerTracer); @@ -9460,7 +9663,7 @@ _this = _super.call(this, scene, config); _this.gameObject = gameObject; if (gameObject) { - gameObject.setInteractive(GetValue$1C(config, "inputConfig", undefined)); + gameObject.setInteractive(GetValue$1D(config, "inputConfig", undefined)); } _this._enable = undefined; _this.resetFromJSON(config); @@ -9470,10 +9673,10 @@ _createClass(OnePointerTracer, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.setEnable(GetValue$1C(o, 'enable', true)); + this.setEnable(GetValue$1D(o, 'enable', true)); this.setDetectBounds(); if (this.gameObject === undefined) { - this.setDetectBounds(GetValue$1C(o, 'bounds', undefined)); + this.setDetectBounds(GetValue$1D(o, 'bounds', undefined)); } else { this.setDetectBounds(); } @@ -9698,7 +9901,7 @@ var TOUCH1$1 = 1; var IDLE$5 = 'IDLE'; - var GetValue$1B = Phaser.Utils.Objects.GetValue; + var GetValue$1C = Phaser.Utils.Objects.GetValue; var DistanceBetween$5 = Phaser.Math.Distance.Between; var Tap = /*#__PURE__*/function (_OnePointerTracer) { _inherits(Tap, _OnePointerTracer); @@ -9754,16 +9957,16 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(Tap.prototype), "resetFromJSON", this).call(this, o); - this.setHoldTime(GetValue$1B(o, 'time', 250)); // min-hold-time of Press is 251 - this.setTapInterval(GetValue$1B(o, 'tapInterval', 200)); - this.setDragThreshold(GetValue$1B(o, 'threshold', 9)); - this.setTapOffset(GetValue$1B(o, 'tapOffset', 10)); - var taps = GetValue$1B(o, 'taps', undefined); + this.setHoldTime(GetValue$1C(o, 'time', 250)); // min-hold-time of Press is 251 + this.setTapInterval(GetValue$1C(o, 'tapInterval', 200)); + this.setDragThreshold(GetValue$1C(o, 'threshold', 9)); + this.setTapOffset(GetValue$1C(o, 'tapOffset', 10)); + var taps = GetValue$1C(o, 'taps', undefined); if (taps !== undefined) { this.setTaps(taps); } else { - this.setMaxTaps(GetValue$1B(o, 'maxTaps', undefined)); - this.setMinTaps(GetValue$1B(o, 'minTaps', undefined)); + this.setMaxTaps(GetValue$1C(o, 'maxTaps', undefined)); + this.setMinTaps(GetValue$1C(o, 'minTaps', undefined)); } return this; } @@ -9905,7 +10108,7 @@ var BEGIN$3 = 'BEGIN'; var RECOGNIZED$3 = 'RECOGNIZED'; - var GetValue$1A = Phaser.Utils.Objects.GetValue; + var GetValue$1B = Phaser.Utils.Objects.GetValue; var Press = /*#__PURE__*/function (_OnePointerTracer) { _inherits(Press, _OnePointerTracer); var _super = _createSuper(Press); @@ -9960,8 +10163,8 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(Press.prototype), "resetFromJSON", this).call(this, o); - this.setDragThreshold(GetValue$1A(o, 'threshold', 9)); - this.setHoldTime(GetValue$1A(o, 'time', 251)); + this.setDragThreshold(GetValue$1B(o, 'threshold', 9)); + this.setHoldTime(GetValue$1B(o, 'time', 251)); return this; } }, { @@ -10142,7 +10345,7 @@ }; var globOut$1 = {}; - var GetValue$1z = Phaser.Utils.Objects.GetValue; + var GetValue$1A = Phaser.Utils.Objects.GetValue; var RadToDeg$3 = Phaser.Math.RadToDeg; var Swipe = /*#__PURE__*/function (_OnePointerTracer) { _inherits(Swipe, _OnePointerTracer); @@ -10199,9 +10402,9 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(Swipe.prototype), "resetFromJSON", this).call(this, o); - this.setDragThreshold(GetValue$1z(o, 'threshold', 10)); - this.setVelocityThreshold(GetValue$1z(o, 'velocityThreshold', 1000)); - this.setDirectionMode(GetValue$1z(o, 'dir', '8dir')); + this.setDragThreshold(GetValue$1A(o, 'threshold', 10)); + this.setVelocityThreshold(GetValue$1A(o, 'velocityThreshold', 1000)); + this.setDirectionMode(GetValue$1A(o, 'dir', '8dir')); return this; } }, { @@ -10308,7 +10511,7 @@ var BEGIN$1 = 'BEGIN'; var RECOGNIZED$1 = 'RECOGNIZED'; - var GetValue$1y = Phaser.Utils.Objects.GetValue; + var GetValue$1z = Phaser.Utils.Objects.GetValue; var SpliceOne = Phaser.Utils.Array.SpliceOne; var DistanceBetween$3 = Phaser.Math.Distance.Between; var AngleBetween = Phaser.Math.Angle.Between; @@ -10321,7 +10524,7 @@ } this.scene = scene; // Event emitter - this.setEventEmitter(GetValue$1y(config, 'eventEmitter', undefined)); + this.setEventEmitter(GetValue$1z(config, 'eventEmitter', undefined)); this._enable = undefined; this.pointers = []; this.movedState = {}; @@ -10331,8 +10534,8 @@ _createClass(TwoPointersTracer, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.setEnable(GetValue$1y(o, "enable", true)); - this.bounds = GetValue$1y(o, 'bounds', undefined); + this.setEnable(GetValue$1z(o, "enable", true)); + this.bounds = GetValue$1z(o, 'bounds', undefined); this.tracerState = TOUCH0; this.pointers.length = 0; Clear(this.movedState); @@ -10694,7 +10897,7 @@ return this; }; - var GetValue$1x = Phaser.Utils.Objects.GetValue; + var GetValue$1y = Phaser.Utils.Objects.GetValue; var WrapDegrees = Phaser.Math.Angle.WrapDegrees; // Wrap degrees: -180 to 180 var ShortestBetween = Phaser.Math.Angle.ShortestBetween; var RadToDeg$2 = Phaser.Math.RadToDeg; @@ -10737,7 +10940,7 @@ key: "resetFromJSON", value: function resetFromJSON(o) { _get(_getPrototypeOf(Rotate.prototype), "resetFromJSON", this).call(this, o); - this.setDragThreshold(GetValue$1x(o, 'threshold', 0)); + this.setDragThreshold(GetValue$1y(o, 'threshold', 0)); return this; } }, { @@ -10801,9 +11004,9 @@ var BEGIN = 'BEGIN'; var RECOGNIZED = 'RECOGNIZED'; - var GetValue$1w = Phaser.Utils.Objects.GetValue; + var GetValue$1x = Phaser.Utils.Objects.GetValue; var TapChild = function TapChild(config) { - var tapConfig = GetValue$1w(config, 'tap', undefined); + var tapConfig = GetValue$1x(config, 'tap', undefined); if (tapConfig === false) { return; } else if (tapConfig === true) { @@ -10816,9 +11019,9 @@ }, this); }; - var GetValue$1v = Phaser.Utils.Objects.GetValue; + var GetValue$1w = Phaser.Utils.Objects.GetValue; var PressChild = function PressChild(config) { - var pressConfig = GetValue$1v(config, 'press', undefined); + var pressConfig = GetValue$1w(config, 'press', undefined); if (pressConfig === false) { return; } else if (pressConfig === true) { @@ -10833,9 +11036,9 @@ }, this); }; - var GetValue$1u = Phaser.Utils.Objects.GetValue; + var GetValue$1v = Phaser.Utils.Objects.GetValue; var SwipeChild = function SwipeChild(config) { - var swipeConfig = GetValue$1u(config, 'swipe', undefined); + var swipeConfig = GetValue$1v(config, 'swipe', undefined); if (swipeConfig === false) { return; } else if (swipeConfig === true) { @@ -10855,16 +11058,16 @@ }, this); }; - var GetValue$1t = Phaser.Utils.Objects.GetValue; + var GetValue$1u = Phaser.Utils.Objects.GetValue; var SetChildrenInteractive$1 = function SetChildrenInteractive(gameObject, config) { gameObject.setInteractive(); - if (GetValue$1t(config, 'dropZone', false)) { + if (GetValue$1u(config, 'dropZone', false)) { gameObject.input.dropZone = true; } gameObject._childrenInteractive = { - targetSizers: GetValue$1t(config, 'targets', [gameObject]), - eventEmitter: GetValue$1t(config, 'eventEmitter', gameObject), - eventNamePrefix: GetValue$1t(config, 'inputEventPrefix', 'child.') + targetSizers: GetValue$1u(config, 'targets', [gameObject]), + eventEmitter: GetValue$1u(config, 'eventEmitter', gameObject), + eventNamePrefix: GetValue$1u(config, 'inputEventPrefix', 'child.') }; DownChild.call(gameObject, config); UpChild.call(gameObject, config); @@ -10929,7 +11132,7 @@ }; Object.assign(methods$j, PaddingMethods, AddChildMethods$7, RemoveChildMethods$6, GetParentSizerMethods, ScaleMethods, FadeMethods$1, EaseMoveMethods, ShakeMethods, EaseDataMethods, ClickMethods, ClickOutsideMethods, TouchingMethods, HideMethods, ModalMethods, GetShownChildrenMethods); - var GetValue$1s = Phaser.Utils.Objects.GetValue; + var GetValue$1t = Phaser.Utils.Objects.GetValue; var Base$1 = /*#__PURE__*/function (_Container) { _inherits(Base, _Container); var _super = _createSuper(Base); @@ -10939,7 +11142,7 @@ _this = _super.call(this, scene, x, y, 1, 1); _this.isRexSizer = true; _this.setMinSize(minWidth, minHeight); - _this.setName(GetValue$1s(config, 'name', '')); + _this.setName(GetValue$1t(config, 'name', '')); _this.rexSizer = {}; _this.space = {}; _this.backgroundChildren = undefined; @@ -10947,18 +11150,18 @@ _this.childrenMap = {}; _this.layoutedChildren = undefined; _this.enableLayoutWarn(); - var anchorConfig = GetValue$1s(config, 'anchor', undefined); + var anchorConfig = GetValue$1t(config, 'anchor', undefined); if (anchorConfig) { _this.setAnchor(anchorConfig); } - _this.setInnerPadding(GetValue$1s(config, 'space', 0)); - var draggable = GetValue$1s(config, 'draggable', false); + _this.setInnerPadding(GetValue$1t(config, 'space', 0)); + var draggable = GetValue$1t(config, 'draggable', false); if (draggable) { _this.setDraggable(draggable); } - _this.setSizerEventsEnable(GetValue$1s(config, 'sizerEvents', false)); + _this.setSizerEventsEnable(GetValue$1t(config, 'sizerEvents', false)); _this.setDirty(true); - if (GetValue$1s(config, 'enableLayer', false)) { + if (GetValue$1t(config, 'enableLayer', false)) { _this.enableLayer(); } return _this; @@ -11594,7 +11797,7 @@ }; var IsPlainObject$k = Phaser.Utils.Objects.IsPlainObject; - var GetValue$1r = Phaser.Utils.Objects.GetValue; + var GetValue$1s = Phaser.Utils.Objects.GetValue; var ALIGN_CENTER$3 = Phaser.Display.Align.CENTER; var PROPORTIONMODE = { min: 0, @@ -11610,17 +11813,17 @@ proportion = PROPORTIONMODE[proportion]; } else if (IsPlainObject$k(proportion)) { var config = proportion; - proportion = GetValue$1r(config, 'proportion', undefined); - align = GetValue$1r(config, 'align', ALIGN_CENTER$3); - paddingConfig = GetValue$1r(config, 'padding', 0); - expand = GetValue$1r(config, 'expand', false); - childKey = GetValue$1r(config, 'key', undefined); - index = GetValue$1r(config, 'index', undefined); + proportion = GetValue$1s(config, 'proportion', undefined); + align = GetValue$1s(config, 'align', ALIGN_CENTER$3); + paddingConfig = GetValue$1s(config, 'padding', 0); + expand = GetValue$1s(config, 'expand', false); + childKey = GetValue$1s(config, 'key', undefined); + index = GetValue$1s(config, 'index', undefined); if (!gameObject.isRexSizer) { - minWidth = GetValue$1r(config, 'minWidth', undefined); - minHeight = GetValue$1r(config, 'minHeight', undefined); + minWidth = GetValue$1s(config, 'minWidth', undefined); + minHeight = GetValue$1s(config, 'minHeight', undefined); } - fitRatio = GetValue$1r(config, 'fitRatio', 0); // width/height + fitRatio = GetValue$1s(config, 'fitRatio', 0); // width/height } if (typeof align === 'string') { @@ -11859,7 +12062,7 @@ }; var IsPlainObject$j = Phaser.Utils.Objects.IsPlainObject; - var GetValue$1q = Phaser.Utils.Objects.GetValue; + var GetValue$1r = Phaser.Utils.Objects.GetValue; var Sizer = /*#__PURE__*/function (_BaseSizer) { _inherits(Sizer, _BaseSizer); var _super = _createSuper(Sizer); @@ -11868,19 +12071,19 @@ _classCallCheck(this, Sizer); if (IsPlainObject$j(x)) { config = x; - x = GetValue$1q(config, 'x', 0); - y = GetValue$1q(config, 'y', 0); - minWidth = GetValue$1q(config, 'width', undefined); - minHeight = GetValue$1q(config, 'height', undefined); - orientation = GetValue$1q(config, 'orientation', 0); + x = GetValue$1r(config, 'x', 0); + y = GetValue$1r(config, 'y', 0); + minWidth = GetValue$1r(config, 'width', undefined); + minHeight = GetValue$1r(config, 'height', undefined); + orientation = GetValue$1r(config, 'orientation', 0); } else if (IsPlainObject$j(minWidth)) { config = minWidth; - minWidth = GetValue$1q(config, 'width', undefined); - minHeight = GetValue$1q(config, 'height', undefined); - orientation = GetValue$1q(config, 'orientation', 0); + minWidth = GetValue$1r(config, 'width', undefined); + minHeight = GetValue$1r(config, 'height', undefined); + orientation = GetValue$1r(config, 'orientation', 0); } else if (IsPlainObject$j(orientation)) { config = orientation; - orientation = GetValue$1q(config, 'orientation', 0); + orientation = GetValue$1r(config, 'orientation', 0); } if (orientation === undefined) { orientation = 0; @@ -11889,9 +12092,9 @@ _this.type = 'rexSizer'; _this.sizerChildren = []; _this.setOrientation(orientation); - _this.setItemSpacing(GetValue$1q(config, 'space.item', 0)); - _this.setStartChildIndex(GetValue$1q(config, 'startChildIndex', 0)); - _this.setRTL(GetValue$1q(config, 'rtl', false)); + _this.setItemSpacing(GetValue$1r(config, 'space.item', 0)); + _this.setStartChildIndex(GetValue$1r(config, 'startChildIndex', 0)); + _this.setRTL(GetValue$1r(config, 'rtl', false)); _this.addChildrenMap('items', _this.sizerChildren); return _this; } @@ -12409,7 +12612,7 @@ return maskGameObject; }; - var GetValue$1p = Phaser.Utils.Objects.GetValue; + var GetValue$1q = Phaser.Utils.Objects.GetValue; var Label = /*#__PURE__*/function (_LabelBase) { _inherits(Label, _LabelBase); var _super = _createSuper(Label); @@ -12421,14 +12624,14 @@ _this.type = 'rexLabel'; // Add elements - var background = GetValue$1p(config, 'background', undefined); - var icon = GetValue$1p(config, 'icon', undefined); - var iconMask = GetValue$1p(config, 'iconMask', undefined); - var text = GetValue$1p(config, 'text', undefined); - var action = GetValue$1p(config, 'action', undefined); - var actionMask = GetValue$1p(config, 'actionMask', undefined); + var background = GetValue$1q(config, 'background', undefined); + var icon = GetValue$1q(config, 'icon', undefined); + var iconMask = GetValue$1q(config, 'iconMask', undefined); + var text = GetValue$1q(config, 'text', undefined); + var action = GetValue$1q(config, 'action', undefined); + var actionMask = GetValue$1q(config, 'actionMask', undefined); // Align - var align = GetValue$1p(config, 'align', undefined); // undefined/left/top: no space + var align = GetValue$1q(config, 'align', undefined); // undefined/left/top: no space if (background) { _this.addBackground(background); @@ -12443,23 +12646,23 @@ if (_this.orientation === 0) { if (text || action) { padding = { - right: GetValue$1p(config, 'space.icon', 0), - top: GetValue$1p(config, 'space.iconTop', 0), - bottom: GetValue$1p(config, 'space.iconBottom', 0), - left: GetValue$1p(config, 'space.iconLeft', 0) + right: GetValue$1q(config, 'space.icon', 0), + top: GetValue$1q(config, 'space.iconTop', 0), + bottom: GetValue$1q(config, 'space.iconBottom', 0), + left: GetValue$1q(config, 'space.iconLeft', 0) }; } } else { if (text || action) { padding = { - bottom: GetValue$1p(config, 'space.icon', 0), - left: GetValue$1p(config, 'space.iconLeft', 0), - right: GetValue$1p(config, 'space.iconRight', 0), - top: GetValue$1p(config, 'space.iconTop', 0) + bottom: GetValue$1q(config, 'space.icon', 0), + left: GetValue$1q(config, 'space.iconLeft', 0), + right: GetValue$1q(config, 'space.iconRight', 0), + top: GetValue$1q(config, 'space.iconTop', 0) }; } } - var fitRatio = GetValue$1p(config, 'squareFitIcon', false) ? 1 : 0; + var fitRatio = GetValue$1q(config, 'squareFitIcon', false) ? 1 : 0; _this.add(icon, { proportion: 0, padding: padding, @@ -12470,14 +12673,14 @@ } if (!fitRatio) { - var iconSize = GetValue$1p(config, 'iconSize', undefined); - _this.setIconSize(GetValue$1p(config, 'iconWidth', iconSize), GetValue$1p(config, 'iconHeight', iconSize)); + var iconSize = GetValue$1q(config, 'iconSize', undefined); + _this.setIconSize(GetValue$1q(config, 'iconWidth', iconSize), GetValue$1q(config, 'iconHeight', iconSize)); } } if (text) { - var textSpace = GetValue$1p(config, 'space.text', 0); - var expandTextWidth = GetValue$1p(config, 'expandTextWidth', false); - var expandTextHeight = GetValue$1p(config, 'expandTextHeight', false); + var textSpace = GetValue$1q(config, 'space.text', 0); + var expandTextWidth = GetValue$1q(config, 'expandTextWidth', false); + var expandTextHeight = GetValue$1q(config, 'expandTextHeight', false); var proportion, padding, expand; if (_this.orientation === 0) { proportion = expandTextWidth ? 1 : 0; @@ -12506,18 +12709,18 @@ var padding; if (_this.orientation === 0) { padding = { - top: GetValue$1p(config, 'space.actionTop', 0), - bottom: GetValue$1p(config, 'space.actionBottom', 0), - right: GetValue$1p(config, 'space.actionRight', 0) + top: GetValue$1q(config, 'space.actionTop', 0), + bottom: GetValue$1q(config, 'space.actionBottom', 0), + right: GetValue$1q(config, 'space.actionRight', 0) }; } else { padding = { - left: GetValue$1p(config, 'space.actionLeft', 0), - right: GetValue$1p(config, 'space.actionRight', 0), - bottom: GetValue$1p(config, 'space.actionBottom', 0) + left: GetValue$1q(config, 'space.actionLeft', 0), + right: GetValue$1q(config, 'space.actionRight', 0), + bottom: GetValue$1q(config, 'space.actionBottom', 0) }; } - var fitRatio = GetValue$1p(config, 'squareFitAction', false) ? 1 : 0; + var fitRatio = GetValue$1q(config, 'squareFitAction', false) ? 1 : 0; _this.add(action, { proportion: 0, padding: padding, @@ -12528,8 +12731,8 @@ } if (!fitRatio) { - var actionSize = GetValue$1p(config, 'actionSize'); - _this.setActionSize(GetValue$1p(config, 'actionWidth', actionSize), GetValue$1p(config, 'actionHeight', actionSize)); + var actionSize = GetValue$1q(config, 'actionSize'); + _this.setActionSize(GetValue$1q(config, 'actionWidth', actionSize), GetValue$1q(config, 'actionHeight', actionSize)); } } @@ -12548,7 +12751,7 @@ return _createClass(Label); }(LabelBase); - var GetValue$1o = Phaser.Utils.Objects.GetValue; + var GetValue$1p = Phaser.Utils.Objects.GetValue; var RoundRectangle$2 = /*#__PURE__*/function () { function RoundRectangle(x, y, width, height, radiusConfig) { _classCallCheck(this, RoundRectangle); @@ -12649,14 +12852,14 @@ defaultRadiusX = value; defaultRadiusY = value; } else { - defaultRadiusX = GetValue$1o(value, 'x', 0); - defaultRadiusY = GetValue$1o(value, 'y', 0); + defaultRadiusX = GetValue$1p(value, 'x', 0); + defaultRadiusY = GetValue$1p(value, 'y', 0); } var radius = this.cornerRadius; - radius.tl = GetRadius(GetValue$1o(value, 'tl', undefined), defaultRadiusX, defaultRadiusY); - radius.tr = GetRadius(GetValue$1o(value, 'tr', undefined), defaultRadiusX, defaultRadiusY); - radius.bl = GetRadius(GetValue$1o(value, 'bl', undefined), defaultRadiusX, defaultRadiusY); - radius.br = GetRadius(GetValue$1o(value, 'br', undefined), defaultRadiusX, defaultRadiusY); + radius.tl = GetRadius(GetValue$1p(value, 'tl', undefined), defaultRadiusX, defaultRadiusY); + radius.tr = GetRadius(GetValue$1p(value, 'tr', undefined), defaultRadiusX, defaultRadiusY); + radius.bl = GetRadius(GetValue$1p(value, 'bl', undefined), defaultRadiusX, defaultRadiusY); + radius.br = GetRadius(GetValue$1p(value, 'br', undefined), defaultRadiusX, defaultRadiusY); } }, { key: "radiusTL", @@ -12717,8 +12920,8 @@ radius.x = value; radius.y = value; } else { - radius.x = GetValue$1o(value, 'x', 0); - radius.y = GetValue$1o(value, 'y', 0); + radius.x = GetValue$1p(value, 'x', 0); + radius.y = GetValue$1p(value, 'y', 0); } SetConvex(radius); }; @@ -12919,7 +13122,7 @@ var Shape$1 = Phaser.GameObjects.Shape; var IsPlainObject$i = Phaser.Utils.Objects.IsPlainObject; - var GetValue$1n = Phaser.Utils.Objects.GetValue; + var GetValue$1o = Phaser.Utils.Objects.GetValue; var Earcut$1 = Phaser.Geom.Polygon.Earcut; var RoundRectangle$1 = /*#__PURE__*/function (_Shape) { _inherits(RoundRectangle, _Shape); @@ -12964,7 +13167,7 @@ _this = _super.call(this, scene, 'rexRoundRectangleShape', geom); _this.setShapeType(shapeType); if (_this.shapeType === 0) { - var radius = GetValue$1n(radiusConfig, 'radius', radiusConfig); + var radius = GetValue$1o(radiusConfig, 'radius', radiusConfig); geom.setTo(0, 0, width, height, radius); } else { var radius = { @@ -12973,7 +13176,7 @@ }; geom.setTo(0, 0, width, height, radius); } - var iteration = GetValue$1n(radiusConfig, 'iteration', undefined); + var iteration = GetValue$1o(radiusConfig, 'iteration', undefined); _this.setIteration(iteration); _this.setPosition(x, y); _this.setFillStyle(fillColor, fillAlpha); @@ -13376,7 +13579,7 @@ return out; }; - var GetValue$1m = Phaser.Utils.Objects.GetValue; + var GetValue$1n = Phaser.Utils.Objects.GetValue; var StyleManager = /*#__PURE__*/function (_ComponentBase) { _inherits(StyleManager, _ComponentBase); var _super = _createSuper(StyleManager); @@ -13386,12 +13589,12 @@ _this = _super.call(this, gameObject, config); // this.parent = gameObject; - _this.style = GetValue$1m(config, 'style', _assertThisInitialized(_this)); - var propertiesMap = GetValue$1m(config, 'propertiesMap'); + _this.style = GetValue$1n(config, 'style', _assertThisInitialized(_this)); + var propertiesMap = GetValue$1n(config, 'propertiesMap'); _this.activeStyle = ExtractStyle(config, 'active', propertiesMap); _this.hoverStyle = ExtractStyle(config, 'hover', propertiesMap); _this.disableStyle = ExtractStyle(config, 'disable', propertiesMap); - _this.onModifyStyle = GetValue$1m(config, 'onModifyStyle'); + _this.onModifyStyle = GetValue$1n(config, 'onModifyStyle'); return _this; } _createClass(StyleManager, [{ @@ -15303,7 +15506,7 @@ }(ComponentBase); var PhaserNineSlice = Phaser.GameObjects.NineSlice; - var GetValue$1l = Phaser.Utils.Objects.GetValue; + var GetValue$1m = Phaser.Utils.Objects.GetValue; var StatesNineSlice = /*#__PURE__*/function (_PhaserNineSlice) { _inherits(StatesNineSlice, _PhaserNineSlice); var _super = _createSuper(StatesNineSlice); @@ -15313,19 +15516,19 @@ if (config === undefined) { config = {}; } - var x = GetValue$1l(config, 'x', 0); - var y = GetValue$1l(config, 'y', 0); - var key = GetValue$1l(config, 'key', null); - var frame = GetValue$1l(config, 'frame', null); - var width = GetValue$1l(config, 'width', 0); - var height = GetValue$1l(config, 'height', 0); - var leftWidth = GetValue$1l(config, 'leftWidth', 0); - var rightWidth = GetValue$1l(config, 'rightWidth', 0); - var topHeight = GetValue$1l(config, 'topHeight', 0); - var bottomHeight = GetValue$1l(config, 'bottomHeight', 0); + var x = GetValue$1m(config, 'x', 0); + var y = GetValue$1m(config, 'y', 0); + var key = GetValue$1m(config, 'key', null); + var frame = GetValue$1m(config, 'frame', null); + var width = GetValue$1m(config, 'width', 0); + var height = GetValue$1m(config, 'height', 0); + var leftWidth = GetValue$1m(config, 'leftWidth', 0); + var rightWidth = GetValue$1m(config, 'rightWidth', 0); + var topHeight = GetValue$1m(config, 'topHeight', 0); + var bottomHeight = GetValue$1m(config, 'bottomHeight', 0); _this = _super.call(this, scene, x, y, key, frame, width, height, leftWidth, rightWidth, topHeight, bottomHeight); _this.type = 'rexStatesNineSlice'; - var effectConfig = GetValue$1l(config, 'effects', true); + var effectConfig = GetValue$1m(config, 'effects', true); if (effectConfig) { AddEffectProperties(_assertThisInitialized(_this), effectConfig); } @@ -15400,7 +15603,7 @@ }(ComponentBase); var PhaserImage = Phaser.GameObjects.Image; - var GetValue$1k = Phaser.Utils.Objects.GetValue; + var GetValue$1l = Phaser.Utils.Objects.GetValue; var StatesImage = /*#__PURE__*/function (_PhaserImage) { _inherits(StatesImage, _PhaserImage); var _super = _createSuper(StatesImage); @@ -15410,13 +15613,13 @@ if (config === undefined) { config = {}; } - var x = GetValue$1k(config, 'x', 0); - var y = GetValue$1k(config, 'y', 0); - var key = GetValue$1k(config, 'key', ''); - var frame = GetValue$1k(config, 'frame', undefined); + var x = GetValue$1l(config, 'x', 0); + var y = GetValue$1l(config, 'y', 0); + var key = GetValue$1l(config, 'key', ''); + var frame = GetValue$1l(config, 'frame', undefined); _this = _super.call(this, scene, x, y, key, frame); _this.type = 'rexStatesImage'; - var effectConfig = GetValue$1k(config, 'effects', true); + var effectConfig = GetValue$1l(config, 'effects', true); if (effectConfig) { AddEffectProperties(_assertThisInitialized(_this), effectConfig); } @@ -15653,11 +15856,11 @@ }; var IsPlainObject$h = Phaser.Utils.Objects.IsPlainObject; - var GetValue$1j = Phaser.Utils.Objects.GetValue; + var GetValue$1k = Phaser.Utils.Objects.GetValue; var SetStretchMode = function SetStretchMode(mode) { if (IsPlainObject$h(mode)) { - this.stretchMode.edge = parseMode(GetValue$1j(mode, 'edge', 0)); - this.stretchMode.internal = parseMode(GetValue$1j(mode, 'internal', 0)); + this.stretchMode.edge = parseMode(GetValue$1k(mode, 'edge', 0)); + this.stretchMode.internal = parseMode(GetValue$1k(mode, 'internal', 0)); } else { mode = parseMode(mode); this.stretchMode.edge = mode; @@ -15716,7 +15919,7 @@ }; var IsPlainObject$g = Phaser.Utils.Objects.IsPlainObject; - var GetValue$1i = Phaser.Utils.Objects.GetValue; + var GetValue$1j = Phaser.Utils.Objects.GetValue; var NinePatchBase = function NinePatchBase(GOClass, type) { var NinePatch = /*#__PURE__*/function (_GOClass) { _inherits(NinePatch, _GOClass); @@ -15726,53 +15929,53 @@ _classCallCheck(this, NinePatch); if (IsPlainObject$g(x)) { config = x; - x = GetValue$1i(config, 'x', 0); - y = GetValue$1i(config, 'y', 0); - width = GetValue$1i(config, 'width', 1); - height = GetValue$1i(config, 'height', 1); - key = GetValue$1i(config, 'key', undefined); - baseFrame = GetValue$1i(config, 'baseFrame', undefined); - columns = GetValue$1i(config, 'columns', undefined); - rows = GetValue$1i(config, 'rows', undefined); + x = GetValue$1j(config, 'x', 0); + y = GetValue$1j(config, 'y', 0); + width = GetValue$1j(config, 'width', 1); + height = GetValue$1j(config, 'height', 1); + key = GetValue$1j(config, 'key', undefined); + baseFrame = GetValue$1j(config, 'baseFrame', undefined); + columns = GetValue$1j(config, 'columns', undefined); + rows = GetValue$1j(config, 'rows', undefined); } else if (IsPlainObject$g(width)) { config = width; - width = GetValue$1i(config, 'width', 1); - height = GetValue$1i(config, 'height', 1); - key = GetValue$1i(config, 'key', undefined); - baseFrame = GetValue$1i(config, 'baseFrame', undefined); - columns = GetValue$1i(config, 'columns', undefined); - rows = GetValue$1i(config, 'rows', undefined); + width = GetValue$1j(config, 'width', 1); + height = GetValue$1j(config, 'height', 1); + key = GetValue$1j(config, 'key', undefined); + baseFrame = GetValue$1j(config, 'baseFrame', undefined); + columns = GetValue$1j(config, 'columns', undefined); + rows = GetValue$1j(config, 'rows', undefined); } else if (IsPlainObject$g(key)) { config = key; - key = GetValue$1i(config, 'key', undefined); - baseFrame = GetValue$1i(config, 'baseFrame', undefined); - columns = GetValue$1i(config, 'columns', undefined); - rows = GetValue$1i(config, 'rows', undefined); + key = GetValue$1j(config, 'key', undefined); + baseFrame = GetValue$1j(config, 'baseFrame', undefined); + columns = GetValue$1j(config, 'columns', undefined); + rows = GetValue$1j(config, 'rows', undefined); } else if (IsPlainObject$g(baseFrame)) { config = baseFrame; - baseFrame = GetValue$1i(config, 'baseFrame', undefined); - columns = GetValue$1i(config, 'columns', undefined); - rows = GetValue$1i(config, 'rows', undefined); + baseFrame = GetValue$1j(config, 'baseFrame', undefined); + columns = GetValue$1j(config, 'columns', undefined); + rows = GetValue$1j(config, 'rows', undefined); } else if (Array.isArray(baseFrame)) { config = rows; rows = columns; columns = baseFrame; - baseFrame = GetValue$1i(config, 'baseFrame', undefined); + baseFrame = GetValue$1j(config, 'baseFrame', undefined); } else if (IsPlainObject$g(columns)) { config = columns; - columns = GetValue$1i(config, 'columns', undefined); - rows = GetValue$1i(config, 'rows', undefined); + columns = GetValue$1j(config, 'columns', undefined); + rows = GetValue$1j(config, 'rows', undefined); } if (columns === undefined) { - var leftWidth = GetValue$1i(config, 'leftWidth', undefined); - var rightWidth = GetValue$1i(config, 'rightWidth', undefined); + var leftWidth = GetValue$1j(config, 'leftWidth', undefined); + var rightWidth = GetValue$1j(config, 'rightWidth', undefined); if (leftWidth !== undefined && rightWidth !== undefined) { columns = [leftWidth, undefined, rightWidth]; } } if (rows === undefined) { - var topHeight = GetValue$1i(config, 'topHeight', undefined); - var bottomHeight = GetValue$1i(config, 'bottomHeight', undefined); + var topHeight = GetValue$1j(config, 'topHeight', undefined); + var bottomHeight = GetValue$1j(config, 'bottomHeight', undefined); if (topHeight !== undefined && bottomHeight !== undefined) { rows = [topHeight, undefined, bottomHeight]; } @@ -15786,12 +15989,12 @@ _this._tileSprite = undefined; // Reserved for drawing image _this._image = undefined; // Reserved for drawing image - _this.setGetFrameNameCallback(GetValue$1i(config, 'getFrameNameCallback', undefined)); - _this.setStretchMode(GetValue$1i(config, 'stretchMode', 0)); - _this.setPreserveRatio(GetValue$1i(config, 'preserveRatio', true)); - var maxFixedPartScale = GetValue$1i(config, 'maxFixedPartScale', 1); - var maxFixedPartScaleX = GetValue$1i(config, 'maxFixedPartScaleX', maxFixedPartScale); - var maxFixedPartScaleY = GetValue$1i(config, 'maxFixedPartScaleY', undefined); + _this.setGetFrameNameCallback(GetValue$1j(config, 'getFrameNameCallback', undefined)); + _this.setStretchMode(GetValue$1j(config, 'stretchMode', 0)); + _this.setPreserveRatio(GetValue$1j(config, 'preserveRatio', true)); + var maxFixedPartScale = GetValue$1j(config, 'maxFixedPartScale', 1); + var maxFixedPartScaleX = GetValue$1j(config, 'maxFixedPartScaleX', maxFixedPartScale); + var maxFixedPartScaleY = GetValue$1j(config, 'maxFixedPartScaleY', undefined); _this.setMaxFixedPartScale(maxFixedPartScaleX, maxFixedPartScaleY); _this.setBaseTexture(key, baseFrame, columns, rows); return _this; @@ -15919,7 +16122,7 @@ }; var PhaserText = Phaser.GameObjects.Text; - var GetValue$1h = Phaser.Utils.Objects.GetValue; + var GetValue$1i = Phaser.Utils.Objects.GetValue; var StatesText = /*#__PURE__*/function (_PhaserText) { _inherits(StatesText, _PhaserText); var _super = _createSuper(StatesText); @@ -15929,9 +16132,9 @@ if (config === undefined) { config = {}; } - var x = GetValue$1h(config, 'x', 0); - var y = GetValue$1h(config, 'y', 0); - var text = GetValue$1h(config, 'text', ''); + var x = GetValue$1i(config, 'x', 0); + var y = GetValue$1i(config, 'y', 0); + var text = GetValue$1i(config, 'text', ''); _this = _super.call(this, scene, x, y, text, config); _this.type = 'rexStatesText'; config.style = _this.style; @@ -16466,7 +16669,7 @@ }; var GetAdvancedValue = Phaser.Utils.Objects.GetAdvancedValue; - var GetValue$1g = Phaser.Utils.Objects.GetValue; + var GetValue$1h = Phaser.Utils.Objects.GetValue; var TextStyle$1 = /*#__PURE__*/function () { function TextStyle(text, style, propertyMap) { _classCallCheck(this, TextStyle); @@ -16580,7 +16783,7 @@ var postCallback = prop[2]; if (key === 'wrapCallback' || key === 'wrapCallbackScope') { // Callback & scope should be set without processing the values - this[key] = GetValue$1g(style, objKey, defaultValue); + this[key] = GetValue$1h(style, objKey, defaultValue); } else { var value = GetAdvancedValue(style, objKey, defaultValue); if (postCallback) { @@ -16591,7 +16794,7 @@ } // Allow for 'font' override - var font = GetValue$1g(style, 'font', null); + var font = GetValue$1h(style, 'font', null); if (font === null) { this._font = this.fontStyle + ' ' + this.fontSize + ' ' + this.fontFamily; } else { @@ -16599,19 +16802,19 @@ } // Allow for 'fill' to be used in place of 'color' - var fill = GetValue$1g(style, 'fill', null); + var fill = GetValue$1h(style, 'fill', null); if (fill !== null) { this.color = GetStyle(fill); } - var metrics = GetValue$1g(style, 'metrics', false); + var metrics = GetValue$1h(style, 'metrics', false); // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning // Doing this is reset if you then change the font of this TextStyle after creation if (metrics) { this.metrics = { - ascent: GetValue$1g(metrics, 'ascent', 0), - descent: GetValue$1g(metrics, 'descent', 0), - fontSize: GetValue$1g(metrics, 'fontSize', 0) + ascent: GetValue$1h(metrics, 'ascent', 0), + descent: GetValue$1h(metrics, 'descent', 0), + fontSize: GetValue$1h(metrics, 'fontSize', 0) }; } else if (updateText || !this.metrics) { this.metrics = MeasureText(this); @@ -16680,9 +16883,9 @@ this.fontSize = ''; this.fontStyle = ''; } else { - this.fontFamily = GetValue$1g(font, 'fontFamily', 'Courier'); - this.fontSize = GetValue$1g(font, 'fontSize', '16px'); - this.fontStyle = GetValue$1g(font, 'fontStyle', ''); + this.fontFamily = GetValue$1h(font, 'fontFamily', 'Courier'); + this.fontSize = GetValue$1h(font, 'fontSize', '16px'); + this.fontStyle = GetValue$1h(font, 'fontStyle', ''); } return this.update(true); } @@ -17033,9 +17236,9 @@ this.fontSize = ''; this.fontStyle = ''; } else { - this.fontFamily = GetValue$1g(font, 'fontFamily', this.fontFamily); - this.fontSize = GetValue$1g(font, 'fontSize', this.fontSize); - this.fontStyle = GetValue$1g(font, 'fontStyle', this.fontStyle); + this.fontFamily = GetValue$1h(font, 'fontFamily', this.fontFamily); + this.fontSize = GetValue$1h(font, 'fontSize', this.fontSize); + this.fontStyle = GetValue$1h(font, 'fontStyle', this.fontStyle); } } return this.parent.updateText(true); @@ -17421,7 +17624,7 @@ } }; - var GetValue$1f = Phaser.Utils.Objects.GetValue; + var GetValue$1g = Phaser.Utils.Objects.GetValue; var NO_NEWLINE$3 = CONST.NO_NEWLINE; var RAW_NEWLINE$1 = CONST.RAW_NEWLINE; var Pen = /*#__PURE__*/function () { @@ -17434,17 +17637,17 @@ key: "resetFromJSON", value: function resetFromJSON(o) { // (txt, x, y, width, prop, newLineMode, startIndex) - this.text = GetValue$1f(o, 'text', ''); - this.x = GetValue$1f(o, 'x', 0); - this.y = GetValue$1f(o, 'y', 0); - this.width = GetValue$1f(o, 'width', 0); - var prop = GetValue$1f(o, 'prop', null); + this.text = GetValue$1g(o, 'text', ''); + this.x = GetValue$1g(o, 'x', 0); + this.y = GetValue$1g(o, 'y', 0); + this.width = GetValue$1g(o, 'width', 0); + var prop = GetValue$1g(o, 'prop', null); if (prop === null) { prop = {}; } this.prop = prop; - this.newLineMode = GetValue$1f(o, 'newLineMode', 0); - this.startIndex = GetValue$1f(o, 'startIndex', 0); + this.newLineMode = GetValue$1g(o, 'newLineMode', 0); + this.startIndex = GetValue$1g(o, 'startIndex', 0); } }, { key: "plainText", @@ -18076,7 +18279,7 @@ return retLines; }; - var GetValue$1e = Phaser.Utils.Objects.GetValue; + var GetValue$1f = Phaser.Utils.Objects.GetValue; var NO_WRAP = CONST.NO_WRAP; var NO_NEWLINE = CONST.NO_NEWLINE; var CanvasText = /*#__PURE__*/function () { @@ -18084,10 +18287,10 @@ _classCallCheck(this, CanvasText); this.parent = config.parent; this.scene = this.parent.scene; - this.context = GetValue$1e(config, 'context', null); + this.context = GetValue$1f(config, 'context', null); this.canvas = this.context.canvas; - this.parser = GetValue$1e(config, 'parser', null); - this.defaultStyle = GetValue$1e(config, 'style', null); + this.parser = GetValue$1f(config, 'parser', null); + this.defaultStyle = GetValue$1f(config, 'style', null); this.autoRound = true; this.pensPool = config.pensPool; // Required this.linesPool = config.linesPool; // Required @@ -18424,7 +18627,7 @@ }(Stack); var IsPlainObject$f = Phaser.Utils.Objects.IsPlainObject; - var GetValue$1d = Phaser.Utils.Objects.GetValue; + var GetValue$1e = Phaser.Utils.Objects.GetValue; var AddImage = function AddImage(key, config) { if (IsPlainObject$f(key)) { config = key; @@ -18459,11 +18662,11 @@ frame: frameKey, width: width, height: height, - y: GetValue$1d(config, 'y', 0), - left: GetValue$1d(config, 'left', 0), - right: GetValue$1d(config, 'right', 0), - originX: GetValue$1d(config, 'originX', 0), - originY: GetValue$1d(config, 'originY', 0) + y: GetValue$1e(config, 'y', 0), + left: GetValue$1e(config, 'left', 0), + right: GetValue$1e(config, 'right', 0), + originX: GetValue$1e(config, 'originX', 0), + originY: GetValue$1e(config, 'originY', 0) }; }; @@ -18601,7 +18804,7 @@ var AddToDOM = Phaser.DOM.AddToDOM; var CanvasPool$1 = Phaser.Display.Canvas.CanvasPool; var GameObject$2 = Phaser.GameObjects.GameObject; - var GetValue$1c = Phaser.Utils.Objects.GetValue; + var GetValue$1d = Phaser.Utils.Objects.GetValue; var RemoveFromDOM = Phaser.DOM.RemoveFromDOM; var SPLITREGEXP = CONST.SPLITREGEXP; @@ -18617,10 +18820,10 @@ _classCallCheck(this, Text); if (IsPlainObject$e(x)) { var config = x; - x = GetValue$1c(config, 'x', 0); - y = GetValue$1c(config, 'y', 0); - text = GetValue$1c(config, 'text', ''); - style = GetValue$1c(config, 'style'); + x = GetValue$1d(config, 'x', 0); + y = GetValue$1d(config, 'y', 0); + text = GetValue$1d(config, 'text', ''); + style = GetValue$1d(config, 'style'); } if (x === undefined) { x = 0; @@ -18652,7 +18855,7 @@ } } _this.style = new TextStyle$1(_assertThisInitialized(_this), style); - var imageData = GetValue$1c(style, 'images', undefined); + var imageData = GetValue$1d(style, 'images', undefined); if (imageData) { _this.addImage(imageData); } @@ -18687,7 +18890,7 @@ _this.renderer.deleteTexture(_this.frame.source.glTexture); _this.frame.source.glTexture = null; } - var sharedPoolMode = GetValue$1c(style, 'sharedPool', true); + var sharedPoolMode = GetValue$1d(style, 'sharedPool', true); var pensPool, linesPool, wrapTextLinesPool; if (sharedPoolMode) { // Use pools first time @@ -18729,8 +18932,8 @@ _this.setPadding(style.padding); } _this.setText(text); - _this.setUrlTagCursorStyle(GetValue$1c(style, 'urlTagCursorStyle', 'pointer')); - if (GetValue$1c(style, 'interactive', false)) { + _this.setUrlTagCursorStyle(GetValue$1d(style, 'urlTagCursorStyle', 'pointer')); + if (GetValue$1d(style, 'interactive', false)) { _this.setInteractive(); } return _this; @@ -18839,21 +19042,21 @@ var config = left; // If they specify x and/or y this applies to all - var x = GetValue$1c(config, 'x', null); + var x = GetValue$1d(config, 'x', null); if (x !== null) { left = x; right = x; } else { - left = GetValue$1c(config, 'left', 0); - right = GetValue$1c(config, 'right', left); + left = GetValue$1d(config, 'left', 0); + right = GetValue$1d(config, 'right', left); } - var y = GetValue$1c(config, 'y', null); + var y = GetValue$1d(config, 'y', null); if (y !== null) { top = y; bottom = y; } else { - top = GetValue$1c(config, 'top', 0); - bottom = GetValue$1c(config, 'bottom', top); + top = GetValue$1d(config, 'top', 0); + bottom = GetValue$1d(config, 'bottom', top); } } else { if (left === undefined) { @@ -19595,11 +19798,11 @@ return Object.assign({}, TagRegexSave); }; - var GetValue$1b = Phaser.Utils.Objects.GetValue; + var GetValue$1c = Phaser.Utils.Objects.GetValue; var Parser = /*#__PURE__*/function () { function Parser(style) { _classCallCheck(this, Parser); - var delimiters = GetValue$1b(style, 'delimiters', '[]'); + var delimiters = GetValue$1c(style, 'delimiters', '[]'); this.tagRegex = GetTagRegex(delimiters); this.delimiters = delimiters; } @@ -19651,12 +19854,12 @@ return BBCodeText; }(Text); - var GetValue$1a = Phaser.Utils.Objects.GetValue; + var GetValue$1b = Phaser.Utils.Objects.GetValue; var PhaserBitmapText = Phaser.GameObjects.BitmapText; var CreateText = function CreateText(scene, config) { - var type = GetValue$1a(config, '$type'); + var type = GetValue$1b(config, '$type'); if (type === undefined) { - if (!!GetValue$1a(config, 'key')) { + if (!!GetValue$1b(config, 'key')) { type = 'bitmaptext'; } } @@ -19664,13 +19867,13 @@ switch (type) { case 'bitmaptext': case 'bitmap': - var key = GetValue$1a(config, 'key'); - var size = GetValue$1a(config, 'size'); + var key = GetValue$1b(config, 'key'); + var size = GetValue$1b(config, 'size'); if (size === undefined) { - size = GetValue$1a(config, 'fontSize'); + size = GetValue$1b(config, 'fontSize'); } gameObject = new PhaserBitmapText(scene, 0, 0, key, '', size); - var color = GetValue$1a(config, 'color'); + var color = GetValue$1b(config, 'color'); if (color !== undefined) { gameObject.setTint(color); } @@ -20052,7 +20255,7 @@ }, getData: function getData(key, defaultValue) { this.enableData(); - return key === undefined ? this.data : GetValue$1O(this.data, key, defaultValue); + return key === undefined ? this.data : GetValue$1P(this.data, key, defaultValue); }, incData: function incData(key, inc, defaultValue) { if (defaultValue === undefined) { @@ -20320,7 +20523,7 @@ var DegToRad$3 = Phaser.Math.DegToRad; var RadToDeg$1 = Phaser.Math.RadToDeg; - var GetValue$19 = Phaser.Utils.Objects.GetValue; + var GetValue$1a = Phaser.Utils.Objects.GetValue; var RenderBase = /*#__PURE__*/function (_Base) { _inherits(RenderBase, _Base); var _super = _createSuper(RenderBase); @@ -20620,10 +20823,10 @@ } // ScaleX, ScaleY - var width = GetValue$19(o, 'width', undefined); - var height = GetValue$19(o, 'height', undefined); - var scaleX = GetValue$19(o, 'scaleX', undefined); - var scaleY = GetValue$19(o, 'scaleY', undefined); + var width = GetValue$1a(o, 'width', undefined); + var height = GetValue$1a(o, 'height', undefined); + var scaleX = GetValue$1a(o, 'scaleX', undefined); + var scaleY = GetValue$1a(o, 'scaleY', undefined); if (width !== undefined) { if (height === undefined && scaleY === undefined) { this.setWidth(width, true); @@ -20755,7 +20958,7 @@ } }; - var GetValue$18 = Phaser.Utils.Objects.GetValue; + var GetValue$19 = Phaser.Utils.Objects.GetValue; var Background = /*#__PURE__*/function (_RenderBase) { _inherits(Background, _RenderBase); var _super = _createSuper(Background); @@ -20764,9 +20967,9 @@ _classCallCheck(this, Background); _this = _super.call(this, parent, 'background'); _this.setScrollFactor(0); - _this.setColor(GetValue$18(config, 'color', null), GetValue$18(config, 'color2', null), GetValue$18(config, 'horizontalGradient', true)); - _this.setStroke(GetValue$18(config, 'stroke', null), GetValue$18(config, 'strokeThickness', 2)); - _this.setCornerRadius(GetValue$18(config, 'cornerRadius', 0), GetValue$18(config, 'cornerIteration', null)); + _this.setColor(GetValue$19(config, 'color', null), GetValue$19(config, 'color2', null), GetValue$19(config, 'horizontalGradient', true)); + _this.setStroke(GetValue$19(config, 'stroke', null), GetValue$19(config, 'strokeThickness', 2)); + _this.setCornerRadius(GetValue$19(config, 'cornerRadius', 0), GetValue$19(config, 'cornerIteration', null)); return _this; } _createClass(Background, [{ @@ -20895,7 +21098,7 @@ return Background; }(RenderBase); - var GetValue$17 = Phaser.Utils.Objects.GetValue; + var GetValue$18 = Phaser.Utils.Objects.GetValue; var InnerBounds = /*#__PURE__*/function (_RenderBase) { _inherits(InnerBounds, _RenderBase); var _super = _createSuper(InnerBounds); @@ -20904,8 +21107,8 @@ _classCallCheck(this, InnerBounds); _this = _super.call(this, parent, 'innerbounds'); _this.setScrollFactor(0); - _this.setColor(GetValue$17(config, 'color', null), GetValue$17(config, 'color2', null), GetValue$17(config, 'horizontalGradient', true)); - _this.setStroke(GetValue$17(config, 'stroke', null), GetValue$17(config, 'strokeThickness', 2)); + _this.setColor(GetValue$18(config, 'color', null), GetValue$18(config, 'color2', null), GetValue$18(config, 'horizontalGradient', true)); + _this.setStroke(GetValue$18(config, 'stroke', null), GetValue$18(config, 'strokeThickness', 2)); return _this; } _createClass(InnerBounds, [{ @@ -20984,10 +21187,10 @@ value: function modifyPorperties(o) { _get(_getPrototypeOf(InnerBounds.prototype), "modifyPorperties", this).call(this, o); if (o.hasOwnProperty('color')) { - this.setColor(o.color, GetValue$17(o, 'color2', null), GetValue$17(o, 'horizontalGradient', true)); + this.setColor(o.color, GetValue$18(o, 'color2', null), GetValue$18(o, 'horizontalGradient', true)); } if (o.hasOwnProperty('stroke')) { - this.setStroke(o.stroke, GetValue$17(o, 'strokeThickness', 2)); + this.setStroke(o.stroke, GetValue$18(o, 'strokeThickness', 2)); } } }, { @@ -21027,7 +21230,7 @@ return InnerBounds; }(RenderBase); - var GetValue$16 = Phaser.Utils.Objects.GetValue; + var GetValue$17 = Phaser.Utils.Objects.GetValue; var TextStyle = /*#__PURE__*/function () { function TextStyle(parent, config) { _classCallCheck(this, TextStyle); @@ -21061,19 +21264,19 @@ }, { key: "set", value: function set(o) { - this.setBold(GetValue$16(o, 'bold', false)); - this.setItalic(GetValue$16(o, 'italic', false)); - this.setFontSize(GetValue$16(o, 'fontSize', '16px')); - this.setFontFamily(GetValue$16(o, 'fontFamily', 'Courier')); - this.setColor(GetValue$16(o, 'color', '#fff')); - this.setStrokeStyle(GetValue$16(o, 'stroke', null), GetValue$16(o, 'strokeThickness', 0)); - this.setShadow(GetValue$16(o, 'shadowColor', null), GetValue$16(o, 'shadowOffsetX', 0), GetValue$16(o, 'shadowOffsetY', 0), GetValue$16(o, 'shadowBlur', 0)); - this.setOffset(GetValue$16(o, 'offsetX', 0), GetValue$16(o, 'offsetY', 0)); - this.setSpace(GetValue$16(o, 'leftSpace', 0), GetValue$16(o, 'rightSpace', 0)); - this.setAlign(GetValue$16(o, 'align', undefined)); - this.setBackgroundColor(GetValue$16(o, 'backgroundColor', null)); - this.setBackgroundHeight(GetValue$16(o, 'backgroundHeight', undefined)); - this.setBackgroundBottomY(GetValue$16(o, 'backgroundBottomY', undefined)); + this.setBold(GetValue$17(o, 'bold', false)); + this.setItalic(GetValue$17(o, 'italic', false)); + this.setFontSize(GetValue$17(o, 'fontSize', '16px')); + this.setFontFamily(GetValue$17(o, 'fontFamily', 'Courier')); + this.setColor(GetValue$17(o, 'color', '#fff')); + this.setStrokeStyle(GetValue$17(o, 'stroke', null), GetValue$17(o, 'strokeThickness', 0)); + this.setShadow(GetValue$17(o, 'shadowColor', null), GetValue$17(o, 'shadowOffsetX', 0), GetValue$17(o, 'shadowOffsetY', 0), GetValue$17(o, 'shadowBlur', 0)); + this.setOffset(GetValue$17(o, 'offsetX', 0), GetValue$17(o, 'offsetY', 0)); + this.setSpace(GetValue$17(o, 'leftSpace', 0), GetValue$17(o, 'rightSpace', 0)); + this.setAlign(GetValue$17(o, 'align', undefined)); + this.setBackgroundColor(GetValue$17(o, 'backgroundColor', null)); + this.setBackgroundHeight(GetValue$17(o, 'backgroundHeight', undefined)); + this.setBackgroundBottomY(GetValue$17(o, 'backgroundBottomY', undefined)); return this; } }, { @@ -22450,22 +22653,22 @@ }; var Result = {}; - var GetValue$15 = Phaser.Utils.Objects.GetValue; + var GetValue$16 = Phaser.Utils.Objects.GetValue; var RunWordWrap$1 = function RunWordWrap(config) { // Parse parameters - var startIndex = GetValue$15(config, 'start', 0); - SetPadding$1(this.wrapPadding, GetValue$15(config, 'padding', 0)); + var startIndex = GetValue$16(config, 'start', 0); + SetPadding$1(this.wrapPadding, GetValue$16(config, 'padding', 0)); var paddingVertical = this.padding.top + this.padding.bottom + this.wrapPadding.top + this.wrapPadding.bottom; var paddingHorizontal = this.padding.left + this.padding.right + this.wrapPadding.left + this.wrapPadding.right; // Get lineHeight, maxLines - var lineHeight = GetValue$15(config, 'lineHeight'); - var ascent = GetValue$15(config, 'ascent', lineHeight); + var lineHeight = GetValue$16(config, 'lineHeight'); + var ascent = GetValue$16(config, 'ascent', lineHeight); var maxLines; if (lineHeight === undefined) { // Calculate lineHeight - var useDefaultTextHeight = GetValue$15(config, 'useDefaultTextHeight', false); - maxLines = GetValue$15(config, 'maxLines', 0); + var useDefaultTextHeight = GetValue$16(config, 'useDefaultTextHeight', false); + maxLines = GetValue$16(config, 'maxLines', 0); if (this.fixedHeight > 0 && !useDefaultTextHeight) { var innerHeight = this.fixedHeight - paddingVertical; if (maxLines > 0) { @@ -22487,13 +22690,13 @@ // Calculate maxLines if (this.fixedHeight > 0) { // Calculate maxLines via lineHeight, in fixedHeight mode - maxLines = GetValue$15(config, 'maxLines'); + maxLines = GetValue$16(config, 'maxLines'); if (maxLines === undefined) { var innerHeight = this.fixedHeight - paddingVertical; maxLines = Math.floor(innerHeight / lineHeight); } } else { - maxLines = GetValue$15(config, 'maxLines', 0); // Default is show all lines + maxLines = GetValue$16(config, 'maxLines', 0); // Default is show all lines } } @@ -22504,7 +22707,7 @@ var showAllLines = maxLines === 0; // Get wrapWidth - var wrapWidth = GetValue$15(config, 'wrapWidth', undefined); + var wrapWidth = GetValue$16(config, 'wrapWidth', undefined); if (wrapWidth === undefined) { if (this.fixedWidth > 0) { wrapWidth = this.fixedWidth - paddingHorizontal; @@ -22513,10 +22716,10 @@ } } - var letterSpacing = GetValue$15(config, 'letterSpacing', 0); - var hAlign = GetValue$15(config, 'hAlign', 0); - var vAlign = GetValue$15(config, 'vAlign', 0); - var charWrap = GetValue$15(config, 'charWrap', false); + var letterSpacing = GetValue$16(config, 'letterSpacing', 0); + var hAlign = GetValue$16(config, 'hAlign', 0); + var vAlign = GetValue$16(config, 'vAlign', 0); + var charWrap = GetValue$16(config, 'charWrap', false); var result = CreateWrapResultData({ // Override properties callback: 'runWordWrap', @@ -22704,18 +22907,18 @@ } }; - var GetValue$14 = Phaser.Utils.Objects.GetValue; + var GetValue$15 = Phaser.Utils.Objects.GetValue; var RunVerticalWrap$1 = function RunVerticalWrap(config) { // Parse parameters - var startIndex = GetValue$14(config, 'start', 0); - SetPadding$1(this.wrapPadding, GetValue$14(config, 'padding', 0)); + var startIndex = GetValue$15(config, 'start', 0); + SetPadding$1(this.wrapPadding, GetValue$15(config, 'padding', 0)); var paddingVertical = this.padding.top + this.padding.bottom + this.wrapPadding.top + this.wrapPadding.bottom; var paddingHorizontal = this.padding.left + this.padding.right + this.wrapPadding.left + this.wrapPadding.right; - var lineWidth = GetValue$14(config, 'lineWidth', undefined); + var lineWidth = GetValue$15(config, 'lineWidth', undefined); var maxLines; if (lineWidth === undefined) { // Calculate lineWidth via maxLines, in fixedWidth mode - maxLines = GetValue$14(config, 'maxLines', 0); + maxLines = GetValue$15(config, 'maxLines', 0); if (this.fixedWidth > 0) { var innerWidth = this.fixedWidth - paddingHorizontal; lineWidth = innerWidth / maxLines; @@ -22725,22 +22928,22 @@ } else { if (this.fixedWidth > 0) { // Calculate maxLines via lineWidth, in fixedWidth mode - maxLines = GetValue$14(config, 'maxLines', undefined); + maxLines = GetValue$15(config, 'maxLines', undefined); if (maxLines === undefined) { var innerWidth = this.fixedWidth - paddingHorizontal; maxLines = Math.floor(innerWidth / lineWidth) + 1; } } else { - maxLines = GetValue$14(config, 'maxLines', 0); // Default is show all lines + maxLines = GetValue$15(config, 'maxLines', 0); // Default is show all lines } } var showAllLines = maxLines === 0; // Get fixedCharacterHeight - var fixedCharacterHeight = GetValue$14(config, 'fixedCharacterHeight', undefined); + var fixedCharacterHeight = GetValue$15(config, 'fixedCharacterHeight', undefined); if (fixedCharacterHeight === undefined) { - var charPerLine = GetValue$14(config, 'charPerLine', undefined); + var charPerLine = GetValue$15(config, 'charPerLine', undefined); if (charPerLine !== undefined) { var innerHeight = this.fixedHeight - paddingVertical; fixedCharacterHeight = Math.floor(innerHeight / charPerLine); @@ -22748,7 +22951,7 @@ } // Get wrapHeight - var wrapHeight = GetValue$14(config, 'wrapHeight', undefined); + var wrapHeight = GetValue$15(config, 'wrapHeight', undefined); if (wrapHeight === undefined) { if (this.fixedHeight > 0) { wrapHeight = this.fixedHeight - paddingVertical; @@ -22757,10 +22960,10 @@ } } - var letterSpacing = GetValue$14(config, 'letterSpacing', 0); - var rtl = GetValue$14(config, 'rtl', true); - var hAlign = GetValue$14(config, 'hAlign', rtl ? 2 : 0); - var vAlign = GetValue$14(config, 'vAlign', 0); + var letterSpacing = GetValue$15(config, 'letterSpacing', 0); + var rtl = GetValue$15(config, 'rtl', true); + var hAlign = GetValue$15(config, 'hAlign', rtl ? 2 : 0); + var vAlign = GetValue$15(config, 'vAlign', 0); var result = CreateWrapResultData({ // Override properties callback: 'runVerticalWrap', @@ -22892,11 +23095,11 @@ return RunVerticalWrap$1.call(this, Merge(config, this.wrapConfig)); }; - var GetValue$13 = Phaser.Utils.Objects.GetValue; + var GetValue$14 = Phaser.Utils.Objects.GetValue; var RunWrap = function RunWrap(config) { - var wrapCallback = GetValue$13(this.wrapConfig, 'callback'); + var wrapCallback = GetValue$14(this.wrapConfig, 'callback'); if (!wrapCallback) { - wrapCallback = GetValue$13(config, 'callback', this.runWordWrap); + wrapCallback = GetValue$14(config, 'callback', this.runWordWrap); } if (typeof wrapCallback === 'string') { wrapCallback = this[wrapCallback]; @@ -23443,7 +23646,7 @@ }(); var IsPlainObject$d = Phaser.Utils.Objects.IsPlainObject; - var GetValue$12 = Phaser.Utils.Objects.GetValue; + var GetValue$13 = Phaser.Utils.Objects.GetValue; var DynamicText = /*#__PURE__*/function (_Canvas) { _inherits(DynamicText, _Canvas); var _super = _createSuper(DynamicText); @@ -23452,14 +23655,14 @@ _classCallCheck(this, DynamicText); if (IsPlainObject$d(x)) { config = x; - x = GetValue$12(config, 'x', 0); - y = GetValue$12(config, 'y', 0); - fixedWidth = GetValue$12(config, 'width', 0); - fixedHeight = GetValue$12(config, 'height', 0); + x = GetValue$13(config, 'x', 0); + y = GetValue$13(config, 'y', 0); + fixedWidth = GetValue$13(config, 'width', 0); + fixedHeight = GetValue$13(config, 'height', 0); } else if (IsPlainObject$d(fixedWidth)) { config = fixedWidth; - fixedWidth = GetValue$12(config, 'width', 0); - fixedHeight = GetValue$12(config, 'height', 0); + fixedWidth = GetValue$13(config, 'width', 0); + fixedHeight = GetValue$13(config, 'height', 0); } var width = fixedWidth === 0 ? 1 : fixedWidth; var height = fixedHeight === 0 ? 1 : fixedHeight; @@ -23468,23 +23671,23 @@ _this.autoRound = true; _this.padding = SetPadding$1(); _this.wrapPadding = SetPadding$1(); - var textStyleConfig = GetValue$12(config, 'style', undefined); + var textStyleConfig = GetValue$13(config, 'style', undefined); _this.defaultTextStyle = new TextStyle(null, textStyleConfig); _this.textStyle = _this.defaultTextStyle.clone(); - _this.setTestString(GetValue$12(config, 'testString', '|MÉqgy')); + _this.setTestString(GetValue$13(config, 'testString', '|MÉqgy')); _this._textOX = 0; _this._textOY = 0; - _this.background = new Background(_assertThisInitialized(_this), GetValue$12(config, 'background', undefined)); - _this.innerBounds = new InnerBounds(_assertThisInitialized(_this), GetValue$12(config, 'innerBounds', undefined)); + _this.background = new Background(_assertThisInitialized(_this), GetValue$13(config, 'background', undefined)); + _this.innerBounds = new InnerBounds(_assertThisInitialized(_this), GetValue$13(config, 'innerBounds', undefined)); _this.children = []; _this.lastAppendedChildren = []; _this.lastOverChild = null; _this.poolManager = new PoolManager(config); _this.setFixedSize(fixedWidth, fixedHeight); - _this.setPadding(GetValue$12(config, 'padding', 0)); - _this.setWrapConfig(GetValue$12(config, 'wrap', undefined)); - _this.setChildrenInteractiveEnable(GetValue$12(config, 'childrenInteractive', false)); - var text = GetValue$12(config, 'text', undefined); + _this.setPadding(GetValue$13(config, 'padding', 0)); + _this.setWrapConfig(GetValue$13(config, 'wrap', undefined)); + _this.setChildrenInteractiveEnable(GetValue$13(config, 'childrenInteractive', false)); + var text = GetValue$13(config, 'text', undefined); if (text) { _this.setText(text); } @@ -23605,20 +23808,20 @@ return gameObject; }; - var GetValue$11 = Phaser.Utils.Objects.GetValue; + var GetValue$12 = Phaser.Utils.Objects.GetValue; var BuildLabelConfig = function BuildLabelConfig(scene, config, creators) { config = config ? DeepClone(config) : {}; - var createBackground = GetValue$11(creators, 'background', CreateBackground$2); - var createText = GetValue$11(creators, 'text', CreateText); - var createIcon = GetValue$11(creators, 'icon', CreateImage); - var createAction = GetValue$11(creators, 'action', CreateImage); + var createBackground = GetValue$12(creators, 'background', CreateBackground$2); + var createText = GetValue$12(creators, 'text', CreateText); + var createIcon = GetValue$12(creators, 'icon', CreateImage); + var createAction = GetValue$12(creators, 'action', CreateImage); if (createBackground) { config.background = createBackground(scene, config.background); } else { delete config.background; } if (createText) { - var wrapText = GetValue$11(config, 'wrapText', false); + var wrapText = GetValue$12(config, 'wrapText', false); if (wrapText) { if (wrapText === true) { wrapText = 'word'; @@ -24692,7 +24895,7 @@ Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha; - var GetValue$10 = Phaser.Utils.Objects.GetValue; + var GetValue$11 = Phaser.Utils.Objects.GetValue; var RoundRectangle = /*#__PURE__*/function (_PathBase) { _inherits(RoundRectangle, _PathBase); var _super = _createSuper(RoundRectangle); @@ -24854,10 +25057,10 @@ this.radiusBL = value; this.radiusBR = value; } else { - this.radiusTL = GetValue$10(value, 'tl', 0); - this.radiusTR = GetValue$10(value, 'tr', 0); - this.radiusBL = GetValue$10(value, 'bl', 0); - this.radiusBR = GetValue$10(value, 'br', 0); + this.radiusTL = GetValue$11(value, 'tl', 0); + this.radiusTR = GetValue$11(value, 'tr', 0); + this.radiusBL = GetValue$11(value, 'bl', 0); + this.radiusBR = GetValue$11(value, 'br', 0); } } }, { @@ -25141,7 +25344,7 @@ } }; - var GetValue$$ = Phaser.Utils.Objects.GetValue; + var GetValue$10 = Phaser.Utils.Objects.GetValue; var IsPlainObject$c = Phaser.Utils.Objects.IsPlainObject; var DegToRad = Phaser.Math.DegToRad; var RadToDeg = Phaser.Math.RadToDeg; @@ -25288,21 +25491,21 @@ var config = left; // If they specify x and/or y this applies to all - var x = GetValue$$(config, 'x', null); + var x = GetValue$10(config, 'x', null); if (x !== null) { left = x; right = x; } else { - left = GetValue$$(config, 'left', 0); - right = GetValue$$(config, 'right', left); + left = GetValue$10(config, 'left', 0); + right = GetValue$10(config, 'right', left); } - var y = GetValue$$(config, 'y', null); + var y = GetValue$10(config, 'y', null); if (y !== null) { top = y; bottom = y; } else { - top = GetValue$$(config, 'top', 0); - bottom = GetValue$$(config, 'bottom', top); + top = GetValue$10(config, 'top', 0); + bottom = GetValue$10(config, 'bottom', top); } } else { if (left === undefined) { @@ -25553,7 +25756,7 @@ } }; - var GetValue$_ = Phaser.Utils.Objects.GetValue; + var GetValue$$ = Phaser.Utils.Objects.GetValue; var Folder$1 = /*#__PURE__*/function (_Sizer) { _inherits(Folder, _Sizer); var _super = _createSuper(Folder); @@ -25581,15 +25784,15 @@ // title var defaultAlign = _this.orientation === 1 ? 'left' : 'top'; - var align = GetValue$_(config, 'align.title', defaultAlign); - var expand = GetValue$_(config, 'expand.title', true); + var align = GetValue$$(config, 'align.title', defaultAlign); + var expand = GetValue$$(config, 'expand.title', true); _this.add(title, { proportion: 0, align: align, expand: expand }); - var toggleByTarget = GetValue$_(config, 'toggleByTarget', undefined); - var toggleClickConfig = GetValue$_(config, 'toggleClickConfig'); + var toggleByTarget = GetValue$$(config, 'toggleByTarget', undefined); + var toggleClickConfig = GetValue$$(config, 'toggleClickConfig'); if (toggleByTarget === undefined) { toggleByTarget = title; } @@ -25601,13 +25804,13 @@ // child _this.childTransition = new Transition(child); - var customOrigin = GetValue$_(config, 'customChildOrigin', false); + var customOrigin = GetValue$$(config, 'customChildOrigin', false); if (!customOrigin) { var origin = !_this.rtl ? 0 : 1; child.setOrigin(origin); } - var align = GetValue$_(config, 'align.child', 'left'); - var expand = GetValue$_(config, 'expand.child', true); + var align = GetValue$$(config, 'align.child', 'left'); + var expand = GetValue$$(config, 'expand.child', true); var proportion = expand ? 1 : 0; _this.add(child, { proportion: proportion, @@ -25618,10 +25821,10 @@ _this.addChildrenMap('child', child); _this.addChildrenMap('background', background); var transitionConfig = config.transition; - _this.setTransitionDuration(GetValue$_(transitionConfig, 'duration', 200)); - _this.setExpandCallback(GetValue$_(transitionConfig, 'expandCallback', undefined)); - _this.setCollapseCallback(GetValue$_(transitionConfig, 'collapseCallback', undefined)); - _this.reLayoutTarget = GetValue$_(config, 'reLayoutTarget', undefined); + _this.setTransitionDuration(GetValue$$(transitionConfig, 'duration', 200)); + _this.setExpandCallback(GetValue$$(transitionConfig, 'expandCallback', undefined)); + _this.setCollapseCallback(GetValue$$(transitionConfig, 'collapseCallback', undefined)); + _this.reLayoutTarget = GetValue$$(config, 'reLayoutTarget', undefined); var onExpandStart = config.onExpandStart; if (onExpandStart) { _this.on('expand.start', onExpandStart); @@ -25688,10 +25891,10 @@ }(Folder$1); Object.assign(Folder.prototype, BindingTargetMethods$3, InputRowTitleWidthMethods$1); - var GetValue$Z = Phaser.Utils.Objects.GetValue; + var GetValue$_ = Phaser.Utils.Objects.GetValue; var CreateFolder = function CreateFolder(scene, config, style) { // Create Folder-title - var titleStyle = GetValue$Z(style, 'title') || {}; + var titleStyle = GetValue$_(style, 'title') || {}; var title = new FolderTitle(scene, titleStyle); scene.add.existing(title); title.on('folder.expand', function () { @@ -25700,12 +25903,12 @@ title.setExpandedState(false); }); var tweakerConfig = { - root: GetValue$Z(style, 'root'), - styles: GetValue$Z(style, 'tweaker'), - space: GetValue$Z(style, 'space') || {} + root: GetValue$_(style, 'root'), + styles: GetValue$_(style, 'tweaker'), + space: GetValue$_(style, 'space') || {} }; var child = CreateTweaker(scene, tweakerConfig); - var backgroundStyle = GetValue$Z(style, 'background'); + var backgroundStyle = GetValue$_(style, 'background'); var background = CreateBackground$1(scene, config, backgroundStyle); var folder = new Folder(scene, { orientation: 1, @@ -25713,19 +25916,19 @@ child: child, background: background, transition: { - duration: GetValue$Z(style, 'transition.duration', 200) + duration: GetValue$_(style, 'transition.duration', 200) } }); scene.add.existing(folder); return folder; }; - var GetValue$Y = Phaser.Utils.Objects.GetValue; + var GetValue$Z = Phaser.Utils.Objects.GetValue; var AddFolder = function AddFolder(config) { var scene = this.scene; // Create folder - var folderStyle = GetValue$Y(this.styles, 'folder') || {}; + var folderStyle = GetValue$Z(this.styles, 'folder') || {}; folderStyle.tweaker = this.styles; folderStyle.root = this.root; var folder = CreateFolder(scene, config, folderStyle); @@ -25739,7 +25942,7 @@ // Set content folder.setTitle(config); - var expanded = GetValue$Y(config, 'expanded', true); + var expanded = GetValue$Z(config, 'expanded', true); if (expanded) { folder.expand(0); } else { @@ -26008,13 +26211,13 @@ } }; - var GetValue$X = Phaser.Utils.Objects.GetValue; + var GetValue$Y = Phaser.Utils.Objects.GetValue; var ButtonsTypeMethods = { setButtonsType: function setButtonsType(config) { if (config === undefined) { config = {}; } - var buttonsType = GetValue$X(config, 'buttonsType', config.type); + var buttonsType = GetValue$Y(config, 'buttonsType', config.type); this.buttonsType = buttonsType; if (!this.buttonsType) { return this; @@ -26022,11 +26225,11 @@ // Assign this.setValueCallback, this.setValueCallbackScope var setValueCallback, setValueCallbackScope; - setValueCallback = GetValue$X(config, 'setValueCallback', undefined); - setValueCallbackScope = GetValue$X(config, 'setValueCallbackScope', undefined); + setValueCallback = GetValue$Y(config, 'setValueCallback', undefined); + setValueCallbackScope = GetValue$Y(config, 'setValueCallbackScope', undefined); if (setValueCallback === undefined) { - setValueCallback = GetValue$X(config, 'setButtonStateCallback', undefined); - setValueCallbackScope = GetValue$X(config, 'setButtonStateCallbackScope', undefined); + setValueCallback = GetValue$Y(config, 'setButtonStateCallback', undefined); + setValueCallbackScope = GetValue$Y(config, 'setButtonStateCallbackScope', undefined); } this.setValueCallback = setValueCallback; this.setValueCallbackScope = setValueCallbackScope; @@ -26327,7 +26530,7 @@ } }; - var GetValue$W = Phaser.Utils.Objects.GetValue; + var GetValue$X = Phaser.Utils.Objects.GetValue; var Buttons$1 = /*#__PURE__*/function (_Sizer) { _inherits(Buttons, _Sizer); var _super = _createSuper(Buttons); @@ -26349,18 +26552,18 @@ _this.type = 'rexButtons'; _this.buttonGroup = new ButtonGroup({ parent: _assertThisInitialized(_this), - eventEmitter: GetValue$W(config, 'eventEmitter', _assertThisInitialized(_this)), - groupName: GetValue$W(config, 'groupName', undefined), - clickConfig: GetValue$W(config, 'click', undefined) + eventEmitter: GetValue$X(config, 'eventEmitter', _assertThisInitialized(_this)), + groupName: GetValue$X(config, 'groupName', undefined), + clickConfig: GetValue$X(config, 'click', undefined) }).setButtonsType(config); // Add elements - var background = GetValue$W(config, 'background', undefined); - var buttons = GetValue$W(config, 'buttons', undefined); + var background = GetValue$X(config, 'background', undefined); + var buttons = GetValue$X(config, 'buttons', undefined); // Buttons properties - _this.buttonsExpand = GetValue$W(config, 'expand', false); - _this.buttonsAlign = GetValue$W(config, 'align', undefined); // undefined/left/top: no space + _this.buttonsExpand = GetValue$X(config, 'expand', false); + _this.buttonsAlign = GetValue$X(config, 'align', undefined); // undefined/left/top: no space if (background) { _this.addBackground(background); @@ -26670,7 +26873,7 @@ }; var IsPlainObject$b = Phaser.Utils.Objects.IsPlainObject; - var GetValue$V = Phaser.Utils.Objects.GetValue; + var GetValue$W = Phaser.Utils.Objects.GetValue; var ALIGN_CENTER$2 = Phaser.Display.Align.CENTER; var Add$5 = function Add(gameObject, paddingConfig, childKey, index) { if (gameObject === '\n') { @@ -26680,9 +26883,9 @@ AddChild$2.call(this, gameObject); if (IsPlainObject$b(paddingConfig)) { var config = paddingConfig; - paddingConfig = GetValue$V(config, 'padding', 0); - childKey = GetValue$V(config, 'key', undefined); - index = GetValue$V(config, 'index', undefined); + paddingConfig = GetValue$W(config, 'padding', 0); + childKey = GetValue$W(config, 'key', undefined); + index = GetValue$W(config, 'index', undefined); } if (paddingConfig === undefined) { paddingConfig = 0; @@ -26798,7 +27001,7 @@ }; var IsPlainObject$a = Phaser.Utils.Objects.IsPlainObject; - var GetValue$U = Phaser.Utils.Objects.GetValue; + var GetValue$V = Phaser.Utils.Objects.GetValue; var FixWidthSizer = /*#__PURE__*/function (_BaseSizer) { _inherits(FixWidthSizer, _BaseSizer); var _super = _createSuper(FixWidthSizer); @@ -26807,26 +27010,26 @@ _classCallCheck(this, FixWidthSizer); if (IsPlainObject$a(x)) { config = x; - x = GetValue$U(config, 'x', 0); - y = GetValue$U(config, 'y', 0); - minWidth = GetValue$U(config, 'width', undefined); - minHeight = GetValue$U(config, 'height', undefined); + x = GetValue$V(config, 'x', 0); + y = GetValue$V(config, 'y', 0); + minWidth = GetValue$V(config, 'width', undefined); + minHeight = GetValue$V(config, 'height', undefined); } else if (IsPlainObject$a(minWidth)) { config = minWidth; - minWidth = GetValue$U(config, 'width', undefined); - minHeight = GetValue$U(config, 'height', undefined); + minWidth = GetValue$V(config, 'width', undefined); + minHeight = GetValue$V(config, 'height', undefined); } _this = _super.call(this, scene, x, y, minWidth, minHeight, config); _this.type = 'rexFixWidthSizer'; _this.sizerChildren = []; - _this.setOrientation(GetValue$U(config, 'orientation', 0)); - _this.setItemSpacing(GetValue$U(config, 'space.item', 0)); - _this.setLineSpacing(GetValue$U(config, 'space.line', 0)); - _this.setIntentLeft(GetValue$U(config, 'space.indentLeftOdd', 0), GetValue$U(config, 'space.indentLeftEven', 0)); - _this.setIntentTop(GetValue$U(config, 'space.indentTopOdd', 0), GetValue$U(config, 'space.indentTopEven', 0)); - _this.setAlign(GetValue$U(config, 'align', 0)); - _this.setJustifyPercentage(GetValue$U(config, 'justifyPercentage', 0.25)); - _this.setRTL(GetValue$U(config, 'rtl', false)); + _this.setOrientation(GetValue$V(config, 'orientation', 0)); + _this.setItemSpacing(GetValue$V(config, 'space.item', 0)); + _this.setLineSpacing(GetValue$V(config, 'space.line', 0)); + _this.setIntentLeft(GetValue$V(config, 'space.indentLeftOdd', 0), GetValue$V(config, 'space.indentLeftEven', 0)); + _this.setIntentTop(GetValue$V(config, 'space.indentTopOdd', 0), GetValue$V(config, 'space.indentTopEven', 0)); + _this.setAlign(GetValue$V(config, 'align', 0)); + _this.setJustifyPercentage(GetValue$V(config, 'justifyPercentage', 0.25)); + _this.setRTL(GetValue$V(config, 'rtl', false)); _this.addChildrenMap('items', _this.sizerChildren); return _this; } @@ -27004,7 +27207,7 @@ } }; - var GetValue$T = Phaser.Utils.Objects.GetValue; + var GetValue$U = Phaser.Utils.Objects.GetValue; var Buttons = /*#__PURE__*/function (_FixWidthSizer) { _inherits(Buttons, _FixWidthSizer); var _super = _createSuper(Buttons); @@ -27027,17 +27230,17 @@ _this.type = 'rexFixWidthButtons'; _this.buttonGroup = new ButtonGroup({ parent: _assertThisInitialized(_this), - eventEmitter: GetValue$T(config, 'eventEmitter', _assertThisInitialized(_this)), - groupName: GetValue$T(config, 'groupName', undefined), - clickConfig: GetValue$T(config, 'click', undefined) + eventEmitter: GetValue$U(config, 'eventEmitter', _assertThisInitialized(_this)), + groupName: GetValue$U(config, 'groupName', undefined), + clickConfig: GetValue$U(config, 'click', undefined) }).setButtonsType(config); // Add elements - var background = GetValue$T(config, 'background', undefined); - var buttons = GetValue$T(config, 'buttons', undefined); + var background = GetValue$U(config, 'background', undefined); + var buttons = GetValue$U(config, 'buttons', undefined); // Buttons properties - _this.buttonsAlign = GetValue$T(config, 'align', undefined); + _this.buttonsAlign = GetValue$U(config, 'align', undefined); if (background) { _this.addBackground(background); } @@ -27205,23 +27408,23 @@ }; var IsPlainObject$9 = Phaser.Utils.Objects.IsPlainObject; - var GetValue$S = Phaser.Utils.Objects.GetValue; + var GetValue$T = Phaser.Utils.Objects.GetValue; var ALIGN_CENTER$1 = Phaser.Display.Align.CENTER; var UUID$1 = Phaser.Utils.String.UUID; var Add$3 = function Add(gameObject, childKey, align, padding, expand, minWidth, minHeight, offsetX, offsetY) { AddChild$2.call(this, gameObject); if (IsPlainObject$9(childKey)) { var config = childKey; - childKey = GetValue$S(config, 'key', undefined); - align = GetValue$S(config, 'align', ALIGN_CENTER$1); - offsetX = GetValue$S(config, 'offsetX', 0); - offsetY = GetValue$S(config, 'offsetY', 0); - padding = GetValue$S(config, 'padding', 0); - expand = GetValue$S(config, 'expand', true); + childKey = GetValue$T(config, 'key', undefined); + align = GetValue$T(config, 'align', ALIGN_CENTER$1); + offsetX = GetValue$T(config, 'offsetX', 0); + offsetY = GetValue$T(config, 'offsetY', 0); + padding = GetValue$T(config, 'padding', 0); + expand = GetValue$T(config, 'expand', true); if (!gameObject.isRexSizer) { // Get minWidth,minHeight from config - minWidth = GetValue$S(config, 'minWidth', gameObject._minWidth); - minHeight = GetValue$S(config, 'minHeight', gameObject._minHeighted); + minWidth = GetValue$T(config, 'minWidth', gameObject._minWidth); + minHeight = GetValue$T(config, 'minHeight', gameObject._minHeighted); } } var hasValidKey = childKey !== undefined; @@ -27261,8 +27464,8 @@ config.alignOffsetY = offsetY; config.padding = GetBoundsConfig(padding); if (IsPlainObject$9(expand)) { - config.expandWidth = GetValue$S(expand, 'width', false); - config.expandHeight = GetValue$S(expand, 'height', false); + config.expandWidth = GetValue$T(expand, 'width', false); + config.expandHeight = GetValue$T(expand, 'height', false); } else { config.expandWidth = expand; config.expandHeight = expand; @@ -27356,7 +27559,7 @@ }; var IsPlainObject$8 = Phaser.Utils.Objects.IsPlainObject; - var GetValue$R = Phaser.Utils.Objects.GetValue; + var GetValue$S = Phaser.Utils.Objects.GetValue; var OverlapSizer = /*#__PURE__*/function (_BaseSizer) { _inherits(OverlapSizer, _BaseSizer); var _super = _createSuper(OverlapSizer); @@ -27365,14 +27568,14 @@ _classCallCheck(this, OverlapSizer); if (IsPlainObject$8(x)) { config = x; - x = GetValue$R(config, 'x', 0); - y = GetValue$R(config, 'y', 0); - minWidth = GetValue$R(config, 'width', undefined); - minHeight = GetValue$R(config, 'height', undefined); + x = GetValue$S(config, 'x', 0); + y = GetValue$S(config, 'y', 0); + minWidth = GetValue$S(config, 'width', undefined); + minHeight = GetValue$S(config, 'height', undefined); } else if (IsPlainObject$8(minWidth)) { config = minWidth; - minWidth = GetValue$R(config, 'width', undefined); - minHeight = GetValue$R(config, 'height', undefined); + minWidth = GetValue$S(config, 'width', undefined); + minHeight = GetValue$S(config, 'height', undefined); } _this = _super.call(this, scene, x, y, minWidth, minHeight, config); _this.type = 'rexOverlapSizer'; @@ -27462,7 +27665,7 @@ }; Object.assign(methods$9, AddChildMethods$1); - var GetValue$Q = Phaser.Utils.Objects.GetValue; + var GetValue$R = Phaser.Utils.Objects.GetValue; var Pages = /*#__PURE__*/function (_OverlapSizer) { _inherits(Pages, _OverlapSizer); var _super = _createSuper(Pages); @@ -27474,8 +27677,8 @@ _this.childrenMap = _this.sizerChildren; _this._previousKey = undefined; _this._currentKey = undefined; - _this.setSwapMode(GetValue$Q(config, 'swapMode', 0)); - _this.setFadeInDuration(GetValue$Q(config, 'fadeIn', 0)); + _this.setSwapMode(GetValue$R(config, 'swapMode', 0)); + _this.setFadeInDuration(GetValue$R(config, 'fadeIn', 0)); return _this; } _createClass(Pages, [{ @@ -27549,14 +27752,14 @@ }; var IsPlainObject$7 = Phaser.Utils.Objects.IsPlainObject; - var GetValue$P = Phaser.Utils.Objects.GetValue; + var GetValue$Q = Phaser.Utils.Objects.GetValue; var UUID = Phaser.Utils.String.UUID; var AddPage = function AddPage(key, tabGameObject, pageGameObject) { if (IsPlainObject$7(key)) { var config = key; - key = GetValue$P(config, 'key'); - tabGameObject = GetValue$P(config, 'tab'); - pageGameObject = GetValue$P(config, 'page'); + key = GetValue$Q(config, 'key'); + tabGameObject = GetValue$Q(config, 'tab'); + pageGameObject = GetValue$Q(config, 'page'); } if (!key) { key = UUID(); @@ -27654,7 +27857,7 @@ }; Object.assign(methods$8, SwapPageMethods, RemovePageMethods); - var GetValue$O = Phaser.Utils.Objects.GetValue; + var GetValue$P = Phaser.Utils.Objects.GetValue; var SizerAdd = Sizer.prototype.add; var TabPages$1 = /*#__PURE__*/function (_Sizer) { _inherits(TabPages, _Sizer); @@ -27665,23 +27868,23 @@ if (config === undefined) { config = {}; } - var tabsPosition = GetValue$O(config, 'tabPosition', 'top'); + var tabsPosition = GetValue$P(config, 'tabPosition', 'top'); var sizerOrientation = tabsPosition === 'left' || tabsPosition === 'right' ? 'x' : 'y'; config.orientation = sizerOrientation; _this = _super.call(this, scene, config); _this.type = 'rexTabPages'; // Add elements - var background = GetValue$O(config, 'background', undefined); + var background = GetValue$P(config, 'background', undefined); if (background) { _this.addBackground(background); } - var pagesConfig = GetValue$O(config, 'pages'); + var pagesConfig = GetValue$P(config, 'pages'); var pages = new Pages(scene, pagesConfig); scene.add.existing(pages); var isHorizontalTabs = sizerOrientation === 'y'; - var wrapTabs = isHorizontalTabs ? GetValue$O(config, 'wrapTabs', false) : false; - var tabsConfig = GetValue$O(config, 'tabs', undefined); + var wrapTabs = isHorizontalTabs ? GetValue$P(config, 'wrapTabs', false) : false; + var tabsConfig = GetValue$P(config, 'tabs', undefined); if (tabsConfig === undefined) { tabsConfig = {}; } @@ -27690,8 +27893,8 @@ tabsConfig.buttonsType = 'radio'; var tabs = new ButtonsClass(scene, tabsConfig); scene.add.existing(tabs); - var tabsExpand = wrapTabs ? true : GetValue$O(config, 'expand.tabs', false); - var tabAlign = GetValue$O(config, 'align.tabs', 'left'); + var tabsExpand = wrapTabs ? true : GetValue$P(config, 'expand.tabs', false); + var tabAlign = GetValue$P(config, 'align.tabs', 'left'); switch (tabsPosition) { case 'top': case 'left': @@ -27859,16 +28062,16 @@ return gameObject; }; - var GetValue$N = Phaser.Utils.Objects.GetValue; + var GetValue$O = Phaser.Utils.Objects.GetValue; var CreateTab = function CreateTab(scene, config, style) { var tabPages = new TabPages(scene, style); scene.add.existing(tabPages); - var tabConfig = GetValue$N(style, 'tab'); + var tabConfig = GetValue$O(style, 'tab'); var tweakerConfig = { - root: GetValue$N(style, 'root'), - styles: GetValue$N(style, 'tweaker') + root: GetValue$O(style, 'root'), + styles: GetValue$O(style, 'tweaker') }; - var pages = GetValue$N(config, 'pages') || []; + var pages = GetValue$O(config, 'pages') || []; for (var i = 0, cnt = pages.length; i < cnt; i++) { var page = pages[i]; tabPages.addPage({ @@ -27887,12 +28090,12 @@ return tabPages; }; - var GetValue$M = Phaser.Utils.Objects.GetValue; + var GetValue$N = Phaser.Utils.Objects.GetValue; var AddTab = function AddTab(config) { var scene = this.scene; // Create tab - var tabStyle = GetValue$M(this.styles, 'tab') || {}; + var tabStyle = GetValue$N(this.styles, 'tab') || {}; tabStyle.tweaker = this.styles; tabStyle.root = this.root; var tab = CreateTab(scene, config, tabStyle); @@ -27903,7 +28106,7 @@ this.add(tab, { expand: true }); - var pagesConfig = GetValue$M(config, 'pages') || []; + var pagesConfig = GetValue$N(config, 'pages') || []; var pages = []; var shownPageIndex = 0; for (var i = 0, cnt = pagesConfig.length; i < cnt; i++) { @@ -27922,7 +28125,7 @@ return pages; }; - var GetValue$L = Phaser.Utils.Objects.GetValue; + var GetValue$M = Phaser.Utils.Objects.GetValue; var BindingTargetMethods$1 = { setupBinding: function setupBinding() { var inputField = this.childrenMap.inputField; @@ -27956,8 +28159,8 @@ return this; }, setValueCallbacks: function setValueCallbacks(config) { - this.onGetValue = GetValue$L(config, 'onGetValue'); - this.onSetValue = GetValue$L(config, 'onSetValue'); + this.onGetValue = GetValue$M(config, 'onGetValue'); + this.onSetValue = GetValue$M(config, 'onSetValue'); return this; }, getTargetValue: function getTargetValue() { @@ -28052,7 +28255,7 @@ } }; - var GetValue$K = Phaser.Utils.Objects.GetValue; + var GetValue$L = Phaser.Utils.Objects.GetValue; var InputRow = /*#__PURE__*/function (_Sizer) { _inherits(InputRow, _Sizer); var _super = _createSuper(InputRow); @@ -28067,8 +28270,8 @@ var inputTitle = config.inputTitle; var inputField = config.inputField; var background = config.background; - var proportion = GetValue$K(config, 'proportion.title', 0); - var titleSpace = GetValue$K(config, 'space.title', 0); + var proportion = GetValue$L(config, 'proportion.title', 0); + var titleSpace = GetValue$L(config, 'space.title', 0); var padding; if (_this.orientation === 0) { padding = { @@ -28088,7 +28291,7 @@ if (defaultProportion === undefined) { defaultProportion = config.parentOrientation === 1 ? 1 : 0; } - var proportion = GetValue$K(config, 'proportion.inputField', defaultProportion); + var proportion = GetValue$L(config, 'proportion.inputField', defaultProportion); _this.add(inputField, { proportion: proportion, expand: true @@ -28296,7 +28499,7 @@ return inputField; }; - var GetValue$J = Phaser.Utils.Objects.GetValue; + var GetValue$K = Phaser.Utils.Objects.GetValue; var CreateInputRow = function CreateInputRow(scene, config, style) { // InputField var inputField = CreateInputField.call(this, scene, config, style); @@ -28306,11 +28509,11 @@ } // Title - var titleStyle = GetValue$J(style, 'title') || {}; + var titleStyle = GetValue$K(style, 'title') || {}; var inputTitle = CreateTitleLabel(scene, config, titleStyle); // Background - var backgroundStyle = GetValue$J(style, 'background') || {}; + var backgroundStyle = GetValue$K(style, 'background') || {}; var background = CreateBackground$2(scene, backgroundStyle); var inputRow = new InputRow(scene, _objectSpread2(_objectSpread2(_objectSpread2({}, style), config), {}, { // config can overwrite style @@ -28393,24 +28596,24 @@ return gameObject; }; - var GetValue$I = Phaser.Utils.Objects.GetValue; + var GetValue$J = Phaser.Utils.Objects.GetValue; var CreateButtons$2 = function CreateButtons(scene, config) { - var wrap = GetValue$I(config, 'wrap', false); + var wrap = GetValue$J(config, 'wrap', false); var ButtonClass = wrap ? Buttons : Buttons$1; var gameObject = new ButtonClass(scene, config); scene.add.existing(gameObject); return gameObject; }; - var GetValue$H = Phaser.Utils.Objects.GetValue; + var GetValue$I = Phaser.Utils.Objects.GetValue; var CreateButtons$1 = function CreateButtons(scene, config, style) { // Title - var titleStyle = GetValue$H(style, 'title') || {}; + var titleStyle = GetValue$I(style, 'title') || {}; var title = CreateTitleLabel(scene, config, titleStyle); // Buttons var buttonsConfig = config.buttons; - var buttonStyle = GetValue$H(style, 'button') || {}; + var buttonStyle = GetValue$I(style, 'button') || {}; var buttons = []; for (var i = 0, cnt = buttonsConfig.length; i < cnt; i++) { var button = CreateLabel(scene, buttonStyle); @@ -28422,12 +28625,12 @@ var buttonsSizer = CreateButtons$2(scene, { buttons: buttons, expand: true, - wrap: GetValue$H(config, 'wrap', false) + wrap: GetValue$I(config, 'wrap', false) }); buttonsSizer.defaultProportion = 1; // Background - var backgroundStyle = GetValue$H(style, 'background') || {}; + var backgroundStyle = GetValue$I(style, 'background') || {}; var background = CreateRoundRectangle(scene, backgroundStyle); // InputRow @@ -28444,7 +28647,7 @@ return inputRow; }; - var GetValue$G = Phaser.Utils.Objects.GetValue; + var GetValue$H = Phaser.Utils.Objects.GetValue; var AddButtons = function AddButtons(config) { var scene = this.scene; if (config === undefined) { @@ -28454,7 +28657,7 @@ delete config.bindingTarget; // Create buttons - var buttonsStyle = GetValue$G(this.styles, 'inputRow') || {}; + var buttonsStyle = GetValue$H(this.styles, 'inputRow') || {}; var buttons = CreateButtons$1(scene, config, buttonsStyle); // Add buttons @@ -28486,12 +28689,12 @@ return this; }; - var GetValue$F = Phaser.Utils.Objects.GetValue; + var GetValue$G = Phaser.Utils.Objects.GetValue; var AddSeparator = function AddSeparator(config) { var scene = this.scene; // Create separator - var separatorStyle = GetValue$F(this.styles, 'separator'); + var separatorStyle = GetValue$G(this.styles, 'separator'); var separator = CreateBackground$1(scene, config, separatorStyle); // Add separator @@ -28565,7 +28768,7 @@ setInputRowTitleWidth: SetInputRowTitleWidth }; - var GetValue$E = Phaser.Utils.Objects.GetValue; + var GetValue$F = Phaser.Utils.Objects.GetValue; var TweakerShell = /*#__PURE__*/function (_Sizer) { _inherits(TweakerShell, _Sizer); var _super = _createSuper(TweakerShell); @@ -28583,13 +28786,13 @@ _this = _super.call(this, scene, config); _this.type = 'rexTweakerShell'; _this.root = config.root || _assertThisInitialized(_this); - _this.styles = GetValue$E(config, 'styles') || {}; + _this.styles = GetValue$F(config, 'styles') || {}; _this.styles.orientation = _this.orientation; - _this.itemWidth = GetValue$E(_this.styles, 'itemWidth', 0); + _this.itemWidth = GetValue$F(_this.styles, 'itemWidth', 0); if (_this.root === _assertThisInitialized(_this) && _this.orientation === 1) { - var alignTitle = GetValue$E(config, 'inputRow.alignTitle'); + var alignTitle = GetValue$F(config, 'inputRow.alignTitle'); if (alignTitle === undefined) { - var titleProportion = GetValue$E(_this.styles, 'inputRow.proportion.title'); + var titleProportion = GetValue$F(_this.styles, 'inputRow.proportion.title'); alignTitle = !titleProportion; } else { if (alignTitle) { @@ -28681,7 +28884,7 @@ LastOpenedEditor = undefined; }; - var GetValue$D = Phaser.Utils.Objects.GetValue; + var GetValue$E = Phaser.Utils.Objects.GetValue; var SetProperties = function SetProperties(properties, config, out) { if (out === undefined) { out = {}; @@ -28689,7 +28892,7 @@ var property, value; for (var key in properties) { property = properties[key]; // [propName, defaultValue] - value = GetValue$D(config, key, property[1]); + value = GetValue$E(config, key, property[1]); if (value !== undefined) { out[property[0]] = value; } @@ -28758,12 +28961,12 @@ this.emit('close', this); }; - var GetValue$C = Phaser.Utils.Objects.GetValue; + var GetValue$D = Phaser.Utils.Objects.GetValue; var CreateElement = function CreateElement(parent, config) { var element; - var textType = GetValue$C(config, 'inputType', undefined); + var textType = GetValue$D(config, 'inputType', undefined); if (textType === undefined) { - textType = GetValue$C(config, 'type', 'text'); + textType = GetValue$D(config, 'type', 'text'); } if (textType === 'textarea') { element = document.createElement('textarea'); @@ -28772,7 +28975,7 @@ element = document.createElement('input'); element.type = textType; } - var style = GetValue$C(config, 'style', undefined); + var style = GetValue$D(config, 'style', undefined); // Apply other style properties var elementStyle = element.style; SetProperties(StyleProperties, style, elementStyle); @@ -28846,7 +29049,7 @@ close: Close }; - var GetValue$B = Phaser.Utils.Objects.GetValue; + var GetValue$C = Phaser.Utils.Objects.GetValue; var HiddenTextEditBase = /*#__PURE__*/function (_ComponentBase) { _inherits(HiddenTextEditBase, _ComponentBase); var _super = _createSuper(HiddenTextEditBase); @@ -28856,22 +29059,22 @@ _this = _super.call(this, gameObject); // this.parent = gameObject; - var textType = GetValue$B(config, 'inputType', undefined); + var textType = GetValue$C(config, 'inputType', undefined); if (textType === undefined) { - textType = GetValue$B(config, 'type', 'text'); + textType = GetValue$C(config, 'type', 'text'); } - _this.setEnterCloseEnable(GetValue$B(config, 'enterClose', textType !== 'textarea')); - var onOpen = GetValue$B(config, 'onOpen', undefined); + _this.setEnterCloseEnable(GetValue$C(config, 'enterClose', textType !== 'textarea')); + var onOpen = GetValue$C(config, 'onOpen', undefined); if (!onOpen) { - onOpen = GetValue$B(config, 'onFocus', undefined); + onOpen = GetValue$C(config, 'onFocus', undefined); } _this.onOpenCallback = onOpen; - var onClose = GetValue$B(config, 'onClose', undefined); + var onClose = GetValue$C(config, 'onClose', undefined); if (!onClose) { - onClose = GetValue$B(config, 'onBlur', undefined); + onClose = GetValue$C(config, 'onBlur', undefined); } _this.onCloseCallback = onClose; - _this.onUpdateCallback = GetValue$B(config, 'onUpdate', undefined); + _this.onUpdateCallback = GetValue$C(config, 'onUpdate', undefined); _this.isOpened = false; gameObject.on('pointerdown', function () { this.open(); @@ -29376,7 +29579,7 @@ hiddenTextEdit.prevCursorPosition = null; }; - var GetValue$A = Phaser.Utils.Objects.GetValue; + var GetValue$B = Phaser.Utils.Objects.GetValue; var HiddenTextEdit = /*#__PURE__*/function (_HiddenTextEditBase) { _inherits(HiddenTextEdit, _HiddenTextEditBase); var _super = _createSuper(HiddenTextEdit); @@ -29386,7 +29589,7 @@ _this = _super.call(this, gameObject, config); // this.parent = gameObject; - _this.setSelectAllWhenFocusEnable(GetValue$A(config, 'selectAll', false)); + _this.setSelectAllWhenFocusEnable(GetValue$B(config, 'selectAll', false)); _this.cursorMoveStartIndex = null; _this.prevCursorPosition = null; _this.prevSelectionStart = null; @@ -29485,10 +29688,10 @@ return HiddenTextEdit; }(HiddenTextEditBase); - var GetValue$z = Phaser.Utils.Objects.GetValue; + var GetValue$A = Phaser.Utils.Objects.GetValue; var PropertiesList = ['inputType', 'onOpen', 'onFocus', 'onClose', 'onBlur', 'onUpdate', 'enterClose', 'readOnly', 'maxLength', 'minLength', 'selectAll']; var CreateHiddenTextEdit = function CreateHiddenTextEdit(parent, parentConfig) { - var config = GetValue$z(parentConfig, 'edit'); + var config = GetValue$A(parentConfig, 'edit'); if (config === undefined) { config = {}; } @@ -30752,7 +30955,7 @@ }; var IsPlainObject$5 = Phaser.Utils.Objects.IsPlainObject; - var GetValue$y = Phaser.Utils.Objects.GetValue; + var GetValue$z = Phaser.Utils.Objects.GetValue; var ALIGN_CENTER = Phaser.Display.Align.CENTER; var GetEmptyCellIndex = function GetEmptyCellIndex(columnIndex, rowIndex, cells, columnCount, rowCount) { if (typeof columnIndex === 'number' || typeof rowIndex === 'number') { @@ -30801,12 +31004,12 @@ AddChild$2.call(this, gameObject); if (IsPlainObject$5(columnIndex)) { var config = columnIndex; - columnIndex = GetValue$y(config, 'column', undefined); - rowIndex = GetValue$y(config, 'row', undefined); - align = GetValue$y(config, 'align', ALIGN_CENTER); - paddingConfig = GetValue$y(config, 'padding', 0); - expand = GetValue$y(config, 'expand', false); - childKey = GetValue$y(config, 'key', undefined); + columnIndex = GetValue$z(config, 'column', undefined); + rowIndex = GetValue$z(config, 'row', undefined); + align = GetValue$z(config, 'align', ALIGN_CENTER); + paddingConfig = GetValue$z(config, 'padding', 0); + expand = GetValue$z(config, 'expand', false); + childKey = GetValue$z(config, 'key', undefined); } // Get insert index @@ -30841,8 +31044,8 @@ config.align = align; config.padding = GetBoundsConfig(paddingConfig); if (IsPlainObject$5(expand)) { - config.expandWidth = GetValue$y(expand, 'width', false); - config.expandHeight = GetValue$y(expand, 'height', false); + config.expandWidth = GetValue$z(expand, 'width', false); + config.expandHeight = GetValue$z(expand, 'height', false); } else { config.expandWidth = expand; config.expandHeight = expand; @@ -30947,7 +31150,7 @@ } }; - var GetValue$x = Phaser.Utils.Objects.GetValue; + var GetValue$y = Phaser.Utils.Objects.GetValue; var ResetGrid = function ResetGrid(columnCount, rowCount, columnProportions, rowProportions, space) { if (columnProportions === undefined) { columnProportions = 0; @@ -30991,8 +31194,8 @@ this.rowHeight.length = rowCount; // space - this.setColumnSpace(GetValue$x(space, 'column', 0)); - this.setRowSpace(GetValue$x(space, 'row', 0)); + this.setColumnSpace(GetValue$y(space, 'column', 0)); + this.setRowSpace(GetValue$y(space, 'row', 0)); var scene = this.scene; var createCellContainerCallback = this.createCellContainerCallback; if (createCellContainerCallback) { @@ -31106,7 +31309,7 @@ }; var IsPlainObject$4 = Phaser.Utils.Objects.IsPlainObject; - var GetValue$w = Phaser.Utils.Objects.GetValue; + var GetValue$x = Phaser.Utils.Objects.GetValue; var GridSizer = /*#__PURE__*/function (_BaseSizer) { _inherits(GridSizer, _BaseSizer); var _super = _createSuper(GridSizer); @@ -31115,41 +31318,41 @@ _classCallCheck(this, GridSizer); if (IsPlainObject$4(x)) { config = x; - x = GetValue$w(config, 'x', 0); - y = GetValue$w(config, 'y', 0); - minWidth = GetValue$w(config, 'width', undefined); - minHeight = GetValue$w(config, 'height', undefined); - columnCount = GetValue$w(config, 'column', config.col || 0); - rowCount = GetValue$w(config, 'row', 0); - columnProportions = GetValue$w(config, 'columnProportions', 0); - rowProportions = GetValue$w(config, 'rowProportions', 0); + x = GetValue$x(config, 'x', 0); + y = GetValue$x(config, 'y', 0); + minWidth = GetValue$x(config, 'width', undefined); + minHeight = GetValue$x(config, 'height', undefined); + columnCount = GetValue$x(config, 'column', config.col || 0); + rowCount = GetValue$x(config, 'row', 0); + columnProportions = GetValue$x(config, 'columnProportions', 0); + rowProportions = GetValue$x(config, 'rowProportions', 0); } else if (IsPlainObject$4(minWidth)) { config = minWidth; - minWidth = GetValue$w(config, 'width', undefined); - minHeight = GetValue$w(config, 'height', undefined); - columnCount = GetValue$w(config, 'column', config.col || 0); - rowCount = GetValue$w(config, 'row', 0); - columnProportions = GetValue$w(config, 'columnProportions', 0); - rowProportions = GetValue$w(config, 'rowProportions', 0); + minWidth = GetValue$x(config, 'width', undefined); + minHeight = GetValue$x(config, 'height', undefined); + columnCount = GetValue$x(config, 'column', config.col || 0); + rowCount = GetValue$x(config, 'row', 0); + columnProportions = GetValue$x(config, 'columnProportions', 0); + rowProportions = GetValue$x(config, 'rowProportions', 0); } else if (IsPlainObject$4(columnCount)) { config = columnCount; - columnCount = GetValue$w(config, 'column', config.col || 0); - rowCount = GetValue$w(config, 'row', 0); - columnProportions = GetValue$w(config, 'columnProportions', 0); - rowProportions = GetValue$w(config, 'rowProportions', 0); + columnCount = GetValue$x(config, 'column', config.col || 0); + rowCount = GetValue$x(config, 'row', 0); + columnProportions = GetValue$x(config, 'columnProportions', 0); + rowProportions = GetValue$x(config, 'rowProportions', 0); } else if (IsPlainObject$4(columnProportions)) { config = columnProportions; - columnProportions = GetValue$w(config, 'columnProportions', 0); - rowProportions = GetValue$w(config, 'rowProportions', 0); + columnProportions = GetValue$x(config, 'columnProportions', 0); + rowProportions = GetValue$x(config, 'rowProportions', 0); } _this = _super.call(this, scene, x, y, minWidth, minHeight, config); _this.type = 'rexGridSizer'; _this.sizerChildren = []; _this.addChildrenMap('items', _this.sizerChildren); - _this.setCreateCellContainerCallback(GetValue$w(config, 'createCellContainerCallback')); - _this.setIndentLeft(GetValue$w(config, 'space.indentLeftOdd', 0), GetValue$w(config, 'space.indentLeftEven', 0)); - _this.setIndentTop(GetValue$w(config, 'space.indentTopOdd', 0), GetValue$w(config, 'space.indentTopEven', 0)); - _this.resetGrid(columnCount, rowCount, columnProportions, rowProportions, GetValue$w(config, 'space', undefined)); + _this.setCreateCellContainerCallback(GetValue$x(config, 'createCellContainerCallback')); + _this.setIndentLeft(GetValue$x(config, 'space.indentLeftOdd', 0), GetValue$x(config, 'space.indentLeftEven', 0)); + _this.setIndentTop(GetValue$x(config, 'space.indentTopOdd', 0), GetValue$x(config, 'space.indentTopEven', 0)); + _this.resetGrid(columnCount, rowCount, columnProportions, rowProportions, GetValue$x(config, 'space', undefined)); return _this; } _createClass(GridSizer, [{ @@ -31249,12 +31452,12 @@ }(Base$1); Object.assign(GridSizer.prototype, methods$6); - var GetValue$v = Phaser.Utils.Objects.GetValue; + var GetValue$w = Phaser.Utils.Objects.GetValue; var AddChild = function AddChild(topPatent, childParent, config) { - var childConfig = GetValue$v(config, 'child'); - var child = GetValue$v(childConfig, 'gameObject', undefined); + var childConfig = GetValue$w(config, 'child'); + var child = GetValue$w(childConfig, 'gameObject', undefined); if (child) { - var childSpace = GetValue$v(config, 'space.child', 0); + var childSpace = GetValue$w(config, 'space.child', 0); topPatent.childMargin = {}; var childMargin = topPatent.childMargin; var childPadding = {}; @@ -31278,35 +31481,35 @@ } else { switch (topPatent.scrollMode) { case 0: - childMargin.top = GetValue$v(childSpace, 'top', 0); - childMargin.bottom = GetValue$v(childSpace, 'bottom', 0); - childPadding.left = GetValue$v(childSpace, 'left', 0); - childPadding.right = GetValue$v(childSpace, 'right', 0); + childMargin.top = GetValue$w(childSpace, 'top', 0); + childMargin.bottom = GetValue$w(childSpace, 'bottom', 0); + childPadding.left = GetValue$w(childSpace, 'left', 0); + childPadding.right = GetValue$w(childSpace, 'right', 0); break; case 1: - childMargin.top = GetValue$v(childSpace, 'left', 0); - childMargin.bottom = GetValue$v(childSpace, 'right', 0); - childPadding.top = GetValue$v(childSpace, 'top', 0); - childPadding.bottom = GetValue$v(childSpace, 'bottom', 0); + childMargin.top = GetValue$w(childSpace, 'left', 0); + childMargin.bottom = GetValue$w(childSpace, 'right', 0); + childPadding.top = GetValue$w(childSpace, 'top', 0); + childPadding.bottom = GetValue$w(childSpace, 'bottom', 0); break; default: // 2 - childMargin.top = GetValue$v(childSpace, 'top', 0); - childMargin.bottom = GetValue$v(childSpace, 'bottom', 0); - childMargin.left = GetValue$v(childSpace, 'left', 0); - childMargin.right = GetValue$v(childSpace, 'right', 0); + childMargin.top = GetValue$w(childSpace, 'top', 0); + childMargin.bottom = GetValue$w(childSpace, 'bottom', 0); + childMargin.left = GetValue$w(childSpace, 'left', 0); + childMargin.right = GetValue$w(childSpace, 'right', 0); break; } } childParent.add(child, { column: 1, row: 1, - align: GetValue$v(childConfig, 'align', 'center'), + align: GetValue$w(childConfig, 'align', 'center'), padding: childPadding, expand: { - width: GetValue$v(childConfig, 'expandWidth', true), + width: GetValue$w(childConfig, 'expandWidth', true), // Private - height: GetValue$v(childConfig, 'expandHeight', true) // Private + height: GetValue$w(childConfig, 'expandHeight', true) // Private } }); } @@ -31414,7 +31617,7 @@ easeValueRepeat: EaseValueRepeat }; - var GetValue$u = Phaser.Utils.Objects.GetValue; + var GetValue$v = Phaser.Utils.Objects.GetValue; var Clamp$5 = Phaser.Math.Clamp; function ProgressBase (BaseClass) { var ProgressBase = /*#__PURE__*/function (_BaseClass) { @@ -31427,13 +31630,13 @@ _createClass(ProgressBase, [{ key: "bootProgressBase", value: function bootProgressBase(config) { - this.eventEmitter = GetValue$u(config, 'eventEmitter', this); - var callback = GetValue$u(config, 'valuechangeCallback', null); + this.eventEmitter = GetValue$v(config, 'eventEmitter', this); + var callback = GetValue$v(config, 'valuechangeCallback', null); if (callback !== null) { - var scope = GetValue$u(config, 'valuechangeCallbackScope', undefined); + var scope = GetValue$v(config, 'valuechangeCallbackScope', undefined); this.eventEmitter.on('valuechange', callback, scope); } - this.setEaseValuePropName('value').setEaseValueDuration(GetValue$u(config, 'easeValue.duration', 0)).setEaseValueFunction(GetValue$u(config, 'easeValue.ease', 'Linear')); + this.setEaseValuePropName('value').setEaseValueDuration(GetValue$v(config, 'easeValue.duration', 0)).setEaseValueFunction(GetValue$v(config, 'easeValue.ease', 'Linear')); return this; } }, { @@ -31667,7 +31870,7 @@ this.resetChildPositionState(indicator); }; - var GetValue$t = Phaser.Utils.Objects.GetValue; + var GetValue$u = Phaser.Utils.Objects.GetValue; var IsPlainObject$3 = Phaser.Utils.Objects.IsPlainObject; var Clamp$4 = Phaser.Math.Clamp; var SnapTo = Phaser.Math.Snap.To; @@ -31681,13 +31884,13 @@ _this = _super.call(this, scene, config); _this.type = 'rexSlider'; _this.bootProgressBase(config); - _this.reverseAxis = GetValue$t(config, 'reverseAxis', false); + _this.reverseAxis = GetValue$u(config, 'reverseAxis', false); // Add elements - var background = GetValue$t(config, 'background', undefined); - var track = GetValue$t(config, 'track', undefined); - var indicator = GetValue$t(config, 'indicator', undefined); - var thumb = GetValue$t(config, 'thumb', undefined); + var background = GetValue$u(config, 'background', undefined); + var track = GetValue$u(config, 'track', undefined); + var indicator = GetValue$u(config, 'indicator', undefined); + var thumb = GetValue$u(config, 'thumb', undefined); if (background) { if (IsPlainObject$3(background)) { background = CreateBackground$2(scene, background); @@ -31720,7 +31923,7 @@ } // Input - var inputMode = GetValue$t(config, 'input', 0); + var inputMode = GetValue$u(config, 'input', 0); if (typeof inputMode === 'string') { inputMode = INPUTMODE[inputMode]; } @@ -31758,9 +31961,9 @@ _this.addChildrenMap('track', track); _this.addChildrenMap('indicator', indicator); _this.addChildrenMap('thumb', thumb); - _this.setEnable(GetValue$t(config, 'enable', undefined)); - _this.setGap(GetValue$t(config, 'gap', undefined)); - _this.setValue(GetValue$t(config, 'value', 0), GetValue$t(config, 'min', undefined), GetValue$t(config, 'max', undefined)); + _this.setEnable(GetValue$u(config, 'enable', undefined)); + _this.setGap(GetValue$u(config, 'gap', undefined)); + _this.setValue(GetValue$u(config, 'value', 0), GetValue$u(config, 'min', undefined), GetValue$u(config, 'max', undefined)); return _this; } _createClass(Slider, [{ @@ -31827,7 +32030,7 @@ }; Object.assign(Slider.prototype, methods$5); - var GetValue$s = Phaser.Utils.Objects.GetValue; + var GetValue$t = Phaser.Utils.Objects.GetValue; var ScrollBar = /*#__PURE__*/function (_Sizer) { _inherits(ScrollBar, _Sizer); var _super = _createSuper(ScrollBar); @@ -31839,12 +32042,12 @@ _this.type = 'rexScrollBar'; // Add elements - var background = GetValue$s(config, 'background', undefined); - var buttonsConfig = GetValue$s(config, 'buttons', undefined); - var button0 = GetValue$s(buttonsConfig, 'top', GetValue$s(buttonsConfig, 'left', undefined)); - var button1 = GetValue$s(buttonsConfig, 'bottom', GetValue$s(buttonsConfig, 'right', undefined)); + var background = GetValue$t(config, 'background', undefined); + var buttonsConfig = GetValue$t(config, 'buttons', undefined); + var button0 = GetValue$t(buttonsConfig, 'top', GetValue$t(buttonsConfig, 'left', undefined)); + var button1 = GetValue$t(buttonsConfig, 'bottom', GetValue$t(buttonsConfig, 'right', undefined)); var slider, - sliderConfig = GetValue$s(config, 'slider', undefined); + sliderConfig = GetValue$t(config, 'slider', undefined); if (background) { _this.addBackground(background); } @@ -31865,10 +32068,10 @@ sliderConfig.value = null; var proportion; if (_this.orientation === 0) { - var sliderWidth = GetValue$s(sliderConfig, 'width', undefined); + var sliderWidth = GetValue$t(sliderConfig, 'width', undefined); proportion = sliderWidth === undefined ? 1 : 0; } else { - var sliderHeight = GetValue$s(sliderConfig, 'height', undefined); + var sliderHeight = GetValue$t(sliderConfig, 'height', undefined); proportion = sliderHeight === undefined ? 1 : 0; } slider = new Slider(scene, sliderConfig); @@ -31892,14 +32095,14 @@ _this.addChildrenMap('background', background); _this.addChildrenMap('slider', slider); _this.addChildrenMap('buttons', buttons); - var callback = GetValue$s(config, 'valuechangeCallback', null); + var callback = GetValue$t(config, 'valuechangeCallback', null); if (callback !== null) { - var scope = GetValue$s(config, 'valuechangeCallbackScope', undefined); + var scope = GetValue$t(config, 'valuechangeCallbackScope', undefined); _this.on('valuechange', callback, scope); } - _this.setEnable(GetValue$s(config, 'enable', undefined)); - _this.setValue(GetValue$s(config, 'value', 0)); - _this.setScrollStep(GetValue$s(buttonsConfig, 'step', 0.01)); + _this.setEnable(GetValue$t(config, 'enable', undefined)); + _this.setValue(GetValue$t(config, 'value', 0)); + _this.setScrollStep(GetValue$t(buttonsConfig, 'step', 0.01)); return _this; } _createClass(ScrollBar, [{ @@ -32201,7 +32404,7 @@ return State; }(FSM); - var GetValue$r = Phaser.Utils.Objects.GetValue; + var GetValue$s = Phaser.Utils.Objects.GetValue; var DistanceBetween = Phaser.Math.Distance.Between; var DragSpeed = /*#__PURE__*/function (_ComponentBase) { _inherits(DragSpeed, _ComponentBase); @@ -32213,7 +32416,7 @@ // this.parent = gameObject; _this._enable = undefined; - gameObject.setInteractive(GetValue$r(config, "inputConfig", undefined)); + gameObject.setInteractive(GetValue$s(config, "inputConfig", undefined)); _this.resetFromJSON(config); _this.boot(); return _this; @@ -32231,9 +32434,9 @@ this.localX = undefined; this.localY = undefined; this.justMoved = false; - this.setEnable(GetValue$r(o, 'enable', true)); - this.holdThreshold = GetValue$r(o, 'holdThreshold', 50); // ms - this.pointerOutReleaseEnable = GetValue$r(o, 'pointerOutRelease', true); + this.setEnable(GetValue$s(o, 'enable', true)); + this.holdThreshold = GetValue$s(o, 'holdThreshold', 50); // ms + this.pointerOutReleaseEnable = GetValue$s(o, 'pointerOutRelease', true); return this; } }, { @@ -32430,7 +32633,7 @@ return DragSpeed; }(ComponentBase); - var GetValue$q = Phaser.Utils.Objects.GetValue; + var GetValue$r = Phaser.Utils.Objects.GetValue; var Movement = /*#__PURE__*/function () { function Movement(config) { _classCallCheck(this, Movement); @@ -32439,9 +32642,9 @@ _createClass(Movement, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.setValue(GetValue$q(o, 'value', 0)); - this.setSpeed(GetValue$q(o, 'speed', 0)); - this.setAcceleration(GetValue$q(o, 'acceleration', 0)); + this.setValue(GetValue$r(o, 'value', 0)); + this.setSpeed(GetValue$r(o, 'speed', 0)); + this.setAcceleration(GetValue$r(o, 'acceleration', 0)); return this; } }, { @@ -32579,7 +32782,7 @@ return SlowDown; }(); - var GetValue$p = Phaser.Utils.Objects.GetValue; + var GetValue$q = Phaser.Utils.Objects.GetValue; var Clamp$3 = Phaser.Math.Clamp; var Scroller = /*#__PURE__*/function (_ComponentBase) { _inherits(Scroller, _ComponentBase); @@ -32590,34 +32793,34 @@ _this = _super.call(this, gameObject, config); // this.parent = gameObject; - var enable = GetValue$p(config, 'enable', true); + var enable = GetValue$q(config, 'enable', true); _this._state = new State(_assertThisInitialized(_this), { enable: enable, eventEmitter: false }); var drapSpeedConfig = { - inputConfig: GetValue$p(config, 'inputConfig', undefined), + inputConfig: GetValue$q(config, 'inputConfig', undefined), enable: enable, - pointerOutRelease: GetValue$p(config, 'pointerOutRelease', true), + pointerOutRelease: GetValue$q(config, 'pointerOutRelease', true), eventEmitter: false }; _this.dragState = new DragSpeed(gameObject, drapSpeedConfig); _this._enable = undefined; _this._value = undefined; _this._slowDown = new SlowDown(); - var callback = GetValue$p(config, 'valuechangeCallback', null); + var callback = GetValue$q(config, 'valuechangeCallback', null); if (callback !== null) { - var scope = GetValue$p(config, 'valuechangeCallbackScope', undefined); + var scope = GetValue$q(config, 'valuechangeCallbackScope', undefined); _this.on('valuechange', callback, scope); } - callback = GetValue$p(config, 'overmaxCallback', null); + callback = GetValue$q(config, 'overmaxCallback', null); if (callback !== null) { - var scope = GetValue$p(config, 'overmaxCallbackScope', undefined); + var scope = GetValue$q(config, 'overmaxCallbackScope', undefined); _this.on('overmax', callback, scope); } - callback = GetValue$p(config, 'overminCallback', null); + callback = GetValue$q(config, 'overminCallback', null); if (callback !== null) { - var scope = GetValue$p(config, 'overminCallbackScope', undefined); + var scope = GetValue$q(config, 'overminCallbackScope', undefined); _this.on('overmin', callback, scope); } _this.resetFromJSON(config); @@ -32627,21 +32830,21 @@ _createClass(Scroller, [{ key: "resetFromJSON", value: function resetFromJSON(o) { - this.setOrientationMode(GetValue$p(o, 'orientation', 0)); - this.setDragThreshold(GetValue$p(o, 'threshold', 10)); - this.setSlidingDeceleration(GetValue$p(o, 'slidingDeceleration', 5000)); - this.setBackDeceleration(GetValue$p(o, 'backDeceleration', 2000)); - var dragRate = GetValue$p(o, 'dragRate', 1); - dragRate = dragRate * (GetValue$p(o, 'dragReverse', false) ? -1 : 1); + this.setOrientationMode(GetValue$q(o, 'orientation', 0)); + this.setDragThreshold(GetValue$q(o, 'threshold', 10)); + this.setSlidingDeceleration(GetValue$q(o, 'slidingDeceleration', 5000)); + this.setBackDeceleration(GetValue$q(o, 'backDeceleration', 2000)); + var dragRate = GetValue$q(o, 'dragRate', 1); + dragRate = dragRate * (GetValue$q(o, 'dragReverse', false) ? -1 : 1); this.setDragRate(dragRate); - var bounds = GetValue$p(o, 'bounds', undefined); + var bounds = GetValue$q(o, 'bounds', undefined); if (bounds) { this.setBounds(bounds); } else { - this.setBounds(GetValue$p(o, 'max', 0), GetValue$p(o, 'min', 0)); + this.setBounds(GetValue$q(o, 'max', 0), GetValue$q(o, 'min', 0)); } - this.setValue(GetValue$p(o, 'value', this.maxValue || 0)); - this.setEnable(GetValue$p(o, "enable", true)); + this.setValue(GetValue$q(o, 'value', this.maxValue || 0)); + this.setEnable(GetValue$q(o, "enable", true)); return this; } }, { @@ -32973,7 +33176,7 @@ horizontal: 1 }; - var GetValue$o = Phaser.Utils.Objects.GetValue; + var GetValue$p = Phaser.Utils.Objects.GetValue; var MouseWheelScroller = /*#__PURE__*/function (_ComponentBase) { _inherits(MouseWheelScroller, _ComponentBase); var _super = _createSuper(MouseWheelScroller); @@ -32984,18 +33187,18 @@ // this.parent = gameObject; if (_this.parent !== _this.scene) { - _this.focusMode = GetValue$o(config, 'focus', true); + _this.focusMode = GetValue$p(config, 'focus', true); } else { _this.focusMode = false; } - _this.setSpeed(GetValue$o(config, 'speed', 0.1)); - _this.setEnable(GetValue$o(config, 'enable', true)); + _this.setSpeed(GetValue$p(config, 'speed', 0.1)); + _this.setEnable(GetValue$p(config, 'enable', true)); if (!_this.focusMode) { // Register on scene _this.scene.input.on('wheel', _this.onSceneScroll, _assertThisInitialized(_this)); } else { var gameObject = _this.parent; - gameObject.setInteractive(GetValue$o(config, "inputConfig", undefined)).on('wheel', function (pointer, dx, dy, dz, event) { + gameObject.setInteractive(GetValue$p(config, "inputConfig", undefined)).on('wheel', function (pointer, dx, dy, dz, event) { if (!this.enable) { return; } @@ -33044,7 +33247,7 @@ return MouseWheelScroller; }(ComponentBase); - var GetValue$n = Phaser.Utils.Objects.GetValue; + var GetValue$o = Phaser.Utils.Objects.GetValue; var AddSlider = function AddSlider(topPatent, sliderParent, axis, config) { axis = axis.toUpperCase(); var isAxisY = axis === 'Y'; @@ -33053,12 +33256,12 @@ var sliderConfig, slider; var sliderConfigKey = "slider".concat(axis); if (isScrollXYMode) { - sliderConfig = GetValue$n(config, sliderConfigKey, undefined); + sliderConfig = GetValue$o(config, sliderConfigKey, undefined); } else { if (config.hasOwnProperty(sliderConfigKey)) { - sliderConfig = GetValue$n(config, sliderConfigKey, undefined); + sliderConfig = GetValue$o(config, sliderConfigKey, undefined); } else { - sliderConfig = GetValue$n(config, 'slider', undefined); + sliderConfig = GetValue$o(config, 'slider', undefined); } } if (sliderConfig) { @@ -33068,7 +33271,7 @@ sliderConfig.orientation = isAxisY ? 1 : 0; slider = CreateScrollbar(topPatent.scene, sliderConfig); var column, row, padding; - var sliderPosition = GetValue$n(sliderConfig, 'position', 0); + var sliderPosition = GetValue$o(sliderConfig, 'position', 0); if (typeof sliderPosition === 'string') { sliderPosition = SLIDER_POSITION_MAP[sliderPosition]; } @@ -33078,15 +33281,15 @@ 2. space.slider 3. space.child */ - var sliderPadding = GetValue$n(config, "space.slider".concat(axis), undefined); + var sliderPadding = GetValue$o(config, "space.slider".concat(axis), undefined); if (sliderPadding === undefined) { - sliderPadding = GetValue$n(config, 'space.slider', undefined); + sliderPadding = GetValue$o(config, 'space.slider', undefined); if (sliderPadding === undefined) { if (isScrollXYMode) { sliderPadding = 0; } else { // Legacy - sliderPadding = GetValue$n(config, 'space.child', 0); + sliderPadding = GetValue$o(config, 'space.child', 0); } } } @@ -33131,9 +33334,9 @@ padding: padding, expand: true }); - topPatent["hideUnscrollableSlider".concat(axis)] = GetValue$n(sliderConfig, 'hideUnscrollableSlider', false); - topPatent["adaptThumb".concat(axis, "SizeMode")] = GetValue$n(sliderConfig, 'adaptThumbSize', false); - topPatent["minThumb".concat(axis, "Size")] = GetValue$n(sliderConfig, 'minThumbSize', undefined); + topPatent["hideUnscrollableSlider".concat(axis)] = GetValue$o(sliderConfig, 'hideUnscrollableSlider', false); + topPatent["adaptThumb".concat(axis, "SizeMode")] = GetValue$o(sliderConfig, 'adaptThumbSize', false); + topPatent["minThumb".concat(axis, "Size")] = GetValue$o(sliderConfig, 'minThumbSize', undefined); } else { topPatent["hideUnscrollableSlider".concat(axis)] = false; topPatent["adaptThumb".concat(axis, "SizeMode")] = false; @@ -33142,12 +33345,12 @@ var scrollerConfig, scroller; var scrollerConfigKey = "scroller".concat(axis); if (isScrollXYMode) { - scrollerConfig = GetValue$n(config, scrollerConfigKey, true); + scrollerConfig = GetValue$o(config, scrollerConfigKey, true); } else { if (config.hasOwnProperty(scrollerConfigKey)) { - scrollerConfig = GetValue$n(config, scrollerConfigKey, true); + scrollerConfig = GetValue$o(config, scrollerConfigKey, true); } else { - scrollerConfig = GetValue$n(config, 'scroller', true); + scrollerConfig = GetValue$o(config, 'scroller', true); } } if (scrollerConfig && child) { @@ -33157,7 +33360,7 @@ scrollerConfig.orientation = isAxisY ? 0 : 1; scroller = new Scroller(child, scrollerConfig); } - var mouseWheelScrollerConfig = GetValue$n(config, isScrollXYMode ? "mouseWheelScroller".concat(axis) : 'mouseWheelScroller', false), + var mouseWheelScrollerConfig = GetValue$o(config, isScrollXYMode ? "mouseWheelScroller".concat(axis) : 'mouseWheelScroller', false), mouseWheelScroller; if (mouseWheelScrollerConfig && child) { mouseWheelScroller = new MouseWheelScroller(child, mouseWheelScrollerConfig); @@ -33217,22 +33420,22 @@ top: 1 }; - var GetValue$m = Phaser.Utils.Objects.GetValue; + var GetValue$n = Phaser.Utils.Objects.GetValue; var CreateScrollableSizer = function CreateScrollableSizer(parent, config) { var scene = parent.scene; var columnProportions = [0, 1, 0], rowProportions = [0, 1, 0]; - var parentMinWidth = GetValue$m(config, 'width'); - var parentMinHeight = GetValue$m(config, 'height'); + var parentMinWidth = GetValue$n(config, 'width'); + var parentMinHeight = GetValue$n(config, 'height'); if (!parentMinWidth) { - var expandChildWidth = GetValue$m(config, 'child.expandWidth', true); + var expandChildWidth = GetValue$n(config, 'child.expandWidth', true); if (!expandChildWidth) { columnProportions[1] = 0; // Calculate parent's width by child's width } } if (!parentMinHeight) { - var expandChildHeight = GetValue$m(config, 'child.expandHeight', true); + var expandChildHeight = GetValue$n(config, 'child.expandHeight', true); if (!expandChildHeight) { rowProportions[1] = 0; // Calculate parent's height by child's height } @@ -33451,7 +33654,7 @@ } }; - var GetValue$l = Phaser.Utils.Objects.GetValue; + var GetValue$m = Phaser.Utils.Objects.GetValue; var Clamp$2 = Phaser.Math.Clamp; var Scrollable = /*#__PURE__*/function (_Sizer) { _inherits(Scrollable, _Sizer); @@ -33467,19 +33670,19 @@ var isRevererXY = scrollMode === 1; config.orientation = !isRevererXY ? 1 : 0; _this = _super.call(this, scene, config); - _this.type = GetValue$l(config, 'type', 'rexScrollable'); + _this.type = GetValue$m(config, 'type', 'rexScrollable'); _this.scrollMode = scrollMode; // Add elements // Background - var background = GetValue$l(config, 'background', undefined); + var background = GetValue$m(config, 'background', undefined); if (background) { _this.addBackground(background); } - var header = GetValue$l(config, 'header', undefined); + var header = GetValue$m(config, 'header', undefined); if (header) { - var align = GetValue$l(config, 'align.header', 'center'); - var headerSpace = GetValue$l(config, 'space.header', 0); + var align = GetValue$m(config, 'align.header', 'center'); + var headerSpace = GetValue$m(config, 'space.header', 0); var padding; if (!isRevererXY) { padding = { @@ -33494,7 +33697,7 @@ proportion: 0, align: align, padding: padding, - expand: GetValue$l(config, 'expand.header', true) + expand: GetValue$m(config, 'expand.header', true) }); } var scrollableSizer = CreateScrollableSizer(_assertThisInitialized(_this), config); @@ -33506,10 +33709,10 @@ expand: true }); } - var footer = GetValue$l(config, 'footer', undefined); + var footer = GetValue$m(config, 'footer', undefined); if (footer) { - var align = GetValue$l(config, 'align.footer', 'center'); - var footerSpace = GetValue$l(config, 'space.footer', 0); + var align = GetValue$m(config, 'align.footer', 'center'); + var footerSpace = GetValue$m(config, 'space.footer', 0); var padding; if (!isRevererXY) { padding = { @@ -33524,7 +33727,7 @@ proportion: 0, align: align, padding: padding, - expand: GetValue$l(config, 'expand.footer', true) + expand: GetValue$m(config, 'expand.footer', true) }); } _this.addChildrenMap('background', background); @@ -34084,7 +34287,7 @@ } }; - var GetValue$k = Phaser.Utils.Objects.GetValue; + var GetValue$l = Phaser.Utils.Objects.GetValue; var TextAreaInput = /*#__PURE__*/function (_Scrollable) { _inherits(TextAreaInput, _Scrollable); var _super = _createSuper(TextAreaInput); @@ -34096,7 +34299,7 @@ } // Create inputText - var inputTextConfig = GetValue$k(config, 'text'); + var inputTextConfig = GetValue$l(config, 'text'); var inputText; if (IsGameObject(inputTextConfig)) { inputText = inputTextConfig; @@ -34128,9 +34331,9 @@ expandWidth: expandInputTextWidth, expandHeight: expandInputTextHeight }; - var spaceConfig = GetValue$k(config, 'space', undefined); + var spaceConfig = GetValue$l(config, 'space', undefined); if (spaceConfig) { - spaceConfig.child = GetValue$k(spaceConfig, 'text', 0); + spaceConfig.child = GetValue$l(spaceConfig, 'text', 0); } config.scroller = false; // No scroller supported _this = _super.call(this, scene, config); @@ -34161,7 +34364,7 @@ }, _assertThisInitialized(_this)); // Set initial text if given - var content = GetValue$k(config, 'content', undefined); + var content = GetValue$l(config, 'content', undefined); if (content) { _this.setText(content); } @@ -34332,7 +34535,7 @@ return gameObject; }; - var GetValue$j = Phaser.Utils.Objects.GetValue; + var GetValue$k = Phaser.Utils.Objects.GetValue; var Linear$2 = Phaser.Math.Linear; var SnapFloor = Phaser.Math.Snap.Floor; var SetRange = function SetRange(gameObject, min, max, step) { @@ -34363,10 +34566,10 @@ gameObject.type = 'rexTweaker.RangeInput'; var sliderConfig = style.slider; var trackSizeKey = gameObject.orientation === 0 ? 'track.height' : 'track.width'; - var trackSize = GetValue$j(sliderConfig, trackSizeKey); + var trackSize = GetValue$k(sliderConfig, trackSizeKey); var slider = CreateSlider(scene, sliderConfig); var defaultProportion = style.parentOrientation === 1 ? 2 : 0; - var proportion = GetValue$j(style, 'proportion.range.slider', defaultProportion); + var proportion = GetValue$k(style, 'proportion.range.slider', defaultProportion); var expand = trackSize === undefined; gameObject.add(slider, { proportion: proportion, @@ -34376,7 +34579,7 @@ var inputTextConfig = style.inputNumber || style.inputText; var inputText = CreateInputText(scene, inputTextConfig).setNumberInput(); var defaultProportion = style.parentOrientation === 1 ? 1 : 0; - var proportion = GetValue$j(style, 'proportion.range.inputText', defaultProportion); + var proportion = GetValue$k(style, 'proportion.range.inputText', defaultProportion); gameObject.add(inputText, { proportion: proportion, expand: true, @@ -34475,7 +34678,7 @@ } }; - var GetValue$i = Phaser.Utils.Objects.GetValue; + var GetValue$j = Phaser.Utils.Objects.GetValue; var IsPlainObject$2 = Phaser.Utils.Objects.IsPlainObject; var Clamp$1 = Phaser.Math.Clamp; var ColorInput$1 = /*#__PURE__*/function (_Sizer) { @@ -34492,14 +34695,14 @@ _this.type = 'rexColorInputLite'; // Add elements - var background = GetValue$i(config, 'background', undefined); - var swatchConfig = GetValue$i(config, 'swatch'); + var background = GetValue$j(config, 'background', undefined); + var swatchConfig = GetValue$j(config, 'swatch'); var swatchSize; if (IsPlainObject$2(swatchConfig)) { - swatchSize = GetValue$i(swatchConfig, 'size'); + swatchSize = GetValue$j(swatchConfig, 'size'); } - var swatch = CreateSwatch(scene, GetValue$i(config, 'swatch')); - var inputTextConfig = GetValue$i(config, 'inputText', {}); + var swatch = CreateSwatch(scene, GetValue$j(config, 'swatch')); + var inputTextConfig = GetValue$j(config, 'inputText', {}); var inputText; if (inputTextConfig) { inputText = CreateInputText(scene, inputTextConfig); @@ -34508,13 +34711,13 @@ _this.addBackground(background); } if (swatch) { - swatchSize = GetValue$i(config, 'swatchSize', swatchSize); + swatchSize = GetValue$j(config, 'swatchSize', swatchSize); var squareExpandSwatch; if (swatchSize !== undefined) { ResizeGameObject(swatch, swatchSize, swatchSize); squareExpandSwatch = false; } else { - squareExpandSwatch = GetValue$i(config, 'squareExpandSwatch', true); + squareExpandSwatch = GetValue$j(config, 'squareExpandSwatch', true); } var fitRatio = squareExpandSwatch ? 1 : 0; _this.add(swatch, { @@ -34524,8 +34727,8 @@ }); } if (inputText) { - var proportion = GetValue$i(inputTextConfig, 'width') === undefined ? 1 : 0; - var expand = GetValue$i(inputTextConfig, 'height') === undefined ? true : false; + var proportion = GetValue$j(inputTextConfig, 'width') === undefined ? 1 : 0; + var expand = GetValue$j(inputTextConfig, 'height') === undefined ? true : false; _this.add(inputText, { proportion: proportion, expand: expand @@ -34539,12 +34742,12 @@ this.setValue(inputText.value); }, _assertThisInitialized(_this)); } - var callback = GetValue$i(config, 'valuechangeCallback', null); + var callback = GetValue$j(config, 'valuechangeCallback', null); if (callback !== null) { - var scope = GetValue$i(config, 'valuechangeCallbackScope', undefined); + var scope = GetValue$j(config, 'valuechangeCallbackScope', undefined); _this.on('valuechange', callback, scope); } - _this.setValue(GetValue$i(config, 'value', 0x0)); + _this.setValue(GetValue$j(config, 'value', 0x0)); return _this; } _createClass(ColorInput, [{ @@ -35198,7 +35401,7 @@ return SVPalette; }(OverlapSizer); - var GetValue$h = Phaser.Utils.Objects.GetValue; + var GetValue$i = Phaser.Utils.Objects.GetValue; var ColorPicker = /*#__PURE__*/function (_Sizer) { _inherits(ColorPicker, _Sizer); var _super = _createSuper(ColorPicker); @@ -35210,7 +35413,7 @@ _this.freezePalettes = false; // orientation - var hPalettePosition = GetValue$h(config, 'hPalette.position', 0); + var hPalettePosition = GetValue$i(config, 'hPalette.position', 0); if (typeof hPalettePosition === 'string') { hPalettePosition = HPalettePositionNamesMap[hPalettePosition]; } @@ -35223,17 +35426,17 @@ _this.setOrientation(orientation); // Add elements - var background = GetValue$h(config, 'background', undefined); + var background = GetValue$i(config, 'background', undefined); var hPaletteWidth, hPaletteHeight; if (_this.orientation === 0) { - var hPaletteWidth = GetValue$h(config, 'hPalette.width', undefined); + var hPaletteWidth = GetValue$i(config, 'hPalette.width', undefined); if (hPaletteWidth === undefined) { - hPaletteWidth = GetValue$h(config, 'hPalette.size', 10); + hPaletteWidth = GetValue$i(config, 'hPalette.size', 10); } } else { - hPaletteHeight = GetValue$h(config, 'hPalette.height', undefined); + hPaletteHeight = GetValue$i(config, 'hPalette.height', undefined); if (hPaletteHeight === undefined) { - hPaletteHeight = GetValue$h(config, 'hPalette.size', 10); + hPaletteHeight = GetValue$i(config, 'hPalette.size', 10); } } var hPalette = new HPalette(scene, { @@ -35241,8 +35444,8 @@ height: hPaletteHeight }); scene.add.existing(hPalette); - var svPaletteWidth = GetValue$h(config, 'svPalette.width', undefined); - var svPaletteHeight = GetValue$h(config, 'svPalette.height', undefined); + var svPaletteWidth = GetValue$i(config, 'svPalette.width', undefined); + var svPaletteHeight = GetValue$i(config, 'svPalette.height', undefined); var svPalette = new SVPalette(scene, { width: svPaletteWidth, height: svPaletteHeight @@ -35284,12 +35487,12 @@ _this.addChildrenMap('background', background); _this.addChildrenMap('hPalette', hPalette); _this.addChildrenMap('svPalette', svPalette); - var callback = GetValue$h(config, 'valuechangeCallback', null); + var callback = GetValue$i(config, 'valuechangeCallback', null); if (callback !== null) { - var scope = GetValue$h(config, 'valuechangeCallbackScope', undefined); + var scope = GetValue$i(config, 'valuechangeCallbackScope', undefined); _this.on('valuechange', callback, scope); } - _this.setValue(GetValue$h(config, 'value', 0xffffff)); + _this.setValue(GetValue$i(config, 'value', 0xffffff)); return _this; } _createClass(ColorPicker, [{ @@ -35354,7 +35557,7 @@ right: 3 }; - var GetValue$g = Phaser.Utils.Objects.GetValue; + var GetValue$h = Phaser.Utils.Objects.GetValue; var Color = Phaser.Display.Color; var ColorToRGBA = Phaser.Display.Color.ColorToRGBA; var HSVToRGB = Phaser.Display.Color.HSVToRGB; @@ -35374,8 +35577,8 @@ _this.colorObject = new Color(); // Add elements - var background = GetValue$g(config, 'background', undefined); - var formatLabel = GetValue$g(config, 'formatLabel', undefined); + var background = GetValue$h(config, 'background', undefined); + var formatLabel = GetValue$h(config, 'formatLabel', undefined); if (!IsGameObject(formatLabel)) { formatLabel = CreateLabel(scene, formatLabel).resetDisplayContent(); } @@ -35385,7 +35588,7 @@ components.push(config.inputText1); components.push(config.inputText2); } else { - var inputTextConfig = GetValue$g(config, 'inputText'); + var inputTextConfig = GetValue$h(config, 'inputText'); for (var i = 0; i < 3; i++) { var inputText = CreateInputText(scene, inputTextConfig).setMaxLength(3).setNumberInput(); components.push(inputText); @@ -35394,15 +35597,15 @@ if (background) { _this.addBackground(background); } - var proportion = GetValue$g(config, 'proportion.formatLabel', 0); + var proportion = GetValue$h(config, 'proportion.formatLabel', 0); var defaultExpand = formatLabel.isRexContainerLite ? true : false; - var expand = GetValue$g(config, 'expand.formatLabel', defaultExpand); + var expand = GetValue$h(config, 'expand.formatLabel', defaultExpand); _this.add(formatLabel, { proportion: proportion, expand: expand }); - var proportion = GetValue$g(inputTextConfig, 'width') === undefined ? 1 : 0; - var expand = GetValue$g(inputTextConfig, 'height') === undefined ? true : false; + var proportion = GetValue$h(inputTextConfig, 'width') === undefined ? 1 : 0; + var expand = GetValue$h(inputTextConfig, 'height') === undefined ? true : false; for (var i = 0, cnt = components.length; i < cnt; i++) { _this.add(components[i], { proportion: proportion, @@ -35419,13 +35622,13 @@ this.setValue(this.colorObject.color); }, _assertThisInitialized(_this)); } - var callback = GetValue$g(config, 'valuechangeCallback', null); + var callback = GetValue$h(config, 'valuechangeCallback', null); if (callback !== null) { - var scope = GetValue$g(config, 'valuechangeCallbackScope', undefined); + var scope = GetValue$h(config, 'valuechangeCallbackScope', undefined); _this.on('valuechange', callback, scope); } formatLabel.setText('RGB'); - _this.setValue(GetValue$g(config, 'value', 0xffffff)); + _this.setValue(GetValue$h(config, 'value', 0xffffff)); return _this; } _createClass(ColorComponents, [{ @@ -35528,7 +35731,7 @@ return ColorComponents; }(Sizer); - var GetValue$f = Phaser.Utils.Objects.GetValue; + var GetValue$g = Phaser.Utils.Objects.GetValue; var ColorPickerPanel = /*#__PURE__*/function (_Sizer) { _inherits(ColorPickerPanel, _Sizer); var _super = _createSuper(ColorPickerPanel); @@ -35543,12 +35746,12 @@ _this.type = 'rexColorInput.ColorPickerPanel'; // Add elements - var background = GetValue$f(config, 'background', undefined); + var background = GetValue$g(config, 'background', undefined); var colorPicker = new ColorPicker(scene, { hPalette: config.hPalette || {}, svPalette: config.svPalette || {}, space: { - item: GetValue$f(config, 'space.hPalette', 8) + item: GetValue$g(config, 'space.hPalette', 8) } }); scene.add.existing(colorPicker); @@ -35584,7 +35787,7 @@ this.setValue(value); }, _assertThisInitialized(_this)); } - _this.setValue(GetValue$f(config, 'value', 0xffffff)); + _this.setValue(GetValue$g(config, 'value', 0xffffff)); return _this; } _createClass(ColorPickerPanel, [{ @@ -35694,29 +35897,29 @@ var GetValueFromAliasKeys = function GetValueFromAliasKeys(source, key0, key1, key2, defaultValue) { if (HasValue(source, key0)) { - return GetValue$1O(source, key0); + return GetValue$1P(source, key0); } else if (key1 && HasValue(source, key1)) { - return GetValue$1O(source, key1); + return GetValue$1P(source, key1); } else if (key2 && HasValue(source, key2)) { - return GetValue$1O(source, key2); + return GetValue$1P(source, key2); } else { return defaultValue; } }; - var GetValue$e = Phaser.Utils.Objects.GetValue; + var GetValue$f = Phaser.Utils.Objects.GetValue; var SetPosition = function SetPosition(gameObject, config) { - var expandDirection = GetValue$e(config, 'expandDirection', undefined); + var expandDirection = GetValue$f(config, 'expandDirection', undefined); if (typeof expandDirection === 'string') { expandDirection = ExpandDirections[expandDirection]; } var alignTargetX = GetValueFromAliasKeys(config, 'alignTarget', 'alignTargetX'); - var alignTargetY = GetValue$e(config, 'alignTargetY', alignTargetX); - var alignOffsetX = GetValue$e(config, 'alignOffsetX', 0); - var alignOffsetY = GetValue$e(config, 'alignOffsetY', 0); - var alignSide = GetValue$e(config, 'alignSide', ''); + var alignTargetY = GetValue$f(config, 'alignTargetY', alignTargetX); + var alignOffsetX = GetValue$f(config, 'alignOffsetX', 0); + var alignOffsetY = GetValue$f(config, 'alignOffsetY', 0); + var alignSide = GetValue$f(config, 'alignSide', ''); var alignRight = alignSide.includes('right'); - var positionBounds = GetValue$e(config, 'bounds'); + var positionBounds = GetValue$f(config, 'bounds'); // Expand direction var isExpandDown = expandDirection === 0; @@ -35748,7 +35951,7 @@ up: 1 }; - var GetValue$d = Phaser.Utils.Objects.GetValue; + var GetValue$e = Phaser.Utils.Objects.GetValue; var DropDown = /*#__PURE__*/function (_OpenCloseTransition) { _inherits(DropDown, _OpenCloseTransition); var _super = _createSuper(DropDown); @@ -35782,8 +35985,8 @@ } // Close conditions: - var touchOutsideClose = GetValue$d(config, 'touchOutsideClose', false); - var anyTouchClose = GetValue$d(config, 'anyTouchClose', false); + var touchOutsideClose = GetValue$e(config, 'touchOutsideClose', false); + var anyTouchClose = GetValue$e(config, 'anyTouchClose', false); if (anyTouchClose) { touchOutsideClose = false; } @@ -35889,7 +36092,7 @@ }; Object.assign(methods$3, methods$4); - var GetValue$c = Phaser.Utils.Objects.GetValue; + var GetValue$d = Phaser.Utils.Objects.GetValue; var ColorInput = /*#__PURE__*/function (_ColorInputBase) { _inherits(ColorInput, _ColorInputBase); var _super = _createSuper(ColorInput); @@ -35911,25 +36114,25 @@ var colorPickerConfig = config.colorPicker; var hasColorPicker = colorPickerConfig !== false && colorPickerConfig !== null; if (hasColorPicker) { - _this.setColorPickerSize(GetValue$c(colorPickerConfig, 'width', 160), GetValue$c(colorPickerConfig, 'height', 170)); + _this.setColorPickerSize(GetValue$d(colorPickerConfig, 'width', 160), GetValue$d(colorPickerConfig, 'height', 170)); var createBackgroundCallback; - var background = GetValue$c(colorPickerConfig, 'background'); + var background = GetValue$d(colorPickerConfig, 'background'); if (background) { createBackgroundCallback = function createBackgroundCallback(scene) { return CreateBackground$2(scene, background); }; } else { - createBackgroundCallback = GetValue$c(colorPickerConfig, 'createBackgroundCallback'); + createBackgroundCallback = GetValue$d(colorPickerConfig, 'createBackgroundCallback'); } _this.setCreateColorPickerBackgroundCallback(createBackgroundCallback); - _this.setColorPickerHPalettePosition(GetValue$c(colorPickerConfig, 'hPalettePosition', 0)); - _this.setColorPickerExpandDirection(GetValue$c(colorPickerConfig, 'expandDirection')); - _this.setColorPickerEaseInDuration(GetValue$c(colorPickerConfig, 'easeIn', 200)); - _this.setColorPickerEaseOutDuration(GetValue$c(colorPickerConfig, 'easeOut', 200)); - _this.setColorPickerTransitInCallback(GetValue$c(colorPickerConfig, 'transitIn')); - _this.setColorPickerTransitOutCallback(GetValue$c(colorPickerConfig, 'transitOut')); - _this.setColorPickerBounds(GetValue$c(colorPickerConfig, 'bounds')); - var colorPickerSpaceConfig = GetValue$c(colorPickerConfig, 'space'); + _this.setColorPickerHPalettePosition(GetValue$d(colorPickerConfig, 'hPalettePosition', 0)); + _this.setColorPickerExpandDirection(GetValue$d(colorPickerConfig, 'expandDirection')); + _this.setColorPickerEaseInDuration(GetValue$d(colorPickerConfig, 'easeIn', 200)); + _this.setColorPickerEaseOutDuration(GetValue$d(colorPickerConfig, 'easeOut', 200)); + _this.setColorPickerTransitInCallback(GetValue$d(colorPickerConfig, 'transitIn')); + _this.setColorPickerTransitOutCallback(GetValue$d(colorPickerConfig, 'transitOut')); + _this.setColorPickerBounds(GetValue$d(colorPickerConfig, 'bounds')); + var colorPickerSpaceConfig = GetValue$d(colorPickerConfig, 'space'); if (colorPickerSpaceConfig === undefined) { colorPickerSpaceConfig = { left: 10, @@ -35944,14 +36147,14 @@ var colorComponentsConfig = config.colorComponents; var hasColorComponents = colorComponentsConfig !== false && colorComponentsConfig !== null; if (hasColorPicker && hasColorComponents) { - _this.setColorComponentsHeight(GetValue$c(colorComponentsConfig, 'height', 30)); - _this.setColorComponentsFormatLabelConfig(GetValue$c(colorComponentsConfig, 'formatLabel')); - var colorComponentsInputTextConfig = GetValue$c(colorComponentsConfig, 'inputText'); + _this.setColorComponentsHeight(GetValue$d(colorComponentsConfig, 'height', 30)); + _this.setColorComponentsFormatLabelConfig(GetValue$d(colorComponentsConfig, 'formatLabel')); + var colorComponentsInputTextConfig = GetValue$d(colorComponentsConfig, 'inputText'); if (!colorComponentsInputTextConfig) { - colorComponentsInputTextConfig = GetValue$c(config, 'inputText'); + colorComponentsInputTextConfig = GetValue$d(config, 'inputText'); } _this.setColorComponentsInputTextConfig(colorComponentsInputTextConfig); - var colorComponentsSpace = GetValue$c(colorComponentsConfig, 'space'); + var colorComponentsSpace = GetValue$d(colorComponentsConfig, 'space'); if (colorComponentsSpace === undefined) { colorComponentsSpace = { item: 8 @@ -36182,7 +36385,7 @@ var methods$2 = {}; Object.assign(methods$2, StyleMethods$1, SizeMethods$1, ShapesUpdateMethods$1, CheckerAnimationMethods); - var GetValue$b = Phaser.Utils.Objects.GetValue; + var GetValue$c = Phaser.Utils.Objects.GetValue; var IsPlainObject$1 = Phaser.Utils.Objects.IsPlainObject; var DefaultBoxFillColor = 0x005cb2; var DefaultCheckerColor = 0xffffff; @@ -36194,33 +36397,33 @@ _classCallCheck(this, CheckboxShape); if (IsPlainObject$1(x)) { config = x; - x = GetValue$b(config, 'x', 0); - y = GetValue$b(config, 'y', 0); - width = GetValue$b(config, 'width', 2); - height = GetValue$b(config, 'height', 2); - color = GetValue$b(config, 'color', DefaultBoxFillColor); + x = GetValue$c(config, 'x', 0); + y = GetValue$c(config, 'y', 0); + width = GetValue$c(config, 'width', 2); + height = GetValue$c(config, 'height', 2); + color = GetValue$c(config, 'color', DefaultBoxFillColor); } else if (IsPlainObject$1(color)) { config = color; - color = GetValue$b(config, 'color', DefaultBoxFillColor); + color = GetValue$c(config, 'color', DefaultBoxFillColor); } _this = _super.call(this, scene, x, y, width, height); _this.type = 'rexCheckbox'; if (color === undefined) { color = DefaultBoxFillColor; } - _this.setBoxShape(GetValue$b(config, 'circleBox', false)); - _this.setBoxFillStyle(color, GetValue$b(config, 'boxFillAlpha', 1)); - _this.setUncheckedBoxFillStyle(GetValue$b(config, 'uncheckedColor', null), GetValue$b(config, 'uncheckedBoxFillAlpha', 1)); - _this.setBoxStrokeStyle(GetValue$b(config, 'boxLineWidth', 4), GetValue$b(config, 'boxStrokeColor', color), GetValue$b(config, 'boxStrokeAlpha', 1)); - _this.setUncheckedBoxStrokeStyle(_this.boxLineWidth, GetValue$b(config, 'uncheckedBoxStrokeColor', _this.boxStrokeColor), GetValue$b(config, 'uncheckedBoxStrokeAlpha', _this.boxStrokeAlpha)); - _this.setCheckerStyle(GetValue$b(config, 'checkerColor', DefaultCheckerColor), GetValue$b(config, 'checkerAlpha', 1)); - _this.setBoxSize(GetValue$b(config, 'boxSize', 1)); - _this.setCheckerSize(GetValue$b(config, 'checkerSize', 1)); - _this.setCheckerAnimationDuration(GetValue$b(config, 'animationDuration', 150)); + _this.setBoxShape(GetValue$c(config, 'circleBox', false)); + _this.setBoxFillStyle(color, GetValue$c(config, 'boxFillAlpha', 1)); + _this.setUncheckedBoxFillStyle(GetValue$c(config, 'uncheckedColor', null), GetValue$c(config, 'uncheckedBoxFillAlpha', 1)); + _this.setBoxStrokeStyle(GetValue$c(config, 'boxLineWidth', 4), GetValue$c(config, 'boxStrokeColor', color), GetValue$c(config, 'boxStrokeAlpha', 1)); + _this.setUncheckedBoxStrokeStyle(_this.boxLineWidth, GetValue$c(config, 'uncheckedBoxStrokeColor', _this.boxStrokeColor), GetValue$c(config, 'uncheckedBoxStrokeAlpha', _this.boxStrokeAlpha)); + _this.setCheckerStyle(GetValue$c(config, 'checkerColor', DefaultCheckerColor), GetValue$c(config, 'checkerAlpha', 1)); + _this.setBoxSize(GetValue$c(config, 'boxSize', 1)); + _this.setCheckerSize(GetValue$c(config, 'checkerSize', 1)); + _this.setCheckerAnimationDuration(GetValue$c(config, 'animationDuration', 150)); _this.buildShapes(); - var value = GetValue$b(config, 'checked'); + var value = GetValue$c(config, 'checked'); if (value === undefined) { - value = GetValue$b(config, 'value', false); + value = GetValue$c(config, 'value', false); } _this.setValue(value); return _this; @@ -36296,7 +36499,7 @@ }(BaseShapes); Object.assign(CheckboxShape.prototype, methods$2); - var GetValue$a = Phaser.Utils.Objects.GetValue; + var GetValue$b = Phaser.Utils.Objects.GetValue; var Checkbox = /*#__PURE__*/function (_CheckboxShape) { _inherits(Checkbox, _CheckboxShape); var _super = _createSuper(Checkbox); @@ -36304,11 +36507,11 @@ var _this; _classCallCheck(this, Checkbox); _this = _super.call(this, scene, x, y, width, height, color, config); - _this._click = new Button(_assertThisInitialized(_this), GetValue$a(config, 'click')); + _this._click = new Button(_assertThisInitialized(_this), GetValue$b(config, 'click')); _this._click.on('click', function () { this.toggleValue(); }, _assertThisInitialized(_this)); - _this.setReadOnly(GetValue$a(config, 'readOnly', false)); + _this.setReadOnly(GetValue$b(config, 'readOnly', false)); return _this; } _createClass(Checkbox, [{ @@ -36570,7 +36773,7 @@ return (shade & 0xff) << 16 | (shade & 0xff) << 8 | shade & 0xff; }; - var GetValue$9 = Phaser.Utils.Objects.GetValue; + var GetValue$a = Phaser.Utils.Objects.GetValue; var IsPlainObject = Phaser.Utils.Objects.IsPlainObject; var DefaultTrackFillColor = 0x005cb2; var DefaultThumbFillColor = 0xffffff; @@ -36582,37 +36785,37 @@ _classCallCheck(this, ToggleSwitchShape); if (IsPlainObject(x)) { config = x; - x = GetValue$9(config, 'x', 0); - y = GetValue$9(config, 'y', 0); - width = GetValue$9(config, 'width', 2); - height = GetValue$9(config, 'height', 2); - color = GetValue$9(config, 'color', DefaultTrackFillColor); + x = GetValue$a(config, 'x', 0); + y = GetValue$a(config, 'y', 0); + width = GetValue$a(config, 'width', 2); + height = GetValue$a(config, 'height', 2); + color = GetValue$a(config, 'color', DefaultTrackFillColor); } else if (IsPlainObject(color)) { config = color; - color = GetValue$9(config, 'color', DefaultTrackFillColor); + color = GetValue$a(config, 'color', DefaultTrackFillColor); } _this = _super.call(this, scene, x, y, width, height); _this.type = 'rexToggleSwitch'; if (color === undefined) { color = DefaultTrackFillColor; } - _this.setTrackFillStyle(color, GetValue$9(config, 'trackFillAlpha', 1)); - _this.setFalseValueTrackFillStyle(GetValue$9(config, 'falseValueTrackColor', GrayScale(color)), GetValue$9(config, 'falseValueTrackFillAlpha', 1)); - _this.setThumbStyle(GetValue$9(config, 'thumbColor', DefaultThumbFillColor), GetValue$9(config, 'thumbAlpha', 1)); - _this.setTrackSize(GetValue$9(config, 'trackWidth', 0.9), GetValue$9(config, 'trackHeight', 0.5)); - _this.setTrackRadius(GetValue$9(config, 'trackRadius', _this.trackHeight * 0.5)); - var thumbHeight = GetValue$9(config, 'thumbHeight', undefined); - var thumbWidth = GetValue$9(config, 'thumbWidth', thumbHeight); + _this.setTrackFillStyle(color, GetValue$a(config, 'trackFillAlpha', 1)); + _this.setFalseValueTrackFillStyle(GetValue$a(config, 'falseValueTrackColor', GrayScale(color)), GetValue$a(config, 'falseValueTrackFillAlpha', 1)); + _this.setThumbStyle(GetValue$a(config, 'thumbColor', DefaultThumbFillColor), GetValue$a(config, 'thumbAlpha', 1)); + _this.setTrackSize(GetValue$a(config, 'trackWidth', 0.9), GetValue$a(config, 'trackHeight', 0.5)); + _this.setTrackRadius(GetValue$a(config, 'trackRadius', _this.trackHeight * 0.5)); + var thumbHeight = GetValue$a(config, 'thumbHeight', undefined); + var thumbWidth = GetValue$a(config, 'thumbWidth', thumbHeight); if (thumbWidth === undefined) { thumbWidth = _this.trackHeight * 0.9; } _this.setThumbSize(thumbWidth, thumbHeight); - _this.setThumbRadius(GetValue$9(config, 'thumbRadius', _this.thumbHeight * 0.5)); - _this.setThumbPosition(GetValue$9(config, 'thumbLeft', 0.3), GetValue$9(config, 'thumbRight', undefined)); - _this.setRTL(GetValue$9(config, 'rtl', false)); - _this.setToggleAnimationDuration(GetValue$9(config, 'animationDuration', 150)); + _this.setThumbRadius(GetValue$a(config, 'thumbRadius', _this.thumbHeight * 0.5)); + _this.setThumbPosition(GetValue$a(config, 'thumbLeft', 0.3), GetValue$a(config, 'thumbRight', undefined)); + _this.setRTL(GetValue$a(config, 'rtl', false)); + _this.setToggleAnimationDuration(GetValue$a(config, 'animationDuration', 150)); _this.buildShapes(); - _this.setValue(GetValue$9(config, 'value', false), 0); + _this.setValue(GetValue$a(config, 'value', false), 0); return _this; } _createClass(ToggleSwitchShape, [{ @@ -36665,7 +36868,7 @@ }(BaseShapes); Object.assign(ToggleSwitchShape.prototype, methods$1); - var GetValue$8 = Phaser.Utils.Objects.GetValue; + var GetValue$9 = Phaser.Utils.Objects.GetValue; var ToggleSwitch = /*#__PURE__*/function (_ToggleSwitchShape) { _inherits(ToggleSwitch, _ToggleSwitchShape); var _super = _createSuper(ToggleSwitch); @@ -36673,11 +36876,11 @@ var _this; _classCallCheck(this, ToggleSwitch); _this = _super.call(this, scene, x, y, width, height, color, config); - _this._click = new Button(_assertThisInitialized(_this), GetValue$8(config, 'click')); + _this._click = new Button(_assertThisInitialized(_this), GetValue$9(config, 'click')); _this._click.on('click', function () { this.toggleValue(); }, _assertThisInitialized(_this)); - _this.setReadOnly(GetValue$8(config, 'readOnly', false)); + _this.setReadOnly(GetValue$9(config, 'readOnly', false)); return _this; } _createClass(ToggleSwitch, [{ @@ -37018,7 +37221,7 @@ }; Object.assign(Methods$2, methods); - var GetValue$7 = Phaser.Utils.Objects.GetValue; + var GetValue$8 = Phaser.Utils.Objects.GetValue; var DropDownList = /*#__PURE__*/function (_Label) { _inherits(DropDownList, _Label); var _super = _createSuper(DropDownList); @@ -37028,27 +37231,27 @@ _this = _super.call(this, scene, config); _this.type = 'rexDropDownList'; _this.timer = undefined; - _this.setOptions(GetValue$7(config, 'options')); - var listConfig = GetValue$7(config, 'list'); - _this.setWrapEnable(GetValue$7(listConfig, 'wrap', false)); - _this.setCreateButtonCallback(GetValue$7(listConfig, 'createButtonCallback')); - _this.setCreateListBackgroundCallback(GetValue$7(listConfig, 'createBackgroundCallback')); - _this.setButtonClickCallback(GetValue$7(listConfig, 'onButtonClick')); - _this.setButtonOverCallback(GetValue$7(listConfig, 'onButtonOver')); - _this.setButtonOutCallback(GetValue$7(listConfig, 'onButtonOut')); - _this.setListExpandDirection(GetValue$7(listConfig, 'expandDirection')); - _this.setListEaseInDuration(GetValue$7(listConfig, 'easeIn', 500)); - _this.setListEaseOutDuration(GetValue$7(listConfig, 'easeOut', 100)); - _this.setListTransitInCallback(GetValue$7(listConfig, 'transitIn')); - _this.settListTransitOutCallback(GetValue$7(listConfig, 'transitOut')); - _this.setListSize(GetValue$7(listConfig, 'width'), GetValue$7(listConfig, 'height')); - _this.setListAlignmentMode(GetValue$7(listConfig, 'alignParent', 'text')); - _this.setListAlignmentSide(GetValue$7(listConfig, 'alignSide', '')); - _this.setListBounds(GetValue$7(listConfig, 'bounds')); - _this.setListSpace(GetValue$7(listConfig, 'space')); - _this.setListDraggable(GetValue$7(listConfig, 'draggable', false)); - _this.setValueChangeCallback(GetValue$7(config, 'setValueCallback'), GetValue$7(config, 'setValueCallbackScope')); - _this.setValue(GetValue$7(config, 'value')); + _this.setOptions(GetValue$8(config, 'options')); + var listConfig = GetValue$8(config, 'list'); + _this.setWrapEnable(GetValue$8(listConfig, 'wrap', false)); + _this.setCreateButtonCallback(GetValue$8(listConfig, 'createButtonCallback')); + _this.setCreateListBackgroundCallback(GetValue$8(listConfig, 'createBackgroundCallback')); + _this.setButtonClickCallback(GetValue$8(listConfig, 'onButtonClick')); + _this.setButtonOverCallback(GetValue$8(listConfig, 'onButtonOver')); + _this.setButtonOutCallback(GetValue$8(listConfig, 'onButtonOut')); + _this.setListExpandDirection(GetValue$8(listConfig, 'expandDirection')); + _this.setListEaseInDuration(GetValue$8(listConfig, 'easeIn', 500)); + _this.setListEaseOutDuration(GetValue$8(listConfig, 'easeOut', 100)); + _this.setListTransitInCallback(GetValue$8(listConfig, 'transitIn')); + _this.settListTransitOutCallback(GetValue$8(listConfig, 'transitOut')); + _this.setListSize(GetValue$8(listConfig, 'width'), GetValue$8(listConfig, 'height')); + _this.setListAlignmentMode(GetValue$8(listConfig, 'alignParent', 'text')); + _this.setListAlignmentSide(GetValue$8(listConfig, 'alignSide', '')); + _this.setListBounds(GetValue$8(listConfig, 'bounds')); + _this.setListSpace(GetValue$8(listConfig, 'space')); + _this.setListDraggable(GetValue$8(listConfig, 'draggable', false)); + _this.setValueChangeCallback(GetValue$8(config, 'setValueCallback'), GetValue$8(config, 'setValueCallbackScope')); + _this.setValue(GetValue$8(config, 'value')); _this.onClick(_this.toggleListPanel, _assertThisInitialized(_this)); return _this; } @@ -37204,7 +37407,7 @@ } }; - var GetValue$6 = Phaser.Utils.Objects.GetValue; + var GetValue$7 = Phaser.Utils.Objects.GetValue; var SetOptions = function SetOptions(gameObject, options) { var list = gameObject.getElement('list'); list.options = options; @@ -37234,7 +37437,7 @@ // TODO : DeepClone? var buttonConfig = style.button ? DeepClone(style.button) : {}; - var buttonExpand = GetValue$6(buttonConfig, 'expand', true); + var buttonExpand = GetValue$7(buttonConfig, 'expand', true); if (buttonExpand) { buttonConfig.align = 'center'; } @@ -37326,11 +37529,11 @@ return Tweaker; }(TweakerShell); - var GetValue$5 = Phaser.Utils.Objects.GetValue; - function DefaultConfig (colors) { - var COLOR_PRIMARY = GetValue$5(colors, 'primary', 0x424242); - var COLOR_LIGHT = GetValue$5(colors, 'light', 0x6d6d6d); - var COLOR_DARK = GetValue$5(colors, 'dark', 0x1b1b1b); + var GetValue$6 = Phaser.Utils.Objects.GetValue; + function DefaultConfig$1 (colors) { + var COLOR_PRIMARY = GetValue$6(colors, 'primary', 0x424242); + var COLOR_LIGHT = GetValue$6(colors, 'light', 0x6d6d6d); + var COLOR_DARK = GetValue$6(colors, 'dark', 0x1b1b1b); return { width: 240, styles: { @@ -37508,7 +37711,7 @@ } var MergeConfig = function MergeConfig(extraConfig) { - var sourceConfig = DefaultConfig(extraConfig); + var sourceConfig = DefaultConfig$1(extraConfig); for (var key in extraConfig) { var extraData = extraConfig[key]; if (key === 'styles') { @@ -38411,32 +38614,32 @@ }; Object.assign(Methods$1, FadeMethods, AddMethods, RemoveMethods, PropertyMethods, CallMethods, DataMethods); - var GetValue$4 = Phaser.Utils.Objects.GetValue; + var GetValue$5 = Phaser.Utils.Objects.GetValue; var GOManager = /*#__PURE__*/function () { function GOManager(scene, config) { _classCallCheck(this, GOManager); this.scene = scene; - this.BobClass = GetValue$4(config, 'BobClass', BobBase); - this.setCreateGameObjectCallback(GetValue$4(config, 'createGameObject'), GetValue$4(config, 'createGameObjectScope')); - this.setEventEmitter(GetValue$4(config, 'eventEmitter', undefined)); - var fadeConfig = GetValue$4(config, 'fade', 500); + this.BobClass = GetValue$5(config, 'BobClass', BobBase); + this.setCreateGameObjectCallback(GetValue$5(config, 'createGameObject'), GetValue$5(config, 'createGameObjectScope')); + this.setEventEmitter(GetValue$5(config, 'eventEmitter', undefined)); + var fadeConfig = GetValue$5(config, 'fade', 500); if (typeof fadeConfig === 'number') { this.setGOFadeMode(); this.setGOFadeTime(fadeConfig); } else { - this.setGOFadeMode(GetValue$4(fadeConfig, 'mode')); - this.setGOFadeTime(GetValue$4(fadeConfig, 'time', 500)); + this.setGOFadeMode(GetValue$5(fadeConfig, 'mode')); + this.setGOFadeTime(GetValue$5(fadeConfig, 'time', 500)); } - var viewportCoordinateConfig = GetValue$4(config, 'viewportCoordinate', false); + var viewportCoordinateConfig = GetValue$5(config, 'viewportCoordinate', false); if (viewportCoordinateConfig !== false) { - this.setViewportCoordinateEnable(GetValue$4(config, 'enable', true)); - this.setViewport(GetValue$4(viewportCoordinateConfig, 'viewport')); + this.setViewportCoordinateEnable(GetValue$5(config, 'enable', true)); + this.setViewport(GetValue$5(viewportCoordinateConfig, 'viewport')); } else { this.setViewportCoordinateEnable(false); } - var effectPropertiesConfig = GetValue$4(config, 'effectProperties', false); + var effectPropertiesConfig = GetValue$5(config, 'effectProperties', false); this.setEffectPropertiesConfig(effectPropertiesConfig); - this.setSymbols(GetValue$4(config, 'symbols')); + this.setSymbols(GetValue$5(config, 'symbols')); this.bobs = {}; this.removedGOs = []; this._timeScale = 1; @@ -38520,7 +38723,7 @@ }(); Object.assign(GOManager.prototype, EventEmitterMethods$1, Methods$1); - var GetValue$3 = Phaser.Utils.Objects.GetValue; + var GetValue$4 = Phaser.Utils.Objects.GetValue; var LayerManager = /*#__PURE__*/function (_GOManager) { _inherits(LayerManager, _GOManager); var _super = _createSuper(LayerManager); @@ -38539,7 +38742,7 @@ } config.viewportCoordinate = false; _this = _super.call(this, scene, config); - var initLayers = GetValue$3(config, 'layers'); + var initLayers = GetValue$4(config, 'layers'); if (initLayers) { for (var i = 0, cnt = initLayers.length; i < cnt; i++) { _this.add(initLayers[i]); @@ -38659,6 +38862,102 @@ }); SetValue(window, 'RexPlugins.GameObjectShell.LayerManager', LayerManager); + var MouseWheelToUpDown = /*#__PURE__*/function (_CursorKeys) { + _inherits(MouseWheelToUpDown, _CursorKeys); + var _super = _createSuper(MouseWheelToUpDown); + function MouseWheelToUpDown(scene, config) { + var _this; + _classCallCheck(this, MouseWheelToUpDown); + _this = _super.call(this, scene); + _this.scene = scene; + _this.boot(); + return _this; + } + _createClass(MouseWheelToUpDown, [{ + key: "boot", + value: function boot() { + this.scene.input.on('wheel', this.onWheeling, this); + this.scene.sys.events.on('postupdate', this.clearAllKeysState, this); + this.scene.sys.events.once('shutdown', this.destroy, this); + } + }, { + key: "shutdown", + value: function shutdown() { + if (!this.scene) { + return; + } + this.scene.input.off('wheel', this.onWheeling, this); + this.scene.sys.events.off('postupdate', this.clearAllKeysState, this); + this.scene.sys.events.off('shutdown', this.destroy, this); + this.scene = undefined; + _get(_getPrototypeOf(MouseWheelToUpDown.prototype), "shutdown", this).call(this); + } + }, { + key: "destroy", + value: function destroy() { + this.shutdown(); + } + }, { + key: "onWheeling", + value: function onWheeling(pointer, currentlyOver, dx, dy, dz, event) { + this.setKeyState('up', dy < 0); + this.setKeyState('down', dy > 0); + } + }, { + key: "up", + get: function get() { + return this.upKeyDown; + } + }, { + key: "down", + get: function get() { + return this.downKeyDown; + } + }, { + key: "noKey", + get: function get() { + return this.noKeyDown; + } + }]); + return MouseWheelToUpDown; + }(CursorKeys); + + ObjectFactory.register('mouseWheelToUpDown', function (config) { + var mouseWheelToUpDown = new MouseWheelToUpDown(this.scene, config); + // mouseWheelToUpDown is not a gameObject + return mouseWheelToUpDown; + }); + SetValue(window, 'RexPlugins.GameObjectShell.MouseWheelToUpDown', MouseWheelToUpDown); + + var CreateLayerManager = function CreateLayerManager(config) { + var layers = config.layers; + if (!Array.isArray(layers)) { + layers = []; + } + this.backgroundLayerName = layers[0] || 'background'; + this.monitorLayerName = layers[1] || 'monitor'; + this.uiLayerName = layers[2] || 'ui'; + var layerManager = config.layerManager; + this.isPrivateLayerManager = !layerManager; + if (this.isPrivateLayerManager) { + layerManager = new LayerManager(this.scene, { + layers: [this.backgroundLayerName, this.monitorLayerName, this.uiLayerName] + }); + } + this.layerManager = layerManager; + this.once('destroy', function () { + if (this.isPrivateLayerManager) { + this.layerManager.destroy(fromScene); + } else { + var layNames = [this.backgroundLayerName, this.monitorLayerName, this.uiLayerName]; + for (var i = 0, cnt = layNames.length; i < cnt; i++) { + this.layerManager.clearLayer(layNames[i], !fromScene); + } + } + this.layerManager = undefined; + }, this); + }; + var CreateBackground = function CreateBackground(config) { var background = new FullWindowRectangle(this.scene); this.scene.add.existing(background); @@ -38669,13 +38968,17 @@ }; background.setInteractive().on('pointerdown', onUnSelectGameObject); this.background = background; + this.once('destroy', function () { + this.background.destroy(); + this.background = undefined; + }, this); }; - var GetValue$2 = Phaser.Utils.Objects.GetValue; + var GetValue$3 = Phaser.Utils.Objects.GetValue; var CreatePropertiesPanel = function CreatePropertiesPanel(config) { - var panelConfig = GetValue$2(config, 'panel', {}); + var panelConfig = GetValue$3(config, 'panel', {}); var unknowPositon = panelConfig.x === undefined && panelConfig.y === undefined; - var extraProperties = GetValue$2(config, 'extraProperties', {}); + var extraProperties = GetValue$3(config, 'extraProperties', {}); var panel = new PropertiesPanel(this.scene, panelConfig, extraProperties); panel.setScrollFactor(0); this.scene.add.existing(panel); @@ -38686,35 +38989,76 @@ panel.top = 0; } this.panel = panel; + this.once('destroy', function () { + this.panel.destroy(); + this.panel = undefined; + }, this); }; - var GetValue$1 = Phaser.Utils.Objects.GetValue; + var GetValue$2 = Phaser.Utils.Objects.GetValue; var CreateControlPoints = function CreateControlPoints(config) { - var controlPoints = new ControlPoints(this.scene, GetValue$1(config, 'controlPoints')); + var controlPoints = new ControlPoints(this.scene, GetValue$2(config, 'controlPoints')); this.scene.add.existing(controlPoints); this.addToUILayer(controlPoints); this.controlPoints = controlPoints; + this.once('destroy', function () { + this.controlPoints.destroy(); + this.controlPoints = undefined; + }, this); + }; + + var CreateCursorAtBoundsCameraController = function CreateCursorAtBoundsCameraController(config) { + var scene = this.scene; + var cursorAtBounds = new CursorAtBounds(scene); + var cursorKeys = cursorAtBounds.createCursorKeys(); + var mouseWheelToUpDown = new MouseWheelToUpDown(scene); + var zoomKeys = mouseWheelToUpDown.createCursorKeys(); + var cameraController = new Phaser.Cameras.Controls.SmoothedKeyControl({ + camera: scene.cameras.main, + left: cursorKeys.left, + right: cursorKeys.right, + up: cursorKeys.up, + down: cursorKeys.down, + zoomIn: zoomKeys.down, + zoomOut: zoomKeys.up, + acceleration: 0.06, + drag: 0.003, + maxSpeed: 0.3, + zoomSpeed: 0.05 + }); + this.cameraController = cameraController; + var UpdateCameraController = function UpdateCameraController(time, delta) { + cameraController.update(delta); + }; + scene.events.on('preupdate', UpdateCameraController); + this.once('destroy', function () { + this.cameraController = undefined; + scene.events.off('preupdate', UpdateCameraController); + cursorAtBounds.destroy(); + cursorAtBounds = undefined; + mouseWheelToUpDown.destroy(); + mouseWheelToUpDown = undefined; + cameraController.destroy(); + cameraController = undefined; + cursorKeys = undefined; + zoomKeys = undefined; + }, this); + }; + + var GetValue$1 = Phaser.Utils.Objects.GetValue; + var DefaultConfig = { + type: 'cursorAtBounds' + }; + var CreateCameraController = function CreateCameraController(config) { + var cameraControllerConfig = GetValue$1(config, 'cameraController', DefaultConfig); + switch (cameraControllerConfig.type) { + case 'cursorAtBounds': + CreateCursorAtBoundsCameraController.call(this, cameraControllerConfig); + break; + } }; var LayerManagerMethods = { - addLayerManager: function addLayerManager(config) { - var layers = config.layers; - if (!Array.isArray(layers)) { - layers = []; - } - this.backgroundLayerName = layers[0] || 'background'; - this.monitorLayerName = layers[1] || 'monitor'; - this.uiLayerName = layers[2] || 'ui'; - var layerManager = config.layerManager; - this.isPrivateLayerManager = !layerManager; - if (this.isPrivateLayerManager) { - layerManager = new LayerManager(this.scene, { - layers: [this.backgroundLayerName, this.monitorLayerName, this.uiLayerName] - }); - } - this.layerManager = layerManager; - return this; - }, addToBackgroundLayer: function addToBackgroundLayer(gameObject) { this.layerManager.addToLayer(this.backgroundLayerName, gameObject); return this; @@ -38815,10 +39159,11 @@ _this.onSelectGameObjectCallback = GetValue(config, 'onSelectGameObject', OnSelectGameObject); _this.onUnSelectGameObjectCallback = GetValue(config, 'onUnSelectGameObject', OnUnSelectGameObject); - _this.addLayerManager(config); + CreateLayerManager.call(_assertThisInitialized(_this), config); CreateBackground.call(_assertThisInitialized(_this), config); CreatePropertiesPanel.call(_assertThisInitialized(_this), config); CreateControlPoints.call(_assertThisInitialized(_this), config); + CreateCameraController.call(_assertThisInitialized(_this), config); /* - Click game object on 'monitor' layer to open properties editor @@ -38828,25 +39173,6 @@ return _this; } _createClass(Shell, [{ - key: "shutdown", - value: function shutdown(fromScene) { - _get(_getPrototypeOf(Shell.prototype), "shutdown", this).call(this, fromScene); - - // background, panel, controlPoints are placed inside layers - if (this.isPrivateLayerManager) { - this.layerManager.destroy(fromScene); - } else { - var layNames = [this.backgroundLayerName, this.monitorLayerName, this.uiLayerName]; - for (var i = 0, cnt = layNames.length; i < cnt; i++) { - this.layerManager.clearLayer(layNames[i], !fromScene); - } - } - this.background = undefined; - this.panel = undefined; - this.controlPoints = undefined; - this.layerManager = undefined; - } - }, { key: "destroy", value: function destroy(fromScene) { this.emit('destroy'); diff --git a/dist/rexgameobjectshellplugin.min.js b/dist/rexgameobjectshellplugin.min.js index 8c1aeb163e..b5c3998156 100644 --- a/dist/rexgameobjectshellplugin.min.js +++ b/dist/rexgameobjectshellplugin.min.js @@ -1,12 +1,12 @@ -!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).rexgameobjectshellplugin=e();}(undefined,(function(){function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n);}return i}function e(e){for(var i=1;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0;n--)(e=this.children[n]).parentContainer||e.displayList||e.destroy(t);this.clear(!t),p(h(i.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 S(this.children,t,0,(function(t){t.once("destroy",e.onChildDestroy,e);}),this),this}},{key:"remove",value:function(t,e){var i=this;return P(this.children,t,(function(t){t.off("destroy",i.onChildDestroy,i),e&&t.destroy();})),this}},{key:"onChildDestroy",value:function(t,e){this.remove(t,!1);}},{key:"clear",value:function(t){for(var e,i=0,n=this.children.length;i0;){var n=i.shift();!e(n)&&n.isRexContainerLite&&i.push.apply(i,y(n.children));}},ot=Phaser.Utils.Array,at={getChildren:function(t){if(t)for(var e=0,i=this.children.length;et.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0;n--)(e=this.children[n]).parentContainer||e.displayList||e.destroy(t);this.clear(!t),v(h(i.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 S(this.children,t,0,(function(t){t.once("destroy",e.onChildDestroy,e);}),this),this}},{key:"remove",value:function(t,e){var i=this;return P(this.children,t,(function(t){t.off("destroy",i.onChildDestroy,i),e&&t.destroy();})),this}},{key:"onChildDestroy",value:function(t,e){this.remove(t,!1);}},{key:"clear",value:function(t){for(var e,i=0,n=this.children.length;i0;){var n=i.shift();!e(n)&&n.isRexContainerLite&&i.push.apply(i,y(n.children));}},ot=Phaser.Utils.Array,at={getChildren:function(t){if(t)for(var e=0,i=this.children.length;e * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */Object.assign(Pe.prototype,fe);var Oe=function(t){return null==t||""===t||0===t.length},Te=function(t,e,n,r){if(void 0===r&&(r="."),"object"===i(t)){if(Oe(e)){if(null==n)return;"object"===i(n)&&(t=n);}else {"string"==typeof e&&(e=e.split(r));var s=e.pop(),o=function(t,e,n){var r=t;if(Oe(e));else {var s;"string"==typeof e&&(e=e.split("."));for(var o=0,a=e.length;o=0;e--)this.remove(this.backgroundChildren[e],t);return this}},Si=Phaser.Utils.Objects.GetValue,Pi=function(t,e){return void 0===e?t:t[e]},Oi=function(t,e,n){void 0===t&&(t={}),void 0===e&&(e=0);var r=i(e);return "string"===r?t[e]=n:"number"===r?(t.left=e,t.right=e,t.top=e,t.bottom=e):(t.left=Si(e,"left",0),t.right=Si(e,"right",0),t.top=Si(e,"top",0),t.bottom=Si(e,"bottom",0)),t},Ti={getInnerPadding:function(t){return Pi(this.space,t)},setInnerPadding:function(t,e){return Oi(this.space,t,e),this},getOuterPadding:function(t){return Pi(this.getSizerConfig(this).padding,t)},setOuterPadding:function(t,e){return Oi(this.getSizerConfig(this).padding,t,e),this},getChildOuterPadding:function(t,e){return "string"==typeof t&&(t=this.getElement(t)),Pi(this.getSizerConfig(t).padding,e)},setChildOuterPadding:function(t,e,i){return "string"==typeof t&&(t=this.getElement(t)),Oi(this.getSizerConfig(t).padding,e,i),this}},_i=function(t){var e=this.childrenWidth,i=void 0!==this.minWidth?this.minWidth:0;return void 0===t?(t=Math.max(i,e),this.layoutWarnEnable&&i>0&&e>i&&console.warn("Layout width warn: ".concat(this.constructor.name,"'s minWidth (").concat(i,") < childrenWidth (").concat(e,")"))):this.layoutWarnEnable&&(i>t||e>t)&&console.warn("Layout width warn: ".concat(this.constructor.name,"'s minWidth (").concat(i,") or childrenWidth (").concat(e," > targetWidth ").concat(t,")")),t},Ei=function(t){var e=this.childrenHeight,i=void 0!==this.minHeight?this.minHeight:0;return void 0===t?(t=Math.max(i,e),this.layoutWarnEnable&&i>0&&e>i&&console.warn("Layout height warn: ".concat(this.constructor.name,"'s minHeight (").concat(i,") < childrenHeight (").concat(e,")"))):this.layoutWarnEnable&&(i>t||e>t)&&console.warn("Layout height warn: ".concat(this.constructor.name,"'s minHeight (").concat(i,") or childrenHeight (").concat(e,") > targetHeight (").concat(t,")")),t},Mi={getShownChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,n=0,r=i.length;n0;){var i=e.shift();i.rexSizer&&i.rexSizer.hidden||(i!==this&&t.push(i),i.isRexContainerLite&&e.push.apply(e,y(i.children)));}return t}},Ri=function(){this._childrenWidth=void 0,this._childrenHeight=void 0;for(var t,e=this.getChildrenSizers(),i=0,n=e.length;i0?-this.delay:0,this.state=this.nowTime>=0?tn:Qi,this.repeatCounter=0,this}},{key:"stop",value:function(){return this.state=$i,this}},{key:"update",value:function(t,e){this.state!==$i&&this.state!==nn&&0!==e&&0!==this.timeScale&&(this.nowTime+=e*this.timeScale,this.justRestart=!1,this.nowTime>=this.duration?-1===this.repeat||this.repeatCounter0&&(this.nowTime-=this.repeatDelay,this.state=en)):(this.nowTime=this.duration,this.state=nn):this.nowTime>=0&&(this.state=tn));}},{key:"t",get:function(){var t;switch(this.state){case $i:case Qi:case en:t=0;break;case tn:t=this.nowTime/this.duration;break;case nn:t=1;}return qi(t,0,1)},set:function(t){(t=qi(t,-1,1))<0?(this.state=Qi,this.nowTime=-this.delay*t):(this.state=tn,this.nowTime=this.duration*t,1===t&&0!==this.repeat&&this.repeatCounter++);}},{key:"setT",value:function(t){return this.t=t,this}},{key:"isIdle",get:function(){return this.state===$i}},{key:"isDelay",get:function(){return this.state===Qi}},{key:"isCountDown",get:function(){return this.state===tn}},{key:"isRunning",get:function(){return this.state===Qi||this.state===tn}},{key:"isDone",get:function(){return this.state===nn}},{key:"isOddIteration",get:function(){return 1==(1&this.repeatCounter)}},{key:"isEvenIteration",get:function(){return 0==(1&this.repeatCounter)}}]),t}(),$i=0,Qi=1,tn=2,en=3,nn=-1,rn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).timer=new Zi,s}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(p(h(i.prototype),"shutdown",this).call(this,t),this.timer.destroy(),this.timer=void 0);}},{key:"start",value:function(){return this.timer.start(),p(h(i.prototype),"start",this).call(this),this}},{key:"stop",value:function(){return this.timer.stop(),p(h(i.prototype),"stop",this).call(this),this}},{key:"complete",value:function(){return this.timer.stop(),p(h(i.prototype),"complete",this).call(this),this}}]),i}(Ui),sn=Phaser.Utils.Objects.GetValue,on=Phaser.Utils.Objects.GetAdvancedValue,an=Phaser.Tweens.Builders.GetEaseFunction,hn=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"resetFromJSON",value:function(t){return this.timer.resetFromJSON(sn(t,"timer")),this.setEnable(sn(t,"enable",!0)),this.setTarget(sn(t,"target",this.parent)),this.setDelay(on(t,"delay",0)),this.setDuration(on(t,"duration",1e3)),this.setEase(sn(t,"ease","Linear")),this.setRepeat(sn(t,"repeat",0)),this}},{key:"setEnable",value:function(t){return null==t&&(t=!0),this.enable=t,this}},{key:"setTarget",value:function(t){return void 0===t&&(t=this.parent),this.target=t,this}},{key:"setDelay",value:function(t){return 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:"setRepeatDelay",value:function(t){return this.repeatDelay=t,this}},{key:"setEase",value:function(t){return void 0===t&&(t="Linear"),this.ease=t,this.easeFn=an(t),this}},{key:"start",value:function(){return this.timer.isRunning||p(h(i.prototype),"start",this).call(this),this}},{key:"restart",value:function(){return this.timer.stop(),this.start.apply(this,arguments),this}},{key:"stop",value:function(t){return void 0===t&&(t=!1),p(h(i.prototype),"stop",this).call(this),t&&(this.timer.setT(1),this.updateGameObject(this.target,this.timer),this.complete()),this}},{key:"update",value:function(t,e){if(!this.isRunning||!this.enable||!this.parent.active)return this;var i=this.target,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(t,e){}}]),i}(rn),ln=Phaser.Utils.Objects.GetValue,un=Phaser.Utils.Objects.GetAdvancedValue,cn=Phaser.Math.Linear,dn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).scaleStart={},s.scaleEnd={},s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setMode(ln(t,"mode",0)),this.setScaleRange(un(t,"start",void 0),un(t,"end",0)),this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=fn[t]),this.mode=t,this}},{key:"setScaleRange",value:function(t,e){return "number"==typeof t?(this.startX=t,this.startY=t):(this.startX=un(t,"x",this.parent.scaleX),this.startY=un(t,"y",this.parent.scaleY)),"number"==typeof e?(this.endX=e,this.endY=e):(this.endX=un(e,"x",void 0),this.endY=un(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;this.hasScaleX&&(t.scaleX=this.startX),this.hasScaleY&&(t.scaleY=this.startY);var e=this.repeat;return 2===this.mode&&-1!==e&&(e=2*(e+1)-1),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(e),p(h(i.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=cn(this.startX,this.endX,i)),this.hasScaleY&&(t.scaleY=cn(this.startY,this.endY,i));}},{key:"complete",value:function(){return p(h(i.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),i}(hn),fn={stop:0,destroy:1,yoyo:2},pn=function(t,e,i,n,r){var s,o;switch(void 0===n&&(n="Cubic"),i){case 0:case"x":s={x:0},o={x:t.scaleX};break;case 1:case"y":s={y:0},o={y:t.scaleY};break;default:s=0,o=t.scale;}var a={mode:0,start:s,end:o,duration:e,ease:n};return void 0===r?r=new dn(t,a):r.resetFromJSON(a),r.restart(),r},vn=function(t,e,i,n,r,s){void 0===n&&(n="Linear"),r instanceof dn&&(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=n,void 0===s?s=new dn(t,o):s.resetFromJSON(o),s.restart(),s},gn=function(t,e){return new Promise((function(i,n){t.once(e,(function(){i();}));}))},yn=function(t){return gn(t,"complete")},kn=Phaser.Utils.Objects.IsPlainObject,mn=function(t,e){e.completeEventName=void 0,e.on("complete",(function(){e.completeEventName&&(t.emit(e.completeEventName,t),e.completeEventName=void 0);})),e.on("update",(function(){var e=gi.getParentSizer(t);e&&e.resetChildPositionState(t);}));},bn={popUp:function(t,e,i){if(kn(t)){var n=t;t=n.duration,e=n.orientation,i=n.ease;}var r=void 0===this._scaleBehavior;return this._scaleBehavior=pn(this,t,e,i,this._scaleBehavior),r&&mn(this,this._scaleBehavior),this._scaleBehavior.completeEventName="popup.complete",this},popUpPromise:function(t,e,i){return this.popUp(t,e,i),yn(this._scaleBehavior)},scaleDownDestroy:function(t,e,i,n){if(kn(t)){var r=t;t=r.duration,e=r.orientation,i=r.ease,n=r.destroy;}var s=void 0===this._scaleBehavior;return this._scaleBehavior=vn(this,t,e,i,n,this._scaleBehavior),s&&mn(this,this._scaleBehavior),this._scaleBehavior.completeEventName="scaledown.complete",this},scaleDownDestroyPromise:function(t,e,i,n){return this.scaleDownDestroy(t,e,i,n),yn(this._scaleBehavior)},scaleDown:function(t,e,i){return this.scaleDownDestroy(t,e,i,!1),this},scaleDownPromise:function(t,e,i){return this.scaleDown(t,e,i),yn(this._scaleBehavior)},scaleYoyo:function(t,e,i,n,r){if(kn(t)){var s=t;t=s.duration,e=s.peakValue,i=s.repeat,n=s.orientation,r=s.ease;}var o=void 0===this._scaleBehavior;return this._scaleBehavior=function(t,e,i,n,r,s,o){var a,h;switch(void 0===i&&(i=1.2),void 0===n&&(n=0),void 0===s&&(s="Cubic"),r){case 0:case"x":a={x:t.scaleX},h={x:i};break;case 1:case"y":a={y:t.scaleX},h={y:i};break;default:a=t.scaleX,h=i;}var l={mode:2,start:a,end:h,duration:e/2,ease:s,repeat:n};return void 0===o?o=new dn(t,l):o.resetFromJSON(l),o.restart(),o}(this,t,e,i,n,r,this._scaleBehavior),o&&mn(this,this._scaleBehavior),this._scaleBehavior.completeEventName="scaleyoyo.complete",this},scaleYoyoPromise:function(t,e,i,n,r){return this.scaleYoyo(t,e,i,n,r),yn(this._scaleBehavior)}},xn=Phaser.Utils.Objects.GetValue,Cn=Phaser.Utils.Objects.GetAdvancedValue,wn=Phaser.Math.Linear,Sn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setMode(xn(t,"mode",0)),this.setAlphaRange(Cn(t,"start",this.parent.alpha),Cn(t,"end",0)),this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=Pn[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),p(h(i.prototype),"start",this).call(this)),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;e.isOddIteration&&(i=1-i),t.alpha=wn(this.alphaStart,this.alphaEnd,i);}},{key:"complete",value:function(){return p(h(i.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),i}(hn),Pn={stop:0,destroy:1,yoyo:2},On=Phaser.Utils.Objects.IsPlainObject,Tn=function(t,e,i,n){var r,s;On(i)?(r=i.start,s=i.end):s=i,void 0===r&&(r=0),void 0===s&&(s=1);var o={mode:0,start:r,end:s,duration:e};return void 0===n?n=new Sn(t,o):n.resetFromJSON(o),n.restart(),n},_n=function(t,e,i,n){i instanceof Sn&&(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 Sn(t,r):n.resetFromJSON(r),n.restart(),n},En=Phaser.Utils.Objects.IsPlainObject,Mn=function(t,e){e.completeEventName=void 0,e.on("complete",(function(){e.completeEventName&&(t.emit(e.completeEventName,t),e.completeEventName=void 0);})),e.on("update",(function(){var e=gi.getParentSizer(t);e&&e.resetChildAlphaState(t);}));},Rn={fadeIn:function(t,e){if(En(t)){var i=t;t=i.duration,e=i.alpha;}var n=void 0===this._fade;return this._fade=Tn(this,t,e,this._fade),n&&Mn(this,this._fade),this._fade.completeEventName="fadein.complete",this},fadeInPromise:function(t,e){return this.fadeIn(t,e),yn(this._fade)},fadeOutDestroy:function(t,e){if(En(t)){var i=t;t=i.duration,e=i.destroy;}var n=void 0===this._fade;return this._fade=_n(this,t,e,this._fade),n&&Mn(this,this._fade),this._fade.completeEventName="fadeout.complete",this},fadeOutDestroyPromise:function(t,e){return this.fadeOutDestroy(t,e),yn(this._fade)},fadeOut:function(t){return this.fadeOutDestroy(t,!1),this},fadeOutPromise:function(t){return this.fadeOut(t),yn(this._fade)}},Ln=Phaser.Utils.Objects.GetValue,Dn=Phaser.Utils.Objects.GetAdvancedValue,An=Phaser.Math.Linear,jn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){if(p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setMode(Ln(t,"mode",0)),t&&(t.hasOwnProperty("x")||t.hasOwnProperty("y"))){var e=Dn(t,"x",void 0),n=Dn(t,"y",void 0);this.setTargetPosition(e,n);}else this.setTargetPosition(t);return this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=zn[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=Dn(i,"startX",void 0),this.startY=Dn(i,"startY",void 0),this.endX=Dn(i,"endX",void 0),this.endY=Dn(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),p(h(i.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=An(this.startX,this.endX,i)),this.hasMoveY&&(t.y=An(this.startY,this.endY,i));}},{key:"complete",value:function(){return p(h(i.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),i}(hn),zn={stop:0,destroy:1,yoyo:2},Bn=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}},In=Phaser.Utils.Objects.IsPlainObject,Wn=Phaser.Math.Distance.Between,Fn=function(t,e){e.completeEventName=void 0,e.on("complete",(function(){e.completeEventName&&(t.emit(e.completeEventName,t),e.completeEventName=void 0);})),e.on("update",(function(){var e=gi.getParentSizer(t);e&&e.resetChildPositionState(t);}));},Yn={moveFrom:function(t,e,i,n,r){if(In(t)){var s=t;e=s.x,i=s.y,t=s.hasOwnProperty("speed")?1e3*Wn(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 jn&&(o=s,s=void 0),void 0===s&&(s=!1);var a={};return a.mode=s?1:0,void 0!==i&&(a.startX=Bn(i,t.x),a.endX=t.x),void 0!==n&&(a.startY=Bn(n,t.y),a.endY=t.y),a.duration=e,a.ease=void 0===r?"Linear":r,void 0===o?o=new jn(t,a):o.resetFromJSON(a),o.restart(),o}(this,t,e,i,n,r,this._easeMove),o&&Fn(this,this._easeMove),this._easeMove.completeEventName="movefrom.complete",this},moveFromPromise:function(t,e,i,n,r){return this.moveFrom(t,e,i,n,r),yn(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),yn(this._easeMove)},moveTo:function(t,e,i,n,r){if(In(t)){var s=t;e=s.x,i=s.y,t=s.hasOwnProperty("speed")?1e3*Wn(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 jn&&(o=s,s=void 0),void 0===s&&(s=!1);var a={};return a.mode=s?1:0,void 0!==i&&(a.startX=t.x,a.endX=Bn(i,t.x)),void 0!==n&&(a.startY=t.y,a.endY=Bn(n,t.y)),a.duration=e,a.ease=void 0===r?"Linear":r,void 0===o?o=new jn(t,a):o.resetFromJSON(a),o.restart(),o}(this,t,e,i,n,r,this._easeMove),o&&Fn(this,this._easeMove),this._easeMove.completeEventName="moveto.complete",this},moveToPromise:function(t,e,i,n,r){return this.moveTo(t,e,i,n,r),yn(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),yn(this._easeMove)},moveStop:function(t){return this._easeMove?(this._easeMove.stop(t),this):this}},Xn=Phaser.Utils.Objects.GetValue,Gn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).timer=new Zi,s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.timer.resetFromJSON(Xn(t,"timer")),this.setEnable(Xn(t,"enable",!0)),this.setMode(Xn(t,"mode",1)),this.isRunning=Xn(t,"isRunning",!1),this.setMagnitudeMode(Xn(t,"magnitudeMode",1)),this.setAxisMode(Xn(t,"axis",0)),this.setDuration(Xn(t,"duration",500)),this.setMagnitude(Xn(t,"magnitude",10)),this.ox=Xn(t,"ox",void 0),this.oy=Xn(t,"oy",void 0),this}},{key:"toJSON",value:function(){return {timer:this.timer.toJSON(),enable:this.enable,mode:this.mode,isRunning:this.isRunning,magnitudeMode:magnitudeMode,duration:this.duration,magnitude:this.magnitude,ox:this.ox,oy:this.oy}}},{key:"shutdown",value:function(t){this.isShutdown||(p(h(i.prototype),"shutdown",this).call(this,t),this.timer.destroy(),this.timer=void 0);}},{key:"startTicking",value:function(){p(h(i.prototype),"startTicking",this).call(this),0===this.mode?(this.scene.game.events.on("poststep",this.update,this),this.scene.game.events.on("prestep",this.backToOrigin,this)):this.scene.sys.events.on("preupdate",this.update,this);}},{key:"stopTicking",value:function(){p(h(i.prototype),"stopTicking",this).call(this),this.scene&&(0===this.mode?(this.scene.game.events.off("poststep",this.update,this),this.scene.game.events.off("prestep",this.backToOrigin,this)):this.scene.sys.events.off("preupdate",this.update,this));}},{key:"setEnable",value:function(t){return null==t&&(t=!0),this.enable=t,this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=Vn[t]),this.mode=t,this}},{key:"setMagnitudeMode",value:function(t){return "string"==typeof t&&(t=Nn[t]),this.magnitudeMode=t,this}},{key:"setAxisMode",value:function(t){return "string"==typeof t&&(t=Hn[t]),this.axisMode=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"setMagnitude",value:function(t){return this.magnitude=t,this}},{key:"start",value:function(t,e){if("number"!=typeof t){var n=t;e=Xn(n,"magnitude",void 0),t=Xn(n,"duration",void 0);}return void 0!==e&&this.setMagnitude(e),void 0!==t&&this.setDuration(t),this.timer.setDuration(this.duration).start(),p(h(i.prototype),"start",this).call(this),this}},{key:"shake",value:function(t,e){return this.start(t,e),this}},{key:"update",value:function(t,e){if(!this.isRunning||!this.enable)return this;var i=this.parent;if(!i.active)return this;if(this.timer.update(t,e),this.timer.isDone)this.backToOrigin(),this.complete();else {void 0===this.ox&&(this.ox=i.x,this.oy=i.y);var n=this.magnitude;1===this.magnitudeMode&&(n*=1-this.timer.t);var r=Math.random()*Math.PI*2,s=this.ox+Math.cos(r)*n,o=this.oy+Math.sin(r)*n;switch(this.axisMode){case 1:i.x=s;break;case 2:i.y=o;break;default:i.x=s,i.y=o;}}return this}},{key:"backToOrigin",value:function(){if(!this.isRunning||!this.enable)return this;if(void 0===this.ox)return this;var t=this.parent;switch(this.axisMode){case 1:t.x=this.ox;break;case 2:t.y=this.oy;break;default:t.x=this.ox,t.y=this.oy;}return this.ox=void 0,this.oy=void 0,this}}]),i}(Vi),Vn={effect:0,behavior:1},Hn={both:0,"h&v":0,"x&y":0,horizontal:1,h:1,x:1,vertical:2,v:2,y:2},Nn={constant:0,decay:1},Un=Phaser.Utils.Objects.IsPlainObject,Kn={shake:function(t,e,i){if(Un(t)){var n=t;t=n.duration,e=n.magnitude,i=n.magnitudeMode;}return void 0===this._shake&&(this._shake=new Gn(this,{mode:0,magnitudeMode:1}),function(t,e){e.on("complete",(function(){t.emit("shake.complete",t);}));}(this,this._shake)),void 0!==t&&this._shake.setDuration(t),void 0!==e&&this._shake.setMagnitude(e),void 0!==i&&this._shake.setMagnitudeMode(i),this._shake.shake(),this},shakePromise:function(t,e){return this.shake(t,e),yn(this._shake)}},Jn=Phaser.Utils.Objects.GetValue,qn=Phaser.Math.Linear,Zn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).resetFromJSON(),s.boot(),s}return s(i,[{key:"start",value:function(t){if(this.timer.isRunning)return this;var e=this.target;this.propertyKey=Jn(t,"key","value");var n=e[this.propertyKey];return this.fromValue=Jn(t,"from",n),this.toValue=Jn(t,"to",n),this.setEase(Jn(t,"ease",this.ease)),this.setDuration(Jn(t,"duration",this.duration)),this.setRepeat(Jn(t,"repeat",0)),this.setDelay(Jn(t,"delay",0)),this.setRepeatDelay(Jn(t,"repeatDelay",0)),this.timer.setDuration(this.duration).setRepeat(this.repeat).setDelay(this.delay).setRepeatDelay(this.repeatDelay),e[this.propertyKey]=this.fromValue,p(h(i.prototype),"start",this).call(this),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;i=this.easeFn(i),t[this.propertyKey]=qn(this.fromValue,this.toValue,i);}}]),i}(hn),$n=Phaser.Utils.Objects.IsPlainObject,Qn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).parent.setDataEnabled(),s.easeTasks={},s}return s(i,[{key:"complete",value:function(t){this.emit("complete-".concat(t),this.parent,this),this.emit("complete",t,this.parent,this);}},{key:"getEaseTask",value:function(t){var e=this.easeTasks[t];return void 0===e&&(e=new Zn(this.parent),this.easeTasks[t]=e,e.setTarget(this.parent.data.values).on("complete",(function(){this.complete(t);}),this)),e}},{key:"easeTo",value:function(t,e,i,n){if($n(t)){var r=t;t=r.key,e=r.value,i=r.duration,n=r.ease;var s=r.speed;void 0===i&&void 0!==s&&(i=Math.abs(e-this.parent.data.values[t])/s*1e3);}return void 0===i&&(i=1e3),void 0===n&&(n="Linear"),this.getEaseTask(t).restart({key:t,to:e,duration:i,ease:n}),this}},{key:"easeFrom",value:function(t,e,i,n){if($n(t)){var r=t;t=r.key,e=r.value,i=r.duration,n=r.ease;var s=r.speed;void 0===i&&void 0!==s&&(i=Math.abs(e-this.parent.data.values[t])/s*1e3);}return void 0===i&&(i=1e3),void 0===n&&(n="Linear"),this.getEaseTask(t).restart({key:t,from:e,duration:i,ease:n}),this}},{key:"stopEase",value:function(t,e){void 0===e&&(e=!0);var i=this.easeTasks[t];return i&&i.stop(e),this}},{key:"stopAll",value:function(t){for(var e in void 0===t&&(t=!0),this.easeTasks)this.stopEase(e,t);return this}}]),i}(Yi),tr={easeDataTo:function(t,e,i,n){return this._easeData||(this._easeData=new Qn(this),function(t,e){e.on("complete",(function(e){t.emit("easedata.".concat(e,".complete"),t),t.emit("easedata.complete",e,t);}));}(this,this._easeData)),this._easeData.easeTo(t,e,i,n),this},easeDataToPromise:function(t,e,i,n){return this.easeDataTo(t,e,i,n),gn(this._easeData,"complete-".concat(t))},stopEaseData:function(t,e){return this._easeData?(this._easeData.stopEase(t,e),this):this},stopAllEaseData:function(t){return this._easeData?(this._easeData.stopAll(t),this):this}},er=function(t){rr(t,!1);},ir=function(t){rr(t,!0);},nr=function(t){return !!t&&!_e(t).hidden},rr=function(t,e){if(t){_e(t).hidden=e;var i=E(t);i?i.setChildVisible(t,!e):t.setVisible(!e);}},sr={show:function(t){return void 0===t&&(t=this),er(t),this},hide:function(t){return void 0===t&&(t=this),ir(t),this},isShow:function(t){return void 0===t&&(t=this),nr(t)}};function or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ar={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1;}function s(t,e,n,s,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,s||t,o),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e];}function a(){this._events=new n,this._eventsCount=0;}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return [];if(n.fn)return [n.fn];for(var r=0,s=n.length,o=new Array(s);r0){var e=t.runTransitionInCallback();t.delayCall(e,this.next,this);}else this.next();}},{key:"exit_TRANS_OPNE",value:function(){this.parent.removeDelayCall();}},{key:"next_OPEN",value:function(){return "TRANS_CLOSE"}},{key:"enter_OPEN",value:function(){this.parent.onOpen();}},{key:"exit_OPEN",value:function(){this.parent.removeDelayCall();}},{key:"next_TRANS_CLOSE",value:function(){return "CLOSE"}},{key:"enter_TRANS_CLOSE",value:function(){var t=this.parent;if(t.transitOutTime>0){var e=t.runTransitionOutCallback();t.delayCall(e,this.next,this);}else this.next();}},{key:"exit_TRANS_CLOSE",value:function(){this.parent.removeDelayCall();}},{key:"next_CLOSE",value:function(){return "TRANS_OPNE"}},{key:"enter_CLOSE",value:function(){this.parent.onClose();}},{key:"exit_CLOSE",value:function(){}},{key:"canOpen",value:function(){return "IDLE"===this.state||"CLOSE"===this.state}},{key:"canClose",value:function(){return "IDLE"===this.state||"OPEN"===this.state}}]),i}(vr),yr={delayCall:function(t,e,i){return this.delayCallTimer=function(t,e,i,n,r){var s=zi(t);return s.time.delayedCall(e,(function(){s.game.events.once("poststep",(function(){i.call(n,r);}));}))}(this,t,e,i),this},removeDelayCall:function(){return this.delayCallTimer&&(this.delayCallTimer.remove(!1),this.delayCallTimer=void 0),this}},kr={setTransitInTime:function(t){return this.transitInTime=t,this},setTransitOutTime:function(t){return this.transitOutTime=t,this},setTransitInCallback:function(t){return t||(t=je),this.transitInCallback=t,this},setTransitOutCallback:function(t){return t||(t=je),this.transitOutCallback=t,this}},mr={runTransitionInCallback:function(){return this.transitInCallback(this.parent,this.transitInTime),this.transitInTime},onOpen:function(){},requestOpen:function(t,e){if(!this._state.canOpen())return this;this.openEventData=arguments.length>0?t:this.parent;var i=this.transitInTime;return void 0!==e&&(this.transitInTime=e),this._state.goto("TRANS_OPNE"),this.transitInTime=i,this}},br={runTransitionOutCallback:function(){return this.transitOutCallback(this.parent,this.transitOutTime),this.transitOutTime},onClose:function(){this.oneShotMode&&this.parent.destroy();},requestClose:function(t,e){if(!this._state.canClose)return this;this.closeEventData=arguments.length>0?t:this.parent;var i=this.transitOutTime;return void 0!==e&&(this.transitOutTime=e),this._state.goto("TRANS_CLOSE"),this.transitOutTime=i,this}},xr={};Object.assign(xr,yr,kr,mr,br);var Cr=Phaser.Utils.Objects.GetValue,wr=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).setTransitInTime(Cr(r,"duration.in",200)),s.setTransitOutTime(Cr(r,"duration.out",200)),s.setTransitInCallback(Cr(r,"transitIn")),s.setTransitOutCallback(Cr(r,"transitOut")),s.oneShotMode=Cr(r,"destroy",!1),s.delayCallTimer=void 0,s._state=new gr(u(s),{eventEmitter:!1,initState:Cr(r,"initState","IDLE")}),s.openEventData=void 0,s.closeEventData=void 0,s}return s(i,[{key:"state",get:function(){return this._state.state}},{key:"shutdown",value:function(t){this.isShutdown||(this.transitInCallback=void 0,this.transitOutCallback=void 0,this.openEventData=void 0,this.closeEventData=void 0,this.removeDelayCall(),p(h(i.prototype),"shutdown",this).call(this,t));}}]),i}(Yi);Object.assign(wr.prototype,xr);var Sr=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),(o=e.call(this,t,0,0,2,2,r,1)).setAlpha(s),o.setScrollFactor(0),o.boot(),o}return s(i,[{key:"boot",value:function(){this.scene.sys.events.on("prerender",this.resize,this);}},{key:"destroy",value:function(t){this.scene&&!this.ignoreDestroy&&(this.scene.sys.events.off("prerender",this.resize,this),p(h(i.prototype),"destroy",this).call(this,t));}},{key:"tint",get:function(){return this.fillColor},set:function(t){this.setFillStyle(t,this.fillAlpha);}},{key:"resize",value:function(){var t=this.scene,e=t.sys.scale.gameSize,i=t.sys.cameras.main,n=e.width,r=e.height,s=1/i.zoom,o=n/2,a=r/2,h=n*s,l=r*s;this.x===o&&this.y===a||this.setPosition(o,a),this.width===h&&this.height===l||this.setSize(h,l).setOrigin(.5);}}]),i}(Phaser.GameObjects.Rectangle),Pr=Phaser.Utils.Objects.GetValue,Or=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,{eventEmitter:!1})).resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.setHitAreaMode(Pr(t,"hitAreaMode",0)),this.setEnable(Pr(t,"enable",!0)),this.setStopMode(Pr(t,"stopAllLevels",!0)),this}},{key:"boot",value:function(){this.parent.on("pointerdown",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointerup",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointermove",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointerover",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointerout",(function(t,e){this.stopAllLevels&&e.stopPropagation();}),this);}},{key:"setHitAreaMode",value:function(t){"string"==typeof t&&(t=Tr[t]);var e=this.parent;return e.input&&e.removeInteractive(),0===t?e.setInteractive():e.setInteractive({hitArea:{},hitAreaCallback:function(){return !0}}),this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),t?this.parent.setInteractive():this.parent.disableInteractive(),this.enable=t,this}},{key:"setStopMode",value:function(t){return void 0===t&&(t=!0),this.stopAllLevels=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}}]),i}(Yi),Tr={default:0,fullWindow:1},_r=Phaser.Utils.Objects.GetValue,Er=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=_r(r,"color",0),a=_r(r,"alpha",.8);return (s=e.call(this,t,o,a)).touchEventStop=new Or(u(s),{hitAreaMode:1}),s}return s(i)}(Sr),Mr=function(t,e){void 0!==t._modalScaleSave?(t.scaleX=t._modalScaleSave,t.scaleY=t._modalScaleSave):t._modalScaleSave=t.scaleX,pn(t,e);},Rr=function(t,e){vn(t,e,void 0,void 0,!1);},Lr=function(t,e){void 0!==t._modalAlphaSave?t.alpha=t._modalAlphaSave:t._modalAlphaSave=t.alpha,Tn(t,e);},Dr=function(t,e){_n(t,e,!1);},Ar=function(t,e){void 0!==t._modalAlphaSave?t.alpha=t._modalAlphaSave:t._modalAlphaSave=t.alpha,Tn(t,e,t.alpha);},jr=function(t,e){_n(t,e,!1);},zr=function(t,e,i,n,r){return !!t&&(!(n&&!n(t,e,i))&&(!!St(t,!0).contains(e,i)&&!(r&&!r(t,e,i))))},Br=Phaser.Utils.Objects.GetValue,Ir=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),null==r.transitIn&&(r.transitIn=Wr.popUp),null==r.transitOut&&(r.transitOut=Wr.scaleDown),r.destroy=Br(r,"destroy",!0),s=e.call(this,t,r);var o=Br(r,"cover");s.cover=!1!==o?function(t,e){var i=t.scene,n=new Er(i,e);return i.add.existing(n),t.isRexContainerLite?(t.pin(n,{syncPosition:!1,syncRotation:!1,syncScale:!1,syncAlpha:!1,syncScrollFactor:!1}),t.moveDepthBelow(n)):i.children.moveBelow(n,t),n}(t,o):void 0,s.cover&&(s.setCoverTransitInCallback(Br(o,"transitIn",Ar)),s.setCoverTransitOutCallback(Br(o,"transitOut",jr)));var a=Br(r,"touchOutsideClose",!1),h=Br(r,"duration.hold",-1),l=Br(r,"timeOutClose",h>=0),c=Br(r,"anyTouchClose",!1);return Br(r,"manualClose",!1)&&(a=!1,c=!1,l=!1),c&&(a=!1),l?s.setDisplayTime(h):s.setDisplayTime(-1),c?s.once("open",s.anyTouchClose,u(s)):a&&s.once("open",s.touchOutsideClose,u(s)),Br(r,"openOnStart",!0)&&s.delayCall(0,s.requestOpen,u(s)),s}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(this.cover||this.scene.input.off("pointerup",this.touchCloseCallback,this),this.cover&&!t&&(this.cover.destroy(),this.cover=void 0),p(h(i.prototype),"shutdown",this).call(this,t));}},{key:"touchOutsideClose",value:function(){return this.cover?this.cover.on("pointerup",this.touchCloseCallback,this):this.scene.input.on("pointerup",this.touchCloseCallback,this),this.clickOutsideTest=!0,this}},{key:"anyTouchClose",value:function(){return this.cover?this.cover.once("pointerup",this.touchCloseCallback,this):this.scene.input.once("pointerup",this.touchCloseCallback,this),this}},{key:"touchCloseCallback",value:function(t){this.clickOutsideTest&&zr(this.parent,t.worldX,t.worldY)||this.requestClose();}},{key:"runTransitionInCallback",value:function(){var t=p(h(i.prototype),"runTransitionInCallback",this).call(this),e=this.cover;return e&&this.coverTransitInCallback&&this.coverTransitInCallback(e,t),t}},{key:"runTransitionOutCallback",value:function(){var t=p(h(i.prototype),"runTransitionOutCallback",this).call(this),e=this.cover;return e&&this.coverTransitOutCallback&&this.coverTransitOutCallback(e,t),t}},{key:"onOpen",value:function(){var t=this.displayTime;t>=0&&this.delayCall(t,this.requestClose,this),this.emit("open",this.parent,this),p(h(i.prototype),"onOpen",this).call(this);}},{key:"onClose",value:function(){this.emit("close",this.closeEventData),p(h(i.prototype),"onClose",this).call(this);}},{key:"setDisplayTime",value:function(t){return this.displayTime=t,this}},{key:"setTransitInCallback",value:function(t){switch("string"==typeof t&&(t=Wr[t]),t){case Wr.popUp:t=Mr;break;case Wr.fadeIn:t=Lr;}return p(h(i.prototype),"setTransitInCallback",this).call(this,t),this}},{key:"setTransitOutCallback",value:function(t){switch("string"==typeof t&&(t=Wr[t]),t){case Wr.scaleDown:t=Rr;break;case Wr.fadeOut:t=Dr;}return p(h(i.prototype),"setTransitOutCallback",this).call(this,t),this}},{key:"setCoverTransitInCallback",value:function(t){return this.coverTransitInCallback=t,this}},{key:"setCoverTransitOutCallback",value:function(t){return this.coverTransitOutCallback=t,this}}]),i}(wr),Wr={popUp:0,fadeIn:1,scaleDown:0,fadeOut:1},Fr={modal:function(t,e){return ye(t)&&(e=t,t=void 0),void 0===this._modalBehavior&&(this.onCreateModalBehavior&&this.onCreateModalBehavior(this,t),this._modalBehavior=function(t,e){var i=new Ir(t,e);return i.on("open",(function(){t.emit("modal.open",i);})),i.on("close",(function(e){t.emit("modal.close",e,i);})),t.on("modal.requestClose",i.requestClose,i),i}(this,t)),e&&this._modalBehavior.once("close",e),this._modalBehavior.requestOpen(),this},modalPromise:function(t){var e=this;return new Promise((function(i,n){e.modal(t,i);}))},modalClose:function(t){return function(t,e){t.emit("modal.requestClose",e);}(this,t),this}},Yr=function(t,e,i,n){if(e)return zr(t,e.worldX,e.worldY,i,n);for(var r=t.scene.input.manager,s=r.pointersTotal,o=r.pointers,a=0;a=this.dragThreshold&&this.cancel();}},{key:"click",value:function(t,e,i){if(!this.enable)return this;if(void 0===t)return this.emit("click",this,this.parent,e,i),this;this.pointer=void 0;var n=this.lastClickTime;return void 0!==n&&t-n<=this.clickInterval||(this.lastClickTime=t,this.emit("click",this,this.parent,e,i)),this}},{key:"cancel",value:function(){return this.pointer=void 0,this}},{key:"onOver",value:function(t,e,i,n){return this.enable?(this.emit("over",this,this.parent,t,n),this):this}},{key:"onOut",value:function(t,e){return this.enable?(this.emit("out",this,this.parent,t,e),this):this}}]),i}(Yi),ns={press:0,pointerdown:0,release:1,pointerup:1},rs={onClick:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._click&&(t._click=new is(t,n)),t._click.on("click",e,i),this):this},offClick:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._click||t._click.off("click",e,i),this},enableClick:function(t,e){return t&&"object"!==i(t)&&(e=t,t=this),void 0===t._click||t._click.setEnable(e),this},disableClick:function(t){return t&&"object"!==i(t)&&(t=this),void 0===t._click||t._click.setEnable(!1),this}},ss=function(t,e,i,n){if(e)return !(i&&!i(t,e))&&(!!os(t,e)&&!(n&&!n(t,e)));for(var r=t.scene.input.manager,s=r.pointersTotal,o=r.pointers,a=0;a0)return as.length=0,!0;return as.length=0,!1},as=[],hs=Phaser.Utils.Objects.GetValue,ls=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r))._enable=void 0;var o=hs(r,"inputConfig",void 0);return o&&t.setInteractive(o),s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.lastClickTime=void 0,this.setEnable(hs(t,"enable",!0)),this.setMode(hs(t,"mode",1)),this.setClickInterval(hs(t,"clickInterval",100)),this.setDragThreshold(hs(t,"threshold",void 0)),this}},{key:"boot",value:function(){var t=this.parent.scene;t.input.on("pointerdown",this.onPress,this),t.input.on("pointerup",this.onRelease,this),t.input.on("pointermove",this.onMove,this);}},{key:"shutdown",value:function(t){if(!this.isShutdown){var e=this.parent.scene;e.input.off("pointerdown",this.onPress,this),e.input.off("pointerup",this.onRelease,this),e.input.off("pointermove",this.onMove,this),this.pointer=null,p(h(i.prototype),"shutdown",this).call(this,t);}}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t){t||this.cancel(),this._enable=t;var e=t?"enable":"disable";this.emit(e,this,this.parent);}}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=us[t]),this.mode=t,this}},{key:"setClickInterval",value:function(t){return this.clickInterval=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"isPointerInside",value:function(t){var e=this.parent;return (e.input?ss:Yr)(e,t)}},{key:"onPress",value:function(t){this.parent.willRender(t.camera)&&void 0===this.pointer&&(this.pointer=t,0===this.mode&&(this.isPointerInside(t)||this.click(t.downTime,t)));}},{key:"onRelease",value:function(t){this.parent.willRender(t.camera)&&this.pointer===t&&(1===this.mode&&(this.isPointerInside(t)||this.click(t.upTime,t)),this.pointer=void 0);}},{key:"onMove",value:function(t,e,i,n){this.pointer===t&&void 0!==this.dragThreshold&&1===this.mode&&(t.getDistance()>=this.dragThreshold||this.isPointerInside(t))&&this.cancel();}},{key:"click",value:function(t,e){if(!this.enable)return this;if(void 0===t)return this.emit("clickoutside",this,this.parent,e),this;this.pointer=void 0;var i=this.lastClickTime;return void 0!==i&&t-i<=this.clickInterval||(this.lastClickTime=t,this.emit("clickoutside",this,this.parent,e)),this}},{key:"cancel",value:function(){return this.pointer=void 0,this}}]),i}(Yi),us={press:0,pointerdown:0,release:1,pointerup:1},cs={onClickOutside:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._clickOutside&&(t._clickOutside=new ls(t,n)),t._clickOutside.on("clickoutside",e,i),this):this},offClickOutside:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._clickOutside||t._clickOutside.off("clickoutside",e,i),this},enableClickOutside:function(t,e){return t&&"object"!==i(t)&&(e=t,t=this),void 0===t._clickOutside||t._clickOutside.setEnable(e),this},disableClickOutside:function(t){return t&&"object"!==i(t)&&(t=this),void 0===t._clickOutside||t._clickOutside.setEnable(!1),this}},ds=function(t){a(i,t);var e=d(i);function i(){var t;return n(this,i),(t=e.call(this,{eventEmitter:!1})).goto("IDLE"),t}return s(i,[{key:"setCooldownTime",value:function(t){return this.cooldownTime=t,this.cooldownMode=void 0!==t,this}},{key:"request",value:function(){return this.runMethod("request")}},{key:"update_IDLE",value:function(){this.compensationTime=0;}},{key:"request_IDLE",value:function(){return this.next(),!0}},{key:"next_IDLE",value:function(){if(this.cooldownMode)return "COOLDOWN"}},{key:"enter_COOLDOWN",value:function(){this.remainderTime=this.cooldownTime+this.compensationTime;}},{key:"update_COOLDOWN",value:function(t,e){this.remainderTime-=e,this.remainderTime<0&&(this.compensationTime=this.cooldownTime>e?-this.remainderTime:0,this.goto("IDLE"));}},{key:"request_COOLDOWN",value:function(){return !1}}]),i}(vr),fs=Phaser.Utils.Objects.GetValue,ps=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r))._enable=void 0,s.cooldown=new ds,s.parent.setInteractive(fs(r,"inputConfig",void 0)),s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.prevIsInTouch=!1,this.isInTouching=!1,this.setEnable(fs(t,"enable",!0)),this.setCooldown(fs(t,"cooldown",void 0)),this}},{key:"boot",value:function(){var t=this.parent;t.on("pointerdown",this.onPointIn,this),t.on("pointerover",this.onPointIn,this),t.on("pointerup",this.onPointOut,this),t.on("pointerout",this.onPointOut,this),this.scene.sys.events.on("preupdate",this.preupdate,this);}},{key:"shutdown",value:function(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this.preupdate,this),this.pointer=void 0,p(h(i.prototype),"shutdown",this).call(this,t));}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t)return t||(this.prevIsInTouch=!1,this.isInTouching=!1,this.pointer=void 0),this._enable=t,this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"cooldownTime",get:function(){return this.cooldown.cooldownTime},set:function(t){this.cooldown.setCooldownTime(t);}},{key:"setCooldown",value:function(t){return this.cooldownTime=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"onPointIn",value:function(t,e,i){this.enable&&t.isDown&&void 0===this.pointer&&(this.pointer=t,this.isInTouching=!0);}},{key:"onPointOut",value:function(t){this.enable&&this.pointer===t&&(this.pointer=void 0,this.isInTouching=!1);}},{key:"preupdate",value:function(t,e){this.cooldown.update(t,e),!this.prevIsInTouch&&this.isInTouching&&this.emit("touchstart",this,this.parent),this.isInTouching&&this.cooldown.request()&&this.emit("intouch",this,this.parent,this.pointer),this.prevIsInTouch&&!this.isInTouching&&this.emit("touchend",this,this.parent),this.prevIsInTouch=this.isInTouching;}}]),i}(Yi),vs={isPointerInBounds:function(t){return void 0===t?t=this:"string"==typeof t&&(t=this.getElement(t)),!!t&&Yr(t)},onTouching:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._inTouching&&(t._inTouching=new ps(t,n)),t._inTouching.on("intouch",e,i),this):this},offTouching:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._inTouching||t._inTouching.off("intouch",e,i),this},onTouchingEnd:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._inTouching&&(t._inTouching=new ps(t,n)),t._inTouching.on("touchend",e,i),this):this},offTouchingEnd:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._inTouching||t._inTouching.off("touchend",e,i),this},enableTouching:function(t,e){return t&&"object"!==i(t)&&(e=t,t=this),void 0===t._inTouching||t._inTouching.setEnable(e),this},disableTouching:function(t){return t&&"object"!==i(t)&&(t=this),void 0===t._inTouching||t._inTouching.setEnable(!1),this}},gs=function(t,e,i){for(var n,r=0,s=t.length;r0),this.onDragStart()));}},{key:"onPointerUp",value:function(t){this.enable&&((!this.bounds||this.bounds.contains(t.x,t.y))&&this.pointer===t&&(this.pointer=void 0,this.movedState=!1,this.tracerState=Ls,this.onDragEnd()));}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown){var e=!this.bounds||this.bounds.contains(t.x,t.y),i=this.pointer===t;!i&&e||(i&&!e?this.onPointerUp(t):(this.movedState||(this.movedState=t.x!==t.downX||t.y!==t.downY),this.movedState&&this.onDrag()));}}},{key:"dragCancel",value:function(){return this.tracerState===Ds&&this.onDragEnd(),this.pointer=void 0,this.tracerState=Ls,this}},{key:"onDragStart",value:function(){this.emit("dragstart",this);}},{key:"onDragEnd",value:function(){this.emit("dragend",this);}},{key:"onDrag",value:function(){this.emit("drag",this);}},{key:"preUpdate",value:function(t,e){}},{key:"postUpdate",value:function(t,e){}},{key:"startTicking",value:function(){p(h(i.prototype),"startTicking",this).call(this),this.scene.sys.events.on("preupdate",this.preUpdate,this),this.scene.sys.events.on("postupdate",this.postUpdate,this);}},{key:"stopTicking",value:function(){p(h(i.prototype),"stopTicking",this).call(this),this.scene&&(this.scene.sys.events.off("preupdate",this.preUpdate,this),this.scene.sys.events.off("postupdate",this.postUpdate,this));}},{key:"setRecongizedStateObject",value:function(t){return this.recongizedState=t,this}},{key:"state",get:function(){return this.recongizedState.state},set:function(t){this.recongizedState.state=t;}},{key:"cancel",value:function(){return this.state=As,this}}]),i}(Vi),Ls=0,Ds=1,As="IDLE",js=Phaser.Utils.Objects.GetValue,zs=Phaser.Math.Distance.Between,Bs=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.stop(),o.tapsCount=0,o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.start(),o.tapsCount=0,o.emit("tappingstart",o,o.gameObject,o.lastPointer);}},RECOGNIZED:{enter:function(){o.start(),o.emit("tap",o,o.gameObject,o.lastPointer),o.emit("".concat(o.tapsCount,"tap"),o,o.gameObject,o.lastPointer);}}},init:function(){this.state=Is;},eventEmitter:!1};return s.setRecongizedStateObject(new vr(a)),s}return s(i,[{key:"resetFromJSON",value:function(t){p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setHoldTime(js(t,"time",250)),this.setTapInterval(js(t,"tapInterval",200)),this.setDragThreshold(js(t,"threshold",9)),this.setTapOffset(js(t,"tapOffset",10));var e=js(t,"taps",void 0);return void 0!==e?this.setTaps(e):(this.setMaxTaps(js(t,"maxTaps",void 0)),this.setMinTaps(js(t,"minTaps",void 0))),this}},{key:"onDragStart",value:function(){switch(this.state){case Is:this.state=Ws;break;case Ws:var t=this.lastPointer;zs(t.upX,t.upY,t.x,t.y)>this.tapOffset&&(this.state=Fs,this.state=Ws);break;case Fs:this.state=Ws;}}},{key:"onDragEnd",value:function(){this.state===Ws&&(this.tapsCount++,this.emit("tapping",this,this.gameObject,this.lastPointer),void 0!==this.maxTaps&&this.tapsCount===this.maxTaps&&(this.state=Fs));}},{key:"onDrag",value:function(){this.state!==Is&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Is);}},{key:"preUpdate",value:function(t,e){if(this.isRunning&&this.enable&&this.state===Ws){var i=this.lastPointer;if(i.isDown)t-i.downTime>this.holdTime&&(this.state=Is);else t-i.upTime>this.tapInterval&&(void 0===this.minTaps||this.tapsCount>=this.minTaps?this.state=Fs:this.state=Is);}}},{key:"postUpdate",value:function(t,e){this.isRunning&&this.enable&&this.state===Fs&&(this.state=Is);}},{key:"isTapped",get:function(){return this.state===Fs}},{key:"setHoldTime",value:function(t){return this.holdTime=t,this}},{key:"setTapInterval",value:function(t){return this.tapInterval=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"setTapOffset",value:function(t){return this.tapOffset=t,this}},{key:"setMaxTaps",value:function(t){return this.maxTaps=t,this}},{key:"setMinTaps",value:function(t){return this.minTaps=t,this}},{key:"setTaps",value:function(t,e){return void 0===e&&(e=t),this.setMinTaps(t).setMaxTaps(e),this}}]),i}(Rs),Is="IDLE",Ws="BEGIN",Fs="RECOGNIZED",Ys=Phaser.Utils.Objects.GetValue,Xs=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.start();},exit:function(){o.stop();}},RECOGNIZED:{enter:function(){o.emit("pressstart",o,o.gameObject,o.lastPointer);},exit:function(){o.emit("pressend",o,o.gameObject,o.lastPointer);}}},init:function(){this.state=Gs;},eventEmitter:!1};return s.setRecongizedStateObject(new vr(a)),s}return s(i,[{key:"resetFromJSON",value:function(t){return p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(Ys(t,"threshold",9)),this.setHoldTime(Ys(t,"time",251)),this}},{key:"onDragStart",value:function(){this.state=Vs,0===this.holdTime&&(this.state=Hs);}},{key:"onDragEnd",value:function(){this.state=Gs;}},{key:"onDrag",value:function(){this.state!==Gs&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Gs);}},{key:"preUpdate",value:function(t,e){this.isRunning&&this.enable&&(this.state===Vs&&t-this.pointer.downTime>=this.holdTime&&(this.state=Hs));}},{key:"isPressed",get:function(){return this.state===Hs}},{key:"setHoldTime",value:function(t){return this.holdTime=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(Rs),Gs="IDLE",Vs="BEGIN",Hs="RECOGNIZED";Phaser.Utils.Objects.GetValue;var Ns=function(t){return Wi(t).loop.delta},Us=Phaser.Math.Distance.Between,Ks=Phaser.Math.Angle.Between,Js={getDt:function(){return Ns(this.scene)},getVelocity:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Us(e.x,e.y,t.x,t.y)/(.001*this.getDt())},getVelocityX:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Math.abs(t.x-e.x)/(.001*this.getDt())},getVelocityY:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Math.abs(t.y-e.y)/(.001*this.getDt())},getVelocityAngle:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Ks(e.x,e.y,t.x,t.y)}},qs={"up&down":0,"left&right":1,"4dir":2,"8dir":3},Zs={},$s=Phaser.Utils.Objects.GetValue,Qs=Phaser.Math.RadToDeg,to=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.validDrag=!1;}},RECOGNIZED:{enter:function(){o.start(),o.updateDirectionStates(),o.emit("swipe",o,o.gameObject,o.lastPointer);},exit:function(){o.stop(),o.clearDirectionStates();}}},init:function(){this.state=eo;},eventEmitter:!1};return s.setRecongizedStateObject(new vr(a)),s.clearDirectionStates(),s}return s(i,[{key:"resetFromJSON",value:function(t){return p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold($s(t,"threshold",10)),this.setVelocityThreshold($s(t,"velocityThreshold",1e3)),this.setDirectionMode($s(t,"dir","8dir")),this}},{key:"onDragStart",value:function(){this.state=io;}},{key:"onDragEnd",value:function(){this.state=eo;}},{key:"onDrag",value:function(){this.state===io&&(this.validDrag||(this.validDrag=0===this.dragThreshold||this.pointer.getDistance()>=this.dragThreshold),this.validDrag&&this.dragVelocity>this.velocityThreshold&&(this.state=no));}},{key:"postUpdate",value:function(t,e){this.isRunning&&this.enable&&this.state===no&&(this.state=eo);}},{key:"isSwiped",get:function(){return this.state===no}},{key:"dragVelocity",get:function(){var t;switch(this.dirMode){case 0:t=this.getVelocityY();break;case 1:t=this.getVelocityX();break;default:t=this.getVelocity();}return t}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"setVelocityThreshold",value:function(t){return this.velocityThreshold=t,this}},{key:"setDirectionMode",value:function(t){return "string"==typeof t&&(t=qs[t]),this.dirMode=t,this}},{key:"updateDirectionStates",value:function(){return function(t,e,i){switch(void 0===i?i={}:!0===i&&(i=Zs),i.left=!1,i.right=!1,i.up=!1,i.down=!1,t=(t+360)%360,e){case 0:t<180?i.down=!0:i.up=!0;break;case 1:t>90&&t<=270?i.left=!0:i.right=!0;break;case 2:t>45&&t<=135?i.down=!0:t>135&&t<=225?i.left=!0:t>225&&t<=315?i.up=!0:i.right=!0;break;case 3:t>22.5&&t<=67.5?(i.down=!0,i.right=!0):t>67.5&&t<=112.5?i.down=!0:t>112.5&&t<=157.5?(i.down=!0,i.left=!0):t>157.5&&t<=202.5?i.left=!0:t>202.5&&t<=247.5?(i.left=!0,i.up=!0):t>247.5&&t<=292.5?i.up=!0:t>292.5&&t<=337.5?(i.up=!0,i.right=!0):i.right=!0;}}(Qs(this.getVelocityAngle()),this.dirMode,this),this}},{key:"clearDirectionStates",value:function(){return this.left=!1,this.right=!1,this.up=!1,this.down=!1,this}}]),i}(Rs);Object.assign(to.prototype,Js);var eo="IDLE",io="BEGIN",no="RECOGNIZED",ro=Phaser.Utils.Objects.GetValue,so=Phaser.Utils.Array.SpliceOne,oo=Phaser.Math.Distance.Between,ao=Phaser.Math.Angle.Between,ho=function(){function t(e,i){n(this,t);var r=e.input.manager.pointersTotal-1;r<2&&e.input.addPointer(2-r),this.scene=e,this.setEventEmitter(ro(i,"eventEmitter",void 0)),this._enable=void 0,this.pointers=[],this.movedState={},this.resetFromJSON(i),this.boot();}return s(t,[{key:"resetFromJSON",value:function(t){return this.setEnable(ro(t,"enable",!0)),this.bounds=ro(t,"bounds",void 0),this.tracerState=uo,this.pointers.length=0,At(this.movedState),this}},{key:"boot",value:function(){this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("gameout",this.dragCancel,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.sys.events.once("shutdown",this.destroy,this);}},{key:"shutdown",value:function(){this.scene&&(this.destroyEventEmitter(),this.pointers.length=0,At(this.movedState),this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("gameout",this.dragCancel,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.sys.events.off("shutdown",this.destroy,this),this.scene=void 0);}},{key:"destroy",value:function(){this.shutdown();}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t)return t||this.dragCancel(),this._enable=t,this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"onPointerDown",value:function(t){if(this.enable&&(2!==this.pointers.length&&(!this.bounds||this.bounds.contains(t.x,t.y))&&-1===this.pointers.indexOf(t)))switch(this.movedState[t.id]=!1,this.pointers.push(t),this.tracerState){case uo:this.tracerState=co,this.onDrag1Start();break;case co:this.tracerState=fo,this.onDrag2Start();}}},{key:"onPointerUp",value:function(t){if(this.enable&&(!this.bounds||this.bounds.contains(t.x,t.y))){var e=this.pointers.indexOf(t);if(-1!==e)switch(delete this.movedState[t.id],so(this.pointers,e),this.tracerState){case co:this.tracerState=uo,this.onDrag1End();break;case fo:this.tracerState=co,this.onDrag2End(),this.onDrag1Start();}}}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown){var e=!this.bounds||this.bounds.contains(t.x,t.y),i=-1!==this.pointers.indexOf(t);if(!i&&e);else if(i&&!e)this.onPointerUp(t);else if(this.movedState[t.id]||(this.movedState[t.id]=t.x!==t.downX||t.y!==t.downY),this.movedState[t.id])switch(this.tracerState){case co:this.onDrag1();break;case fo:this.onDrag2();}}}},{key:"dragCancel",value:function(){return this.tracerState===fo&&this.onDrag2End(),this.pointers.length=0,At(this.movedState),this.tracerState=uo,this}},{key:"onDrag1Start",value:function(){this.emit("drag1start",this);}},{key:"onDrag1End",value:function(){this.emit("drag1end",this);}},{key:"onDrag1",value:function(){this.emit("drag1",this);}},{key:"onDrag2Start",value:function(){this.emit("drag2start",this);}},{key:"onDrag2End",value:function(){this.emit("drag2end",this);}},{key:"onDrag2",value:function(){this.emit("drag2",this);}},{key:"distanceBetween",get:function(){if(this.tracerState!==fo)return 0;var t=this.pointers[0],e=this.pointers[1];return oo(t.x,t.y,e.x,e.y)}},{key:"angleBetween",get:function(){if(this.tracerState!==fo)return 0;var t=this.pointers[0],e=this.pointers[1];return ao(t.x,t.y,e.x,e.y)}},{key:"drag1Vector",get:function(){var t=this.pointers[0];if(t&&this.movedState[t.id]){var e=t.position,i=t.prevPosition;lo.x=e.x-i.x,lo.y=e.y-i.y;}else lo.x=0,lo.y=0;return lo}},{key:"centerX",get:function(){if(this.tracerState!==fo)return 0;var t=this.pointers[0].position,e=this.pointers[1].position;return (t.x+e.x)/2}},{key:"centerY",get:function(){if(this.tracerState!==fo)return 0;var t=this.pointers[0].position,e=this.pointers[1].position;return (t.y+e.y)/2}},{key:"prevCenterX",get:function(){if(this.tracerState!==fo)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,e=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return (t.x+e.x)/2}},{key:"prevCenterY",get:function(){if(this.tracerState!==fo)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,e=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return (t.y+e.y)/2}},{key:"movementCenterX",get:function(){return this.centerX-this.prevCenterX}},{key:"movementCenterY",get:function(){return this.centerY-this.prevCenterY}},{key:"setRecongizedStateObject",value:function(t){return this.recongizedState=t,this}},{key:"state",get:function(){return this.recongizedState.state},set:function(t){this.recongizedState.state=t;}},{key:"cancel",value:function(){return this.state=po,this}}]),t}();Object.assign(ho.prototype,Di);var lo={},uo=0,co=1,fo=2,po="IDLE";Phaser.Utils.Objects.GetValue;var vo=Phaser.Math.RotateAround,go=function(t,e,i,n){return vo(t,e,i,n),t.rotation+=n,t},yo={},ko=Phaser.Utils.Objects.GetValue,mo=Phaser.Math.Angle.WrapDegrees,bo=Phaser.Math.Angle.ShortestBetween,xo=Phaser.Math.RadToDeg,Co=Phaser.Math.DegToRad,wo=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.prevAngle=void 0,o.angle=0;}},BEGIN:{},RECOGNIZED:{enter:function(){o.emit("rotatestart",o);},exit:function(){o.emit("rotateend",o);}}},init:function(){this.state=Po;},eventEmitter:!1};return s.setRecongizedStateObject(new vr(a)),s}return s(i,[{key:"resetFromJSON",value:function(t){return p(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(ko(t,"threshold",0)),this}},{key:"onDrag2Start",value:function(){this.prevAngle=mo(xo(this.angleBetween)),this.state=Oo,0===this.dragThreshold&&(this.state=To);}},{key:"onDrag2End",value:function(){this.state=Po;}},{key:"onDrag2",value:function(){switch(this.state){case Oo:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var t=mo(xo(this.angleBetween));this.angle=bo(this.prevAngle,t),this.prevAngle=t,this.state=To;}break;case To:t=mo(xo(this.angleBetween));this.angle=bo(this.prevAngle,t),this.prevAngle=t,this.emit("rotate",this);}}},{key:"isRotated",get:function(){return this.state===To}},{key:"rotation",get:function(){return Co(this.angle)}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(ho),So={spinObject:function(t,e){if(!this.isRotation)return this;void 0===e&&(e=this.pointers[0].camera);var i=this.movementCenterX,n=this.movementCenterY,r=function(t,e,i,n){return void 0===n?n={}:!0===n&&(n=yo),i.getWorldPoint(t,e,n),n}(this.centerX,this.centerY,e,!0),s=r.x,o=r.y,a=this.rotation;if(Array.isArray(t))for(var h=t,l=0,u=h.length;l=this.sizerChildren.length?this.sizerChildren.push(t):this.sizerChildren.splice(a,0,t),t.isRexSizer||(e>0&&(0===this.orientation?t.minWidth=void 0===h?mt(t):h:t.minHeight=void 0===l?bt(t):l),s&&(0===this.orientation?t.minHeight=l:t.minWidth=h)),void 0!==o&&this.addChildrenMap(o,t),this},Ko={add:Uo,addSpace:function(t){return this.insertSpace(void 0,t),this},insertSpace:function(t,e){return void 0===e&&(e=1),Uo.call(this,new Yo(this.scene),{proportion:e,minWidth:0,minHeight:0,index:t}),this},insert:function(t,e,i,n,r,s,o,a){return Go(i)&&(i.index=t),Uo.call(this,e,i,n,r,s,o,t,a),this},insertAtPosition:function(t,e,i,n,r,s,o,a,h){var l=Xo.call(this,t,e);return -1===l&&(l=void 0),this.insert(l,i,n,r,s,o,a,h),this}},Jo=qt.prototype.clear,qo=function(t){this.backgroundChildren&&(this.backgroundChildren.length=0);var e,i=!t&&this.sizerEventsEnable;if(i&&(e=this.getChildren([])),Jo.call(this,t),i)for(var n,r=0,s=e.length;r=0;e--)this.remove(this.sizerChildren[e],t);return this},clear:function(t){return this.sizerChildren.length=0,qo.call(this,t),this}},Qo={getChildAlign:function(t){return this.getSizerConfig(t).align},setChildAlign:function(t,e){return "string"==typeof e&&(e=Ae[e]),this.getSizerConfig(t).align=e,this}},ta={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=this.space.item,a=!0,h=0,l=s.length;h0&&this.proportionLength>0&&(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):n.proportion>0&&this.proportionLength>0&&(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;n0?(e=t-this.getChildrenWidth(!1),this.proportionLength=e/this.childrenProportion):this.proportionLength=0;}return t},resolveHeight:function(t){t=Ei.call(this,t);if(void 0===this.proportionLength&&1===this.orientation){var e=t-this.childrenHeight;e>0?(e=t-this.getChildrenHeight(!1),this.proportionLength=e/this.childrenProportion):this.proportionLength=0;}return t}};Object.assign(ta,Ko,$o,Qo,{getChildProportion:function(t){return this.getSizerConfig(t).proportion},setChildProportion:function(t,e){return this.getSizerConfig(t).proportion=e,this}},{getChildExpand:function(t){return this.getSizerConfig(t).expand},setChildExpand:function(t,e){return this.getSizerConfig(t).expand=e,this}});var ea=function(){for(var t,e,i=0,n=this.sizerChildren,r=0,s=n.length;r0&&(i+=e);return i},ia={x:0,h:0,horizontal:0,"left-to-right":0,y:1,v:1,vertical:1,"top-to-bottom":1},na=function(t){return "string"==typeof t&&(t=ia[t]),t},ra=Phaser.Utils.Objects.IsPlainObject,sa=Phaser.Utils.Objects.GetValue,oa=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var u;return n(this,i),ra(r)?(r=sa(l=r,"x",0),s=sa(l,"y",0),o=sa(l,"width",void 0),a=sa(l,"height",void 0),h=sa(l,"orientation",0)):ra(o)?(o=sa(l=o,"width",void 0),a=sa(l,"height",void 0),h=sa(l,"orientation",0)):ra(h)&&(h=sa(l=h,"orientation",0)),void 0===h&&(h=0),(u=e.call(this,t,r,s,o,a,l)).type="rexSizer",u.sizerChildren=[],u.setOrientation(h),u.setItemSpacing(sa(l,"space.item",0)),u.setStartChildIndex(sa(l,"startChildIndex",0)),u.setRTL(sa(l,"rtl",!1)),u.addChildrenMap("items",u.sizerChildren),u}return s(i,[{key:"setOrientation",value:function(t){return this.orientation=na(t),this}},{key:"setItemSpacing",value:function(t){return this.space.item=t,this}},{key:"setStartChildIndex",value:function(t){return this.startChildIndex=t,this}},{key:"setRTL",value:function(t){return void 0===t&&(t=!0),this.rtl=t,this}},{key:"childrenProportion",get:function(){return void 0===this._childrenProportion&&(this._childrenProportion=ea.call(this)),this._childrenProportion}}]),i}(Io);Object.assign(oa.prototype,ta);var aa=Phaser.Utils.Array.GetFirst,ha=Phaser.Utils.Array.Remove,la=function(t,e,i){if(t){var n=null==e,r=null==i;return n&&r||(n||(t.displayWidth=e),r||(t.displayHeight=i),n&&(t.scaleX=t.scaleY),r&&(t.scaleY=t.scaleX)),t}},ua=function(t,e){var i;return t||0===t||(t=""),void 0===e&&(e=!0),Array.isArray(t)&&(t=t.join("\n")),(i=e?"".concat(this.text,"\n").concat(t):"".concat(this.text).concat(t))!=this.text&&this.setText(i),this},ca={appendText:ua,resetDisplayContent:function(t){void 0===t?t={}:"string"==typeof t&&(t={text:t});var e=t.text||"";this.setText(e);var i=this.childrenMap.icon;if(i){t.icon?this.show(i):this.hide(i);var n=t.iconSize;n&&(this.setChildDisplaySize(i,n,n),void 0!==this.iconWidth&&this.setIconSize(n)),!0!==t.icon&&this.setIconTexture(t.icon,t.iconFrame);}var r=this.childrenMap.action;if(r){t.action?this.show(r):this.hide(r);var s=t.actionSize;s&&(this.setChildDisplaySize(r,s,s),void 0!==this.actionWidth&&this.setActionSize(s)),!0!==t.action&&this.setActionTexture(t.action,t.actionFrame);}return this}},da=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"text",get:function(){var t=this.childrenMap.text;return t?t.text:""},set:function(t){var e=this.childrenMap.text;e&&e.setText(t);}},{key:"setText",value:function(t){return this.text=t,this}},{key:"setIconTexture",value:function(t,e){var i=this.childrenMap.icon;return i?(i.setTexture(t,e),void 0!==this.iconWidth&&void 0!==this.iconHeight&&(la(i,this.iconWidth,this.iconHeight),this.resetChildScaleState(i)),this):this}},{key:"setTexture",value:function(t,e){return this.setIconTexture(t,e),this}},{key:"setIconSize",value:function(t,e){return void 0===e&&(e=t),this.iconWidth=t,this.iconHeight=e,this}},{key:"texture",get:function(){var t=this.childrenMap.icon;if(t)return t.texture}},{key:"frame",get:function(){var t=this.childrenMap.icon;if(t)return t.frame}},{key:"setActionTexture",value:function(t,e){var i=this.childrenMap.action;return void 0===i||(i.setTexture(t,e),void 0!==this.actionWidth&&void 0!==this.actionHeight&&(la(i,this.actionWidth,this.actionHeight),this.resetChildScaleState(i))),this}},{key:"actionTexture",get:function(){var t=this.childrenMap.action;if(t)return t.texture}},{key:"actionFrame",get:function(){var t=this.childrenMap.action;if(t)return t.frame}},{key:"setActionSize",value:function(t,e){return void 0===e&&(e=t),this.actionWidth=t,this.actionHeight=e,this}},{key:"preLayout",value:function(){var t=this.childrenMap.icon;t&&void 0!==this.iconWidth&&void 0!==this.iconHeight&&la(t,this.iconWidth,this.iconHeight);var e=this.childrenMap.action;e&&void 0!==this.actionWidth&&void 0!==this.actionHeight&&la(e,this.actionWidth,this.actionHeight),p(h(i.prototype),"preLayout",this).call(this);}},{key:"postLayout",value:function(t,e,i){var n=this.childrenMap.iconMask;n&&(n.setPosition(),this.resetChildPositionState(n));var r=this.childrenMap.actionMask;return r&&(r.setPosition(),this.resetChildPositionState(r)),this}},{key:"resize",value:function(t,e){p(h(i.prototype),"resize",this).call(this,t,e);var n=this.childrenMap.iconMask;n&&n.resize();var r=this.childrenMap.actionMask;return r&&r.resize(),this}}]),i}(oa);Object.assign(da.prototype,ca);var fa=function(t,e,i,n,r){if(this.clear().fillStyle(16777215),1===this.shapeType){i=i.left;var s=Math.min(t,e)/2;this.fillCircle(-t*(n-.5),-e*(r-.5),s+i);}else this.fillRect(-t*n-i.left,-e*r-i.top,t+i.left+i.right,e+i.top+i.bottom);},pa=function(t,e){for(var i in t){if(!(i in e))return !1;if(t[i]!==e[i])return !1}for(var i in e)if(!(i in t))return !1;return !0},va=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),void 0===r&&(r=0),"string"==typeof r&&(r=ga[r]),(o=e.call(this,t.scene)).parent=t,o.shapeType=r,o.padding=ci(s),o.setPosition().resize().setVisible(!1),o}return s(i,[{key:"destroy",value:function(){return this.parent=void 0,p(h(i.prototype),"destroy",this).call(this),this}},{key:"setPosition",value:function(t,e){var n=this.parent;return void 0===t&&(t=n.x),void 0===e&&(e=n.y),p(h(i.prototype),"setPosition",this).call(this,t,e),this}},{key:"resize",value:function(t,e,i){var n=this.parent;void 0===t&&(t=n.width),void 0===e&&(e=n.height),void 0===i?i=this.padding:"number"==typeof i&&(i=ci(i));var r=this.width!==t||this.height!==e,s=this.padding!==i&&!pa(this.padding,i);return r||s?(this.width=t,this.height=e,s&&jt(i,this.padding),this.originX=n.originX,this.originY=n.originY,fa.call(this,t,e,i,n.originX,n.originY),this):this}},{key:"setOrigin",value:function(t,e){void 0===e&&(e=t);var i=this.parent;return void 0===t&&(t=i.originX),void 0===e&&(e=i.originY),this.originX===t&&this.originY===e||(this.originX=t,this.originY=e,fa.call(this,this.width,this.height,this.padding,t,e)),this}}]),i}(Phaser.GameObjects.Graphics),ga={rectangle:0,circle:1},ya=function(t,e,i,n){var r=new va(e,i,n);if(t&&!t.isRexSizer){var s=r.createGeometryMask();t.setMask(s),this.once("destroy",(function(){t.setMask(),s.destroy();}));}return this.pin(r),r},ka=Phaser.Utils.Objects.GetValue,ma=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r)).type="rexLabel";var o=ka(r,"background",void 0),a=ka(r,"icon",void 0),h=ka(r,"iconMask",void 0),l=ka(r,"text",void 0),c=ka(r,"action",void 0),d=ka(r,"actionMask",void 0),f=ka(r,"align",void 0);if(o&&s.addBackground(o),"right"!==f&&"bottom"!==f&&"center"!==f||s.addSpace(),a){0===s.orientation?(l||c)&&(x={right:ka(r,"space.icon",0),top:ka(r,"space.iconTop",0),bottom:ka(r,"space.iconBottom",0),left:ka(r,"space.iconLeft",0)}):(l||c)&&(x={bottom:ka(r,"space.icon",0),left:ka(r,"space.iconLeft",0),right:ka(r,"space.iconRight",0),top:ka(r,"space.iconTop",0)});var p=ka(r,"squareFitIcon",!1)?1:0;if(s.add(a,{proportion:0,padding:x,fitRatio:p}),h&&(h=ya.call(u(s),a,a,1)),!p){var v=ka(r,"iconSize",void 0);s.setIconSize(ka(r,"iconWidth",v),ka(r,"iconHeight",v));}}if(l){var g,y,k=ka(r,"space.text",0),m=ka(r,"expandTextWidth",!1),b=ka(r,"expandTextHeight",!1);0===s.orientation?(g=m?1:0,c&&(x={right:k}),y=b):(g=b?1:0,c&&(x={bottom:k}),y=m),s.add(l,{proportion:g,expand:y,padding:x});}if(c){var x;x=0===s.orientation?{top:ka(r,"space.actionTop",0),bottom:ka(r,"space.actionBottom",0),right:ka(r,"space.actionRight",0)}:{left:ka(r,"space.actionLeft",0),right:ka(r,"space.actionRight",0),bottom:ka(r,"space.actionBottom",0)};p=ka(r,"squareFitAction",!1)?1:0;if(s.add(c,{proportion:0,padding:x,fitRatio:p}),d&&(d=ya.call(u(s),c,c,1)),!p){var C=ka(r,"actionSize");s.setActionSize(ka(r,"actionWidth",C),ka(r,"actionHeight",C));}}return "center"===f&&s.addSpace(),s.addChildrenMap("background",o),s.addChildrenMap("icon",a),s.addChildrenMap("iconMask",h),s.addChildrenMap("text",l),s.addChildrenMap("action",c),s.addChildrenMap("actionMask",d),s}return s(i)}(da),ba=Phaser.Utils.Objects.GetValue,xa=function(){function t(e,i,r,s,o){n(this,t),void 0===e&&(e=0),void 0===i&&(i=e),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),this.cornerRadius={},this._width=0,this._height=0,this.setTo(e,i,r,s,o);}return s(t,[{key:"setTo",value:function(t,e,i,n,r){return this.setPosition(t,e),this.setRadius(r),this.setSize(i,n),this}},{key:"setPosition",value:function(t,e){return this.x=t,this.y=e,this}},{key:"setRadius",value:function(t){return void 0===t&&(t=0),this.radius=t,this}},{key:"setSize",value:function(t,e){return this.width=t,this.height=e,this}},{key:"minWidth",get:function(){var t=this.cornerRadius;return Math.max(t.tl.x+t.tr.x,t.bl.x+t.br.x)}},{key:"minHeight",get:function(){var t=this.cornerRadius;return Math.max(t.tl.y+t.bl.y,t.tr.y+t.br.y)}},{key:"width",get:function(){return this._width},set:function(t){null==t&&(t=0),this._width=Math.max(t,this.minWidth);}},{key:"height",get:function(){return this._height},set:function(t){null==t&&(t=0),this._height=Math.max(t,this.minHeight);}},{key:"radius",get:function(){var t=this.cornerRadius;return Math.max(t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y)},set:function(t){var e,i;"number"==typeof t?(e=t,i=t):(e=ba(t,"x",0),i=ba(t,"y",0));var n=this.cornerRadius;n.tl=Ca(ba(t,"tl",void 0),e,i),n.tr=Ca(ba(t,"tr",void 0),e,i),n.bl=Ca(ba(t,"bl",void 0),e,i),n.br=Ca(ba(t,"br",void 0),e,i);}},{key:"radiusTL",get:function(){var t=this.cornerRadius.tl;return Math.max(t.x,t.y)},set:function(t){wa(this.cornerRadius.tl,t);}},{key:"radiusTR",get:function(){var t=this.cornerRadius.tr;return Math.max(t.x,t.y)},set:function(t){wa(this.cornerRadius.tr,t);}},{key:"radiusBL",get:function(){var t=this.cornerRadius.bl;return Math.max(t.x,t.y)},set:function(t){wa(this.cornerRadius.bl,t);}},{key:"radiusBR",get:function(){var t=this.cornerRadius.br;return Math.max(t.x,t.y)},set:function(t){wa(this.cornerRadius.br,t);}}]),t}(),Ca=function(t,e,i){return void 0===t?t={x:e,y:i}:"number"==typeof t&&(t={x:t,y:t}),Sa(t),t},wa=function(t,e){"number"==typeof e?(t.x=e,t.y=e):(t.x=ba(e,"x",0),t.y=ba(e,"y",0)),Sa(t);},Sa=function(t){t.convex=t.x>=0||t.y>=0,t.x=Math.abs(t.x),t.y=Math.abs(t.y);},Pa=function(t,e,i){var n=i.length;if(n>=2){var r=i[n-2],s=i[n-1];if(t===r&&e===s)return i}return i.push(t,e),i},Oa=Phaser.Math.DegToRad,Ta=function(t,e,i,n,r,s,o,a,h){o&&s>r?s-=360:!o&&s>>16,a=(65280&r)>>>8,h=255&r;t.fillStyle="rgba("+o+","+a+","+h+","+s+")";},Aa=function(t,e,i,n){var r=i||e.strokeColor,s=n||e.strokeAlpha,o=(16711680&r)>>>16,a=(65280&r)>>>8,h=255&r;t.strokeStyle="rgba("+o+","+a+","+h+","+s+")",t.lineWidth=e.lineWidth;},ja=Phaser.Renderer.Canvas.SetTransform,za={renderWebGL:function(t,e,i,n){e.dirty&&(e.updateData(),e.dirty=!1),i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),s=La(e,i,n),o=r.calcMatrix.copyFrom(s.calc),a=e._displayOriginX,h=e._displayOriginY,l=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&Ea(r,o,e,l,a,h),e.isStroked&&Ra(r,e,l,a,h),t.pipelines.postBatch(e);},renderCanvas:function(t,e,i,n){e.dirty&&(e.updateData(),e.dirty=!1),i.addToRenderList(e);var r=t.currentContext;if(ja(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,l=a[0]-s,u=a[1]-o;r.beginPath(),r.moveTo(l,u),e.closePath||(h-=2);for(var c=2;c0;}},{key:"fillAlpha",get:function(){return this._fillAlpha},set:function(t){this._fillAlpha=t,this.isFilled=t>0&&null!=this._fillColor;}},{key:"setFillStyle",value:function(t,e){return void 0===e&&(e=1),this.fillColor=t,this.fillAlpha=e,this}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(t){this._strokeColor=t,this.isStroked=null!=t&&this._strokeAlpha>0&&this._lineWidth>0;}},{key:"strokeAlpha",get:function(){return this._strokeAlpha},set:function(t){this._strokeAlpha=t,this.isStroked=t>0&&null!=this._strokeColor&&this._lineWidth>0;}},{key:"lineWidth",get:function(){return this._lineWidth},set:function(t){this._lineWidth=t,this.isStroked=t>0&&null!=this._strokeColor;}},{key:"setStrokeStyle",value:function(t,e,i){return void 0===i&&(i=1),this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this}},{key:"updateData",value:function(){var t=this.geom,e=this.pathData;e.length=0;var i,n=t.width,r=t.height,s=t.cornerRadius,o=this.iteration+1;if(i=s.tl,Xa(i))if(i.convex){var a=i.x,h=i.y;Ta(a,h,i.x,i.y,180,270,!1,o,e);}else {Ta(a=0,h=0,i.x,i.y,90,0,!0,o,e);}else Pa(0,0,e);if(i=s.tr,Xa(i))if(i.convex){a=n-i.x,h=i.y;Ta(a,h,i.x,i.y,270,360,!1,o,e);}else {Ta(a=n,h=0,i.x,i.y,180,90,!0,o,e);}else Pa(n,0,e);if(i=s.br,Xa(i))if(i.convex){a=n-i.x,h=r-i.y;Ta(a,h,i.x,i.y,0,90,!1,o,e);}else {Ta(a=n,h=r,i.x,i.y,270,180,!0,o,e);}else Pa(n,r,e);if(i=s.bl,Xa(i))if(i.convex){a=i.x,h=r-i.y;Ta(a,h,i.x,i.y,90,180,!1,o,e);}else {Ta(a=0,h=r,i.x,i.y,360,270,!0,o,e);}else Pa(0,r,e);return e.push(e[0],e[1]),this.pathIndexes=Fa(e),this}},{key:"setShapeType",value:function(t){return "string"==typeof t&&(t=Ga[t]),this.shapeType=t,this}},{key:"width",get:function(){return this.geom.width},set:function(t){this.resize(t,this.height);}},{key:"height",get:function(){return this.geom.height},set:function(t){this.resize(this.width,t);}},{key:"setSize",value:function(t,e){if(void 0===e&&(e=t),this.geom.width===t&&this.geom.height===e)return this;this.geom.setSize(t,e),1===this.shapeType&&this.setRadius({x:t/2,y:e/2}),this.updateDisplayOrigin(),this.dirty=!0;var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this}},{key:"resize",value:function(t,e){return this.setSize(t,e),this}},{key:"radius",get:function(){return this.geom.radius},set:function(t){this.geom.setRadius(t),this.updateDisplayOrigin(),this.dirty=!0;}},{key:"radiusTL",get:function(){return this.geom.radiusTL},set:function(t){this.geom.radiusTL=t,this.dirty=!0;}},{key:"radiusTR",get:function(){return this.geom.radiusTR},set:function(t){this.geom.radiusTR=t,this.dirty=!0;}},{key:"radiusBL",get:function(){return this.geom.radiusBL},set:function(t){this.geom.radiusBL=t,this.dirty=!0;}},{key:"radiusBR",get:function(){return this.geom.radiusBR},set:function(t){this.geom.radiusBR=t,this.dirty=!0;}},{key:"setRadius",value:function(t){return void 0===t&&(t=0),this.radius=t,this}},{key:"setRadiusTL",value:function(t){return void 0===t&&(t=0),this.radiusTL=t,this}},{key:"setRadiusTR",value:function(t){return void 0===t&&(t=0),this.radiusTR=t,this}},{key:"setRadiusBL",value:function(t){return void 0===t&&(t=0),this.radiusBL=t,this}},{key:"setRadiusBR",value:function(t){return void 0===t&&(t=0),this.radiusBR=t,this}},{key:"cornerRadius",get:function(){return this.geom.cornerRadius},set:function(t){this.radius=t;}},{key:"setCornerRadius",value:function(t){return this.setRadius(t)}},{key:"iteration",get:function(){return this._iteration},set:function(t){void 0!==this._iteration?this._iteration!==t&&(this._iteration=t,this.dirty=!0):this._iteration=t;}},{key:"setIteration",value:function(t){return void 0===t&&(t=6),this.iteration=t,this}}]),i}(Ba),Xa=function(t){return t.x>0&&t.y>0},Ga={rectangle:0,circle:1};Object.assign(Ya.prototype,za);var Va=function(t,e,i,n){if(void 0===i&&(i="."),void 0===n&&(n={}),!t)return n;if(e in t)return Object.assign(n,t[e]);for(var r in e+=i,t)r.startsWith(e)&&(n[r.replace(e,"")]=t[r]);return n},Ha=function(t,e,i){if(void 0===i&&(i={}),Array.isArray(e))for(var n=0,r=e.length;n=6?(n=[arguments[2],void 0,arguments[3]],r=[arguments[4],void 0,arguments[5]]):(n=ge(n),r=ge(r)),this.textureKey=t,this.baseFrameName=e,this.columns.data=n,this.columns.count=n?n.length:0,this.columns.stretch=0,this.columns.minWidth=0,this.columns.scale=1,this.rows.data=r,this.rows.count=r?r.length:0,this.rows.stretch=0,this.rows.minHeight=0,this.rows.scale=1;var s=this.scene.sys.textures.get(t);if(!s)return this.clear(),this;if(!n||!r)return this.clear(),this;for(var o=s.get(e),a=o.width,h=0,l=0,u=n.length;l0?0:g,b=0;l=0;for(var S=n.length;l0?0:y),y>=1&&g>=1){var P=i(k=this.getFrameNameCallback(l,C,e));"string"!==P&&"number"!==P||s.add(k,0,b+o.cutX,x+o.cutY,y,g);}b+=y;}x+=g;}return this.updateTexture(),this},updateTexture:function(){if(this.clear(),void 0===this.textureKey)return this;var t=this.scene.sys.textures.get(this.textureKey);if(!t)return this;var e,i,n,r,s,o,a,h=this.columns.minWidth*this.maxFixedPartScaleX,l=this.rows.minHeight*this.maxFixedPartScaleY,u=this.width-h,c=this.height-l,d=u>=0?this.maxFixedPartScaleX:this.width/h,f=c>=0?this.maxFixedPartScaleY:this.height/l;if(this.preserveRatio){var p=Math.min(d,f);if(d>p){var v=(d-p)*h;u>=0?u+=v:u=v,d=p;}if(f>p){var g=(f-p)*l;c>=0?c+=g:c=g,f=p;}}this.columns.scale=d,this.rows.scale=f,e=u>0&&this.columns.stretch>0?u/this.columns.stretch:0,i=c>0&&this.rows.stretch>0?c/this.rows.stretch:0;var y=0,k=0;this._beginDraw();for(var m=0,b=this.rows.count;m0&&a>0&&(0===(0===s.stretch&&0===r.stretch||0===this.getStretchMode(x,m)?0:1)?this._drawImage(this.textureKey,n,y,k,o,a):this._drawTileSprite(this.textureKey,n,y,k,o,a)),y+=o;k+=a;}this._endDraw();},setStretchMode:function(t){return ph(t)?(this.stretchMode.edge=gh(vh(t,"edge",0)),this.stretchMode.internal=gh(vh(t,"internal",0))):(t=gh(t),this.stretchMode.edge=t,this.stretchMode.internal=t),this},getStretchMode:function(t,e){return kh.call(this,t,e)?this.stretchMode.edge:this.stretchMode.internal},setPreserveRatio:function(t){return null==t&&(t=!0),this.preserveRatio=t,this},setMaxFixedPartScale:function(t,e){return void 0===e&&(e=t),this.maxFixedPartScaleX=t,this.maxFixedPartScaleY=e,this}},bh=Phaser.Utils.Objects.IsPlainObject,xh=Phaser.Utils.Objects.GetValue,Ch=Phaser.GameObjects,wh=void 0,Sh=function(t,e){if(wh||(wh={},Wi(t).events.once("destroy",(function(){for(var t in wh)wh[t].destroy();wh=void 0;}))),!wh.hasOwnProperty(e)){var i=Wi(t).scene.systemScene;(t=new Ch[e](i)).setOrigin(0),wh[e]=t;}return wh[e]},Ph=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i)}(function(t,e){var i=function(t){a(r,t);var i=d(r);function r(t,s,o,a,h,l,u,c,d,f){var p;if(n(this,r),bh(s)?(s=xh(f=s,"x",0),o=xh(f,"y",0),a=xh(f,"width",1),h=xh(f,"height",1),l=xh(f,"key",void 0),u=xh(f,"baseFrame",void 0),c=xh(f,"columns",void 0),d=xh(f,"rows",void 0)):bh(a)?(a=xh(f=a,"width",1),h=xh(f,"height",1),l=xh(f,"key",void 0),u=xh(f,"baseFrame",void 0),c=xh(f,"columns",void 0),d=xh(f,"rows",void 0)):bh(l)?(l=xh(f=l,"key",void 0),u=xh(f,"baseFrame",void 0),c=xh(f,"columns",void 0),d=xh(f,"rows",void 0)):bh(u)?(u=xh(f=u,"baseFrame",void 0),c=xh(f,"columns",void 0),d=xh(f,"rows",void 0)):Array.isArray(u)?(f=d,d=c,c=u,u=xh(f,"baseFrame",void 0)):bh(c)&&(c=xh(f=c,"columns",void 0),d=xh(f,"rows",void 0)),void 0===c){var v=xh(f,"leftWidth",void 0),g=xh(f,"rightWidth",void 0);void 0!==v&&void 0!==g&&(c=[v,void 0,g]);}if(void 0===d){var y=xh(f,"topHeight",void 0),k=xh(f,"bottomHeight",void 0);void 0!==y&&void 0!==k&&(d=[y,void 0,k]);}(p=i.call(this,t)).type=e,p.setPosition(s,o).setSize(a,h).setOrigin(.5,.5),p.columns={},p.rows={},p.stretchMode={},p._tileSprite=void 0,p._image=void 0,p.setGetFrameNameCallback(xh(f,"getFrameNameCallback",void 0)),p.setStretchMode(xh(f,"stretchMode",0)),p.setPreserveRatio(xh(f,"preserveRatio",!0));var m=xh(f,"maxFixedPartScale",1),b=xh(f,"maxFixedPartScaleX",m),x=xh(f,"maxFixedPartScaleY",void 0);return p.setMaxFixedPartScale(b,x),p.setBaseTexture(l,u,c,d),p}return s(r,[{key:"minWidth",get:function(){return this.columns.minWidth}},{key:"minHeight",get:function(){return this.rows.minHeight}},{key:"fixedPartScaleX",get:function(){return this.columns.scale}},{key:"fixedPartScaleY",get:function(){return this.rows.scale}},{key:"resize",value:function(t,e){return this.width===t&&this.height===e||(p(h(r.prototype),"resize",this)?p(h(r.prototype),"resize",this).call(this,t,e):p(h(r.prototype),"setSize",this).call(this,t,e),this.updateTexture()),this}}]),r}(t);return Object.assign(i.prototype,mh),i}(Phaser.GameObjects.RenderTexture,"rexNinePatch")),Oh={_drawImage:function(t,e,i,n,r,s){var o=Sh(this,"Image").setTexture(t,e).setDisplaySize(r,s);this.draw(o,i,n);},_drawTileSprite:function(t,e,i,n,r,s){var o=Sh(this,"TileSprite").setTexture(t,e).setSize(r,s);this.draw(o,i,n);}};Object.assign(Ph.prototype,Oh);var Th=function(t,e){var i,n;switch(e&&(e.hasOwnProperty("type")?i=e.type:e.hasOwnProperty("leftWidth")?i="nineSlice":e.hasOwnProperty("key")&&(i="image")),i){case"image":n=new dh(t,e);break;case"nineSlice":n=e.hasOwnProperty("stretchMode")?new Ph(t,e):new hh(t,e);break;default:n=new Za(t,e);}return t.add.existing(n),n},_h=Phaser.GameObjects.Text,Eh=Phaser.Utils.Objects.GetValue,Mh=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={});var o=Eh(r,"x",0),a=Eh(r,"y",0),h=Eh(r,"text","");return (s=e.call(this,t,o,a,h,r)).type="rexStatesText",r.style=s.style,r.onModifyStyle=function(t,e){var i=e.hasOwnProperty("fontStyle")||e.hasOwnProperty("fontSize")||e.hasOwnProperty("fontFamily");t.style.update(i);},s.addStyleManager(r),delete r.style,s}return s(i)}(_h);Object.assign(Mh.prototype,qa); + */Object.assign(Pe.prototype,fe);var Oe=function(t){return null==t||""===t||0===t.length},Te=function(t,e,n,r){if(void 0===r&&(r="."),"object"===i(t)){if(Oe(e)){if(null==n)return;"object"===i(n)&&(t=n);}else {"string"==typeof e&&(e=e.split(r));var s=e.pop(),o=function(t,e,n){var r=t;if(Oe(e));else {var s;"string"==typeof e&&(e=e.split("."));for(var o=0,a=e.length;o=n&&e<=n+a,l=e<=r&&e>=r-a,u=i>=s&&i<=s+a,c=i<=o&&i>=o-a;this.clearAllKeysState(),this.setKeyState("left",h),this.setKeyState("right",l),this.setKeyState("up",u),this.setKeyState("down",c);}},{key:"up",get:function(){return this.upKeyDown}},{key:"down",get:function(){return this.downKeyDown}},{key:"left",get:function(){return this.leftKeyDown}},{key:"right",get:function(){return this.rightKeyDown}},{key:"noKey",get:function(){return this.noKeyDown}}]),i}(Me);b.register("cursorAtBounds",(function(t){return new Be(this.scene,t)})),Te(window,"RexPlugins.GameObjectShell.CursorAtBounds",Be);var Ie=function(t){return t.hasOwnProperty("rexSizer")||(t.rexSizer={}),t.rexSizer};var We=Phaser.Display.Align,Fe={center:We.CENTER,left:We.LEFT_CENTER,right:We.RIGHT_CENTER,top:We.TOP_CENTER,bottom:We.BOTTOM_CENTER,"left-top":We.TOP_LEFT,"top-left":We.TOP_LEFT,"left-center":We.LEFT_CENTER,"center-left":We.LEFT_CENTER,"left-bottom":We.BOTTOM_LEFT,"bottom-left":We.BOTTOM_LEFT,"center-top":We.TOP_CENTER,"top-center":We.TOP_CENTER,"center-center":We.CENTER,"center-bottom":We.BOTTOM_CENTER,"bottom-center":We.BOTTOM_CENTER,"right-top":We.TOP_RIGHT,"top-right":We.TOP_RIGHT,"right-center":We.RIGHT_CENTER,"center-right":We.RIGHT_CENTER,"right-bottom":We.BOTTOM_RIGHT,"bottom-right":We.BOTTOM_RIGHT},Ye=function(){},Xe=new Phaser.GameObjects.Zone({sys:{queueDepthSort:Ye,events:{once:Ye}}},0,0,1,1);Xe.setOrigin(0);var Ge=0,Ve=1,He=2,Ne=4,Ue=6,Ke=8,Je=10,qe=12,Ze=function(t){var e=bt(t);return t.y+e-e*t.originY},$e=function(t){var e=mt(t);return t.x-e*t.originX+.5*e},Qe=function(t,e){var i=bt(t);return t.y=e-i+i*t.originY,t},ti=function(t,e){var i=mt(t),n=i*t.originX;return t.x=e+n-.5*i,t},ei=function(t){var e=mt(t);return t.x-e*t.originX},ii=function(t,e){var i=mt(t);return t.x=e+i*t.originX,t},ni=function(t){var e=mt(t);return t.x+e-e*t.originX},ri=function(t,e){var i=mt(t);return t.x=e-i+i*t.originX,t},si=function(t,e){var i=bt(t),n=i*t.originY;return t.y=e+n-.5*i,t},oi=function(t){var e=bt(t);return t.y-e*t.originY+.5*e},ai=function(t){var e=bt(t);return t.y-e*t.originY},hi=function(t,e){var i=bt(t);return t.y=e+i*t.originY,t},li=[];li[11]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ti(t,$e(e)+i),Qe(t,Ze(e)+n),t},li[Je]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ii(t,ei(e)-i),Qe(t,Ze(e)+n),t},li[qe]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ri(t,ni(e)+i),Qe(t,Ze(e)+n),t},li[Ue]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),function(t,e,i){ti(t,e),si(t,i);}(t,$e(e)+i,oi(e)+n),t},li[Ne]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ii(t,ei(e)-i),si(t,oi(e)+n),t},li[Ke]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ri(t,ni(e)+i),si(t,oi(e)+n),t},li[Ve]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ti(t,$e(e)+i),hi(t,ai(e)-n),t},li[Ge]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ii(t,ei(e)-i),hi(t,ai(e)-n),t},li[He]=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),ri(t,ni(e)+i),hi(t,ai(e)-n),t};var ui=function(t,e,i,n,r){return li[i](t,e,n,r)},ci=function(t,e,i,n,r,s){Xe.setPosition(e,i).setSize(n,r),ui(t,Xe,s);},di=Phaser.Utils.Objects.GetValue,fi=Phaser.GameObjects.Group,vi=function(t,e,i){return t.add.text(0,0,"")},pi=void 0,gi=Phaser.Utils.Objects.GetValue,yi=function(t,e){return void 0===t&&(t=0),void 0===e&&(e={}),"number"==typeof t?(e.left=t,e.right=t,e.top=t,e.bottom=t):(e.left=gi(t,"left",0),e.right=gi(t,"right",0),e.top=gi(t,"top",0),e.bottom=gi(t,"bottom",0)),e},ki=qt.prototype.add,mi=function(t){return ki.call(this,t),this.sizerEventsEnable&&(t.emit("sizer.add",t,this),this.emit("add",t,this)),this},bi={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),mi.call(this,t),this.backgroundChildren.push(t),this.getSizerConfig(t).padding=yi(e),void 0!==i&&this.addChildrenMap(i,t),this},isBackground:function(t){return void 0!==this.backgroundChildren&&-1!==this.backgroundChildren.indexOf(t)}},xi=function t(e,i){var n=null;if(void 0===i)e.hasOwnProperty("rexContainer")&&((n=e.rexContainer.parent)?n.isRexSizer||(n=t(n)):n=null);else for(n=t(e);n&&n.name!==i;)n=t(n);return n},Ci={getParentSizer:function(t,e){return "string"==typeof t&&(e=t,t=void 0),void 0===t&&(t=this),xi(t,e)},getTopmostSizer:function(t){return void 0===t&&(t=this),function(t){for(var e=xi(t);e;)t=e,e=xi(e);return t}(t)},hasParentSizer:function(t,e){void 0===e&&(e=this);for(var i=xi(e);i;){if(i===t)return !0;i=xi(i);}return !1},hasChild:function(t,e){return void 0===e&&(e=this),this.hasParentSizer(e,t)}},wi=Phaser.Utils.Array.Remove,Si=qt.prototype.remove,Pi=Ci.getParentSizer,Oi=function(t,e){for(var i=Pi(t);i;)i.removeChildCallback&&i.removeChildCallback(t,e),i=Pi(i);return this.isBackground(t)&&wi(this.backgroundChildren,t),Si.call(this,t,e),!e&&this.sizerEventsEnable&&(t.emit("sizer.remove",t,this),this.emit("remove",t,this)),this},Ti=Phaser.Utils.Array.Remove,_i=Ci.getParentSizer,Ei={removeFromParentSizer:function(){var t=_i(gameObject);return t&&t.remove(this),this},removeBackground:function(t,e){return void 0===this.backgroundChildren||this.getParentSizer(t)!==this||(Ti(this.backgroundChildren,t),Oi.call(this,t,e)),this},removeAllBackgrounds:function(t){if(void 0===this.backgroundChildren)return this;for(var e=this.backgroundChildren.length-1;e>=0;e--)this.remove(this.backgroundChildren[e],t);return this}},Mi=Phaser.Utils.Objects.GetValue,Ri=function(t,e){return void 0===e?t:t[e]},Li=function(t,e,n){void 0===t&&(t={}),void 0===e&&(e=0);var r=i(e);return "string"===r?t[e]=n:"number"===r?(t.left=e,t.right=e,t.top=e,t.bottom=e):(t.left=Mi(e,"left",0),t.right=Mi(e,"right",0),t.top=Mi(e,"top",0),t.bottom=Mi(e,"bottom",0)),t},Di={getInnerPadding:function(t){return Ri(this.space,t)},setInnerPadding:function(t,e){return Li(this.space,t,e),this},getOuterPadding:function(t){return Ri(this.getSizerConfig(this).padding,t)},setOuterPadding:function(t,e){return Li(this.getSizerConfig(this).padding,t,e),this},getChildOuterPadding:function(t,e){return "string"==typeof t&&(t=this.getElement(t)),Ri(this.getSizerConfig(t).padding,e)},setChildOuterPadding:function(t,e,i){return "string"==typeof t&&(t=this.getElement(t)),Li(this.getSizerConfig(t).padding,e,i),this}},Ai=function(t){var e=this.childrenWidth,i=void 0!==this.minWidth?this.minWidth:0;return void 0===t?(t=Math.max(i,e),this.layoutWarnEnable&&i>0&&e>i&&console.warn("Layout width warn: ".concat(this.constructor.name,"'s minWidth (").concat(i,") < childrenWidth (").concat(e,")"))):this.layoutWarnEnable&&(i>t||e>t)&&console.warn("Layout width warn: ".concat(this.constructor.name,"'s minWidth (").concat(i,") or childrenWidth (").concat(e," > targetWidth ").concat(t,")")),t},ji=function(t){var e=this.childrenHeight,i=void 0!==this.minHeight?this.minHeight:0;return void 0===t?(t=Math.max(i,e),this.layoutWarnEnable&&i>0&&e>i&&console.warn("Layout height warn: ".concat(this.constructor.name,"'s minHeight (").concat(i,") < childrenHeight (").concat(e,")"))):this.layoutWarnEnable&&(i>t||e>t)&&console.warn("Layout height warn: ".concat(this.constructor.name,"'s minHeight (").concat(i,") or childrenHeight (").concat(e,") > targetHeight (").concat(t,")")),t},zi={getShownChildren:function(t){void 0===t&&(t=[]);for(var e,i=this.children,n=0,r=i.length;n0;){var i=e.shift();i.rexSizer&&i.rexSizer.hidden||(i!==this&&t.push(i),i.isRexContainerLite&&e.push.apply(e,y(i.children)));}return t}},Bi=function(){this._childrenWidth=void 0,this._childrenHeight=void 0;for(var t,e=this.getChildrenSizers(),i=0,n=e.length;i0?-this.delay:0,this.state=this.nowTime>=0?an:on,this.repeatCounter=0,this}},{key:"stop",value:function(){return this.state=sn,this}},{key:"update",value:function(t,e){this.state!==sn&&this.state!==ln&&0!==e&&0!==this.timeScale&&(this.nowTime+=e*this.timeScale,this.justRestart=!1,this.nowTime>=this.duration?-1===this.repeat||this.repeatCounter0&&(this.nowTime-=this.repeatDelay,this.state=hn)):(this.nowTime=this.duration,this.state=ln):this.nowTime>=0&&(this.state=an));}},{key:"t",get:function(){var t;switch(this.state){case sn:case on:case hn:t=0;break;case an:t=this.nowTime/this.duration;break;case ln:t=1;}return nn(t,0,1)},set:function(t){(t=nn(t,-1,1))<0?(this.state=on,this.nowTime=-this.delay*t):(this.state=an,this.nowTime=this.duration*t,1===t&&0!==this.repeat&&this.repeatCounter++);}},{key:"setT",value:function(t){return this.t=t,this}},{key:"isIdle",get:function(){return this.state===sn}},{key:"isDelay",get:function(){return this.state===on}},{key:"isCountDown",get:function(){return this.state===an}},{key:"isRunning",get:function(){return this.state===on||this.state===an}},{key:"isDone",get:function(){return this.state===ln}},{key:"isOddIteration",get:function(){return 1==(1&this.repeatCounter)}},{key:"isEvenIteration",get:function(){return 0==(1&this.repeatCounter)}}]),t}(),sn=0,on=1,an=2,hn=3,ln=-1,un=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).timer=new rn,s}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(v(h(i.prototype),"shutdown",this).call(this,t),this.timer.destroy(),this.timer=void 0);}},{key:"start",value:function(){return this.timer.start(),v(h(i.prototype),"start",this).call(this),this}},{key:"stop",value:function(){return this.timer.stop(),v(h(i.prototype),"stop",this).call(this),this}},{key:"complete",value:function(){return this.timer.stop(),v(h(i.prototype),"complete",this).call(this),this}}]),i}(Qi),cn=Phaser.Utils.Objects.GetValue,dn=Phaser.Utils.Objects.GetAdvancedValue,fn=Phaser.Tweens.Builders.GetEaseFunction,vn=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"resetFromJSON",value:function(t){return this.timer.resetFromJSON(cn(t,"timer")),this.setEnable(cn(t,"enable",!0)),this.setTarget(cn(t,"target",this.parent)),this.setDelay(dn(t,"delay",0)),this.setDuration(dn(t,"duration",1e3)),this.setEase(cn(t,"ease","Linear")),this.setRepeat(cn(t,"repeat",0)),this}},{key:"setEnable",value:function(t){return null==t&&(t=!0),this.enable=t,this}},{key:"setTarget",value:function(t){return void 0===t&&(t=this.parent),this.target=t,this}},{key:"setDelay",value:function(t){return 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:"setRepeatDelay",value:function(t){return this.repeatDelay=t,this}},{key:"setEase",value:function(t){return void 0===t&&(t="Linear"),this.ease=t,this.easeFn=fn(t),this}},{key:"start",value:function(){return this.timer.isRunning||v(h(i.prototype),"start",this).call(this),this}},{key:"restart",value:function(){return this.timer.stop(),this.start.apply(this,arguments),this}},{key:"stop",value:function(t){return void 0===t&&(t=!1),v(h(i.prototype),"stop",this).call(this),t&&(this.timer.setT(1),this.updateGameObject(this.target,this.timer),this.complete()),this}},{key:"update",value:function(t,e){if(!this.isRunning||!this.enable||!this.parent.active)return this;var i=this.target,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(t,e){}}]),i}(un),pn=Phaser.Utils.Objects.GetValue,gn=Phaser.Utils.Objects.GetAdvancedValue,yn=Phaser.Math.Linear,kn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).scaleStart={},s.scaleEnd={},s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setMode(pn(t,"mode",0)),this.setScaleRange(gn(t,"start",void 0),gn(t,"end",0)),this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=mn[t]),this.mode=t,this}},{key:"setScaleRange",value:function(t,e){return "number"==typeof t?(this.startX=t,this.startY=t):(this.startX=gn(t,"x",this.parent.scaleX),this.startY=gn(t,"y",this.parent.scaleY)),"number"==typeof e?(this.endX=e,this.endY=e):(this.endX=gn(e,"x",void 0),this.endY=gn(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;this.hasScaleX&&(t.scaleX=this.startX),this.hasScaleY&&(t.scaleY=this.startY);var e=this.repeat;return 2===this.mode&&-1!==e&&(e=2*(e+1)-1),this.timer.setDelay(this.delay).setDuration(this.duration).setRepeat(e),v(h(i.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=yn(this.startX,this.endX,i)),this.hasScaleY&&(t.scaleY=yn(this.startY,this.endY,i));}},{key:"complete",value:function(){return v(h(i.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),i}(vn),mn={stop:0,destroy:1,yoyo:2},bn=function(t,e,i,n,r){var s,o;switch(void 0===n&&(n="Cubic"),i){case 0:case"x":s={x:0},o={x:t.scaleX};break;case 1:case"y":s={y:0},o={y:t.scaleY};break;default:s=0,o=t.scale;}var a={mode:0,start:s,end:o,duration:e,ease:n};return void 0===r?r=new kn(t,a):r.resetFromJSON(a),r.restart(),r},xn=function(t,e,i,n,r,s){void 0===n&&(n="Linear"),r instanceof kn&&(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=n,void 0===s?s=new kn(t,o):s.resetFromJSON(o),s.restart(),s},Cn=function(t,e){return new Promise((function(i,n){t.once(e,(function(){i();}));}))},wn=function(t){return Cn(t,"complete")},Sn=Phaser.Utils.Objects.IsPlainObject,Pn=function(t,e){e.completeEventName=void 0,e.on("complete",(function(){e.completeEventName&&(t.emit(e.completeEventName,t),e.completeEventName=void 0);})),e.on("update",(function(){var e=Ci.getParentSizer(t);e&&e.resetChildPositionState(t);}));},On={popUp:function(t,e,i){if(Sn(t)){var n=t;t=n.duration,e=n.orientation,i=n.ease;}var r=void 0===this._scaleBehavior;return this._scaleBehavior=bn(this,t,e,i,this._scaleBehavior),r&&Pn(this,this._scaleBehavior),this._scaleBehavior.completeEventName="popup.complete",this},popUpPromise:function(t,e,i){return this.popUp(t,e,i),wn(this._scaleBehavior)},scaleDownDestroy:function(t,e,i,n){if(Sn(t)){var r=t;t=r.duration,e=r.orientation,i=r.ease,n=r.destroy;}var s=void 0===this._scaleBehavior;return this._scaleBehavior=xn(this,t,e,i,n,this._scaleBehavior),s&&Pn(this,this._scaleBehavior),this._scaleBehavior.completeEventName="scaledown.complete",this},scaleDownDestroyPromise:function(t,e,i,n){return this.scaleDownDestroy(t,e,i,n),wn(this._scaleBehavior)},scaleDown:function(t,e,i){return this.scaleDownDestroy(t,e,i,!1),this},scaleDownPromise:function(t,e,i){return this.scaleDown(t,e,i),wn(this._scaleBehavior)},scaleYoyo:function(t,e,i,n,r){if(Sn(t)){var s=t;t=s.duration,e=s.peakValue,i=s.repeat,n=s.orientation,r=s.ease;}var o=void 0===this._scaleBehavior;return this._scaleBehavior=function(t,e,i,n,r,s,o){var a,h;switch(void 0===i&&(i=1.2),void 0===n&&(n=0),void 0===s&&(s="Cubic"),r){case 0:case"x":a={x:t.scaleX},h={x:i};break;case 1:case"y":a={y:t.scaleX},h={y:i};break;default:a=t.scaleX,h=i;}var l={mode:2,start:a,end:h,duration:e/2,ease:s,repeat:n};return void 0===o?o=new kn(t,l):o.resetFromJSON(l),o.restart(),o}(this,t,e,i,n,r,this._scaleBehavior),o&&Pn(this,this._scaleBehavior),this._scaleBehavior.completeEventName="scaleyoyo.complete",this},scaleYoyoPromise:function(t,e,i,n,r){return this.scaleYoyo(t,e,i,n,r),wn(this._scaleBehavior)}},Tn=Phaser.Utils.Objects.GetValue,_n=Phaser.Utils.Objects.GetAdvancedValue,En=Phaser.Math.Linear,Mn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setMode(Tn(t,"mode",0)),this.setAlphaRange(_n(t,"start",this.parent.alpha),_n(t,"end",0)),this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=Rn[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),v(h(i.prototype),"start",this).call(this)),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;e.isOddIteration&&(i=1-i),t.alpha=En(this.alphaStart,this.alphaEnd,i);}},{key:"complete",value:function(){return v(h(i.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),i}(vn),Rn={stop:0,destroy:1,yoyo:2},Ln=Phaser.Utils.Objects.IsPlainObject,Dn=function(t,e,i,n){var r,s;Ln(i)?(r=i.start,s=i.end):s=i,void 0===r&&(r=0),void 0===s&&(s=1);var o={mode:0,start:r,end:s,duration:e};return void 0===n?n=new Mn(t,o):n.resetFromJSON(o),n.restart(),n},An=function(t,e,i,n){i instanceof Mn&&(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 Mn(t,r):n.resetFromJSON(r),n.restart(),n},jn=Phaser.Utils.Objects.IsPlainObject,zn=function(t,e){e.completeEventName=void 0,e.on("complete",(function(){e.completeEventName&&(t.emit(e.completeEventName,t),e.completeEventName=void 0);})),e.on("update",(function(){var e=Ci.getParentSizer(t);e&&e.resetChildAlphaState(t);}));},Bn={fadeIn:function(t,e){if(jn(t)){var i=t;t=i.duration,e=i.alpha;}var n=void 0===this._fade;return this._fade=Dn(this,t,e,this._fade),n&&zn(this,this._fade),this._fade.completeEventName="fadein.complete",this},fadeInPromise:function(t,e){return this.fadeIn(t,e),wn(this._fade)},fadeOutDestroy:function(t,e){if(jn(t)){var i=t;t=i.duration,e=i.destroy;}var n=void 0===this._fade;return this._fade=An(this,t,e,this._fade),n&&zn(this,this._fade),this._fade.completeEventName="fadeout.complete",this},fadeOutDestroyPromise:function(t,e){return this.fadeOutDestroy(t,e),wn(this._fade)},fadeOut:function(t){return this.fadeOutDestroy(t,!1),this},fadeOutPromise:function(t){return this.fadeOut(t),wn(this._fade)}},In=Phaser.Utils.Objects.GetValue,Wn=Phaser.Utils.Objects.GetAdvancedValue,Fn=Phaser.Math.Linear,Yn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){if(v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setMode(In(t,"mode",0)),t&&(t.hasOwnProperty("x")||t.hasOwnProperty("y"))){var e=Wn(t,"x",void 0),n=Wn(t,"y",void 0);this.setTargetPosition(e,n);}else this.setTargetPosition(t);return this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=Xn[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=Wn(i,"startX",void 0),this.startY=Wn(i,"startY",void 0),this.endX=Wn(i,"endX",void 0),this.endY=Wn(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),v(h(i.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=Fn(this.startX,this.endX,i)),this.hasMoveY&&(t.y=Fn(this.startY,this.endY,i));}},{key:"complete",value:function(){return v(h(i.prototype),"complete",this).call(this),1===this.mode&&this.parent.destroy(),this}}]),i}(vn),Xn={stop:0,destroy:1,yoyo:2},Gn=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}},Vn=Phaser.Utils.Objects.IsPlainObject,Hn=Phaser.Math.Distance.Between,Nn=function(t,e){e.completeEventName=void 0,e.on("complete",(function(){e.completeEventName&&(t.emit(e.completeEventName,t),e.completeEventName=void 0);})),e.on("update",(function(){var e=Ci.getParentSizer(t);e&&e.resetChildPositionState(t);}));},Un={moveFrom:function(t,e,i,n,r){if(Vn(t)){var s=t;e=s.x,i=s.y,t=s.hasOwnProperty("speed")?1e3*Hn(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 Yn&&(o=s,s=void 0),void 0===s&&(s=!1);var a={};return a.mode=s?1:0,void 0!==i&&(a.startX=Gn(i,t.x),a.endX=t.x),void 0!==n&&(a.startY=Gn(n,t.y),a.endY=t.y),a.duration=e,a.ease=void 0===r?"Linear":r,void 0===o?o=new Yn(t,a):o.resetFromJSON(a),o.restart(),o}(this,t,e,i,n,r,this._easeMove),o&&Nn(this,this._easeMove),this._easeMove.completeEventName="movefrom.complete",this},moveFromPromise:function(t,e,i,n,r){return this.moveFrom(t,e,i,n,r),wn(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),wn(this._easeMove)},moveTo:function(t,e,i,n,r){if(Vn(t)){var s=t;e=s.x,i=s.y,t=s.hasOwnProperty("speed")?1e3*Hn(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 Yn&&(o=s,s=void 0),void 0===s&&(s=!1);var a={};return a.mode=s?1:0,void 0!==i&&(a.startX=t.x,a.endX=Gn(i,t.x)),void 0!==n&&(a.startY=t.y,a.endY=Gn(n,t.y)),a.duration=e,a.ease=void 0===r?"Linear":r,void 0===o?o=new Yn(t,a):o.resetFromJSON(a),o.restart(),o}(this,t,e,i,n,r,this._easeMove),o&&Nn(this,this._easeMove),this._easeMove.completeEventName="moveto.complete",this},moveToPromise:function(t,e,i,n,r){return this.moveTo(t,e,i,n,r),wn(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),wn(this._easeMove)},moveStop:function(t){return this._easeMove?(this._easeMove.stop(t),this):this}},Kn=Phaser.Utils.Objects.GetValue,Jn=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).timer=new rn,s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.timer.resetFromJSON(Kn(t,"timer")),this.setEnable(Kn(t,"enable",!0)),this.setMode(Kn(t,"mode",1)),this.isRunning=Kn(t,"isRunning",!1),this.setMagnitudeMode(Kn(t,"magnitudeMode",1)),this.setAxisMode(Kn(t,"axis",0)),this.setDuration(Kn(t,"duration",500)),this.setMagnitude(Kn(t,"magnitude",10)),this.ox=Kn(t,"ox",void 0),this.oy=Kn(t,"oy",void 0),this}},{key:"toJSON",value:function(){return {timer:this.timer.toJSON(),enable:this.enable,mode:this.mode,isRunning:this.isRunning,magnitudeMode:magnitudeMode,duration:this.duration,magnitude:this.magnitude,ox:this.ox,oy:this.oy}}},{key:"shutdown",value:function(t){this.isShutdown||(v(h(i.prototype),"shutdown",this).call(this,t),this.timer.destroy(),this.timer=void 0);}},{key:"startTicking",value:function(){v(h(i.prototype),"startTicking",this).call(this),0===this.mode?(this.scene.game.events.on("poststep",this.update,this),this.scene.game.events.on("prestep",this.backToOrigin,this)):this.scene.sys.events.on("preupdate",this.update,this);}},{key:"stopTicking",value:function(){v(h(i.prototype),"stopTicking",this).call(this),this.scene&&(0===this.mode?(this.scene.game.events.off("poststep",this.update,this),this.scene.game.events.off("prestep",this.backToOrigin,this)):this.scene.sys.events.off("preupdate",this.update,this));}},{key:"setEnable",value:function(t){return null==t&&(t=!0),this.enable=t,this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=qn[t]),this.mode=t,this}},{key:"setMagnitudeMode",value:function(t){return "string"==typeof t&&(t=$n[t]),this.magnitudeMode=t,this}},{key:"setAxisMode",value:function(t){return "string"==typeof t&&(t=Zn[t]),this.axisMode=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"setMagnitude",value:function(t){return this.magnitude=t,this}},{key:"start",value:function(t,e){if("number"!=typeof t){var n=t;e=Kn(n,"magnitude",void 0),t=Kn(n,"duration",void 0);}return void 0!==e&&this.setMagnitude(e),void 0!==t&&this.setDuration(t),this.timer.setDuration(this.duration).start(),v(h(i.prototype),"start",this).call(this),this}},{key:"shake",value:function(t,e){return this.start(t,e),this}},{key:"update",value:function(t,e){if(!this.isRunning||!this.enable)return this;var i=this.parent;if(!i.active)return this;if(this.timer.update(t,e),this.timer.isDone)this.backToOrigin(),this.complete();else {void 0===this.ox&&(this.ox=i.x,this.oy=i.y);var n=this.magnitude;1===this.magnitudeMode&&(n*=1-this.timer.t);var r=Math.random()*Math.PI*2,s=this.ox+Math.cos(r)*n,o=this.oy+Math.sin(r)*n;switch(this.axisMode){case 1:i.x=s;break;case 2:i.y=o;break;default:i.x=s,i.y=o;}}return this}},{key:"backToOrigin",value:function(){if(!this.isRunning||!this.enable)return this;if(void 0===this.ox)return this;var t=this.parent;switch(this.axisMode){case 1:t.x=this.ox;break;case 2:t.y=this.oy;break;default:t.x=this.ox,t.y=this.oy;}return this.ox=void 0,this.oy=void 0,this}}]),i}(qi),qn={effect:0,behavior:1},Zn={both:0,"h&v":0,"x&y":0,horizontal:1,h:1,x:1,vertical:2,v:2,y:2},$n={constant:0,decay:1},Qn=Phaser.Utils.Objects.IsPlainObject,tr={shake:function(t,e,i){if(Qn(t)){var n=t;t=n.duration,e=n.magnitude,i=n.magnitudeMode;}return void 0===this._shake&&(this._shake=new Jn(this,{mode:0,magnitudeMode:1}),function(t,e){e.on("complete",(function(){t.emit("shake.complete",t);}));}(this,this._shake)),void 0!==t&&this._shake.setDuration(t),void 0!==e&&this._shake.setMagnitude(e),void 0!==i&&this._shake.setMagnitudeMode(i),this._shake.shake(),this},shakePromise:function(t,e){return this.shake(t,e),wn(this._shake)}},er=Phaser.Utils.Objects.GetValue,ir=Phaser.Math.Linear,nr=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).resetFromJSON(),s.boot(),s}return s(i,[{key:"start",value:function(t){if(this.timer.isRunning)return this;var e=this.target;this.propertyKey=er(t,"key","value");var n=e[this.propertyKey];return this.fromValue=er(t,"from",n),this.toValue=er(t,"to",n),this.setEase(er(t,"ease",this.ease)),this.setDuration(er(t,"duration",this.duration)),this.setRepeat(er(t,"repeat",0)),this.setDelay(er(t,"delay",0)),this.setRepeatDelay(er(t,"repeatDelay",0)),this.timer.setDuration(this.duration).setRepeat(this.repeat).setDelay(this.delay).setRepeatDelay(this.repeatDelay),e[this.propertyKey]=this.fromValue,v(h(i.prototype),"start",this).call(this),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;i=this.easeFn(i),t[this.propertyKey]=ir(this.fromValue,this.toValue,i);}}]),i}(vn),rr=Phaser.Utils.Objects.IsPlainObject,sr=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).parent.setDataEnabled(),s.easeTasks={},s}return s(i,[{key:"complete",value:function(t){this.emit("complete-".concat(t),this.parent,this),this.emit("complete",t,this.parent,this);}},{key:"getEaseTask",value:function(t){var e=this.easeTasks[t];return void 0===e&&(e=new nr(this.parent),this.easeTasks[t]=e,e.setTarget(this.parent.data.values).on("complete",(function(){this.complete(t);}),this)),e}},{key:"easeTo",value:function(t,e,i,n){if(rr(t)){var r=t;t=r.key,e=r.value,i=r.duration,n=r.ease;var s=r.speed;void 0===i&&void 0!==s&&(i=Math.abs(e-this.parent.data.values[t])/s*1e3);}return void 0===i&&(i=1e3),void 0===n&&(n="Linear"),this.getEaseTask(t).restart({key:t,to:e,duration:i,ease:n}),this}},{key:"easeFrom",value:function(t,e,i,n){if(rr(t)){var r=t;t=r.key,e=r.value,i=r.duration,n=r.ease;var s=r.speed;void 0===i&&void 0!==s&&(i=Math.abs(e-this.parent.data.values[t])/s*1e3);}return void 0===i&&(i=1e3),void 0===n&&(n="Linear"),this.getEaseTask(t).restart({key:t,from:e,duration:i,ease:n}),this}},{key:"stopEase",value:function(t,e){void 0===e&&(e=!0);var i=this.easeTasks[t];return i&&i.stop(e),this}},{key:"stopAll",value:function(t){for(var e in void 0===t&&(t=!0),this.easeTasks)this.stopEase(e,t);return this}}]),i}(Ui),or={easeDataTo:function(t,e,i,n){return this._easeData||(this._easeData=new sr(this),function(t,e){e.on("complete",(function(e){t.emit("easedata.".concat(e,".complete"),t),t.emit("easedata.complete",e,t);}));}(this,this._easeData)),this._easeData.easeTo(t,e,i,n),this},easeDataToPromise:function(t,e,i,n){return this.easeDataTo(t,e,i,n),Cn(this._easeData,"complete-".concat(t))},stopEaseData:function(t,e){return this._easeData?(this._easeData.stopEase(t,e),this):this},stopAllEaseData:function(t){return this._easeData?(this._easeData.stopAll(t),this):this}},ar=function(t){ur(t,!1);},hr=function(t){ur(t,!0);},lr=function(t){return !!t&&!Ie(t).hidden},ur=function(t,e){if(t){Ie(t).hidden=e;var i=E(t);i?i.setChildVisible(t,!e):t.setVisible(!e);}},cr={show:function(t){return void 0===t&&(t=this),ar(t),this},hide:function(t){return void 0===t&&(t=this),hr(t),this},isShow:function(t){return void 0===t&&(t=this),lr(t)}};function dr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fr={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1;}function s(t,e,n,s,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,s||t,o),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e];}function a(){this._events=new n,this._eventsCount=0;}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return [];if(n.fn)return [n.fn];for(var r=0,s=n.length,o=new Array(s);r0){var e=t.runTransitionInCallback();t.delayCall(e,this.next,this);}else this.next();}},{key:"exit_TRANS_OPNE",value:function(){this.parent.removeDelayCall();}},{key:"next_OPEN",value:function(){return "TRANS_CLOSE"}},{key:"enter_OPEN",value:function(){this.parent.onOpen();}},{key:"exit_OPEN",value:function(){this.parent.removeDelayCall();}},{key:"next_TRANS_CLOSE",value:function(){return "CLOSE"}},{key:"enter_TRANS_CLOSE",value:function(){var t=this.parent;if(t.transitOutTime>0){var e=t.runTransitionOutCallback();t.delayCall(e,this.next,this);}else this.next();}},{key:"exit_TRANS_CLOSE",value:function(){this.parent.removeDelayCall();}},{key:"next_CLOSE",value:function(){return "TRANS_OPNE"}},{key:"enter_CLOSE",value:function(){this.parent.onClose();}},{key:"exit_CLOSE",value:function(){}},{key:"canOpen",value:function(){return "IDLE"===this.state||"CLOSE"===this.state}},{key:"canClose",value:function(){return "IDLE"===this.state||"OPEN"===this.state}}]),i}(xr),wr={delayCall:function(t,e,i){return this.delayCallTimer=function(t,e,i,n,r){var s=Xi(t);return s.time.delayedCall(e,(function(){s.game.events.once("poststep",(function(){i.call(n,r);}));}))}(this,t,e,i),this},removeDelayCall:function(){return this.delayCallTimer&&(this.delayCallTimer.remove(!1),this.delayCallTimer=void 0),this}},Sr={setTransitInTime:function(t){return this.transitInTime=t,this},setTransitOutTime:function(t){return this.transitOutTime=t,this},setTransitInCallback:function(t){return t||(t=Ye),this.transitInCallback=t,this},setTransitOutCallback:function(t){return t||(t=Ye),this.transitOutCallback=t,this}},Pr={runTransitionInCallback:function(){return this.transitInCallback(this.parent,this.transitInTime),this.transitInTime},onOpen:function(){},requestOpen:function(t,e){if(!this._state.canOpen())return this;this.openEventData=arguments.length>0?t:this.parent;var i=this.transitInTime;return void 0!==e&&(this.transitInTime=e),this._state.goto("TRANS_OPNE"),this.transitInTime=i,this}},Or={runTransitionOutCallback:function(){return this.transitOutCallback(this.parent,this.transitOutTime),this.transitOutTime},onClose:function(){this.oneShotMode&&this.parent.destroy();},requestClose:function(t,e){if(!this._state.canClose)return this;this.closeEventData=arguments.length>0?t:this.parent;var i=this.transitOutTime;return void 0!==e&&(this.transitOutTime=e),this._state.goto("TRANS_CLOSE"),this.transitOutTime=i,this}},Tr={};Object.assign(Tr,wr,Sr,Pr,Or);var _r=Phaser.Utils.Objects.GetValue,Er=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).setTransitInTime(_r(r,"duration.in",200)),s.setTransitOutTime(_r(r,"duration.out",200)),s.setTransitInCallback(_r(r,"transitIn")),s.setTransitOutCallback(_r(r,"transitOut")),s.oneShotMode=_r(r,"destroy",!1),s.delayCallTimer=void 0,s._state=new Cr(u(s),{eventEmitter:!1,initState:_r(r,"initState","IDLE")}),s.openEventData=void 0,s.closeEventData=void 0,s}return s(i,[{key:"state",get:function(){return this._state.state}},{key:"shutdown",value:function(t){this.isShutdown||(this.transitInCallback=void 0,this.transitOutCallback=void 0,this.openEventData=void 0,this.closeEventData=void 0,this.removeDelayCall(),v(h(i.prototype),"shutdown",this).call(this,t));}}]),i}(Ui);Object.assign(Er.prototype,Tr);var Mr=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),(o=e.call(this,t,0,0,2,2,r,1)).setAlpha(s),o.setScrollFactor(0),o.boot(),o}return s(i,[{key:"boot",value:function(){this.scene.sys.events.on("prerender",this.resize,this);}},{key:"destroy",value:function(t){this.scene&&!this.ignoreDestroy&&(this.scene.sys.events.off("prerender",this.resize,this),v(h(i.prototype),"destroy",this).call(this,t));}},{key:"tint",get:function(){return this.fillColor},set:function(t){this.setFillStyle(t,this.fillAlpha);}},{key:"resize",value:function(){var t=this.scene,e=t.sys.scale.gameSize,i=t.sys.cameras.main,n=e.width,r=e.height,s=1/i.zoom,o=n/2,a=r/2,h=n*s,l=r*s;this.x===o&&this.y===a||this.setPosition(o,a),this.width===h&&this.height===l||this.setSize(h,l).setOrigin(.5);}}]),i}(Phaser.GameObjects.Rectangle),Rr=Phaser.Utils.Objects.GetValue,Lr=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,{eventEmitter:!1})).resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.setHitAreaMode(Rr(t,"hitAreaMode",0)),this.setEnable(Rr(t,"enable",!0)),this.setStopMode(Rr(t,"stopAllLevels",!0)),this}},{key:"boot",value:function(){this.parent.on("pointerdown",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointerup",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointermove",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointerover",(function(t,e,i,n){this.stopAllLevels&&n.stopPropagation();}),this).on("pointerout",(function(t,e){this.stopAllLevels&&e.stopPropagation();}),this);}},{key:"setHitAreaMode",value:function(t){"string"==typeof t&&(t=Dr[t]);var e=this.parent;return e.input&&e.removeInteractive(),0===t?e.setInteractive():e.setInteractive({hitArea:{},hitAreaCallback:function(){return !0}}),this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),t?this.parent.setInteractive():this.parent.disableInteractive(),this.enable=t,this}},{key:"setStopMode",value:function(t){return void 0===t&&(t=!0),this.stopAllLevels=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}}]),i}(Ui),Dr={default:0,fullWindow:1},Ar=Phaser.Utils.Objects.GetValue,jr=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=Ar(r,"color",0),a=Ar(r,"alpha",.8);return (s=e.call(this,t,o,a)).touchEventStop=new Lr(u(s),{hitAreaMode:1}),s}return s(i)}(Mr),zr=function(t,e){void 0!==t._modalScaleSave?(t.scaleX=t._modalScaleSave,t.scaleY=t._modalScaleSave):t._modalScaleSave=t.scaleX,bn(t,e);},Br=function(t,e){xn(t,e,void 0,void 0,!1);},Ir=function(t,e){void 0!==t._modalAlphaSave?t.alpha=t._modalAlphaSave:t._modalAlphaSave=t.alpha,Dn(t,e);},Wr=function(t,e){An(t,e,!1);},Fr=function(t,e){void 0!==t._modalAlphaSave?t.alpha=t._modalAlphaSave:t._modalAlphaSave=t.alpha,Dn(t,e,t.alpha);},Yr=function(t,e){An(t,e,!1);},Xr=function(t,e,i,n,r){return !!t&&(!(n&&!n(t,e,i))&&(!!St(t,!0).contains(e,i)&&!(r&&!r(t,e,i))))},Gr=Phaser.Utils.Objects.GetValue,Vr=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),null==r.transitIn&&(r.transitIn=Hr.popUp),null==r.transitOut&&(r.transitOut=Hr.scaleDown),r.destroy=Gr(r,"destroy",!0),s=e.call(this,t,r);var o=Gr(r,"cover");s.cover=!1!==o?function(t,e){var i=t.scene,n=new jr(i,e);return i.add.existing(n),t.isRexContainerLite?(t.pin(n,{syncPosition:!1,syncRotation:!1,syncScale:!1,syncAlpha:!1,syncScrollFactor:!1}),t.moveDepthBelow(n)):i.children.moveBelow(n,t),n}(t,o):void 0,s.cover&&(s.setCoverTransitInCallback(Gr(o,"transitIn",Fr)),s.setCoverTransitOutCallback(Gr(o,"transitOut",Yr)));var a=Gr(r,"touchOutsideClose",!1),h=Gr(r,"duration.hold",-1),l=Gr(r,"timeOutClose",h>=0),c=Gr(r,"anyTouchClose",!1);return Gr(r,"manualClose",!1)&&(a=!1,c=!1,l=!1),c&&(a=!1),l?s.setDisplayTime(h):s.setDisplayTime(-1),c?s.once("open",s.anyTouchClose,u(s)):a&&s.once("open",s.touchOutsideClose,u(s)),Gr(r,"openOnStart",!0)&&s.delayCall(0,s.requestOpen,u(s)),s}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(this.cover||this.scene.input.off("pointerup",this.touchCloseCallback,this),this.cover&&!t&&(this.cover.destroy(),this.cover=void 0),v(h(i.prototype),"shutdown",this).call(this,t));}},{key:"touchOutsideClose",value:function(){return this.cover?this.cover.on("pointerup",this.touchCloseCallback,this):this.scene.input.on("pointerup",this.touchCloseCallback,this),this.clickOutsideTest=!0,this}},{key:"anyTouchClose",value:function(){return this.cover?this.cover.once("pointerup",this.touchCloseCallback,this):this.scene.input.once("pointerup",this.touchCloseCallback,this),this}},{key:"touchCloseCallback",value:function(t){this.clickOutsideTest&&Xr(this.parent,t.worldX,t.worldY)||this.requestClose();}},{key:"runTransitionInCallback",value:function(){var t=v(h(i.prototype),"runTransitionInCallback",this).call(this),e=this.cover;return e&&this.coverTransitInCallback&&this.coverTransitInCallback(e,t),t}},{key:"runTransitionOutCallback",value:function(){var t=v(h(i.prototype),"runTransitionOutCallback",this).call(this),e=this.cover;return e&&this.coverTransitOutCallback&&this.coverTransitOutCallback(e,t),t}},{key:"onOpen",value:function(){var t=this.displayTime;t>=0&&this.delayCall(t,this.requestClose,this),this.emit("open",this.parent,this),v(h(i.prototype),"onOpen",this).call(this);}},{key:"onClose",value:function(){this.emit("close",this.closeEventData),v(h(i.prototype),"onClose",this).call(this);}},{key:"setDisplayTime",value:function(t){return this.displayTime=t,this}},{key:"setTransitInCallback",value:function(t){switch("string"==typeof t&&(t=Hr[t]),t){case Hr.popUp:t=zr;break;case Hr.fadeIn:t=Ir;}return v(h(i.prototype),"setTransitInCallback",this).call(this,t),this}},{key:"setTransitOutCallback",value:function(t){switch("string"==typeof t&&(t=Hr[t]),t){case Hr.scaleDown:t=Br;break;case Hr.fadeOut:t=Wr;}return v(h(i.prototype),"setTransitOutCallback",this).call(this,t),this}},{key:"setCoverTransitInCallback",value:function(t){return this.coverTransitInCallback=t,this}},{key:"setCoverTransitOutCallback",value:function(t){return this.coverTransitOutCallback=t,this}}]),i}(Er),Hr={popUp:0,fadeIn:1,scaleDown:0,fadeOut:1},Nr={modal:function(t,e){return ye(t)&&(e=t,t=void 0),void 0===this._modalBehavior&&(this.onCreateModalBehavior&&this.onCreateModalBehavior(this,t),this._modalBehavior=function(t,e){var i=new Vr(t,e);return i.on("open",(function(){t.emit("modal.open",i);})),i.on("close",(function(e){t.emit("modal.close",e,i);})),t.on("modal.requestClose",i.requestClose,i),i}(this,t)),e&&this._modalBehavior.once("close",e),this._modalBehavior.requestOpen(),this},modalPromise:function(t){var e=this;return new Promise((function(i,n){e.modal(t,i);}))},modalClose:function(t){return function(t,e){t.emit("modal.requestClose",e);}(this,t),this}},Ur=function(t,e,i,n){if(e)return Xr(t,e.worldX,e.worldY,i,n);for(var r=t.scene.input.manager,s=r.pointersTotal,o=r.pointers,a=0;a=this.dragThreshold&&this.cancel();}},{key:"click",value:function(t,e,i){if(!this.enable)return this;if(void 0===t)return this.emit("click",this,this.parent,e,i),this;this.pointer=void 0;var n=this.lastClickTime;return void 0!==n&&t-n<=this.clickInterval||(this.lastClickTime=t,this.emit("click",this,this.parent,e,i)),this}},{key:"cancel",value:function(){return this.pointer=void 0,this}},{key:"onOver",value:function(t,e,i,n){return this.enable?(this.emit("over",this,this.parent,t,n),this):this}},{key:"onOut",value:function(t,e){return this.enable?(this.emit("out",this,this.parent,t,e),this):this}}]),i}(Ui),ls={press:0,pointerdown:0,release:1,pointerup:1},us={onClick:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._click&&(t._click=new hs(t,n)),t._click.on("click",e,i),this):this},offClick:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._click||t._click.off("click",e,i),this},enableClick:function(t,e){return t&&"object"!==i(t)&&(e=t,t=this),void 0===t._click||t._click.setEnable(e),this},disableClick:function(t){return t&&"object"!==i(t)&&(t=this),void 0===t._click||t._click.setEnable(!1),this}},cs=function(t,e,i,n){if(e)return !(i&&!i(t,e))&&(!!ds(t,e)&&!(n&&!n(t,e)));for(var r=t.scene.input.manager,s=r.pointersTotal,o=r.pointers,a=0;a0)return fs.length=0,!0;return fs.length=0,!1},fs=[],vs=Phaser.Utils.Objects.GetValue,ps=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r))._enable=void 0;var o=vs(r,"inputConfig",void 0);return o&&t.setInteractive(o),s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.lastClickTime=void 0,this.setEnable(vs(t,"enable",!0)),this.setMode(vs(t,"mode",1)),this.setClickInterval(vs(t,"clickInterval",100)),this.setDragThreshold(vs(t,"threshold",void 0)),this}},{key:"boot",value:function(){var t=this.parent.scene;t.input.on("pointerdown",this.onPress,this),t.input.on("pointerup",this.onRelease,this),t.input.on("pointermove",this.onMove,this);}},{key:"shutdown",value:function(t){if(!this.isShutdown){var e=this.parent.scene;e.input.off("pointerdown",this.onPress,this),e.input.off("pointerup",this.onRelease,this),e.input.off("pointermove",this.onMove,this),this.pointer=null,v(h(i.prototype),"shutdown",this).call(this,t);}}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t){t||this.cancel(),this._enable=t;var e=t?"enable":"disable";this.emit(e,this,this.parent);}}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"setMode",value:function(t){return "string"==typeof t&&(t=gs[t]),this.mode=t,this}},{key:"setClickInterval",value:function(t){return this.clickInterval=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"isPointerInside",value:function(t){var e=this.parent;return (e.input?cs:Ur)(e,t)}},{key:"onPress",value:function(t){this.parent.willRender(t.camera)&&void 0===this.pointer&&(this.pointer=t,0===this.mode&&(this.isPointerInside(t)||this.click(t.downTime,t)));}},{key:"onRelease",value:function(t){this.parent.willRender(t.camera)&&this.pointer===t&&(1===this.mode&&(this.isPointerInside(t)||this.click(t.upTime,t)),this.pointer=void 0);}},{key:"onMove",value:function(t,e,i,n){this.pointer===t&&void 0!==this.dragThreshold&&1===this.mode&&(t.getDistance()>=this.dragThreshold||this.isPointerInside(t))&&this.cancel();}},{key:"click",value:function(t,e){if(!this.enable)return this;if(void 0===t)return this.emit("clickoutside",this,this.parent,e),this;this.pointer=void 0;var i=this.lastClickTime;return void 0!==i&&t-i<=this.clickInterval||(this.lastClickTime=t,this.emit("clickoutside",this,this.parent,e)),this}},{key:"cancel",value:function(){return this.pointer=void 0,this}}]),i}(Ui),gs={press:0,pointerdown:0,release:1,pointerup:1},ys={onClickOutside:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._clickOutside&&(t._clickOutside=new ps(t,n)),t._clickOutside.on("clickoutside",e,i),this):this},offClickOutside:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._clickOutside||t._clickOutside.off("clickoutside",e,i),this},enableClickOutside:function(t,e){return t&&"object"!==i(t)&&(e=t,t=this),void 0===t._clickOutside||t._clickOutside.setEnable(e),this},disableClickOutside:function(t){return t&&"object"!==i(t)&&(t=this),void 0===t._clickOutside||t._clickOutside.setEnable(!1),this}},ks=function(t){a(i,t);var e=d(i);function i(){var t;return n(this,i),(t=e.call(this,{eventEmitter:!1})).goto("IDLE"),t}return s(i,[{key:"setCooldownTime",value:function(t){return this.cooldownTime=t,this.cooldownMode=void 0!==t,this}},{key:"request",value:function(){return this.runMethod("request")}},{key:"update_IDLE",value:function(){this.compensationTime=0;}},{key:"request_IDLE",value:function(){return this.next(),!0}},{key:"next_IDLE",value:function(){if(this.cooldownMode)return "COOLDOWN"}},{key:"enter_COOLDOWN",value:function(){this.remainderTime=this.cooldownTime+this.compensationTime;}},{key:"update_COOLDOWN",value:function(t,e){this.remainderTime-=e,this.remainderTime<0&&(this.compensationTime=this.cooldownTime>e?-this.remainderTime:0,this.goto("IDLE"));}},{key:"request_COOLDOWN",value:function(){return !1}}]),i}(xr),ms=Phaser.Utils.Objects.GetValue,bs=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r))._enable=void 0,s.cooldown=new ks,s.parent.setInteractive(ms(r,"inputConfig",void 0)),s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.prevIsInTouch=!1,this.isInTouching=!1,this.setEnable(ms(t,"enable",!0)),this.setCooldown(ms(t,"cooldown",void 0)),this}},{key:"boot",value:function(){var t=this.parent;t.on("pointerdown",this.onPointIn,this),t.on("pointerover",this.onPointIn,this),t.on("pointerup",this.onPointOut,this),t.on("pointerout",this.onPointOut,this),this.scene.sys.events.on("preupdate",this.preupdate,this);}},{key:"shutdown",value:function(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this.preupdate,this),this.pointer=void 0,v(h(i.prototype),"shutdown",this).call(this,t));}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t)return t||(this.prevIsInTouch=!1,this.isInTouching=!1,this.pointer=void 0),this._enable=t,this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"cooldownTime",get:function(){return this.cooldown.cooldownTime},set:function(t){this.cooldown.setCooldownTime(t);}},{key:"setCooldown",value:function(t){return this.cooldownTime=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"onPointIn",value:function(t,e,i){this.enable&&t.isDown&&void 0===this.pointer&&(this.pointer=t,this.isInTouching=!0);}},{key:"onPointOut",value:function(t){this.enable&&this.pointer===t&&(this.pointer=void 0,this.isInTouching=!1);}},{key:"preupdate",value:function(t,e){this.cooldown.update(t,e),!this.prevIsInTouch&&this.isInTouching&&this.emit("touchstart",this,this.parent),this.isInTouching&&this.cooldown.request()&&this.emit("intouch",this,this.parent,this.pointer),this.prevIsInTouch&&!this.isInTouching&&this.emit("touchend",this,this.parent),this.prevIsInTouch=this.isInTouching;}}]),i}(Ui),xs={isPointerInBounds:function(t){return void 0===t?t=this:"string"==typeof t&&(t=this.getElement(t)),!!t&&Ur(t)},onTouching:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._inTouching&&(t._inTouching=new bs(t,n)),t._inTouching.on("intouch",e,i),this):this},offTouching:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._inTouching||t._inTouching.off("intouch",e,i),this},onTouchingEnd:function(t,e,i,n){return t?("function"==typeof t&&(n=i,i=e,e=t,t=this),void 0===t._inTouching&&(t._inTouching=new bs(t,n)),t._inTouching.on("touchend",e,i),this):this},offTouchingEnd:function(t,e,i){return "function"==typeof t&&(i=e,e=t,t=this),void 0===t._inTouching||t._inTouching.off("touchend",e,i),this},enableTouching:function(t,e){return t&&"object"!==i(t)&&(e=t,t=this),void 0===t._inTouching||t._inTouching.setEnable(e),this},disableTouching:function(t){return t&&"object"!==i(t)&&(t=this),void 0===t._inTouching||t._inTouching.setEnable(!1),this}},Cs=function(t,e,i){for(var n,r=0,s=t.length;r0),this.onDragStart()));}},{key:"onPointerUp",value:function(t){this.enable&&((!this.bounds||this.bounds.contains(t.x,t.y))&&this.pointer===t&&(this.pointer=void 0,this.movedState=!1,this.tracerState=Is,this.onDragEnd()));}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown){var e=!this.bounds||this.bounds.contains(t.x,t.y),i=this.pointer===t;!i&&e||(i&&!e?this.onPointerUp(t):(this.movedState||(this.movedState=t.x!==t.downX||t.y!==t.downY),this.movedState&&this.onDrag()));}}},{key:"dragCancel",value:function(){return this.tracerState===Ws&&this.onDragEnd(),this.pointer=void 0,this.tracerState=Is,this}},{key:"onDragStart",value:function(){this.emit("dragstart",this);}},{key:"onDragEnd",value:function(){this.emit("dragend",this);}},{key:"onDrag",value:function(){this.emit("drag",this);}},{key:"preUpdate",value:function(t,e){}},{key:"postUpdate",value:function(t,e){}},{key:"startTicking",value:function(){v(h(i.prototype),"startTicking",this).call(this),this.scene.sys.events.on("preupdate",this.preUpdate,this),this.scene.sys.events.on("postupdate",this.postUpdate,this);}},{key:"stopTicking",value:function(){v(h(i.prototype),"stopTicking",this).call(this),this.scene&&(this.scene.sys.events.off("preupdate",this.preUpdate,this),this.scene.sys.events.off("postupdate",this.postUpdate,this));}},{key:"setRecongizedStateObject",value:function(t){return this.recongizedState=t,this}},{key:"state",get:function(){return this.recongizedState.state},set:function(t){this.recongizedState.state=t;}},{key:"cancel",value:function(){return this.state=Fs,this}}]),i}(qi),Is=0,Ws=1,Fs="IDLE",Ys=Phaser.Utils.Objects.GetValue,Xs=Phaser.Math.Distance.Between,Gs=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.stop(),o.tapsCount=0,o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.start(),o.tapsCount=0,o.emit("tappingstart",o,o.gameObject,o.lastPointer);}},RECOGNIZED:{enter:function(){o.start(),o.emit("tap",o,o.gameObject,o.lastPointer),o.emit("".concat(o.tapsCount,"tap"),o,o.gameObject,o.lastPointer);}}},init:function(){this.state=Vs;},eventEmitter:!1};return s.setRecongizedStateObject(new xr(a)),s}return s(i,[{key:"resetFromJSON",value:function(t){v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setHoldTime(Ys(t,"time",250)),this.setTapInterval(Ys(t,"tapInterval",200)),this.setDragThreshold(Ys(t,"threshold",9)),this.setTapOffset(Ys(t,"tapOffset",10));var e=Ys(t,"taps",void 0);return void 0!==e?this.setTaps(e):(this.setMaxTaps(Ys(t,"maxTaps",void 0)),this.setMinTaps(Ys(t,"minTaps",void 0))),this}},{key:"onDragStart",value:function(){switch(this.state){case Vs:this.state=Hs;break;case Hs:var t=this.lastPointer;Xs(t.upX,t.upY,t.x,t.y)>this.tapOffset&&(this.state=Ns,this.state=Hs);break;case Ns:this.state=Hs;}}},{key:"onDragEnd",value:function(){this.state===Hs&&(this.tapsCount++,this.emit("tapping",this,this.gameObject,this.lastPointer),void 0!==this.maxTaps&&this.tapsCount===this.maxTaps&&(this.state=Ns));}},{key:"onDrag",value:function(){this.state!==Vs&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Vs);}},{key:"preUpdate",value:function(t,e){if(this.isRunning&&this.enable&&this.state===Hs){var i=this.lastPointer;if(i.isDown)t-i.downTime>this.holdTime&&(this.state=Vs);else t-i.upTime>this.tapInterval&&(void 0===this.minTaps||this.tapsCount>=this.minTaps?this.state=Ns:this.state=Vs);}}},{key:"postUpdate",value:function(t,e){this.isRunning&&this.enable&&this.state===Ns&&(this.state=Vs);}},{key:"isTapped",get:function(){return this.state===Ns}},{key:"setHoldTime",value:function(t){return this.holdTime=t,this}},{key:"setTapInterval",value:function(t){return this.tapInterval=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"setTapOffset",value:function(t){return this.tapOffset=t,this}},{key:"setMaxTaps",value:function(t){return this.maxTaps=t,this}},{key:"setMinTaps",value:function(t){return this.minTaps=t,this}},{key:"setTaps",value:function(t,e){return void 0===e&&(e=t),this.setMinTaps(t).setMaxTaps(e),this}}]),i}(Bs),Vs="IDLE",Hs="BEGIN",Ns="RECOGNIZED",Us=Phaser.Utils.Objects.GetValue,Ks=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.start();},exit:function(){o.stop();}},RECOGNIZED:{enter:function(){o.emit("pressstart",o,o.gameObject,o.lastPointer);},exit:function(){o.emit("pressend",o,o.gameObject,o.lastPointer);}}},init:function(){this.state=Js;},eventEmitter:!1};return s.setRecongizedStateObject(new xr(a)),s}return s(i,[{key:"resetFromJSON",value:function(t){return v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(Us(t,"threshold",9)),this.setHoldTime(Us(t,"time",251)),this}},{key:"onDragStart",value:function(){this.state=qs,0===this.holdTime&&(this.state=Zs);}},{key:"onDragEnd",value:function(){this.state=Js;}},{key:"onDrag",value:function(){this.state!==Js&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Js);}},{key:"preUpdate",value:function(t,e){this.isRunning&&this.enable&&(this.state===qs&&t-this.pointer.downTime>=this.holdTime&&(this.state=Zs));}},{key:"isPressed",get:function(){return this.state===Zs}},{key:"setHoldTime",value:function(t){return this.holdTime=t,this}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(Bs),Js="IDLE",qs="BEGIN",Zs="RECOGNIZED";Phaser.Utils.Objects.GetValue;var $s=function(t){return Hi(t).loop.delta},Qs=Phaser.Math.Distance.Between,to=Phaser.Math.Angle.Between,eo={getDt:function(){return $s(this.scene)},getVelocity:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Qs(e.x,e.y,t.x,t.y)/(.001*this.getDt())},getVelocityX:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Math.abs(t.x-e.x)/(.001*this.getDt())},getVelocityY:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return Math.abs(t.y-e.y)/(.001*this.getDt())},getVelocityAngle:function(){var t=this.pointer.position,e=this.pointer.prevPosition;return to(e.x,e.y,t.x,t.y)}},io={"up&down":0,"left&right":1,"4dir":2,"8dir":3},no={},ro=Phaser.Utils.Objects.GetValue,so=Phaser.Math.RadToDeg,oo=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.x=0,o.y=0,o.worldX=0,o.worldY=0;},exit:function(){var t=o.lastPointer;o.x=t.x,o.y=t.y,o.worldX=t.worldX,o.worldY=t.worldY;}},BEGIN:{enter:function(){o.validDrag=!1;}},RECOGNIZED:{enter:function(){o.start(),o.updateDirectionStates(),o.emit("swipe",o,o.gameObject,o.lastPointer);},exit:function(){o.stop(),o.clearDirectionStates();}}},init:function(){this.state=ao;},eventEmitter:!1};return s.setRecongizedStateObject(new xr(a)),s.clearDirectionStates(),s}return s(i,[{key:"resetFromJSON",value:function(t){return v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(ro(t,"threshold",10)),this.setVelocityThreshold(ro(t,"velocityThreshold",1e3)),this.setDirectionMode(ro(t,"dir","8dir")),this}},{key:"onDragStart",value:function(){this.state=ho;}},{key:"onDragEnd",value:function(){this.state=ao;}},{key:"onDrag",value:function(){this.state===ho&&(this.validDrag||(this.validDrag=0===this.dragThreshold||this.pointer.getDistance()>=this.dragThreshold),this.validDrag&&this.dragVelocity>this.velocityThreshold&&(this.state=lo));}},{key:"postUpdate",value:function(t,e){this.isRunning&&this.enable&&this.state===lo&&(this.state=ao);}},{key:"isSwiped",get:function(){return this.state===lo}},{key:"dragVelocity",get:function(){var t;switch(this.dirMode){case 0:t=this.getVelocityY();break;case 1:t=this.getVelocityX();break;default:t=this.getVelocity();}return t}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}},{key:"setVelocityThreshold",value:function(t){return this.velocityThreshold=t,this}},{key:"setDirectionMode",value:function(t){return "string"==typeof t&&(t=io[t]),this.dirMode=t,this}},{key:"updateDirectionStates",value:function(){return function(t,e,i){switch(void 0===i?i={}:!0===i&&(i=no),i.left=!1,i.right=!1,i.up=!1,i.down=!1,t=(t+360)%360,e){case 0:t<180?i.down=!0:i.up=!0;break;case 1:t>90&&t<=270?i.left=!0:i.right=!0;break;case 2:t>45&&t<=135?i.down=!0:t>135&&t<=225?i.left=!0:t>225&&t<=315?i.up=!0:i.right=!0;break;case 3:t>22.5&&t<=67.5?(i.down=!0,i.right=!0):t>67.5&&t<=112.5?i.down=!0:t>112.5&&t<=157.5?(i.down=!0,i.left=!0):t>157.5&&t<=202.5?i.left=!0:t>202.5&&t<=247.5?(i.left=!0,i.up=!0):t>247.5&&t<=292.5?i.up=!0:t>292.5&&t<=337.5?(i.up=!0,i.right=!0):i.right=!0;}}(so(this.getVelocityAngle()),this.dirMode,this),this}},{key:"clearDirectionStates",value:function(){return this.left=!1,this.right=!1,this.up=!1,this.down=!1,this}}]),i}(Bs);Object.assign(oo.prototype,eo);var ao="IDLE",ho="BEGIN",lo="RECOGNIZED",uo=Phaser.Utils.Objects.GetValue,co=Phaser.Utils.Array.SpliceOne,fo=Phaser.Math.Distance.Between,vo=Phaser.Math.Angle.Between,po=function(){function t(e,i){n(this,t);var r=e.input.manager.pointersTotal-1;r<2&&e.input.addPointer(2-r),this.scene=e,this.setEventEmitter(uo(i,"eventEmitter",void 0)),this._enable=void 0,this.pointers=[],this.movedState={},this.resetFromJSON(i),this.boot();}return s(t,[{key:"resetFromJSON",value:function(t){return this.setEnable(uo(t,"enable",!0)),this.bounds=uo(t,"bounds",void 0),this.tracerState=yo,this.pointers.length=0,At(this.movedState),this}},{key:"boot",value:function(){this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("gameout",this.dragCancel,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.sys.events.once("shutdown",this.destroy,this);}},{key:"shutdown",value:function(){this.scene&&(this.destroyEventEmitter(),this.pointers.length=0,At(this.movedState),this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("gameout",this.dragCancel,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.sys.events.off("shutdown",this.destroy,this),this.scene=void 0);}},{key:"destroy",value:function(){this.shutdown();}},{key:"enable",get:function(){return this._enable},set:function(t){if(this._enable!==t)return t||this.dragCancel(),this._enable=t,this}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"onPointerDown",value:function(t){if(this.enable&&(2!==this.pointers.length&&(!this.bounds||this.bounds.contains(t.x,t.y))&&-1===this.pointers.indexOf(t)))switch(this.movedState[t.id]=!1,this.pointers.push(t),this.tracerState){case yo:this.tracerState=ko,this.onDrag1Start();break;case ko:this.tracerState=mo,this.onDrag2Start();}}},{key:"onPointerUp",value:function(t){if(this.enable&&(!this.bounds||this.bounds.contains(t.x,t.y))){var e=this.pointers.indexOf(t);if(-1!==e)switch(delete this.movedState[t.id],co(this.pointers,e),this.tracerState){case ko:this.tracerState=yo,this.onDrag1End();break;case mo:this.tracerState=ko,this.onDrag2End(),this.onDrag1Start();}}}},{key:"onPointerMove",value:function(t){if(this.enable&&t.isDown){var e=!this.bounds||this.bounds.contains(t.x,t.y),i=-1!==this.pointers.indexOf(t);if(!i&&e);else if(i&&!e)this.onPointerUp(t);else if(this.movedState[t.id]||(this.movedState[t.id]=t.x!==t.downX||t.y!==t.downY),this.movedState[t.id])switch(this.tracerState){case ko:this.onDrag1();break;case mo:this.onDrag2();}}}},{key:"dragCancel",value:function(){return this.tracerState===mo&&this.onDrag2End(),this.pointers.length=0,At(this.movedState),this.tracerState=yo,this}},{key:"onDrag1Start",value:function(){this.emit("drag1start",this);}},{key:"onDrag1End",value:function(){this.emit("drag1end",this);}},{key:"onDrag1",value:function(){this.emit("drag1",this);}},{key:"onDrag2Start",value:function(){this.emit("drag2start",this);}},{key:"onDrag2End",value:function(){this.emit("drag2end",this);}},{key:"onDrag2",value:function(){this.emit("drag2",this);}},{key:"distanceBetween",get:function(){if(this.tracerState!==mo)return 0;var t=this.pointers[0],e=this.pointers[1];return fo(t.x,t.y,e.x,e.y)}},{key:"angleBetween",get:function(){if(this.tracerState!==mo)return 0;var t=this.pointers[0],e=this.pointers[1];return vo(t.x,t.y,e.x,e.y)}},{key:"drag1Vector",get:function(){var t=this.pointers[0];if(t&&this.movedState[t.id]){var e=t.position,i=t.prevPosition;go.x=e.x-i.x,go.y=e.y-i.y;}else go.x=0,go.y=0;return go}},{key:"centerX",get:function(){if(this.tracerState!==mo)return 0;var t=this.pointers[0].position,e=this.pointers[1].position;return (t.x+e.x)/2}},{key:"centerY",get:function(){if(this.tracerState!==mo)return 0;var t=this.pointers[0].position,e=this.pointers[1].position;return (t.y+e.y)/2}},{key:"prevCenterX",get:function(){if(this.tracerState!==mo)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,e=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return (t.x+e.x)/2}},{key:"prevCenterY",get:function(){if(this.tracerState!==mo)return 0;var t=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,e=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return (t.y+e.y)/2}},{key:"movementCenterX",get:function(){return this.centerX-this.prevCenterX}},{key:"movementCenterY",get:function(){return this.centerY-this.prevCenterY}},{key:"setRecongizedStateObject",value:function(t){return this.recongizedState=t,this}},{key:"state",get:function(){return this.recongizedState.state},set:function(t){this.recongizedState.state=t;}},{key:"cancel",value:function(){return this.state=bo,this}}]),t}();Object.assign(po.prototype,Wi);var go={},yo=0,ko=1,mo=2,bo="IDLE";Phaser.Utils.Objects.GetValue;var xo=Phaser.Math.RotateAround,Co=function(t,e,i,n){return xo(t,e,i,n),t.rotation+=n,t},wo={},So=Phaser.Utils.Objects.GetValue,Po=Phaser.Math.Angle.WrapDegrees,Oo=Phaser.Math.Angle.ShortestBetween,To=Phaser.Math.RadToDeg,_o=Phaser.Math.DegToRad,Eo=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i);var o=u(s=e.call(this,t,r)),a={states:{IDLE:{enter:function(){o.prevAngle=void 0,o.angle=0;}},BEGIN:{},RECOGNIZED:{enter:function(){o.emit("rotatestart",o);},exit:function(){o.emit("rotateend",o);}}},init:function(){this.state=Ro;},eventEmitter:!1};return s.setRecongizedStateObject(new xr(a)),s}return s(i,[{key:"resetFromJSON",value:function(t){return v(h(i.prototype),"resetFromJSON",this).call(this,t),this.setDragThreshold(So(t,"threshold",0)),this}},{key:"onDrag2Start",value:function(){this.prevAngle=Po(To(this.angleBetween)),this.state=Lo,0===this.dragThreshold&&(this.state=Do);}},{key:"onDrag2End",value:function(){this.state=Ro;}},{key:"onDrag2",value:function(){switch(this.state){case Lo:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var t=Po(To(this.angleBetween));this.angle=Oo(this.prevAngle,t),this.prevAngle=t,this.state=Do;}break;case Do:t=Po(To(this.angleBetween));this.angle=Oo(this.prevAngle,t),this.prevAngle=t,this.emit("rotate",this);}}},{key:"isRotated",get:function(){return this.state===Do}},{key:"rotation",get:function(){return _o(this.angle)}},{key:"setDragThreshold",value:function(t){return this.dragThreshold=t,this}}]),i}(po),Mo={spinObject:function(t,e){if(!this.isRotation)return this;void 0===e&&(e=this.pointers[0].camera);var i=this.movementCenterX,n=this.movementCenterY,r=function(t,e,i,n){return void 0===n?n={}:!0===n&&(n=wo),i.getWorldPoint(t,e,n),n}(this.centerX,this.centerY,e,!0),s=r.x,o=r.y,a=this.rotation;if(Array.isArray(t))for(var h=t,l=0,u=h.length;l=this.sizerChildren.length?this.sizerChildren.push(t):this.sizerChildren.splice(a,0,t),t.isRexSizer||(e>0&&(0===this.orientation?t.minWidth=void 0===h?mt(t):h:t.minHeight=void 0===l?bt(t):l),s&&(0===this.orientation?t.minHeight=l:t.minWidth=h)),void 0!==o&&this.addChildrenMap(o,t),this},ta={add:Qo,addSpace:function(t){return this.insertSpace(void 0,t),this},insertSpace:function(t,e){return void 0===e&&(e=1),Qo.call(this,new Uo(this.scene),{proportion:e,minWidth:0,minHeight:0,index:t}),this},insert:function(t,e,i,n,r,s,o,a){return Jo(i)&&(i.index=t),Qo.call(this,e,i,n,r,s,o,t,a),this},insertAtPosition:function(t,e,i,n,r,s,o,a,h){var l=Ko.call(this,t,e);return -1===l&&(l=void 0),this.insert(l,i,n,r,s,o,a,h),this}},ea=qt.prototype.clear,ia=function(t){this.backgroundChildren&&(this.backgroundChildren.length=0);var e,i=!t&&this.sizerEventsEnable;if(i&&(e=this.getChildren([])),ea.call(this,t),i)for(var n,r=0,s=e.length;r=0;e--)this.remove(this.sizerChildren[e],t);return this},clear:function(t){return this.sizerChildren.length=0,ia.call(this,t),this}},sa={getChildAlign:function(t){return this.getSizerConfig(t).align},setChildAlign:function(t,e){return "string"==typeof e&&(e=Fe[e]),this.getSizerConfig(t).align=e,this}},oa={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=this.space.item,a=!0,h=0,l=s.length;h0&&this.proportionLength>0&&(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):n.proportion>0&&this.proportionLength>0&&(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;n0?(e=t-this.getChildrenWidth(!1),this.proportionLength=e/this.childrenProportion):this.proportionLength=0;}return t},resolveHeight:function(t){t=ji.call(this,t);if(void 0===this.proportionLength&&1===this.orientation){var e=t-this.childrenHeight;e>0?(e=t-this.getChildrenHeight(!1),this.proportionLength=e/this.childrenProportion):this.proportionLength=0;}return t}};Object.assign(oa,ta,ra,sa,{getChildProportion:function(t){return this.getSizerConfig(t).proportion},setChildProportion:function(t,e){return this.getSizerConfig(t).proportion=e,this}},{getChildExpand:function(t){return this.getSizerConfig(t).expand},setChildExpand:function(t,e){return this.getSizerConfig(t).expand=e,this}});var aa=function(){for(var t,e,i=0,n=this.sizerChildren,r=0,s=n.length;r0&&(i+=e);return i},ha={x:0,h:0,horizontal:0,"left-to-right":0,y:1,v:1,vertical:1,"top-to-bottom":1},la=function(t){return "string"==typeof t&&(t=ha[t]),t},ua=Phaser.Utils.Objects.IsPlainObject,ca=Phaser.Utils.Objects.GetValue,da=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var u;return n(this,i),ua(r)?(r=ca(l=r,"x",0),s=ca(l,"y",0),o=ca(l,"width",void 0),a=ca(l,"height",void 0),h=ca(l,"orientation",0)):ua(o)?(o=ca(l=o,"width",void 0),a=ca(l,"height",void 0),h=ca(l,"orientation",0)):ua(h)&&(h=ca(l=h,"orientation",0)),void 0===h&&(h=0),(u=e.call(this,t,r,s,o,a,l)).type="rexSizer",u.sizerChildren=[],u.setOrientation(h),u.setItemSpacing(ca(l,"space.item",0)),u.setStartChildIndex(ca(l,"startChildIndex",0)),u.setRTL(ca(l,"rtl",!1)),u.addChildrenMap("items",u.sizerChildren),u}return s(i,[{key:"setOrientation",value:function(t){return this.orientation=la(t),this}},{key:"setItemSpacing",value:function(t){return this.space.item=t,this}},{key:"setStartChildIndex",value:function(t){return this.startChildIndex=t,this}},{key:"setRTL",value:function(t){return void 0===t&&(t=!0),this.rtl=t,this}},{key:"childrenProportion",get:function(){return void 0===this._childrenProportion&&(this._childrenProportion=aa.call(this)),this._childrenProportion}}]),i}(Vo);Object.assign(da.prototype,oa);var fa=Phaser.Utils.Array.GetFirst,va=Phaser.Utils.Array.Remove,pa=function(t,e,i){if(t){var n=null==e,r=null==i;return n&&r||(n||(t.displayWidth=e),r||(t.displayHeight=i),n&&(t.scaleX=t.scaleY),r&&(t.scaleY=t.scaleX)),t}},ga=function(t,e){var i;return t||0===t||(t=""),void 0===e&&(e=!0),Array.isArray(t)&&(t=t.join("\n")),(i=e?"".concat(this.text,"\n").concat(t):"".concat(this.text).concat(t))!=this.text&&this.setText(i),this},ya={appendText:ga,resetDisplayContent:function(t){void 0===t?t={}:"string"==typeof t&&(t={text:t});var e=t.text||"";this.setText(e);var i=this.childrenMap.icon;if(i){t.icon?this.show(i):this.hide(i);var n=t.iconSize;n&&(this.setChildDisplaySize(i,n,n),void 0!==this.iconWidth&&this.setIconSize(n)),!0!==t.icon&&this.setIconTexture(t.icon,t.iconFrame);}var r=this.childrenMap.action;if(r){t.action?this.show(r):this.hide(r);var s=t.actionSize;s&&(this.setChildDisplaySize(r,s,s),void 0!==this.actionWidth&&this.setActionSize(s)),!0!==t.action&&this.setActionTexture(t.action,t.actionFrame);}return this}},ka=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"text",get:function(){var t=this.childrenMap.text;return t?t.text:""},set:function(t){var e=this.childrenMap.text;e&&e.setText(t);}},{key:"setText",value:function(t){return this.text=t,this}},{key:"setIconTexture",value:function(t,e){var i=this.childrenMap.icon;return i?(i.setTexture(t,e),void 0!==this.iconWidth&&void 0!==this.iconHeight&&(pa(i,this.iconWidth,this.iconHeight),this.resetChildScaleState(i)),this):this}},{key:"setTexture",value:function(t,e){return this.setIconTexture(t,e),this}},{key:"setIconSize",value:function(t,e){return void 0===e&&(e=t),this.iconWidth=t,this.iconHeight=e,this}},{key:"texture",get:function(){var t=this.childrenMap.icon;if(t)return t.texture}},{key:"frame",get:function(){var t=this.childrenMap.icon;if(t)return t.frame}},{key:"setActionTexture",value:function(t,e){var i=this.childrenMap.action;return void 0===i||(i.setTexture(t,e),void 0!==this.actionWidth&&void 0!==this.actionHeight&&(pa(i,this.actionWidth,this.actionHeight),this.resetChildScaleState(i))),this}},{key:"actionTexture",get:function(){var t=this.childrenMap.action;if(t)return t.texture}},{key:"actionFrame",get:function(){var t=this.childrenMap.action;if(t)return t.frame}},{key:"setActionSize",value:function(t,e){return void 0===e&&(e=t),this.actionWidth=t,this.actionHeight=e,this}},{key:"preLayout",value:function(){var t=this.childrenMap.icon;t&&void 0!==this.iconWidth&&void 0!==this.iconHeight&&pa(t,this.iconWidth,this.iconHeight);var e=this.childrenMap.action;e&&void 0!==this.actionWidth&&void 0!==this.actionHeight&&pa(e,this.actionWidth,this.actionHeight),v(h(i.prototype),"preLayout",this).call(this);}},{key:"postLayout",value:function(t,e,i){var n=this.childrenMap.iconMask;n&&(n.setPosition(),this.resetChildPositionState(n));var r=this.childrenMap.actionMask;return r&&(r.setPosition(),this.resetChildPositionState(r)),this}},{key:"resize",value:function(t,e){v(h(i.prototype),"resize",this).call(this,t,e);var n=this.childrenMap.iconMask;n&&n.resize();var r=this.childrenMap.actionMask;return r&&r.resize(),this}}]),i}(da);Object.assign(ka.prototype,ya);var ma=function(t,e,i,n,r){if(this.clear().fillStyle(16777215),1===this.shapeType){i=i.left;var s=Math.min(t,e)/2;this.fillCircle(-t*(n-.5),-e*(r-.5),s+i);}else this.fillRect(-t*n-i.left,-e*r-i.top,t+i.left+i.right,e+i.top+i.bottom);},ba=function(t,e){for(var i in t){if(!(i in e))return !1;if(t[i]!==e[i])return !1}for(var i in e)if(!(i in t))return !1;return !0},xa=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),void 0===r&&(r=0),"string"==typeof r&&(r=Ca[r]),(o=e.call(this,t.scene)).parent=t,o.shapeType=r,o.padding=yi(s),o.setPosition().resize().setVisible(!1),o}return s(i,[{key:"destroy",value:function(){return this.parent=void 0,v(h(i.prototype),"destroy",this).call(this),this}},{key:"setPosition",value:function(t,e){var n=this.parent;return void 0===t&&(t=n.x),void 0===e&&(e=n.y),v(h(i.prototype),"setPosition",this).call(this,t,e),this}},{key:"resize",value:function(t,e,i){var n=this.parent;void 0===t&&(t=n.width),void 0===e&&(e=n.height),void 0===i?i=this.padding:"number"==typeof i&&(i=yi(i));var r=this.width!==t||this.height!==e,s=this.padding!==i&&!ba(this.padding,i);return r||s?(this.width=t,this.height=e,s&&jt(i,this.padding),this.originX=n.originX,this.originY=n.originY,ma.call(this,t,e,i,n.originX,n.originY),this):this}},{key:"setOrigin",value:function(t,e){void 0===e&&(e=t);var i=this.parent;return void 0===t&&(t=i.originX),void 0===e&&(e=i.originY),this.originX===t&&this.originY===e||(this.originX=t,this.originY=e,ma.call(this,this.width,this.height,this.padding,t,e)),this}}]),i}(Phaser.GameObjects.Graphics),Ca={rectangle:0,circle:1},wa=function(t,e,i,n){var r=new xa(e,i,n);if(t&&!t.isRexSizer){var s=r.createGeometryMask();t.setMask(s),this.once("destroy",(function(){t.setMask(),s.destroy();}));}return this.pin(r),r},Sa=Phaser.Utils.Objects.GetValue,Pa=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r)).type="rexLabel";var o=Sa(r,"background",void 0),a=Sa(r,"icon",void 0),h=Sa(r,"iconMask",void 0),l=Sa(r,"text",void 0),c=Sa(r,"action",void 0),d=Sa(r,"actionMask",void 0),f=Sa(r,"align",void 0);if(o&&s.addBackground(o),"right"!==f&&"bottom"!==f&&"center"!==f||s.addSpace(),a){0===s.orientation?(l||c)&&(x={right:Sa(r,"space.icon",0),top:Sa(r,"space.iconTop",0),bottom:Sa(r,"space.iconBottom",0),left:Sa(r,"space.iconLeft",0)}):(l||c)&&(x={bottom:Sa(r,"space.icon",0),left:Sa(r,"space.iconLeft",0),right:Sa(r,"space.iconRight",0),top:Sa(r,"space.iconTop",0)});var v=Sa(r,"squareFitIcon",!1)?1:0;if(s.add(a,{proportion:0,padding:x,fitRatio:v}),h&&(h=wa.call(u(s),a,a,1)),!v){var p=Sa(r,"iconSize",void 0);s.setIconSize(Sa(r,"iconWidth",p),Sa(r,"iconHeight",p));}}if(l){var g,y,k=Sa(r,"space.text",0),m=Sa(r,"expandTextWidth",!1),b=Sa(r,"expandTextHeight",!1);0===s.orientation?(g=m?1:0,c&&(x={right:k}),y=b):(g=b?1:0,c&&(x={bottom:k}),y=m),s.add(l,{proportion:g,expand:y,padding:x});}if(c){var x;x=0===s.orientation?{top:Sa(r,"space.actionTop",0),bottom:Sa(r,"space.actionBottom",0),right:Sa(r,"space.actionRight",0)}:{left:Sa(r,"space.actionLeft",0),right:Sa(r,"space.actionRight",0),bottom:Sa(r,"space.actionBottom",0)};v=Sa(r,"squareFitAction",!1)?1:0;if(s.add(c,{proportion:0,padding:x,fitRatio:v}),d&&(d=wa.call(u(s),c,c,1)),!v){var C=Sa(r,"actionSize");s.setActionSize(Sa(r,"actionWidth",C),Sa(r,"actionHeight",C));}}return "center"===f&&s.addSpace(),s.addChildrenMap("background",o),s.addChildrenMap("icon",a),s.addChildrenMap("iconMask",h),s.addChildrenMap("text",l),s.addChildrenMap("action",c),s.addChildrenMap("actionMask",d),s}return s(i)}(ka),Oa=Phaser.Utils.Objects.GetValue,Ta=function(){function t(e,i,r,s,o){n(this,t),void 0===e&&(e=0),void 0===i&&(i=e),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=0),this.cornerRadius={},this._width=0,this._height=0,this.setTo(e,i,r,s,o);}return s(t,[{key:"setTo",value:function(t,e,i,n,r){return this.setPosition(t,e),this.setRadius(r),this.setSize(i,n),this}},{key:"setPosition",value:function(t,e){return this.x=t,this.y=e,this}},{key:"setRadius",value:function(t){return void 0===t&&(t=0),this.radius=t,this}},{key:"setSize",value:function(t,e){return this.width=t,this.height=e,this}},{key:"minWidth",get:function(){var t=this.cornerRadius;return Math.max(t.tl.x+t.tr.x,t.bl.x+t.br.x)}},{key:"minHeight",get:function(){var t=this.cornerRadius;return Math.max(t.tl.y+t.bl.y,t.tr.y+t.br.y)}},{key:"width",get:function(){return this._width},set:function(t){null==t&&(t=0),this._width=Math.max(t,this.minWidth);}},{key:"height",get:function(){return this._height},set:function(t){null==t&&(t=0),this._height=Math.max(t,this.minHeight);}},{key:"radius",get:function(){var t=this.cornerRadius;return Math.max(t.tl.x,t.tl.y,t.tr.x,t.tr.y,t.bl.x,t.bl.y,t.br.x,t.br.y)},set:function(t){var e,i;"number"==typeof t?(e=t,i=t):(e=Oa(t,"x",0),i=Oa(t,"y",0));var n=this.cornerRadius;n.tl=_a(Oa(t,"tl",void 0),e,i),n.tr=_a(Oa(t,"tr",void 0),e,i),n.bl=_a(Oa(t,"bl",void 0),e,i),n.br=_a(Oa(t,"br",void 0),e,i);}},{key:"radiusTL",get:function(){var t=this.cornerRadius.tl;return Math.max(t.x,t.y)},set:function(t){Ea(this.cornerRadius.tl,t);}},{key:"radiusTR",get:function(){var t=this.cornerRadius.tr;return Math.max(t.x,t.y)},set:function(t){Ea(this.cornerRadius.tr,t);}},{key:"radiusBL",get:function(){var t=this.cornerRadius.bl;return Math.max(t.x,t.y)},set:function(t){Ea(this.cornerRadius.bl,t);}},{key:"radiusBR",get:function(){var t=this.cornerRadius.br;return Math.max(t.x,t.y)},set:function(t){Ea(this.cornerRadius.br,t);}}]),t}(),_a=function(t,e,i){return void 0===t?t={x:e,y:i}:"number"==typeof t&&(t={x:t,y:t}),Ma(t),t},Ea=function(t,e){"number"==typeof e?(t.x=e,t.y=e):(t.x=Oa(e,"x",0),t.y=Oa(e,"y",0)),Ma(t);},Ma=function(t){t.convex=t.x>=0||t.y>=0,t.x=Math.abs(t.x),t.y=Math.abs(t.y);},Ra=function(t,e,i){var n=i.length;if(n>=2){var r=i[n-2],s=i[n-1];if(t===r&&e===s)return i}return i.push(t,e),i},La=Phaser.Math.DegToRad,Da=function(t,e,i,n,r,s,o,a,h){o&&s>r?s-=360:!o&&s>>16,a=(65280&r)>>>8,h=255&r;t.fillStyle="rgba("+o+","+a+","+h+","+s+")";},Fa=function(t,e,i,n){var r=i||e.strokeColor,s=n||e.strokeAlpha,o=(16711680&r)>>>16,a=(65280&r)>>>8,h=255&r;t.strokeStyle="rgba("+o+","+a+","+h+","+s+")",t.lineWidth=e.lineWidth;},Ya=Phaser.Renderer.Canvas.SetTransform,Xa={renderWebGL:function(t,e,i,n){e.dirty&&(e.updateData(),e.dirty=!1),i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),s=Ia(e,i,n),o=r.calcMatrix.copyFrom(s.calc),a=e._displayOriginX,h=e._displayOriginY,l=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&ja(r,o,e,l,a,h),e.isStroked&&Ba(r,e,l,a,h),t.pipelines.postBatch(e);},renderCanvas:function(t,e,i,n){e.dirty&&(e.updateData(),e.dirty=!1),i.addToRenderList(e);var r=t.currentContext;if(Ya(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,l=a[0]-s,u=a[1]-o;r.beginPath(),r.moveTo(l,u),e.closePath||(h-=2);for(var c=2;c0;}},{key:"fillAlpha",get:function(){return this._fillAlpha},set:function(t){this._fillAlpha=t,this.isFilled=t>0&&null!=this._fillColor;}},{key:"setFillStyle",value:function(t,e){return void 0===e&&(e=1),this.fillColor=t,this.fillAlpha=e,this}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(t){this._strokeColor=t,this.isStroked=null!=t&&this._strokeAlpha>0&&this._lineWidth>0;}},{key:"strokeAlpha",get:function(){return this._strokeAlpha},set:function(t){this._strokeAlpha=t,this.isStroked=t>0&&null!=this._strokeColor&&this._lineWidth>0;}},{key:"lineWidth",get:function(){return this._lineWidth},set:function(t){this._lineWidth=t,this.isStroked=t>0&&null!=this._strokeColor;}},{key:"setStrokeStyle",value:function(t,e,i){return void 0===i&&(i=1),this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this}},{key:"updateData",value:function(){var t=this.geom,e=this.pathData;e.length=0;var i,n=t.width,r=t.height,s=t.cornerRadius,o=this.iteration+1;if(i=s.tl,Ka(i))if(i.convex){var a=i.x,h=i.y;Da(a,h,i.x,i.y,180,270,!1,o,e);}else {Da(a=0,h=0,i.x,i.y,90,0,!0,o,e);}else Ra(0,0,e);if(i=s.tr,Ka(i))if(i.convex){a=n-i.x,h=i.y;Da(a,h,i.x,i.y,270,360,!1,o,e);}else {Da(a=n,h=0,i.x,i.y,180,90,!0,o,e);}else Ra(n,0,e);if(i=s.br,Ka(i))if(i.convex){a=n-i.x,h=r-i.y;Da(a,h,i.x,i.y,0,90,!1,o,e);}else {Da(a=n,h=r,i.x,i.y,270,180,!0,o,e);}else Ra(n,r,e);if(i=s.bl,Ka(i))if(i.convex){a=i.x,h=r-i.y;Da(a,h,i.x,i.y,90,180,!1,o,e);}else {Da(a=0,h=r,i.x,i.y,360,270,!0,o,e);}else Ra(0,r,e);return e.push(e[0],e[1]),this.pathIndexes=Na(e),this}},{key:"setShapeType",value:function(t){return "string"==typeof t&&(t=Ja[t]),this.shapeType=t,this}},{key:"width",get:function(){return this.geom.width},set:function(t){this.resize(t,this.height);}},{key:"height",get:function(){return this.geom.height},set:function(t){this.resize(this.width,t);}},{key:"setSize",value:function(t,e){if(void 0===e&&(e=t),this.geom.width===t&&this.geom.height===e)return this;this.geom.setSize(t,e),1===this.shapeType&&this.setRadius({x:t/2,y:e/2}),this.updateDisplayOrigin(),this.dirty=!0;var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this}},{key:"resize",value:function(t,e){return this.setSize(t,e),this}},{key:"radius",get:function(){return this.geom.radius},set:function(t){this.geom.setRadius(t),this.updateDisplayOrigin(),this.dirty=!0;}},{key:"radiusTL",get:function(){return this.geom.radiusTL},set:function(t){this.geom.radiusTL=t,this.dirty=!0;}},{key:"radiusTR",get:function(){return this.geom.radiusTR},set:function(t){this.geom.radiusTR=t,this.dirty=!0;}},{key:"radiusBL",get:function(){return this.geom.radiusBL},set:function(t){this.geom.radiusBL=t,this.dirty=!0;}},{key:"radiusBR",get:function(){return this.geom.radiusBR},set:function(t){this.geom.radiusBR=t,this.dirty=!0;}},{key:"setRadius",value:function(t){return void 0===t&&(t=0),this.radius=t,this}},{key:"setRadiusTL",value:function(t){return void 0===t&&(t=0),this.radiusTL=t,this}},{key:"setRadiusTR",value:function(t){return void 0===t&&(t=0),this.radiusTR=t,this}},{key:"setRadiusBL",value:function(t){return void 0===t&&(t=0),this.radiusBL=t,this}},{key:"setRadiusBR",value:function(t){return void 0===t&&(t=0),this.radiusBR=t,this}},{key:"cornerRadius",get:function(){return this.geom.cornerRadius},set:function(t){this.radius=t;}},{key:"setCornerRadius",value:function(t){return this.setRadius(t)}},{key:"iteration",get:function(){return this._iteration},set:function(t){void 0!==this._iteration?this._iteration!==t&&(this._iteration=t,this.dirty=!0):this._iteration=t;}},{key:"setIteration",value:function(t){return void 0===t&&(t=6),this.iteration=t,this}}]),i}(Ga),Ka=function(t){return t.x>0&&t.y>0},Ja={rectangle:0,circle:1};Object.assign(Ua.prototype,Xa);var qa=function(t,e,i,n){if(void 0===i&&(i="."),void 0===n&&(n={}),!t)return n;if(e in t)return Object.assign(n,t[e]);for(var r in e+=i,t)r.startsWith(e)&&(n[r.replace(e,"")]=t[r]);return n},Za=function(t,e,i){if(void 0===i&&(i={}),Array.isArray(e))for(var n=0,r=e.length;n=6?(n=[arguments[2],void 0,arguments[3]],r=[arguments[4],void 0,arguments[5]]):(n=ge(n),r=ge(r)),this.textureKey=t,this.baseFrameName=e,this.columns.data=n,this.columns.count=n?n.length:0,this.columns.stretch=0,this.columns.minWidth=0,this.columns.scale=1,this.rows.data=r,this.rows.count=r?r.length:0,this.rows.stretch=0,this.rows.minHeight=0,this.rows.scale=1;var s=this.scene.sys.textures.get(t);if(!s)return this.clear(),this;if(!n||!r)return this.clear(),this;for(var o=s.get(e),a=o.width,h=0,l=0,u=n.length;l0?0:g,b=0;l=0;for(var S=n.length;l0?0:y),y>=1&&g>=1){var P=i(k=this.getFrameNameCallback(l,C,e));"string"!==P&&"number"!==P||s.add(k,0,b+o.cutX,x+o.cutY,y,g);}b+=y;}x+=g;}return this.updateTexture(),this},updateTexture:function(){if(this.clear(),void 0===this.textureKey)return this;var t=this.scene.sys.textures.get(this.textureKey);if(!t)return this;var e,i,n,r,s,o,a,h=this.columns.minWidth*this.maxFixedPartScaleX,l=this.rows.minHeight*this.maxFixedPartScaleY,u=this.width-h,c=this.height-l,d=u>=0?this.maxFixedPartScaleX:this.width/h,f=c>=0?this.maxFixedPartScaleY:this.height/l;if(this.preserveRatio){var v=Math.min(d,f);if(d>v){var p=(d-v)*h;u>=0?u+=p:u=p,d=v;}if(f>v){var g=(f-v)*l;c>=0?c+=g:c=g,f=v;}}this.columns.scale=d,this.rows.scale=f,e=u>0&&this.columns.stretch>0?u/this.columns.stretch:0,i=c>0&&this.rows.stretch>0?c/this.rows.stretch:0;var y=0,k=0;this._beginDraw();for(var m=0,b=this.rows.count;m0&&a>0&&(0===(0===s.stretch&&0===r.stretch||0===this.getStretchMode(x,m)?0:1)?this._drawImage(this.textureKey,n,y,k,o,a):this._drawTileSprite(this.textureKey,n,y,k,o,a)),y+=o;k+=a;}this._endDraw();},setStretchMode:function(t){return bh(t)?(this.stretchMode.edge=Ch(xh(t,"edge",0)),this.stretchMode.internal=Ch(xh(t,"internal",0))):(t=Ch(t),this.stretchMode.edge=t,this.stretchMode.internal=t),this},getStretchMode:function(t,e){return Sh.call(this,t,e)?this.stretchMode.edge:this.stretchMode.internal},setPreserveRatio:function(t){return null==t&&(t=!0),this.preserveRatio=t,this},setMaxFixedPartScale:function(t,e){return void 0===e&&(e=t),this.maxFixedPartScaleX=t,this.maxFixedPartScaleY=e,this}},Oh=Phaser.Utils.Objects.IsPlainObject,Th=Phaser.Utils.Objects.GetValue,_h=Phaser.GameObjects,Eh=void 0,Mh=function(t,e){if(Eh||(Eh={},Hi(t).events.once("destroy",(function(){for(var t in Eh)Eh[t].destroy();Eh=void 0;}))),!Eh.hasOwnProperty(e)){var i=Hi(t).scene.systemScene;(t=new _h[e](i)).setOrigin(0),Eh[e]=t;}return Eh[e]},Rh=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i)}(function(t,e){var i=function(t){a(r,t);var i=d(r);function r(t,s,o,a,h,l,u,c,d,f){var v;if(n(this,r),Oh(s)?(s=Th(f=s,"x",0),o=Th(f,"y",0),a=Th(f,"width",1),h=Th(f,"height",1),l=Th(f,"key",void 0),u=Th(f,"baseFrame",void 0),c=Th(f,"columns",void 0),d=Th(f,"rows",void 0)):Oh(a)?(a=Th(f=a,"width",1),h=Th(f,"height",1),l=Th(f,"key",void 0),u=Th(f,"baseFrame",void 0),c=Th(f,"columns",void 0),d=Th(f,"rows",void 0)):Oh(l)?(l=Th(f=l,"key",void 0),u=Th(f,"baseFrame",void 0),c=Th(f,"columns",void 0),d=Th(f,"rows",void 0)):Oh(u)?(u=Th(f=u,"baseFrame",void 0),c=Th(f,"columns",void 0),d=Th(f,"rows",void 0)):Array.isArray(u)?(f=d,d=c,c=u,u=Th(f,"baseFrame",void 0)):Oh(c)&&(c=Th(f=c,"columns",void 0),d=Th(f,"rows",void 0)),void 0===c){var p=Th(f,"leftWidth",void 0),g=Th(f,"rightWidth",void 0);void 0!==p&&void 0!==g&&(c=[p,void 0,g]);}if(void 0===d){var y=Th(f,"topHeight",void 0),k=Th(f,"bottomHeight",void 0);void 0!==y&&void 0!==k&&(d=[y,void 0,k]);}(v=i.call(this,t)).type=e,v.setPosition(s,o).setSize(a,h).setOrigin(.5,.5),v.columns={},v.rows={},v.stretchMode={},v._tileSprite=void 0,v._image=void 0,v.setGetFrameNameCallback(Th(f,"getFrameNameCallback",void 0)),v.setStretchMode(Th(f,"stretchMode",0)),v.setPreserveRatio(Th(f,"preserveRatio",!0));var m=Th(f,"maxFixedPartScale",1),b=Th(f,"maxFixedPartScaleX",m),x=Th(f,"maxFixedPartScaleY",void 0);return v.setMaxFixedPartScale(b,x),v.setBaseTexture(l,u,c,d),v}return s(r,[{key:"minWidth",get:function(){return this.columns.minWidth}},{key:"minHeight",get:function(){return this.rows.minHeight}},{key:"fixedPartScaleX",get:function(){return this.columns.scale}},{key:"fixedPartScaleY",get:function(){return this.rows.scale}},{key:"resize",value:function(t,e){return this.width===t&&this.height===e||(v(h(r.prototype),"resize",this)?v(h(r.prototype),"resize",this).call(this,t,e):v(h(r.prototype),"setSize",this).call(this,t,e),this.updateTexture()),this}}]),r}(t);return Object.assign(i.prototype,Ph),i}(Phaser.GameObjects.RenderTexture,"rexNinePatch")),Lh={_drawImage:function(t,e,i,n,r,s){var o=Mh(this,"Image").setTexture(t,e).setDisplaySize(r,s);this.draw(o,i,n);},_drawTileSprite:function(t,e,i,n,r,s){var o=Mh(this,"TileSprite").setTexture(t,e).setSize(r,s);this.draw(o,i,n);}};Object.assign(Rh.prototype,Lh);var Dh=function(t,e){var i,n;switch(e&&(e.hasOwnProperty("type")?i=e.type:e.hasOwnProperty("leftWidth")?i="nineSlice":e.hasOwnProperty("key")&&(i="image")),i){case"image":n=new kh(t,e);break;case"nineSlice":n=e.hasOwnProperty("stretchMode")?new Rh(t,e):new vh(t,e);break;default:n=new nh(t,e);}return t.add.existing(n),n},Ah=Phaser.GameObjects.Text,jh=Phaser.Utils.Objects.GetValue,zh=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={});var o=jh(r,"x",0),a=jh(r,"y",0),h=jh(r,"text","");return (s=e.call(this,t,o,a,h,r)).type="rexStatesText",r.style=s.style,r.onModifyStyle=function(t,e){var i=e.hasOwnProperty("fontStyle")||e.hasOwnProperty("fontSize")||e.hasOwnProperty("fontFamily");t.style.update(i);},s.addStyleManager(r),delete r.style,s}return s(i)}(Ah);Object.assign(zh.prototype,ih); /** * @author Richard Davey * @copyright 2019 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Rh=Phaser.Renderer.WebGL.Utils,Lh={renderWebGL:function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,s=r.width,o=r.height,a=Rh.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(r.glTexture,e);t.pipelines.preBatch(e),h.batchTexture(e,r.glTexture,s,o,e.x,e.y,s/e.style.resolution,o/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,s,o,a(e.tintTopLeft,i.alpha*e._alphaTL),a(e.tintTopRight,i.alpha*e._alphaTR),a(e.tintBottomLeft,i.alpha*e._alphaBL),a(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,l),t.pipelines.postBatch(e);}},renderCanvas:function(t,e,i,n){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n));}},Dh=Phaser.Display.Canvas.CanvasPool;C();var Ah=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"setStyle",value:function(t){return this.style.setStyle(t)}},{key:"setFont",value:function(t){return this.style.setFont(t)}},{key:"setFontFamily",value:function(t){return this.style.setFontFamily(t)}},{key:"setFontSize",value:function(t){return this.style.setFontSize(t)}},{key:"setFontStyle",value:function(t){return this.style.setFontStyle(t)}},{key:"setTestString",value:function(t){return this.style.setTestString(t)}},{key:"setFixedSize",value:function(t,e){return this.style.setFixedSize(t,e)}},{key:"setBackgroundColor",value:function(t,e,i){return this.style.setBackgroundColor(t,e,i)}},{key:"setBackgroundStrokeColor",value:function(t,e){return this.style.setBackgroundStrokeColor(t,e)}},{key:"setBackgroundCornerRadius",value:function(t,e){return this.style.setBackgroundCornerRadius(t,e)}},{key:"setFill",value:function(t){return this.style.setFill(t)}},{key:"setColor",value:function(t){return this.style.setColor(t)}},{key:"setStroke",value:function(t,e){return this.style.setStroke(t,e)}},{key:"setShadow",value:function(t,e,i,n,r,s){return this.style.setShadow(t,e,i,n,r,s)}},{key:"setShadowOffset",value:function(t,e){return this.style.setShadowOffset(t,e)}},{key:"setShadowColor",value:function(t){return this.style.setShadowColor(t)}},{key:"setShadowBlur",value:function(t){return this.style.setShadowBlur(t)}},{key:"setShadowStroke",value:function(t){return this.style.setShadowStroke(t)}},{key:"setShadowFill",value:function(t){return this.style.setShadowFill(t)}},{key:"setWrapMode",value:function(t){return this.style.setWrapMode(t)}},{key:"setWrapWidth",value:function(t){return this.style.setWrapWidth(t)}},{key:"setWordWrapWidth",value:function(t){return this.style.setWrapWidth(t)}},{key:"setAlign",value:function(t){return this.style.setHAlign(t)}},{key:"setHAlign",value:function(t){return this.style.setHAlign(t)}},{key:"setVAlign",value:function(t){return this.style.setVAlign(t)}},{key:"setLineSpacing",value:function(t){return this.style.setLineSpacing(t)}},{key:"lineSpacing",get:function(){return this.style.lineSpacing},set:function(t){this.setLineSpacing(t);}},{key:"setXOffset",value:function(t){return this.style.setXOffset(t)}},{key:"setMaxLines",value:function(t){return this.style.setMaxLines(t)}},{key:"setResolution",value:function(t){return this.style.setResolution(t)}},{key:"getTextMetrics",value:function(){return this.style.getTextMetrics()}},{key:"setTextMetrics",value:function(t,e){return this.style.setTextMetrics(t,e)}},{key:"measureTextMargins",value:function(t,e){return function(t,e,i){void 0===i&&(i={});var n=Dh.create(this),r=n.getContext("2d",{willReadFrequently:!0});t.syncFont(n,r);var s=r.measureText(e),o=Math.ceil(s.width*t.baselineX),a=o,h=2*a;if(a=a*t.baselineY|0,n.width=o,n.height=h,r.fillStyle="#f00",r.fillRect(0,0,o,h),r.font=t._font,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(t.testString,0,a),i.left=0,0===o||0===h||!r.getImageData(0,0,o,h))return Dh.remove(n),i;for(var l=r.getImageData(0,0,o,h).data,u=!1,c=0;ch;u--){for(c=0;c0&&this.wrapMode!==Vh&&0===this.wrapWidth}},{key:"setStyle",value:function(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("wordWrap")){var n=t.wordWrap;n.hasOwnProperty("width")&&(t.wrap={mode:"word",width:n.width});}if(t&&t.hasOwnProperty("wrap")){var r=t.wrap;if(r.hasOwnProperty("mode")){var s=r.mode;"string"==typeof s&&(r.mode=Zh[s]);}else r.hasOwnProperty("width")&&(r.mode=1);}t&&t.rtl&&i&&!t.hasOwnProperty("halign")&&(t.halign="right"),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");var o=this.propertyMap;for(var a in o){var h=o[a],l=h[0],u=i?h[1]:this[a],c=h[2];if("wrapCallback"===a||"wrapCallbackScope"===a)this[a]=Jh(t,l,u);else {var d=Kh(t,l,u);c&&(d=c(d)),this[a]=d;}}var f=Jh(t,"font",null);this._font=null===f?this.fontStyle+" "+this.fontSize+" "+this.fontFamily:f;var p=Jh(t,"fill",null);null!==p&&(this.color=Bh(p));var v=Jh(t,"metrics",!1);return v?this.metrics={ascent:Jh(v,"ascent",0),descent:Jh(v,"descent",0),fontSize:Jh(v,"fontSize",0)}:!e&&this.metrics||(this.metrics=Fh(this)),e?this.parent.updateText():this.parent}},{key:"syncFont",value:function(t,e){e.font=this._font;}},{key:"syncStyle",value:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round";}},{key:"syncShadow",value:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0);}},{key:"update",value:function(t){return t&&(this._font="".concat(this.fontStyle," ").concat(this.fontSize," ").concat(this.fontFamily).trim(),this.metrics=Fh(this)),this.parent.updateText(t)}},{key:"buildFont",value:function(){var t="".concat(this.fontStyle," ").concat(this.fontSize," ").concat(this.fontFamily).trim();return t!==this._font&&(this._font=t),this}},{key:"setFont",value:function(t){return "string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=Jh(t,"fontFamily","Courier"),this.fontSize=Jh(t,"fontSize","16px"),this.fontStyle=Jh(t,"fontStyle","")),this.update(!0)}},{key:"setFontFamily",value:function(t){return this.fontFamily=t,this.update(!0)}},{key:"setFontStyle",value:function(t){return this.fontStyle=t,this.update(!0)}},{key:"setFontSize",value:function(t){return "number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)}},{key:"setTestString",value:function(t){return this.testString=t,this.update(!0)}},{key:"setFixedSize",value:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(this.isWrapFitMode)}},{key:"setResolution",value:function(t){return this.resolution=t,this.update(!1)}},{key:"setLineSpacing",value:function(t){return this.lineSpacing=t,this.update(!1)}},{key:"setXOffset",value:function(t){return this.xOffset=t,this.update(!1)}},{key:"setBackgroundColor",value:function(t,e,i){return void 0===i&&(i=!0),this.backgroundColor=Bh(t,this.parent.canvas,this.parent.context),this.backgroundColor2=Bh(e,this.parent.canvas,this.parent.context),this.backgroundHorizontalGradient=i,this.update(!1)}},{key:"setBackgroundStrokeColor",value:function(t,e){return this.backgroundStrokeColor=Bh(t,this.parent.canvas,this.parent.context),this.backgroundStrokeLineWidth=e,this.update(!1)}},{key:"setBackgroundCornerRadius",value:function(t,e){return this.backgroundCornerRadius=t,this.backgroundCornerIteration=e,this.update(!1)}},{key:"setFill",value:function(t){return this.color=Bh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setColor",value:function(t){return this.color=Bh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setStroke",value:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=Bh(t,this.parent.canvas,this.parent.context),this.strokeThickness=e),this.update(!0)}},{key:"setShadow",value:function(t,e,i,n,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===s&&(s=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=Bh(i,this.parent.canvas,this.parent.context),this.shadowBlur=n,this.shadowStroke=r,this.shadowFill=s,this.update(!1)}},{key:"setShadowOffset",value:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)}},{key:"setShadowColor",value:function(t){return void 0===t&&(t="#000"),this.shadowColor=Bh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setShadowBlur",value:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)}},{key:"setShadowStroke",value:function(t){return this.shadowStroke=t,this.update(!1)}},{key:"setShadowFill",value:function(t){return this.shadowFill=t,this.update(!1)}},{key:"setUnderline",value:function(t,e,i){return void 0===t&&(t="#000"),void 0===e&&(e=0),void 0===i&&(i=0),this.underlineColor=Bh(t,this.parent.canvas,this.parent.context),this.underlineThickness=e,this.underlineOffset=i,this.update(!1)}},{key:"setUnderlineColor",value:function(t){return void 0===t&&(t="#000"),this.underlineColor=Bh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setUnderlineThickness",value:function(t){return void 0===t&&(t=0),this.underlineThickness=t,this.update(!1)}},{key:"setUnderlineOffset",value:function(t){return void 0===t&&(t=0),this.underlineOffset=t,this.update(!1)}},{key:"setStrikethrough",value:function(t,e,i){return void 0===t&&(t="#000"),void 0===e&&(e=0),void 0===i&&(i=0),this.strikethroughColor=Bh(t,this.parent.canvas,this.parent.context),this.strikethroughThickness=e,this.strikethroughOffset=i,this.update(!1)}},{key:"setStrikethroughColor",value:function(t){return void 0===t&&(t="#000"),this.strikethroughColor=Bh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setStrikethroughThickness",value:function(t){return void 0===t&&(t=0),this.strikethroughThickness=t,this.update(!1)}},{key:"setStrikethroughOffset",value:function(t){return void 0===t&&(t=0),this.strikethroughOffset=t,this.update(!1)}},{key:"setWrapMode",value:function(t){return "string"==typeof t&&(t=Zh[t.toLowerCase()]||0),this.wrapMode=t,this.update(!0)}},{key:"setWrapWidth",value:function(t){return this.wrapWidth=t,this.update(!1)}},{key:"setAlign",value:function(t,e){return void 0===t&&(t="left"),void 0===e&&(e="top"),this.halign=t,this.valign=e,this.update(!1)}},{key:"setHAlign",value:function(t){return void 0===t&&(t="left"),this.halign=t,this.update(!1)}},{key:"setVAlign",value:function(t){return void 0===t&&(t="top"),this.valign=t,this.update(!1)}},{key:"setMaxLines",value:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)}},{key:"getTextMetrics",value:function(){var t=this.metrics;return {ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}}},{key:"setTextMetrics",value:function(t,e){return this.metrics.ascent=t.ascent,this.metrics.descent=t.descent,this.metrics.fontSize=t.fontSize,e&&("string"==typeof e?(this.fontFamily=e,this.fontSize="",this.fontStyle=""):(this.fontFamily=Jh(e,"fontFamily",this.fontFamily),this.fontSize=Jh(e,"fontSize",this.fontSize),this.fontStyle=Jh(e,"fontStyle",this.fontStyle))),this.parent.updateText(!0)}},{key:"lineHeight",get:function(){return this.metrics.fontSize+this.strokeThickness+this.lineSpacing}},{key:"toJSON",value:function(){var t={},e=this.propertyMap;for(var i in e)t[i]=this[i];return t.metrics=this.getTextMetrics(),t}},{key:"destroy",value:function(){this.parent=void 0;}}]),t}(),Zh={none:Vh,word:Hh,char:Nh,character:Nh},$h=Phaser.Math.DegToRad,Qh=function(t){return !t.hasOwnProperty("convex")||t.convex},tl=function(t){return t.x>0&&t.y>0},el=function(t,e,i,n,r,s,o,a,h){if(a&&o>s?o-=360:!a&&o=f?1:n/f,g=r>=p?1:r/p,y=d.cornerRadius;t.save(),t.beginPath(),t.translate(e,i),a=y.tl,tl(a)?(h=a.x*v,l=a.y*g,Qh(a)?el(t,h,l,h,l,180,270,!1,o):el(t,0,0,h,l,90,0,!0,o),u=0,c=l):(t.lineTo(0,0),u=0,c=0),a=y.tr,tl(a)?(h=a.x*v,l=a.y*g,Qh(a)?el(t,n-h,l,h,l,270,360,!1,o):el(t,n,0,h,l,180,90,!0,o)):t.lineTo(n,0),a=y.br,tl(a)?(h=a.x*v,l=a.y*g,Qh(a)?el(t,n-h,r-l,h,l,0,90,!1,o):el(t,n,r,h,l,270,180,!0,o)):t.lineTo(n,r),a=y.bl,tl(a)?(h=a.x*v,l=a.y*g,Qh(a)?el(t,h,r-l,h,l,90,180,!1,o):el(t,0,r,h,l,360,270,!0,o)):t.lineTo(0,r),t.lineTo(u,c),t.closePath(),t.restore();}(e,i,n,r,s,o,d),null!=a){var f;if(null!=u)(f=c?e.createLinearGradient(0,0,r,0):e.createLinearGradient(0,0,0,s)).addColorStop(0,a),f.addColorStop(1,u),a=f;e.fillStyle=a,e.fill();}null!=h&&l>0&&(e.strokeStyle=h,e.lineWidth=l,e.stroke());},nl=function(t,e,i,n,r,s,o,a){if(null!=e||null!=i){var h=t.canvas.width,l=t.canvas.height;null==i&&(n=0);var u=n/2;h=Math.max(1,h-n),l=Math.max(1,l-n),il(t.canvas,t.context,u,u,h,l,r,e,i,n,s,o,a);}},rl={draw:function(t,e,i,n){var r=this.penManager;this.hitAreaManager.clear();var s=this.context;s.save();var o=this.defaultStyle;this.clear(),nl(this,o.backgroundColor,o.backgroundStrokeColor,o.backgroundStrokeLineWidth,o.backgroundCornerRadius,o.backgroundColor2,o.backgroundHorizontalGradient,o.backgroundCornerIteration),t+=this.startXOffset,e+=this.startYOffset;var a,h,l,u,c,d,f=o.halign,p=o.valign,v=o.lineHeight,g=r.lines,y=g.length,k=o.maxLines;k>0&&y>k?(h=k,l="center"===p?Math.floor((y-h)/2):"bottom"===p?y-h:0):(h=y,l=0),u=l+h;var m=this.rtl,b=m?this.parent.width:void 0;d="center"===p?Math.max((n-h*v)/2,0):"bottom"===p?Math.max(n-h*v-2,0):0,d+=e;for(var x=l;x0&&t.width>0){var a=i+o.underlineOffset-o.underlineThickness/2;this.drawLine(e,a,t.width,o.underlineThickness,o.underlineColor,o);}if(t.isTextPen&&this.drawText(e,i,t.text,o),t.isImagePen&&this.drawImage(e,i,t.prop.img,o),o.strikethroughThickness>0&&t.width>0){a=i+o.strikethroughOffset-o.strikethroughThickness/2;this.drawLine(e,a,t.width,o.strikethroughThickness,o.strikethroughColor,o);}if(s.restore(),t.hasAreaMarker&&t.width>0){var h,l=t.prop.area;if(l)h={key:l};else {var u=t.prop.url;h={key:"url:".concat(u),url:u};}this.hitAreaManager.add(e,i-this.startYOffset,t.width,this.defaultStyle.lineHeight,h);}},clear:function(){var t=this.canvas;this.context.clearRect(0,0,t.width,t.height);},drawLine:function(t,e,i,n,r,s){this.autoRound&&(t=Math.round(t),e=Math.round(e));var o=this.context;s.syncShadow(o,s.shadowStroke);var a=o.lineCap;o.lineCap="butt",o.strokeStyle=r,o.lineWidth=n,o.beginPath(),o.moveTo(t,e),o.lineTo(t+i,e),o.stroke(),o.lineCap=a;},drawText:function(t,e,i,n){this.autoRound&&(t=Math.round(t),e=Math.round(e));var r=this.context;n.stroke&&"none"!==n.stroke&&n.strokeThickness>0&&(n.syncShadow(r,n.shadowStroke),r.strokeText(i,t,e)),n.color&&"none"!==n.color&&(n.syncShadow(r,n.shadowFill),r.fillText(i,t,e));},drawImage:function(t,e,i,n){e-=this.startYOffset,this.parent.imageManager.draw(i,this.context,t,e,this.autoRound);}},sl=Phaser.Utils.Objects.GetValue,ol=Yh,al=Xh,hl=function(){function t(e){n(this,t),this.prop={},this.resetFromJSON(e);}return s(t,[{key:"resetFromJSON",value:function(t){this.text=sl(t,"text",""),this.x=sl(t,"x",0),this.y=sl(t,"y",0),this.width=sl(t,"width",0);var e=sl(t,"prop",null);null===e&&(e={}),this.prop=e,this.newLineMode=sl(t,"newLineMode",0),this.startIndex=sl(t,"startIndex",0);}},{key:"plainText",get:function(){var t=this.text;return this.newLineMode===al&&(t+="\n"),t}},{key:"wrapText",get:function(){var t=this.text;return this.newLineMode!==ol&&(t+="\n"),t}},{key:"rawTextLength",get:function(){var t=this.text.length;return this.newLineMode===al&&(t+=1),t}},{key:"endIndex",get:function(){return this.startIndex+this.rawTextLength}},{key:"lastX",get:function(){return this.x+this.width}},{key:"isTextPen",get:function(){return ""!==this.text}},{key:"isImagePen",get:function(){return !!this.prop.img}},{key:"hasAreaMarker",get:function(){return !!this.prop.area||!!this.prop.url}}]),t}(),ll=Phaser.Utils.Objects.GetFastValue,ul=Yh,cl=Gh,dl=function(){function t(e){n(this,t),this.pens=[],this.lines=[],this.maxLinesWidth=void 0,this.pensPool=e.pensPool,this.linesPool=e.linesPool,this.tagToText=ll(e,"tagToText",je),this.tagToTextScope=ll(e,"tagToTextScope",void 0);}return s(t,[{key:"destroy",value:function(){this.clear(),this.tagToText=void 0,this.tagToTextScope=void 0;}},{key:"clear",value:function(){for(var t=0,e=this.lines.length;t=this.lines.length)return this.getLineEndIndex(t);var e=this.lines[t];return e&&e[0]?e[0].startIndex:0}},{key:"getLineEndIndex",value:function(t){t>=this.lines.length&&(t=this.lines.length-1);var e,i,n=!1;for(e=t;e>=0&&!(n=null!=(i=this.lines[e])&&i.length>0);e--);return n?i[i.length-1].endIndex:0}},{key:"getLineWidth",value:function(t){var e=this.lines[t];if(!e)return 0;var i=e[e.length-1];return null==i?0:i.lastX}},{key:"getMaxLineWidth",value:function(){if(void 0!==this.maxLinesWidth)return this.maxLinesWidth;for(var t,e=0,i=0,n=this.lines.length;ie&&(e=t);return this.maxLinesWidth=e,e}},{key:"getLineWidths",value:function(){for(var t=[],e=0,i=this.lines.length;e=t&&h<=e||(o=o.substring(t-a,e-a)),this.tagToTextScope?c+=this.tagToText.call(this.tagToTextScope,o,l,u):c+=this.tagToText(o,l,u),u=l,!(h>=e)));d++);return c}},{key:"length",get:function(){return this.lines.length},set:function(t){this.clear();}}]),t}(),fl={},pl=function(){function t(){n(this,t),this.items=[];}return s(t,[{key:"destroy",value:function(){this.clear(),this.items=void 0;}},{key:"pop",value:function(){return this.items.length>0?this.items.pop():null}},{key:"push",value:function(t){return this.items.push(t),this}},{key:"pushMultiple",value:function(t){return this.items.push.apply(this.items,t),t.length=0,this}},{key:"clear",value:function(){return this.items.length=0,this}}]),t}(),vl=Phaser.Geom.Rectangle,gl=new pl,yl=function(){function t(){n(this,t),this.hitAreas=[];}return s(t,[{key:"destroy",value:function(){this.clear();}},{key:"clear",value:function(){for(var t=0,e=this.hitAreas.length;tr){""!==S?a.push(o.getLine(S,P,Sl)):0===T&&s>0&&a.push(o.getLine("",0,Sl)),a.push.apply(a,y(t(b,i,Tl,r,0,o)));var E=a.pop();S=E.text,P=E.width,o.freeLine(E)," "===S&&(S="",P=0);}else (w=P+x)>l?(a.push(o.getLine(S,P,Sl)),S=b,P=x,l=r):(S+=b,P=w),C&&a.push(o.getLine(S,P,u));}return a},Ml=Phaser.Utils.Objects.GetValue,Rl=Vh,Ll=Yh,Dl=function(){function t(e){n(this,t),this.parent=e.parent,this.scene=this.parent.scene,this.context=Ml(e,"context",null),this.canvas=this.context.canvas,this.parser=Ml(e,"parser",null),this.defaultStyle=Ml(e,"style",null),this.autoRound=!0,this.pensPool=e.pensPool,this.linesPool=e.linesPool,this.wrapTextLinesPool=e.wrapTextLinesPool,this.penManager=this.newPenManager(),this._tmpPenManager=null,this.hitAreaManager=new yl,this.lastHitAreaKey=null,this.urlTagCursorStyle=null;var i=this.context;this.getTextWidth=function(t){return i.measureText(t).width};}return s(t,[{key:"destroy",value:function(){this.parent=void 0,this.scene=void 0,this.context=void 0,this.canvas=void 0,this.parser=void 0,this.defaultStyle=void 0,this.penManager&&(this.penManager.destroy(),this.penManager=void 0),this._tmpPenManager&&(this._tmpPenManager.destroy(),this._tmpPenManager=void 0),this.hitAreaManager&&(this.hitAreaManager.destroy(),this.hitAreaManager=void 0),this.pensPool=void 0,this.linesPool=void 0,this.wrapTextLinesPool=void 0;}},{key:"updatePenManager",value:function(t,e,i,n,r){if(void 0===r&&(r=this.penManager),r.clear(),""===t)return r;var s=this.parent.style;if(s.isWrapFitMode){var o=this.parent.padding;i=s.fixedWidth-o.left-o.right;}for(var a,h,l,u,c,d=this.canvas,f=this.context,p=function(t){return f.measureText(t).width},v=0,g=0,y=s.wrapCallback,k=s.wrapCallbackScope,m=!0,b=this.parser.splitText(t),x=this.wrapTextLinesPool,C=0,w=b.length;C0&&e!==Rl&&i0&&t>e&&(t=e),t}},{key:"linesWidth",get:function(){return Math.ceil(this.penManager.getMaxLineWidth())}},{key:"linesHeight",get:function(){var t=this.desplayLinesCount,e=this.defaultStyle.lineHeight*t;return t>0&&(e-=this.defaultStyle.lineSpacing),e}},{key:"imageManager",get:function(){return this.parent.imageManager}},{key:"rtl",get:function(){return this.parent.style.rtl}},{key:"newPenManager",value:function(){return new dl({pensPool:this.pensPool,linesPool:this.linesPool,tagToText:this.parser.propToTagText,tagToTextScope:this.parser})}},{key:"tmpPenManager",get:function(){return null===this._tmpPenManager&&(this._tmpPenManager=this.newPenManager()),this._tmpPenManager}},{key:"getPlainText",value:function(t,e,i){var n;if(null==t)n=this.penManager.plainText;else {var r=this.parser.splitText(t,1);n="";for(var s=0,o=r.length;s0}},{key:"drawX",get:function(){var t=this.x+this.leftSpace+this.offsetX-this.originX*this.width;return this.parent._textOX*this.scrollFactorX+t}},{key:"drawY",get:function(){var t=this.y+this.offsetY;return this.parent._textOY*this.scrollFactorY+t}},{key:"drawTLX",get:function(){return 0}},{key:"drawTLY",get:function(){return 0}},{key:"drawBLX",get:function(){return 0}},{key:"drawBLY",get:function(){return 0}},{key:"drawTRX",get:function(){return 0}},{key:"drawTRY",get:function(){return 0}},{key:"drawBRX",get:function(){return 0}},{key:"drawBRY",get:function(){return 0}},{key:"drawCenterX",get:function(){return (this.drawTRX+this.drawTLX)/2}},{key:"drawCenterY",get:function(){return (this.drawBLY+this.drawTLY)/2}}]),i}(zu);Object.assign(ic.prototype,$u);var nc=function(t,e,i){return e.hasOwnProperty(t)?e[t]:i[t]},rc=Phaser.Utils.Objects.GetValue,sc=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,"background")).setScrollFactor(0),s.setColor(rc(r,"color",null),rc(r,"color2",null),rc(r,"horizontalGradient",!0)),s.setStroke(rc(r,"stroke",null),rc(r,"strokeThickness",2)),s.setCornerRadius(rc(r,"cornerRadius",0),rc(r,"cornerIteration",null)),s}return s(i,[{key:"color",get:function(){return this._color},set:function(t){t=Bh(t,this.canvas,this.context),this.setDirty(this._color!=t),this._color=t;}},{key:"color2",get:function(){return this._color2},set:function(t){t=Bh(t,this.canvas,this.context),this.setDirty(this._color2!=t),this._color2=t;}},{key:"horizontalGradient",get:function(){return this._horizontalGradient},set:function(t){this.setDirty(this._horizontalGradient!=t),this._horizontalGradient=t;}},{key:"setColor",value:function(t,e,i){return void 0===i&&(i=!0),this.color=t,this.color2=e,this.horizontalGradient=i,this}},{key:"stroke",get:function(){return this._stroke},set:function(t){t=Bh(t,this.canvas,this.context),this.setDirty(this._stroke!=t),this._stroke=t;}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this.setDirty(this._strokeThickness!=t),this._strokeThickness=t;}},{key:"setStroke",value:function(t,e){return null!=t&&void 0===e&&(e=2),this.stroke=t,this.strokeThickness=e,this}},{key:"cornerRadius",get:function(){return this._cornerRadius},set:function(t){this.setDirty(this._cornerRadius!=t),this._cornerRadius=t;}},{key:"cornerIteration",get:function(){return this._cornerIteration},set:function(t){this.setDirty(this._cornerIteration!=t),this._cornerIteration=t;}},{key:"modifyStyle",value:function(t){return t.hasOwnProperty("color")&&this.setColor(t.color,nc("color2",t,this),nc("horizontalGradient",t,this)),t.hasOwnProperty("stroke")&&this.setStroke(t.stroke,nc("strokeThickness",t,this)),t.hasOwnProperty("cornerRadius")&&this.setCornerRadius(t.cornerRadius,nc("cornerIteration",t,this)),this}},{key:"modifyPorperties",value:function(t){return p(h(i.prototype),"modifyPorperties",this).call(this,t),this.modifyStyle(t),this}},{key:"setCornerRadius",value:function(t,e){return this.cornerRadius=t,this.cornerIteration=e,this}},{key:"renderContent",value:function(){nl(this.parent,this.color,this.stroke,this.strokeThickness,this.cornerRadius,this.color2,this.horizontalGradient,this.cornerIteration);}}]),i}(ic),oc=Phaser.Utils.Objects.GetValue,ac=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,"innerbounds")).setScrollFactor(0),s.setColor(oc(r,"color",null),oc(r,"color2",null),oc(r,"horizontalGradient",!0)),s.setStroke(oc(r,"stroke",null),oc(r,"strokeThickness",2)),s}return s(i,[{key:"color",get:function(){return this._color},set:function(t){t=Bh(t,this.canvas,this.context),this.setDirty(this._color!=t),this._color=t;}},{key:"color2",get:function(){return this._color2},set:function(t){t=Bh(t,this.canvas,this.context),this.setDirty(this._color2!=t),this._color2=t;}},{key:"horizontalGradient",get:function(){return this._horizontalGradient},set:function(t){this.setDirty(this._horizontalGradient!=t),this._horizontalGradient=t;}},{key:"setColor",value:function(t,e,i){return void 0===i&&(i=!0),this.color=t,this.color2=e,this.horizontalGradient=i,this}},{key:"stroke",get:function(){return this._stroke},set:function(t){t=Bh(t,this.canvas,this.context),this.setDirty(this._stroke!=t),this._stroke=t;}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this.setDirty(this._strokeThickness!=t),this._strokeThickness=t;}},{key:"setStroke",value:function(t,e){return null!=t&&void 0===e&&(e=2),this.stroke=t,this.strokeThickness=e,this}},{key:"modifyPorperties",value:function(t){p(h(i.prototype),"modifyPorperties",this).call(this,t),t.hasOwnProperty("color")&&this.setColor(t.color,oc(t,"color2",null),oc(t,"horizontalGradient",!0)),t.hasOwnProperty("stroke")&&this.setStroke(t.stroke,oc(t,"strokeThickness",2));}},{key:"renderContent",value:function(){var t=this.parent.padding,e=t.left,i=t.top,n=this.parent.width-t.left-t.right,r=this.parent.height-t.top-t.bottom,s=this.context;if(null!=this.color){var o,a;if(null!=this.color2)(a=this.horizontalGradient?s.createLinearGradient(0,0,n,0):s.createLinearGradient(0,0,0,r)).addColorStop(0,this.color),a.addColorStop(1,this.color2),o=a;else o=this.color;s.fillStyle=o,s.fillRect(e,i,n,r);}null!=this.stroke&&this.strokeThickness>0&&(s.strokeStyle=this.stroke,s.lineWidth=this.strokeThickness,s.strokeRect(e,i,n,r));}}]),i}(ic),hc=Phaser.Utils.Objects.GetValue,lc=function(){function t(e,i){n(this,t),this.parent=e,this.set(i);}return s(t,[{key:"toJSON",value:function(){return {bold:this.bold,italic:this.italic,fontSize:this.fontSize,fontFamily:this.fontFamily,color:this.color,stroke:this.stroke,strokeThickness:this.strokeThickness,shaodwColor:this.shadowColor,shadowBlur:this.shadowBlur,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,offsetX:this.offsetX,offsetY:this.offsetY,leftSpace:this.leftSpace,rightSpace:this.rightSpace,backgroundHeight:this.backgroundHeight,backgroundBottomY:this.backgroundBottomY,align:this.align}}},{key:"set",value:function(t){return this.setBold(hc(t,"bold",!1)),this.setItalic(hc(t,"italic",!1)),this.setFontSize(hc(t,"fontSize","16px")),this.setFontFamily(hc(t,"fontFamily","Courier")),this.setColor(hc(t,"color","#fff")),this.setStrokeStyle(hc(t,"stroke",null),hc(t,"strokeThickness",0)),this.setShadow(hc(t,"shadowColor",null),hc(t,"shadowOffsetX",0),hc(t,"shadowOffsetY",0),hc(t,"shadowBlur",0)),this.setOffset(hc(t,"offsetX",0),hc(t,"offsetY",0)),this.setSpace(hc(t,"leftSpace",0),hc(t,"rightSpace",0)),this.setAlign(hc(t,"align",void 0)),this.setBackgroundColor(hc(t,"backgroundColor",null)),this.setBackgroundHeight(hc(t,"backgroundHeight",void 0)),this.setBackgroundBottomY(hc(t,"backgroundBottomY",void 0)),this}},{key:"modify",value:function(t){return t.hasOwnProperty("bold")&&this.setBold(t.bold),t.hasOwnProperty("italic")&&this.setItalic(t.italic),t.hasOwnProperty("fontSize")&&this.setFontSize(t.fontSize),t.hasOwnProperty("fontFamily")&&this.setFontFamily(t.fontFamily),t.hasOwnProperty("color")&&this.setColor(t.color),(t.hasOwnProperty("stroke")||t.hasOwnProperty("strokeThickness"))&&this.setStrokeStyle(nc("stroke",t,this),nc("strokeThickness",t,this)),t.hasOwnProperty("shadowColor")&&this.setShadowColor(t.shadowColor),(t.hasOwnProperty("shadowOffsetX")||t.hasOwnProperty("shadowOffsetY"))&&this.setShadowOffset(nc("shadowOffsetX",t,this),nc("shadowOffsetY",t,this)),t.hasOwnProperty("shadowBlur")&&this.setShadowBlur(t.shaodwBlur),t.hasOwnProperty("offsetX")&&this.setOffsetX(t.offsetX),t.hasOwnProperty("offsetY")&&this.setOffsetY(t.offsetY),t.hasOwnProperty("leftSpace")&&this.setLeftSpace(t.leftSpace),t.hasOwnProperty("rightSpace")&&this.setRightSpace(t.rightSpace),t.hasOwnProperty("align")&&this.setAlign(t.align),t.hasOwnProperty("backgroundColor")&&this.setBackgroundColor(t.backgroundColor),t.hasOwnProperty("backgroundHeight")&&this.setBackgroundHeight(t.backgroundHeight),t.hasOwnProperty("backgroundBottomY")&&this.setBackgroundBottomY(t.backgroundBottomY),this}},{key:"setUpdateTextFlag",value:function(){return this.parent&&(this.parent.updateTextFlag=!0),this}},{key:"clone",value:function(){return new t(null,this.toJSON())}},{key:"copyFrom",value:function(t){return this.set(t.toJSON()),this}},{key:"copyTo",value:function(t){return t.set(this.toJSON()),this}},{key:"setBold",value:function(t){return void 0===t&&(t=!0),this.bold=t,this.setUpdateTextFlag(),this}},{key:"setItalic",value:function(t){return void 0===t&&(t=!0),this.italic=t,this.setUpdateTextFlag(),this}},{key:"fontStyle",get:function(){return this.bold&&this.italic?"bold italic":this.bold?"bold":this.italic?"italic":""}},{key:"setFontSize",value:function(t){return "number"==typeof t&&(t="".concat(t,"px")),this.fontSize=t,this.setUpdateTextFlag(),this}},{key:"setFontFamily",value:function(t){return this.fontFamily=t,this.setUpdateTextFlag(),this}},{key:"font",get:function(){return "".concat(this.fontStyle," ").concat(this.fontSize," ").concat(this.fontFamily)}},{key:"setColor",value:function(t){return this.color=Bh(t),this}},{key:"hasFill",get:function(){return null!=this.color}},{key:"setStrokeStyle",value:function(t,e){return this.stroke=Bh(t),void 0!==e&&(this.strokeThickness=e),this}},{key:"setStrokeThickness",value:function(t){return this.strokeThickness=t,this}},{key:"hasStroke",get:function(){return null!=this.stroke&&this.strokeThickness>0}},{key:"setShadowColor",value:function(t){return this.shadowColor=Bh(t),this}},{key:"setShadowOffset",value:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.shadowOffsetX=t,this.shadowOffsetY=e,this}},{key:"setShadowBlur",value:function(t){return void 0===t&&(t=0),this.shaodwBlur=t,this}},{key:"setShadow",value:function(t,e,i,n){return this.setShadowColor(t).setShadowOffset(e,i).setShadowBlur(n),this}},{key:"setBackgroundColor",value:function(t){return this.backgroundColor=Bh(t),this}},{key:"hasBackgroundColor",get:function(){return null!=this.backgroundColor}},{key:"setBackgroundHeight",value:function(t){return this.backgroundHeight=t,this}},{key:"setBackgroundBottomY",value:function(t){return this.backgroundBottomY=t,this}},{key:"setOffsetX",value:function(t){return void 0===t&&(t=0),this.offsetX=t,this}},{key:"setOffsetY",value:function(t){return void 0===t&&(t=0),this.offsetY=t,this}},{key:"setOffset",value:function(t,e){return this.setOffsetX(t).setOffsetY(e),this}},{key:"setLeftSpace",value:function(t){return void 0===t&&(t=0),this.leftSpace=t,this}},{key:"setRightSpace",value:function(t){return void 0===t&&(t=0),this.rightSpace=t,this}},{key:"setSpace",value:function(t,e){return this.setLeftSpace(t).setRightSpace(e),this}},{key:"setAlign",value:function(t){return this.align=t,this}},{key:"syncFont",value:function(t){return t.font=this.font,this}},{key:"syncStyle",value:function(t){t.textBaseline="alphabetic";var e=this.hasFill,i=this.hasStroke;return t.fillStyle=e?this.color:"#000",t.strokeStyle=i?this.stroke:"#000",t.lineWidth=i?this.strokeThickness:0,t.lineCap="round",t.lineJoin="round",this}},{key:"syncShadow",value:function(t){null!=t.shadowColor?(t.shadowColor=this.shadowColor,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowBlur=this.shadowBlur):(t.shadowColor=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0);}},{key:"getTextMetrics",value:function(t,e){return this.syncFont(t).syncStyle(t),t.measureText(e)}}]),t}(),uc=Phaser.Utils.Array.Remove,cc=Phaser.Utils.Array.Remove,dc="text",fc="image",pc="drawer",vc="space",gc="command",yc=function(t){return t.type===dc&&"\n"===t.text},kc=function(t){return t.type===dc&&"\f"===t.text},mc=function(t){return t.type===dc},bc=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),(o=e.call(this,t,dc)).updateTextFlag=!1,o.style=new lc(u(o),s),o.setText(r),o}return s(i,[{key:"autoRound",get:function(){return this.parent.autoRound}},{key:"offsetX",get:function(){return this.style.offsetX},set:function(t){this.style&&(this.style.offsetX=t);}},{key:"offsetY",get:function(){return this.style.offsetY},set:function(t){this.style&&(this.style.offsetY=t);}},{key:"leftSpace",get:function(){return this.style.leftSpace*this.scaleX},set:function(t){this.style&&(this.style.leftSpace=t),g(h(i.prototype),"leftSpace",t,this,!0);}},{key:"rightSpace",get:function(){return this.style.rightSpace*this.scaleX},set:function(t){this.style&&(this.style.rightSpace=t),g(h(i.prototype),"rightSpace",t,this,!0);}},{key:"align",get:function(){return this.style.align},set:function(t){this.style&&(this.style.align=t);}},{key:"modifyStyle",value:function(t){return this.setDirty(!0),this.style.modify(t),this.updateTextFlag&&this.updateTextSize(),this}},{key:"modifyPorperties",value:function(t){return t?(this.modifyStyle(t),p(h(i.prototype),"modifyPorperties",this).call(this,t),this):this}},{key:"setText",value:function(t){return this.setDirty(this.text!=t),this.text=t,this.updateTextSize(),this}},{key:"updateTextSize",value:function(){var t=this.text;if("\n"===t||"\f"===t||""===t)this.clearTextSize();else {var e,i,n=this.style.getTextMetrics(this.context,this.text);this.textWidth=n.width,"actualBoundingBoxAscent"in n?(e=n.actualBoundingBoxAscent,i=n.actualBoundingBoxDescent):(e=0,i=0),this.textHeight=e+i,this.ascent=e,this.descent=i;}return this.updateTextFlag=!1,this}},{key:"clearTextSize",value:function(){return this.textWidth=0,this.textHeight=0,this.ascent=0,this.descent=0,this}},{key:"copyTextSize",value:function(t){return this.textWidth=t.textWidth,this.textHeight=t.textHeight,this.ascent=t.ascent,this.descent=t.descent,this}},{key:"width",get:function(){return this.textWidth*this.scaleX},set:function(t){this.textWidth>0?this.scaleX=t/this.textWidth:this.scaleX=1;}},{key:"height",get:function(){return this.textHeight*this.scaleY},set:function(t){this.textHeight>0?this.scaleY=t/this.textHeight:this.scaleY=1;}},{key:"willRender",get:function(){return 0!==this.textWidth&&p(h(i.prototype),"willRender",this)}},{key:"renderContent",value:function(){var t=this.context,e=this.style;if(e.hasBackgroundColor){t.fillStyle=e.backgroundColor;var i=this.drawTLX,n=this.drawTRX-i,r=e.backgroundBottomY;null==r&&(r=this.drawBLY);var s=e.backgroundHeight;null==s&&(s=r-this.drawTLY);var o=r-s;t.fillRect(i,o,n,s);}var a=e.hasFill,h=e.hasStroke;(a||h)&&(e.syncFont(t).syncStyle(t),h&&(e.syncShadow(t),t.strokeText(this.text,0,0)),a&&(e.syncShadow(t),t.fillText(this.text,0,0)));}},{key:"drawTLX",get:function(){return -this.leftSpace}},{key:"drawTLY",get:function(){return -this.ascent}},{key:"drawBLX",get:function(){return -this.leftSpace}},{key:"drawBLY",get:function(){return this.descent}},{key:"drawTRX",get:function(){return this.textWidth+this.rightSpace}},{key:"drawTRY",get:function(){return -this.ascent}},{key:"drawBRX",get:function(){return this.textWidth+this.rightSpace}},{key:"drawBRY",get:function(){return this.descent}}]),i}(ic),xc=function(t,e){var i=this.createCharChildren(t,e);return this.addChild(i),this},Cc=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),(o=e.call(this,t,fc)).setTexture(r,s),o}return s(i,[{key:"frameWidth",get:function(){return this.frameObj?this.frameObj.cutWidth:0}},{key:"frameHeight",get:function(){return this.frameObj?this.frameObj.cutHeight:0}},{key:"offsetY",get:function(){return -this.height},set:function(t){}},{key:"key",get:function(){return this._key},set:function(t){this.setDirty(this._key!=t),this._key=t;}},{key:"frame",get:function(){return this._frame},set:function(t){this.setDirty(this._frame!=t),this._frame=t;}},{key:"setTexture",value:function(t,e){return this.key=t,this.frame=e,this.frameObj=this.scene.sys.textures.getFrame(t,e),this}},{key:"width",get:function(){return this.frameWidth*this.scaleX},set:function(t){this.setDirty(this.width!==t),this.scaleX=t/this.frameWidth;}},{key:"height",get:function(){return this.frameHeight*this.scaleY},set:function(t){this.setDirty(this.height!==t),this.scaleY=t/this.frameHeight;}},{key:"setHeight",value:function(t,e){return void 0===e&&(e=!1),this.height=t,e&&(this.scaleX=this.scaleY),this}},{key:"renderContent",value:function(){var t=this.context,e=this.frameObj,i=this.frameWidth,n=this.frameHeight;t.drawImage(e.source.image,e.cutX,e.cutY,i,n,0,0,i,n);}},{key:"drawTLX",get:function(){return -this.leftSpace}},{key:"drawTLY",get:function(){return 0}},{key:"drawBLX",get:function(){return -this.leftSpace}},{key:"drawBLY",get:function(){return this.frameHeight}},{key:"drawTRX",get:function(){return this.frameWidth+this.rightSpace}},{key:"drawTRY",get:function(){return 0}},{key:"drawBRX",get:function(){return this.frameWidth+this.rightSpace}},{key:"drawBRY",get:function(){return this.frameHeight}}]),i}(ic),wc=function(t){a(i,t);var e=d(i);function i(t,r,s,o){var a;return n(this,i),(a=e.call(this,t,pc)).setRenderCallback(r),a.setDrawerSize(s,o),a}return s(i,[{key:"setRenderCallback",value:function(t){return t?this.renderContent=t.bind(this):delete this.renderContent,this}},{key:"setDrawerSize",value:function(t,e){return !0===t?(this.toLocalPosition=!1,t=void 0,e=void 0):this.toLocalPosition=!0,void 0===t&&(t=0),void 0===e&&(e=t),this.drawerWidth=t,this.drawerHeight=e,this}},{key:"onFree",value:function(){p(h(i.prototype),"onFree",this).call(this),this.setRenderCallback();}},{key:"width",get:function(){return this.drawerWidth*this.scaleX},set:function(t){this.setDirty(this.width!==t),this.scaleX=this.drawerWidth>0?t/this.drawerWidth:1;}},{key:"height",get:function(){return this.drawerHeight*this.scaleY},set:function(t){this.setDirty(this.height!==t),this.scaleY=this.drawerHeight>0?t/this.drawerHeight:1;}},{key:"offsetY",get:function(){return -this.height},set:function(t){}},{key:"drawTLX",get:function(){return -this.leftSpace}},{key:"drawTLY",get:function(){return 0}},{key:"drawBLX",get:function(){return -this.leftSpace}},{key:"drawBLY",get:function(){return this.drawerHeight}},{key:"drawTRX",get:function(){return this.drawerWidth+this.rightSpace}},{key:"drawTRY",get:function(){return 0}},{key:"drawBRX",get:function(){return this.drawerWidth+this.rightSpace}},{key:"drawBRY",get:function(){return this.drawerHeight}}]),i}(ic),Sc=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,vc)).setSpaceWidth(r),s}return s(i,[{key:"width",get:function(){return this.spaceWidth*this.scaleX},set:function(t){this.spaceWidth>0?this.scaleX=t/this.spaceWidth:this.scaleX=1;}},{key:"setSpaceWidth",value:function(t){return this.spaceWidth=t,this}}]),i}(ic),Pc=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a){var h;return n(this,i),(h=e.call(this,t,gc)).setName(r).setParameter(o).setCallback(s,a),h}return s(i,[{key:"setName",value:function(t){return this.name=t,this}},{key:"setParameter",value:function(t){return this.param=t,this}},{key:"setCallback",value:function(t,e){return this.callback=t,this.scope=e,this}},{key:"exec",value:function(){return this.scope?this.callback.call(this.scope,this.param,this.name):this.callback(this.param,this.name)}},{key:"onFree",value:function(){p(h(i.prototype),"onFree",this).call(this),this.setName().setCallback().setParameter();}}]),i}(zu),Oc=function(t){var e={callback:void 0,start:0,isLastPage:!1,maxLines:void 0,padding:void 0,letterSpacing:void 0,hAlign:void 0,vAlign:void 0,children:[],lines:[],maxLineWidth:0,linesHeight:0,lineHeight:void 0,maxLineHeight:0,linesWidth:0,lineWidth:void 0};return Object.assign(e,t)},Tc=function(t,e,i,n){void 0===n&&(n={word:[],width:0}),n.word.length=0;for(var r=t.length,s=e,o=n.word,a=0;s0&&!a){var h=this.fixedHeight-n;if(i>0)s=h/i;else s=(l=Mc.call(this)).height,o=l.ascent,i=Math.floor((h-o)/s);}else {var l;s=(l=Mc.call(this)).height,o=l.ascent;}}else if(this.fixedHeight>0){if(void 0===(i=Lc(t,"maxLines"))){h=this.fixedHeight-n;i=Math.floor(h/s);}}else i=Lc(t,"maxLines",0);void 0===o&&(o=s);var u=0===i,c=Lc(t,"wrapWidth",void 0);void 0===c&&(c=this.fixedWidth>0?this.fixedWidth-r:1/0);for(var d=Lc(t,"letterSpacing",0),f=Lc(t,"hAlign",0),p=Lc(t,"vAlign",0),v=Lc(t,"charWrap",!1),g=Oc({callback:"runWordWrap",start:e,padding:this.wrapPadding,letterSpacing:d,maxLines:i,hAlign:f,vAlign:p,ascent:o,lineHeight:s,wrapWidth:c,charWrap:v}),y=this.children,k=0,m=y.length;k0&&(_.push({children:E,width:M}),R=Math.max(R,M)),g.start+=T.length,g.isLastPage=!L&&g.start===O,g.maxLineWidth=R,g.linesHeight=_.length*s;var W=this.fixedWidth>0?this.fixedWidth:g.maxLineWidth+r,F=this.fixedHeight>0?this.fixedHeight:g.linesHeight+n;!function(t,e,i){var n,r,s=t.hAlign,o=t.vAlign,a=t.linesHeight;switch(o){case 1:case"center":r=(i-a)/2;break;case 2:case"bottom":r=i-a;break;default:r=0;}for(var h=t.lines,l=0,u=h.length;l0?(o=this.fixedWidth-r)/i:0;else if(this.fixedWidth>0){if(void 0===(i=jc(t,"maxLines",void 0))){var o=this.fixedWidth-r;i=Math.floor(o/s)+1;}}else i=jc(t,"maxLines",0);var a=0===i,h=jc(t,"fixedCharacterHeight",void 0);if(void 0===h){var l=jc(t,"charPerLine",void 0);if(void 0!==l){var u=this.fixedHeight-n;h=Math.floor(u/l);}}var c=jc(t,"wrapHeight",void 0);void 0===c&&(c=this.fixedHeight>0?this.fixedHeight-n:1/0);for(var d=jc(t,"letterSpacing",0),f=jc(t,"rtl",!0),p=jc(t,"hAlign",f?2:0),v=jc(t,"vAlign",0),g=Oc({callback:"runVerticalWrap",start:e,padding:this.wrapPadding,letterSpacing:d,maxLines:i,hAlign:p,vAlign:v,lineWidth:s,fixedCharacterHeight:h,wrapHeight:c,rtl:f}),y=this.children,k=0,m=y.length;k0&&(_.push({children:E,height:M}),R=Math.max(R,M)),g.start+=T.length,g.isLastPage=g.start===O,g.maxLineHeight=R,g.linesWidth=_.length*s;var B=this.fixedWidth>0?this.fixedWidth:g.linesWidth+r,I=this.fixedHeight>0?this.fixedHeight:g.maxLineHeight+n;!function(t,e,i){var n,r,s=t.hAlign,o=t.vAlign,a=t.rtl,h=t.lines,l=t.lineWidth,u=t.linesWidth;switch(s){case 1:case"center":n=(e-u)/2;break;case 2:case"right":n=e-u;break;default:n=0;}a&&(n+=l);for(var c=0,d=h.length;c0?t:this.width,e>0?e:this.height)),this},setPadding:function(t,e){var i=this.padding,n=i.left,r=i.right,s=i.top,o=i.bottom;return Oi(i,t,e),this.dirty=this.dirty||n!=i.left||r!=i.right||s!=i.top||o!=i.bottom,this},getPadding:function(t){return Pi(this.padding,t)},modifyTextStyle:function(t){return this.textStyle.modify(t),this},modifyDefaultTextStyle:function(t){return this.defaultTextStyle.modify(t),this},resetTextStyle:function(){return this.textStyle.copyFrom(this.defaultTextStyle),this},setTestString:function(t){return this.testString=t,this},removeChild:function(t){return this.poolManager.free(t),uc(this.children,t),this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},removeChildren:function(){return this.poolManager.freeMultiple(this.children),this.children.length=0,this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},popChild:function(t){return cc(this.children,t),this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},clearContent:function(){return this.setText(),this},addChild:function(t,e){var i,n,r,s=Array.isArray(t);void 0===e||e===this.children.length?s?(i=this.children).push.apply(i,y(t)):this.children.push(t):s?(n=this.children).splice.apply(n,[e,0].concat(y(t))):this.children.splice(e,0,t);(this.lastAppendedChildren.length=0,s)?(r=this.lastAppendedChildren).push.apply(r,y(t)):this.lastAppendedChildren.push(t);return this},createCharChild:function(t,e){e&&this.textStyle.modify(e);var i=this.poolManager.allocate(dc);return null===i?i=new bc(this,t,this.textStyle):i.setParent(this).setActive().modifyStyle(this.textStyle).setText(t),i},createCharChildren:function(t,e){e&&this.textStyle.modify(e);for(var i=[],n=0,r=t.length;ne&&(n=e,r=t);})),r},getCharWorldPosition:function(t,e,i,n){return "number"==typeof t&&(t=this.getCharChild(t,!0)),Zu(this,t,e,i,n)},setToMinSize:function(){for(var t=this.children,e=0,i=0,n=0,r=t.length;n=i.length&&(t=i.length);for(var n=0,r=0;r0,o=0,a=e.length;o0;this.dirty=this.dirty||this._radiusTL!==t||this._convexTL!==e,this._convexTL=e,this._radiusTL=Math.abs(t);}},{key:"radiusTR",get:function(){return this._radiusTR},set:function(t){var e=t>0;this.dirty=this.dirty||this._radiusTR!==t||this._convexTR!==e,this._convexTR=e,this._radiusTR=Math.abs(t);}},{key:"radiusBL",get:function(){return this._radiusBL},set:function(t){var e=t>0;this.dirty=this.dirty||this._radiusBL!==t||this._convexBL!==e,this._convexBL=e,this._radiusBL=Math.abs(t);}},{key:"radiusBR",get:function(){return this._radiusBR},set:function(t){var e=t>0;this.dirty=this.dirty||this._radiusBR!==t||this._convexBR!==e,this._convexBR=e,this._radiusBR=Math.abs(t);}},{key:"radius",get:function(){return Math.max(this.radiusTL,this.radiusTR,this.radiusBL,this.radiusBR)},set:function(t){"number"==typeof t?(this.radiusTL=t,this.radiusTR=t,this.radiusBL=t,this.radiusBR=t):(this.radiusTL=Nd(t,"tl",0),this.radiusTR=Nd(t,"tr",0),this.radiusBL=Nd(t,"bl",0),this.radiusBR=Nd(t,"br",0));}},{key:"setRadius",value:function(t){return void 0===t&&(t=0),this.radius=t,this}},{key:"iterations",get:function(){return this._iterations},set:function(t){this.dirty=this.dirty||this._iterations!==t,this._iterations=t;}},{key:"setIterations",value:function(t){return this.iterations=t,this}},{key:"updateData",value:function(){var t=this.pathData;t.length=0;var e,n=this.width,r=this.height,s=this.iterations+1;(e=this.radiusTL)>0?this._convexTL?Ta(e,e,e,e,180,270,!1,s,t):Ta(0,0,e,e,90,0,!0,s,t):Pa(0,0,t);(e=this.radiusTR)>0?this._convexTR?Ta(n-e,e,e,e,270,360,!1,s,t):Ta(n,0,e,e,180,90,!0,s,t):Pa(n,0,t);(e=this.radiusBR)>0?this._convexBR?Ta(n-e,r-e,e,e,0,90,!1,s,t):Ta(n,r,e,e,270,180,!0,s,t):Pa(n,r,t);(e=this.radiusBL)>0?this._convexBL?Ta(e,r-e,e,e,90,180,!1,s,t):Ta(0,r,e,e,360,270,!0,s,t):Pa(0,r,t);return t.push(t[0],t[1]),Md(this.x,this.y,t),p(h(i.prototype),"updateData",this).call(this),this}}]),i}(Sd);Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha,Phaser.Math.Wrap;var Kd=Phaser.Math.Linear,Jd=function(){var t,e,i,n,r,s,o=this.getShape("triangle"),a=this.padding,h=this.width-a.right,l=0+a.left,u=this.height-a.bottom,c=0+a.top,d=(l+h)/2,f=(c+u)/2,p={0:{a:{x:l,y:c},b:{x:h,y:f},c:{x:l,y:u}},1:{a:{x:l,y:c},b:{x:d,y:u},c:{x:h,y:c}},2:{a:{x:h,y:c},b:{x:l,y:f},c:{x:h,y:u}},3:{a:{x:l,y:u},b:{x:d,y:c},c:{x:h,y:u}}};if(void 0===this.previousDirection){var v=p[this.direction],g=v.a,y=v.b,k=v.c;t=g.x,e=g.y,i=y.x,n=y.y,r=k.x,s=k.y;}else {var m=p[this.previousDirection],b=p[this.direction],x=this.easeDirectionProgress;t=Kd(m.a.x,b.a.x,x),e=Kd(m.a.y,b.a.y,x),i=Kd(m.b.x,b.b.x,x),n=Kd(m.b.y,b.b.y,x),r=Kd(m.c.x,b.c.x,x),s=Kd(m.c.y,b.c.y,x);}o.startAt(t,e).lineTo(i,n).lineTo(r,s),this.arrowOnly?o.end():o.close();},qd=(0, Phaser.Math.DegToRad)(120),Zd=function(t){t=this.getShape("triangle");var e=this.width/2,i=this.height/2,n=Math.min(e,i)*this.radius,r=this.verticeRotation;t.startAt(e+n*Math.cos(r+qd),i+n*Math.sin(r+qd)).lineTo(e+n*Math.cos(r),i+n*Math.sin(r)).lineTo(e+n*Math.cos(r-qd),i+n*Math.sin(r-qd)),this.arrowOnly?t.end():t.close();},$d={buildShapes:function(){this.addShape((new Hd).setName("triangle"));},updateShapes:function(){var t=this.getShape("triangle");this.arrowOnly?t.fillStyle().lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha):t.fillStyle(this.fillColor,this.fillAlpha).lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha),0===this.shapeMode?Jd.call(this):Zd.call(this);}},Qd={setEaseDuration:function(t){return void 0===t&&(t=0),this.easeDuration=t,this},playEaseDirectionation:function(){return void 0===this.easeDirectionProgressTask&&(this.easeDirectionProgressTask=new Zn(this,{eventEmitter:null})),this.easeDirectionProgressTask.restart({key:"easeDirectionProgress",from:0,to:1,duration:this.easeDuration}),this},stopEaseDirection:function(){return void 0===this.easeDirectionProgressTask||this.easeDirectionProgressTask.stop(),this}},tf=Phaser.Utils.Objects.GetValue,ef=Phaser.Utils.Objects.IsPlainObject,nf=Phaser.Math.DegToRad,rf=Phaser.Math.RadToDeg,sf=function(t){a(r,t);var e=d(r);function r(t,i,s,o,a,h,l){var u,c,d,f,p,v,g,y,k;if(n(this,r),ef(i)){var m=i;i=m.x,s=m.y,o=m.width,a=m.height,h=m.color,l=m.alpha,c=m.strokeColor,d=m.strokeAlpha,f=m.strokeWidth,p=m.arrowOnly,v=m.direction,g=m.easeDuration,y=m.padding,k=m.radius;}return void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=1),void 0===a&&(a=o),void 0===p&&(p=!1),void 0===v&&(v=0),void 0===g&&(g=0),void 0===y&&(y=0),void 0===k&&(k=void 0),(u=e.call(this,t,i,s,o,a)).type="rexTriangle",u.setFillStyle(h,l),void 0!==c&&void 0===f&&(f=2),u.setStrokeStyle(f,c,d),u.setArrowOnly(p),u.setDirection(v,g),u.setPadding(y),u.setRadius(k),u.buildShapes(),u}return s(r,[{key:"arrowOnly",get:function(){return this._arrowOnly},set:function(t){this.dirty=this.dirty||this._arrowOnly!=t,this._arrowOnly=t;}},{key:"setArrowOnly",value:function(t){return void 0===t&&(t=!0),this.arrowOnly=t,this}},{key:"direction",get:function(){return this._direction},set:function(t){t=af(t),this._direction!==t&&(this.easeDuration>0&&void 0!==this._direction?this.previousDirection=this._direction:this.previousDirection=void 0,this._direction=t,this.verticeAngle=90*t,this.dirty=!0,void 0!==this.previousDirection?this.playEaseDirectionation():this.stopEaseDirection());}},{key:"setDirection",value:function(t,e){return void 0!==e&&this.setEaseDuration(e),this.direction=t,this}},{key:"toggleDirection",value:function(t){return this.setDirection(this.direction+2,t),this}},{key:"easeDirectionProgress",get:function(){return this._easeDirectionProgress},set:function(t){this._easeDirectionProgress!==t&&(this._easeDirectionProgress=t,this.dirty=!0);}},{key:"setPadding",value:function(t,e,n,r){if("object"===i(t)){var s=t,o=tf(s,"x",null);null!==o?(t=o,n=o):(t=tf(s,"left",0),n=tf(s,"right",t));var a=tf(s,"y",null);null!==a?(e=a,r=a):(e=tf(s,"top",0),r=tf(s,"bottom",e));}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===n&&(n=t),void 0===r&&(r=e);return void 0===this.padding&&(this.padding={}),this.dirty=this.dirty||this.padding.left!=t||this.padding.top!=e||this.padding.right!=n||this.padding.bottom!=r,this.padding.left=t,this.padding.top=e,this.padding.right=n,this.padding.bottom=r,this.setRadius(),this}},{key:"radius",get:function(){return this._radius},set:function(t){this.dirty=this.dirty||this._radius!=t,this._radius=t;}},{key:"setRadius",value:function(t){return this.radius=t,this.shapeMode=null==t?0:1,this}},{key:"verticeRotation",get:function(){return this._verticeRotation},set:function(t){this.dirty=this.dirty||this._verticeRotation!=t,this._verticeRotation=t;}},{key:"setVerticeRotation",value:function(t){return this.verticeRotation=t,this}},{key:"verticeAngle",get:function(){return rf(this.verticeRotation)},set:function(t){this.verticeRotation=nf(t);}},{key:"setVerticeAngle",value:function(t){return this.verticeAngle=t,this}}]),r}(bd),of={right:0,down:1,left:2,up:3},af=function(t){return "string"==typeof t&&(t=of[t]),t%=4};Object.assign(sf.prototype,$d,Qd);var hf=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),(s=e.call(this,t,r)).type="rexTweaker.FolderTitle";var o=new sf(t,r.expandedIcon);return t.add.existing(o),s.addSpace().add(o,{proportion:0,expand:!1,padding:1,fitRatio:1}),s.addChildrenMap("expandedIcon",o),s}return s(i,[{key:"setExpandedState",value:function(t){void 0===t&&(t=!0);var e=t?"down":"right";return this.childrenMap.expandedIcon.setDirection(e),this}}]),i}(pd),lf=function(t,e){var i=new pv(t,e);return t.add.existing(i),i},uf=function(t,e,i){return Th(t,i)},cf=function(t){a(i,t);var e=d(i);function i(t,r){return n(this,i),void 0===r&&(r={}),r.destroy=!1,e.call(this,t,r)}return s(i,[{key:"onOpen",value:function(){this.emit("open",this.parent,this),p(h(i.prototype),"onOpen",this).call(this);}},{key:"onClose",value:function(){this.emit("close",this.parent,this),p(h(i.prototype),"onClose",this).call(this);}}]),i}(wr),df={expand:function(t){if(!0===this.expanded)return this;void 0===t&&(t=this.transitionDuration),this.expanded=!0;var e=this.childrenMap.title,i=this.childrenMap.child;return this.show(i),(this.reLayoutTarget?this.reLayoutTarget:this.getTopmostSizer()).layout(),e.emit("folder.expand",t,this),i.emit("folder.expand",t,this),this.emit("expand.start",this),this.childTransition.once("open",(function(){this.emit("expand.complete",this);}),this).requestOpen(null,t),this},collapse:function(t){if(!1===this.expanded)return this;void 0===t&&(t=this.transitionDuration),this.expanded=!1;var e=this.childrenMap.title,i=this.childrenMap.child;return e.emit("folder.collapse",t,this),i.emit("folder.collapse",t,this),this.emit("collapse.start",this),this.childTransition.once("close",(function(){this.setChildScale(i,1,1).hide(i),(this.reLayoutTarget?this.reLayoutTarget:this.getTopmostSizer()).layout(),this.emit("collapse.complete",this);}),this).requestClose(null,t),this},toggle:function(t){return this.expanded?this.collapse(t):this.expand(t),this}},ff=function(t,e){bn.popUp.call(t,e,this.expandDirection);},pf=function(t,e){bn.scaleDown.call(t,e,this.expandDirection);},vf={setTransitionDuration:function(t){return this.transitionDuration=t,this.childTransition.setTransitInTime(t).setTransitOutTime(t),this},setExpandCallback:function(t){return void 0===t&&(t=ff.bind(this)),this.childTransition.setTransitInCallback(t),this},setCollapseCallback:function(t){return void 0===t&&(t=pf.bind(this)),this.childTransition.setTransitOutCallback(t),this}},gf=Phaser.Utils.Objects.GetValue,yf=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),r.hasOwnProperty("orientation")||(r.orientation=1),(s=e.call(this,t,r)).type="rexFolder",s.expanded=void 0,s.expandDirection=1===s.orientation?"y":"x";var o=r.background,a=r.title,h=r.child;o&&s.addBackground(o);var l=1===s.orientation?"left":"top",c=gf(r,"align.title",l),d=gf(r,"expand.title",!0);s.add(a,{proportion:0,align:c,expand:d});var f=gf(r,"toggleByTarget",void 0),p=gf(r,"toggleClickConfig");if(void 0===f&&(f=a),f&&rs.onClick.call(f,(function(){this.toggle();}),u(s),p),s.childTransition=new cf(h),!gf(r,"customChildOrigin",!1)){var v=s.rtl?1:0;h.setOrigin(v);}c=gf(r,"align.child","left");var g=(d=gf(r,"expand.child",!0))?1:0;s.add(h,{proportion:g,align:c,expand:d}),s.addChildrenMap("title",a),s.addChildrenMap("child",h),s.addChildrenMap("background",o);var y=r.transition;s.setTransitionDuration(gf(y,"duration",200)),s.setExpandCallback(gf(y,"expandCallback",void 0)),s.setCollapseCallback(gf(y,"collapseCallback",void 0)),s.reLayoutTarget=gf(r,"reLayoutTarget",void 0);var k=r.onExpandStart;k&&s.on("expand.start",k);var m=r.onExpandComplete;m&&s.on("expand.complete",m);var b=r.onCollapseStart;b&&s.on("collapse.start",b);var x=r.onCollapseComplete;return x&&s.on("collapse.complete",x),s}return s(i)}(oa);Object.assign(yf.prototype,df,vf);var kf=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).type="rexTweaker.Folder",s}return s(i,[{key:"setTitle",value:function(t){return this.childrenMap.title.setTitle(t),this}}]),i}(yf);Object.assign(kf.prototype,{setBindingTarget:function(t){return this.childrenMap.child.setBindingTarget(t),this}},{getMaxInputRowTitleWidth:function(){return this.childrenMap.child.getMaxInputRowTitleWidth()+this.getInnerPadding("left")},setInputRowTitleWidth:function(t){return t-=this.getInnerPadding("left"),this.childrenMap.child.setInputRowTitleWidth(t),this}});var mf=Phaser.Utils.Objects.GetValue,bf=Phaser.Utils.Objects.GetValue,xf=oa.prototype.add,Cf=oa.prototype.addSpace,wf=function(t){var e=!t.isRexSpace,i=!e||this.buttonsExpand?1:0;if(0===this.sizerChildren.length)if(e){!this.buttonsExpand&&("right"===this.buttonsAlign||"center"===this.buttonsAlign||"bottom"===this.buttonsAlign)&&Cf.call(this),xf.call(this,t,{proportion:i,expand:!0});var n=!this.buttonsExpand&&"center"===this.buttonsAlign;n&&Cf.call(this),this.hasTailSpace=n;}else xf.call(this,t,{proportion:i,expand:!0}),this.hasTailSpace=!1;else if(this.hasTailSpace){var r=this.sizerChildren.length-1;xf.call(this,t,{index:r,proportion:i,expand:!0});}else xf.call(this,t,{proportion:i,expand:!0});return e&&this.buttonGroup.add(t),this},Sf={addButton:function(t){if(Xr(t))for(var e=t,i=0,n=e.length;i=0;i--)Tf.call(this,e[i],t);return this}},Ef=function(t,e,i){if(t){var n=this.setValueCallback,r=this.setValueCallbackScope;n&&(r?n.call(r,t,e,i):n(t,e,i)),this.fireEvent("button.statechange",t,e,i);}},Mf=function(t){var e=this;t._selected=void 0,Object.defineProperty(t,"selected",{get:function(){return t._selected},set:function(i){if(t._selected!==i){var n=t._selected;t._selected=i,Ef.call(e,t,i,n);}},enumerable:!0,configurable:!0}),t.selected=!1;},Rf={add:function(t){return this.buttons.push(t),t._click||(t._click=new is(t,this.clickConfig),t._click.on("click",(function(t,e,i,n){this.fireEvent("button.click",e,i,n);}),this).on("enable",(function(t,e){this.fireEvent("button.enable",e);}),this).on("disable",(function(t,e){this.fireEvent("button.disable",e);}),this),t.on("pointerover",(function(e,i,n,r){this.fireEvent("button.over",t,e,r);}),this).on("pointerout",(function(e,i){this.fireEvent("button.out",t,e,i);}),this).on("pointerdown",(function(e,i,n,r){this.fireEvent("button.down",t,e,r);}),this).on("pointerup",(function(e,i){this.fireEvent("button.up",t,e,i);}),this)),this.buttonsType&&(void 0===t.name&&console.error("".concat(this.parent.constructor.name,": Option button miss value")),Mf.call(this,t)),this},addMultiple:function(t){for(var e=0,i=t.length;e2?o-2:0),h=2;ha.height/2)){r>(h=Uf(a.left,a.centerY,t,e))&&(r=h,n=s);var h,l=i[s+1];if(!l||l.y!==a.y)r>(h=Uf(a.right,a.centerY,t,e))&&(r=h,n=s+1);}}return n},Jf=Phaser.Utils.Objects.IsPlainObject,qf=Phaser.Utils.Objects.GetValue,Zf=Phaser.Display.Align.CENTER,$f=function(t,e,i,n){if("\n"===t)return this.addNewLine(),this;var r;(fi.call(this,t),Jf(e))&&(e=qf(r=e,"padding",0),i=qf(r,"key",void 0),n=qf(r,"index",void 0));return void 0===e&&(e=0),(r=this.getSizerConfig(t)).align=Zf,r.padding=ci(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},Qf={add:function(t,e,i){if(Xr(t))for(var n=t,r=0,s=n.length;r=0;e--)this.remove(this.sizerChildren[e],t);return this},clear:function(t){return this.sizerChildren.length=0,qo.call(this,t),this}},ip={getChildrenWidth:function(){return this.rexSizer.hidden?0:this.maxChildWidth+this.space.left+this.space.right},getChildrenHeight:function(){return this.rexSizer.hidden?0:this.widthWrapResult.height+this.space.top+this.space.bottom},getChildrenSizers:function(t){void 0===t&&(t=[]);for(var e,i=this.sizerChildren,n=0,r=i.length;nr&&lp.addNewLine(this);}else for(s=0,o=t.length;s=0;i--)pp.call(this,e[i],t);return this}},gp=Phaser.Utils.Objects.GetValue,yp=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={});var o=r.space;"number"==typeof o&&(r.space={item:o,line:o}),(s=e.call(this,t,r)).type="rexFixWidthButtons",s.buttonGroup=new If({parent:u(s),eventEmitter:gp(r,"eventEmitter",u(s)),groupName:gp(r,"groupName",void 0),clickConfig:gp(r,"click",void 0)}).setButtonsType(r);var a=gp(r,"background",void 0),h=gp(r,"buttons",void 0);return s.buttonsAlign=gp(r,"align",void 0),a&&s.addBackground(a),h&&s.addButtons(h),s.addChildrenMap("background",a),s.addChildrenMap("buttons",s.buttonGroup.buttons),s}return s(i,[{key:"destroy",value:function(t){this.scene&&!this.ignoreDestroy&&(p(h(i.prototype),"destroy",this).call(this,t),this.buttonGroup.destroy(),this.buttonGroup=void 0);}},{key:"buttons",get:function(){return this.buttonGroup.buttons}},{key:"groupName",get:function(){return this.buttonGroup.groupName},set:function(t){this.buttonGroup.groupName=t;}},{key:"eventEmitter",get:function(){return this.buttonGroup.eventEmitter}}]),i}(ap);Object.assign(yp.prototype,cp,vp,Bf,Ff);var kp=Phaser.Utils.Objects.IsPlainObject,mp=Phaser.Utils.Objects.GetValue,bp=Phaser.Display.Align.CENTER,xp=Phaser.Utils.String.UUID,Cp={add:function(t,e,i,n,r,s,o,a,h){(fi.call(this,t),kp(e))&&(e=mp(l=e,"key",void 0),i=mp(l,"align",bp),a=mp(l,"offsetX",0),h=mp(l,"offsetY",0),n=mp(l,"padding",0),r=mp(l,"expand",!0),t.isRexSizer||(s=mp(l,"minWidth",t._minWidth),o=mp(l,"minHeight",t._minHeighted)));var l,u=void 0!==e;return u||(e=xp()),"string"==typeof i&&(i=Ae[i]),void 0===i&&(i=bp),void 0===a&&(a=0),void 0===h&&(h=0),void 0===n&&(n=0),void 0===r&&(r=!0),t.isRexSizer||(void 0===s&&(s=t._minWidth),void 0===o&&(o=t._minHeight)),(l=this.getSizerConfig(t)).align=i,l.alignOffsetX=a,l.alignOffsetY=h,l.padding=ci(n),kp(r)?(l.expandWidth=mp(r,"width",!1),l.expandHeight=mp(r,"height",!1)):(l.expandWidth=r,l.expandHeight=r),t.isRexSizer||(l.expandWidth&&(t.minWidth=void 0===s?mt(t):s),l.expandHeight&&(t.minHeight=void 0===o?bt(t):o)),this.sizerChildren.hasOwnProperty(e)&&this.sizerChildren[e].destroy(),this.sizerChildren[e]=t,u&&this.addChildrenMap(e,t),this}},wp={remove:function(t,e){var i;if("string"==typeof t){if(i=t,!(t=this.sizerChildren[i]))return this}else {if(this.getParentSizer(t)!==this)return this;i=this.childToKey(t);}return i&&(delete this.sizerChildren[i],this.childrenMap.hasOwnProperty(i)&&delete this.childrenMap[i]),bi.call(this,t,e),this},removeAll:function(t){for(var e in this.sizerChildren)this.remove(e,t);return this},clear:function(t){for(var e in this.sizerChildren)delete this.sizerChildren[e],this.childrenMap.hasOwnProperty(e)&&delete this.childrenMap[e];return qo.call(this,t),this}},Sp={getChildrenWidth:function(){if(this.rexSizer.hidden)return 0;var t,e,i,n=0,r=this.sizerChildren;for(var s in r)e=(t=r[s]).rexSizer.padding,i=this.getChildWidth(t)+e.left+e.right,n=Math.max(i,n);return n+this.space.left+this.space.right},getChildrenHeight:function(){if(this.rexSizer.hidden)return 0;var t,e,i,n=0,r=this.sizerChildren;for(var s in r)i=(t=r[s]).isRexSizer?Math.max(t.minHeight,t.childrenHeight):void 0!==t.minHeight?t.minHeight:bt(t),i+=(e=t.rexSizer.padding).top+e.bottom,n=Math.max(i,n);return n+this.space.top+this.space.bottom},getExpandedChildWidth:function(t,e){var i;void 0===e&&(e=this.width);var n=t.rexSizer;if(n.expandWidth){var r=e-this.space.left-this.space.right,s=n.padding;i=r-s.left-s.right;}return i},getExpandedChildHeight:function(t,e){var i;void 0===e&&(e=this.height);var n=t.rexSizer;if(n.expandHeight){var r=e-this.space.top-this.space.bottom,s=n.padding;i=r-s.top-s.bottom;}return i},getChildrenSizers:function(t){void 0===t&&(t=[]);var e,i=this.sizerChildren;for(var n in i)(e=i[n]).isRexSizer&&t.push(e);return t},layoutChildren:function(){var t,e,i,n,r,s,o,a,h,l=this.innerLeft,u=this.innerTop,c=this.innerWidth,d=this.innerHeight,f=this.sizerChildren;for(var p in f)(t=f[p]).rexSizer.hidden||(i=(e=t.rexSizer).padding,Zr.call(this,t),t.isRexSizer?(t.runLayout(this,this.getExpandedChildWidth(t),this.getExpandedChildHeight(t)),Wo(t,this)):(a=void 0,h=void 0,e.expandWidth&&(a=c-i.left-i.right),e.expandHeight&&(h=d-i.top-i.bottom),Ur(t,a,h)),n=l+i.left,s=c-i.left-i.right,r=u+i.top,o=d-i.top-i.bottom,$r.call(this,t,n,r,s,o,e.align,e.alignOffsetX,e.alignOffsetY));}};Object.assign(Sp,Cp,wp);var Pp=Phaser.Utils.Objects.IsPlainObject,Op=Phaser.Utils.Objects.GetValue,Tp=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h){var l;return n(this,i),Pp(r)?(r=Op(h=r,"x",0),s=Op(h,"y",0),o=Op(h,"width",void 0),a=Op(h,"height",void 0)):Pp(o)&&(o=Op(h=o,"width",void 0),a=Op(h,"height",void 0)),(l=e.call(this,t,r,s,o,a,h)).type="rexOverlapSizer",l.sizerChildren={},l.addChildrenMap("items",l.sizerChildren),l}return s(i,[{key:"childToKey",value:function(t){if("string"!=typeof t)return function(t,e){if(Array.isArray(t))return t.indexOf(e);for(var i in t)if(t[i]===e)return i;return null}(this.sizerChildren,t);var e=t;return this.sizerChildren.hasOwnPropery(e)?e:null}}]),i}(Io);Object.assign(Tp.prototype,Sp);var _p=Tp.prototype.add,Ep=function(t,e,i,n,r,s,o,a,h){return t.setVisible(!1),_p.call(this,t,e,i,n,r,s,o,a,h),this},Mp={add:Ep,addPage:Ep},Rp=qt.prototype.setChildVisible,Lp={getPage:function(t){return void 0===t?null:this.sizerChildren.hasOwnProperty(t)?this.sizerChildren[t]:null},swapPage:function(t,e){this._previousKey=this._currentKey;var i=this.previousPage;i&&(0===this.swapMode?(Rp.call(this,i,!1),this.emit("pageinvisible",i,this._previousKey,this)):i.destroy()),t&&!this.sizerChildren.hasOwnProperty(t)&&this.emit("createpage",t,this),this._currentKey=t;var n=this.currentPage;return n&&(Rp.call(this,n,!0),this.emit("pagevisible",n,this._currentKey,this),void 0===e&&(e=this.fadeInDuration),e>0&&n.setAlpha(0).fadeIn(e,1)),this},hasPage:function(t){return this.sizerChildren.hasOwnProperty(t)}};Object.assign(Lp,Mp);var Dp=Phaser.Utils.Objects.GetValue,Ap=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).type="rexPages",s.childrenMap=s.sizerChildren,s._previousKey=void 0,s._currentKey=void 0,s.setSwapMode(Dp(r,"swapMode",0)),s.setFadeInDuration(Dp(r,"fadeIn",0)),s}return s(i,[{key:"setSwapMode",value:function(t){return "string"==typeof t&&(t=jp[t]),this.swapMode=t,this}},{key:"setFadeInDuration",value:function(t){return this.fadeInDuration=t,this}},{key:"previousKey",get:function(){return this._previousKey}},{key:"currentKey",get:function(){return this._currentKey},set:function(t){this.swapPage(t);}},{key:"currentPage",get:function(){return this.getPage(this.currentKey)}},{key:"previousPage",get:function(){return this.getPage(this.previousKey)}},{key:"keys",get:function(){return Object.keys(this.sizerChildren)}}]),i}(Tp);Object.assign(Ap.prototype,Lp);var jp={invisible:0,destroy:1},zp=Phaser.Utils.Objects.IsPlainObject,Bp=Phaser.Utils.Objects.GetValue,Ip=Phaser.Utils.String.UUID,Wp={swapPage:function(t,e){var i,n;null!=(i="number"==typeof t?t:this.getPageIndex(t))&&(void 0!==e&&(n=this.childrenMap.pages.fadeInDuration,this.childrenMap.pages.fadeInDuration=e),this.childrenMap.tabs.emitButtonClick(i),void 0!==n&&(this.childrenMap.pages.fadeInDuration=n));return this},swapFirstPage:function(t){return this.swapPage(0,t),this},swapLastPage:function(t){var e=this.getElement("tabs.buttons").length-1;return this.swapPage(e,t),this}},Fp={removePage:function(t,e){"number"==typeof t&&(t=this.getPageKey(t));var i=this.childrenMap.tabs,n=i.getByName(t),r=this.childrenMap.pages,s=r.getElement(t);return n&&s?(r.removeChildrenMap(t),i.removeButton(n,e),r.remove(s,e),this):this}},Yp={getPageKey:function(t){var e=this.getElement("tabs.buttons");if(!(t>=e.length))return e[t].name},getPageIndex:function(t){for(var e=this.getElement("tabs.buttons"),i=0,n=e.length;i0?0:1,r.setMinWidth(this.itemWidth)),this.add(r,{proportion:s,expand:!0}),i.onValueChange&&o.on("valuechange",i.onValueChange),r.setAutoUpdateEnable(i.autoUpdate),r.setBindingTarget(t,e),i.monitor&&r.startMonitorTarget(),i.key&&this.root.addChildrenMap(i.key,r),this},addButtons:function(t){var e=this.scene;void 0===t&&(t={});var i=t.bindingTarget;delete t.bindingTarget;var n=uv(this.styles,"inputRow")||{},r=lv(e,t,n);return this.add(r,{expand:!0}),i&&r.setBindingTarget(i),t.key&&this.root.addChildrenMap(t.key,r),this},addButton:function(t){return void 0===t&&(t={}),t.buttons=[{label:t.label,callback:t.callback}],delete t.label,delete t.callback,this.addButtons(t),this},addSeparator:function(t){var e=this.scene,i=cv(this.styles,"separator"),n=uf(e,0,i);return this.add(n,{expand:!0}),this},setBindingTarget:function(t){for(var e=this.sizerChildren,i=0,n=e.length;i=r&&h=i&&hi.length&&(t.prevCursorPosition=null),null!==t.prevCursorPosition&&(r=e.getCharChild(t.prevCursorPosition))&&("\n"===r.text&&r.clearTextSize(),e.emit("cursorout",r,t.prevCursorPosition,e)),null!=n&&(r=e.getCharChild(n))&&("\n"===r.text&&r.copyTextSize(e.lastInsertCursor),function(t){var e,i,n=t.parent,r=n.width,s=n.height,o=t.drawX,a=t.drawY,h=o+t.drawTLX,l=o+t.drawTRX,u=a+t.drawTLY,c=a+t.drawBLY;e=h<0?0-h:l>r?r-l:0,i=u<0?0-u:c>s?s-c:0,n._textOX+=e,n._textOY+=i;}(r),e.emit("cursorin",r,n,e)),e.emit("movecursor",n,t.prevCursorPosition,e),t.prevCursorPosition=n;}}(this)):(Rv(this),Lv(this)),this}},{key:"setNumberInput",value:function(){return this.onUpdateCallback=Mv,this}},{key:"setSelectAllWhenFocusEnable",value:function(t){return void 0===t&&(t=!0),this.selectAllWhenFocus=t,this}}]),i}(Ev),jv=Phaser.Utils.Objects.GetValue,zv=["inputType","onOpen","onFocus","onClose","onBlur","onUpdate","enterClose","readOnly","maxLength","minLength","selectAll"],Bv=function(t,e){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return !0;if(-1!==e.indexOf(".")){for(var i=e.split("."),n=t,r=0;rt.length?i:t})),l.value=t.join(c);}else l.value=t.join(i.slice(a,a+l.count));a+=l.count,l.added||(h+=l.count);}}var d=e[o-1];return o>1&&"string"==typeof d.value&&(d.added||d.removed)&&t.equals("",d.value)&&(e[o-2].value+=d.value,e.pop()),e}Yv.prototype={diff:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.callback;"function"==typeof i&&(n=i,i={}),this.options=i;var r=this;function s(t){return n?(setTimeout((function(){n(void 0,t);}),0),!0):t}t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t));var o=(e=this.removeEmpty(this.tokenize(e))).length,a=t.length,h=1,l=o+a;i.maxEditLength&&(l=Math.min(l,i.maxEditLength));var u=[{newPos:-1,components:[]}],c=this.extractCommon(u[0],e,t,0);if(u[0].newPos+1>=o&&c+1>=a)return s([{value:this.join(e),count:e.length}]);function d(){for(var i=-1*h;i<=h;i+=2){var n=void 0,l=u[i-1],c=u[i+1],d=(c?c.newPos:0)-i;l&&(u[i-1]=void 0);var f=l&&l.newPos+1=o&&d+1>=a)return s(Xv(r,n.components,e,t,r.useLongestToken));u[i]=n;}else u[i]=void 0;}var v;h++;}if(n)!function t(){setTimeout((function(){if(h>l)return n();d()||t();}),0);}();else for(;h<=l;){var f=d();if(f)return f}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i});},extractCommon:function(t,e,i,n){for(var r=e.length,s=i.length,o=t.newPos,a=o-n,h=0;o+1=0;e--){var i=this.sizerChildren[e];i&&this.remove(i,t);}return this},clear:function(t){return pg(this.sizerChildren,null),qo.call(this,t),this}},gg={setColumnSpace:function(t){if(this.space.column||(this.space.column=[]),this.space.column.length=this.columnCount-1,"number"==typeof t)pg(this.space.column,t);else for(var e=0,i=this.columnCount-1;e=0;n--){var r=n*this.columnCount+t;this.sizerChildren.splice(r,0,null);}return this.columnProportions.push(e),this.columnWidth.length+=1,this.space.column.splice(t,0,i),this},bg={getChildrenWidth:function(t){if(this.rexSizer.hidden)return 0;void 0===t&&(t=!0);for(var e,i,n,r,s=0,o=this.sizerChildren,a=0;a0){var i=t-this.getChildrenWidth(!1);i>=0&&(this.proportionWidthLength=i/e);}else this.proportionWidthLength=0;}return t},resolveHeight:function(t){t=Ei.call(this,t);if(void 0===this.proportionHeightLength){var e=this.totalRowProportions;if(e>0){var i=t-this.getChildrenHeight(!1);i>=0&&(this.proportionHeightLength=i/e);}else this.proportionHeightLength=0;}return t},resolveChildrenWidth:function(t){var e,i,n;for(var r in this.sizerChildren)(e=this.sizerChildren[r])&&e.isRexSizer&&!e.ignoreLayout&&(n=this.getColumnWidth(parseInt(r)%this.columnCount),i=this.getExpandedChildWidth(e,n),i=e.resolveWidth(i),e.resolveChildrenWidth(i));},runWidthWrap:function(t){var e,i,n;for(var r in this.sizerChildren)!(e=this.sizerChildren[r])||e.isRexSizer&&e.ignoreLayout||!e.runWidthWrap||(n=this.getColumnWidth(parseInt(r)%this.columnCount),i=this.getExpandedChildWidth(e,n),e.isRexSizer&&(i=e.resolveWidth(i)),e.runWidthWrap(i));return this},resetGrid:function(t,e,i,n,r){if(void 0===i&&(i=0),void 0===n&&(n=0),this.columnCount=t,this.rowCount=e,this.gridCount=t*e,this.removeAll(),this.sizerChildren.length=t*e,pg(this.sizerChildren,null),this.columnProportions=[],this.columnProportions.length=t,"number"==typeof i)pg(this.columnProportions,i);else for(var s=0;s0&&(e+=t);return e},Cg=function(){for(var t,e=0,i=0;i0&&(e+=t);return e},wg=Phaser.Utils.Objects.IsPlainObject,Sg=Phaser.Utils.Objects.GetValue,Pg=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l,u,c,d){var f;return n(this,i),wg(r)?(r=Sg(d=r,"x",0),s=Sg(d,"y",0),o=Sg(d,"width",void 0),a=Sg(d,"height",void 0),h=Sg(d,"column",d.col||0),l=Sg(d,"row",0),u=Sg(d,"columnProportions",0),c=Sg(d,"rowProportions",0)):wg(o)?(o=Sg(d=o,"width",void 0),a=Sg(d,"height",void 0),h=Sg(d,"column",d.col||0),l=Sg(d,"row",0),u=Sg(d,"columnProportions",0),c=Sg(d,"rowProportions",0)):wg(h)?(h=Sg(d=h,"column",d.col||0),l=Sg(d,"row",0),u=Sg(d,"columnProportions",0),c=Sg(d,"rowProportions",0)):wg(u)&&(u=Sg(d=u,"columnProportions",0),c=Sg(d,"rowProportions",0)),(f=e.call(this,t,r,s,o,a,d)).type="rexGridSizer",f.sizerChildren=[],f.addChildrenMap("items",f.sizerChildren),f.setCreateCellContainerCallback(Sg(d,"createCellContainerCallback")),f.setIndentLeft(Sg(d,"space.indentLeftOdd",0),Sg(d,"space.indentLeftEven",0)),f.setIndentTop(Sg(d,"space.indentTopOdd",0),Sg(d,"space.indentTopEven",0)),f.resetGrid(h,l,u,c,Sg(d,"space",void 0)),f}return s(i,[{key:"destroy",value:function(t){this.scene&&!this.ignoreDestroy&&(p(h(i.prototype),"destroy",this).call(this,t),this.columnProportions=void 0,this.rowProportions=void 0,this.columnWidth=void 0,this.rowHeight=void 0,this.createCellContainerCallback=void 0);}},{key:"setColumnProportion",value:function(t,e){return t>=this.columnProportions.length||(this.columnProportions[t]=e),this}},{key:"setRowProportion",value:function(t,e){return t>=this.rowProportions.length||(this.rowProportions[t]=e),this}},{key:"totalColumnProportions",get:function(){return void 0===this._totalColumnProportions&&(this._totalColumnProportions=xg.call(this)),this._totalColumnProportions}},{key:"totalRowProportions",get:function(){return void 0===this._totalRowProportions&&(this._totalRowProportions=Cg.call(this)),this._totalRowProportions}},{key:"getChildAt",value:function(t,e){return this.sizerChildren[e*this.columnCount+t]}},{key:"childToGridIndex",value:function(t,e){if(!t)return null;var i=this.sizerChildren.indexOf(t);return -1===i?null:(void 0===e&&(e={}),e.x=i%this.columnCount,e.y=Math.floor(i/this.columnCount),e)}},{key:"getColumnWidth",value:function(t){var e=this.columnProportions[t];return 0===e?this.columnWidth[t]:e*this.proportionWidthLength}},{key:"getRowHeight",value:function(t){var e=this.rowProportions[t];return 0===e?this.rowHeight[t]:e*this.proportionHeightLength}},{key:"setCreateCellContainerCallback",value:function(t){return this.createCellContainerCallback=t,this}}]),i}(Io);Object.assign(Pg.prototype,bg);var Og=Phaser.Utils.Objects.GetValue,Tg=Phaser.Math.Linear,_g=Phaser.Math.Percent,Eg={setValue:function(t,e,i){return null==t||(void 0!==e&&(t=_g(t,e,i)),this.value=t),this},addValue:function(t,e,i){return void 0!==e&&(t=_g(t,e,i)),this.value+=t,this},getValue:function(t,e){var i=this.value;return void 0!==t&&(i=Tg(t,e,i)),i}},Mg=Phaser.Math.Percent,Rg={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=Mg(t,e,i)),void 0===this.easeValueTask&&(this.easeValueTask=new Zn(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,to:t,duration:this.easeValueDuration,ease:this.easeFunction})),this},easeValueRepeat:function(t,e,i,n){return void 0===i&&(i=-1),void 0===n&&(n=0),void 0===this.easeValueTask&&(this.easeValueTask=new Zn(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,from:t,to:e,duration:this.easeValueDuration,ease:this.easeFunction,repeat:i,repeatDelay:n}),this}},Lg=Phaser.Utils.Objects.GetValue,Dg=Phaser.Math.Clamp;var Ag=Phaser.Math.Percent,jg=function(t,e,i){var n;return t.y===e.y?n=Ag(i.x,t.x,e.x):t.x===e.x&&(n=Ag(i.y,t.y,e.y)),n},zg=function(t,e,i){var n,r;this.enable&&(Bg.x=e,Bg.y=i,this.reverseAxis?(n=this.getEndPoint(),r=this.getStartPoint()):(n=this.getStartPoint(),r=this.getEndPoint()),this.value=jg(n,r,Bg));},Bg={},Ig=function(t,e,i){if(this.enable&&t.isDown){var n,r;Wg.x=t.worldX,Wg.y=t.worldY,this.reverseAxis?(n=this.getEndPoint(),r=this.getStartPoint()):(n=this.getStartPoint(),r=this.getEndPoint());var s=jg(n,r,Wg);this.stopEaseValue(),0===this.easeValueDuration||Math.abs(this.value-s)<.1?this.value=s:this.easeValueTo(s);}},Wg={},Fg=function(t,e){void 0===e&&(e=Yg);var i=this.childrenMap.thumb,n=i.x,r=i.y;return si(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},Yg={},Xg=Phaser.Display.Align.LEFT_CENTER,Gg=Phaser.Display.Align.TOP_CENTER,Vg={},Hg=Phaser.Display.Align.RIGHT_CENTER,Ng=Phaser.Display.Align.BOTTOM_CENTER,Ug={},Kg=Phaser.Math.Linear,Jg={},qg=Phaser.Display.Align.LEFT_CENTER,Zg=Phaser.Display.Align.TOP_CENTER,$g=Phaser.Display.Align.RIGHT_CENTER,Qg=Phaser.Display.Align.BOTTOM_CENTER,ty=Phaser.Utils.Objects.GetValue,ey=Phaser.Utils.Objects.IsPlainObject,iy=Phaser.Math.Clamp,ny=Phaser.Math.Snap.To,ry=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r)).type="rexSlider",s.bootProgressBase(r),s.reverseAxis=ty(r,"reverseAxis",!1);var o=ty(r,"background",void 0),a=ty(r,"track",void 0),h=ty(r,"indicator",void 0),l=ty(r,"thumb",void 0);o&&(ey(o)&&(o=Th(t,o)),s.addBackground(o)),a&&(ey(a)&&(a=Th(t,a)),s.add(a,{proportion:1,expand:!0,minWidth:0===s.orientation?0:void 0,minHeight:1===s.orientation?0:void 0})),h&&(ey(h)&&(h=Th(t,h)),s.pin(h)),l&&(ey(l)&&(l=Th(t,l)),s.pin(l));var c=ty(r,"input",0);switch("string"==typeof c&&(c=sy[c]),c){case 0:l&&(l.setInteractive(),s.scene.input.setDraggable(l),l.on("drag",zg,u(s)).on("dragstart",(function(t){this.eventEmitter.emit("inputstart",t);}),u(s)).on("dragend",(function(t){this.eventEmitter.emit("inputend",t);}),u(s)));break;case 1:s.on("pointerdown",Ig,u(s)).on("pointermove",Ig,u(s)).on("pointerdown",(function(t){this.eventEmitter.emit("inputstart",t);}),u(s)).on("pointerup",(function(t){this.eventEmitter.emit("inputend",t);}),u(s)).on("pointerover",(function(t){t.isDown&&this.eventEmitter.emit("inputstart",t);}),u(s)).on("pointerout",(function(t){t.isDown&&this.eventEmitter.emit("inputend",t);}),u(s)).setInteractive();}return s.addChildrenMap("background",o),s.addChildrenMap("track",a),s.addChildrenMap("indicator",h),s.addChildrenMap("thumb",l),s.setEnable(ty(r,"enable",void 0)),s.setGap(ty(r,"gap",void 0)),s.setValue(ty(r,"value",0),ty(r,"min",void 0),ty(r,"max",void 0)),s}return s(i,[{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"setGap",value:function(t,e,i){return t&&void 0!==e&&(t/=i-e),this.gap=t,this}},{key:"value",get:function(){return this._value},set:function(t){void 0!==this.gap&&(t=ny(t,this.gap));var e=this._value;this._value=iy(t,0,1),e!==this._value&&(this.updateThumb(this._value),this.updateIndicator(this._value),this.eventEmitter.emit("valuechange",this._value,e,this.eventEmitter));}},{key:"postLayout",value:function(t,e,i){return this.updateThumb(),this.updateIndicator(),this}}]),i}(function(t){var e=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"bootProgressBase",value:function(t){this.eventEmitter=Lg(t,"eventEmitter",this);var e=Lg(t,"valuechangeCallback",null);if(null!==e){var i=Lg(t,"valuechangeCallbackScope",void 0);this.eventEmitter.on("valuechange",e,i);}return this.setEaseValuePropName("value").setEaseValueDuration(Lg(t,"easeValue.duration",0)).setEaseValueFunction(Lg(t,"easeValue.ease","Linear")),this}},{key:"value",get:function(){return this._value},set:function(t){t=Dg(t,0,1);var e=this._value,i=e!=t;this.dirty=this.dirty||i,this._value=t,i&&this.eventEmitter.emit("valuechange",this._value,e,this.eventEmitter);}}]),i}(t);return Object.assign(e.prototype,Eg,Rg),e}(oa)),sy={pan:0,drag:0,click:1,none:-1},oy={getStartPoint:function(t){if(void 0===t&&(t=Vg),this.childrenMap.thumb){var e=0===this.orientation?Xg:Gg;Fg.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=Ug),this.childrenMap.thumb){var e=0===this.orientation?Hg:Ng;Fg.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=this.childrenMap.thumb;return void 0===n||(void 0===t&&(t=this.value),this.reverseAxis?(e=this.getEndPoint(),i=this.getStartPoint()):(e=this.getStartPoint(),i=this.getEndPoint()),function(t,e,i,n){void 0===n&&(n=Jg),n.x=Kg(e.x,i.x,t),n.y=Kg(e.y,i.y,t);}(t,e,i,n),this.resetChildPositionState(n)),this},updateIndicator:function(t){var e=this.childrenMap.indicator;if(void 0===e)return this;void 0===t&&(t=this.value);var i,n,r,s=this.reverseAxis,o=this.childrenMap.thumb;if(o)if(0===this.orientation){var a=mt(o);if(s){h=o.x-a*o.originX;i=this.right-h;}else {var h;i=(h=o.x-a*o.originX)+a-this.left;}}else {var l=bt(o);if(s){u=o.y-l*o.originY;n=this.bottom-u;}else {var u;n=(u=o.y-l*o.originY)+l-this.top;}}else 0===this.orientation?i=this.width*t:n=this.height*t;Ur(e,i,n),r=s?0===this.orientation?$g:Qg:0===this.orientation?qg:Zg,ri(e,this,r),this.resetChildPositionState(e);}};Object.assign(ry.prototype,oy);var ay=Phaser.Utils.Objects.GetValue,hy=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r)).type="rexScrollBar";var o,a=ay(r,"background",void 0),h=ay(r,"buttons",void 0),l=ay(h,"top",ay(h,"left",void 0)),c=ay(h,"bottom",ay(h,"right",void 0)),d=ay(r,"slider",void 0);(a&&s.addBackground(a),l)&&(s.add(l),new ps(l).on("intouch",(function(){if(this.enable){var t=o.reverseAxis?this.scrollStep:-this.scrollStep;this.value+=t;}}),u(s)));if(d){var f;if(d.orientation=s.orientation,d.eventEmitter=u(s),d.value=null,0===s.orientation)f=void 0===ay(d,"width",void 0)?1:0;else f=void 0===ay(d,"height",void 0)?1:0;o=new ry(t,d),t.add.existing(o),s.add(o,{proportion:f});}c&&(s.add(c),new ps(c).on("intouch",(function(){if(this.enable){var t=o.reverseAxis?-this.scrollStep:this.scrollStep;this.value+=t;}}),u(s)));var p=[l,c];s.addChildrenMap("background",a),s.addChildrenMap("slider",o),s.addChildrenMap("buttons",p);var v=ay(r,"valuechangeCallback",null);if(null!==v){var g=ay(r,"valuechangeCallbackScope",void 0);s.on("valuechange",v,g);}return s.setEnable(ay(r,"enable",void 0)),s.setValue(ay(r,"value",0)),s.setScrollStep(ay(h,"step",.01)),s}return s(i,[{key:"setScrollStep",value:function(t){return this.scrollStep=t,this}},{key:"enable",get:function(){return !!this.childrenMap.slider&&this.childrenMap.slider.enable},set:function(t){this.childrenMap.slider&&this.childrenMap.slider.setEnable(t);}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"value",get:function(){return this.childrenMap.slider?this.childrenMap.slider.value:0},set:function(t){this.childrenMap.slider&&(this.childrenMap.slider.value=t);}},{key:"setValue",value:function(t,e,i){return this.childrenMap.slider&&this.childrenMap.slider.setValue(t,e,i),this}},{key:"addValue",value:function(t,e,i){return this.childrenMap.slider&&this.childrenMap.slider.addValue(t,e,i),this}},{key:"getValue",value:function(t,e){return this.childrenMap.slider?this.childrenMap.slider.getValue(t,e):0}},{key:"easeValueTo",value:function(t,e,i){return this.childrenMap.slider&&this.childrenMap.slider.easeValueTo(t,e,i),this}},{key:"stopEaseValue",value:function(){return this.childrenMap.slider&&this.childrenMap.slider.stopEaseValue(),this}},{key:"setEaseValueDuration",value:function(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueDuration(t),this}},{key:"setEaseValueFunction",value:function(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueFunction(t),this}}]),i}(oa),ly=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,r)).parent=t,s.init(),s}return s(i,[{key:"init",value:function(){this.start("IDLE");}},{key:"next_IDLE",value:function(){var t,e=this.parent;return e.dragState.isDown&&(t=0===e.dragThreshold?"DRAG":"DRAGBEGIN"),t}},{key:"update_IDLE",value:function(t,e){this.next();}},{key:"next_DRAGBEGIN",value:function(){var t=this.parent,e=t.dragState;return e.isDown?e.pointer.getDistance()>=t.dragThreshold?"DRAG":"DRAGBEGIN":"IDLE"}},{key:"update_DRAGBEGIN",value:function(t,e){this.next();}},{key:"next_DRAG",value:function(){var t,e=this.parent;return e.dragState.isUp&&(t=e.outOfBounds?"BACK":e.slidingEnable?"SLIDE":"IDLE"),t}},{key:"update_DRAG",value:function(t,e){var i=this.parent;i.dragState.justMoved&&i.dragging(),this.next();}},{key:"enter_DRAG",value:function(){this.parent.onDragStart();}},{key:"exit_DRAG",value:function(){this.parent.onDragEnd();}},{key:"next_SLIDE",value:function(){var t,e=this.parent;return e.dragState.isDown?t="DRAG":e.isSliding||(t="IDLE"),t}},{key:"enter_SLIDE",value:function(){this.parent.onSliding();}},{key:"exit_SLIDE",value:function(){this.parent.stop();}},{key:"update_SLIDE",value:function(t,e){this.parent.sliding(t,e),this.next();}},{key:"next_BACK",value:function(){var t,e=this.parent;return e.dragState.isDown?t="DRAG":e.isPullBack||(t="IDLE"),t}},{key:"enter_BACK",value:function(){this.parent.onPullBack();}},{key:"exit_BACK",value:function(){this.parent.stop();}},{key:"update_BACK",value:function(t,e){this.parent.pullBack(t,e),this.next();}}]),i}(vr),uy=Phaser.Utils.Objects.GetValue,cy=Phaser.Math.Distance.Between,dy=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r))._enable=void 0,t.setInteractive(uy(r,"inputConfig",void 0)),s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.isInTouched=!1,this.holdStartTime=void 0,this.x=void 0,this.y=void 0,this.preX=void 0,this.preY=void 0,this.localX=void 0,this.localY=void 0,this.justMoved=!1,this.setEnable(uy(t,"enable",!0)),this.holdThreshold=uy(t,"holdThreshold",50),this.pointerOutReleaseEnable=uy(t,"pointerOutRelease",!0),this}},{key:"boot",value:function(){this.parent.on("pointerdown",this.onPointIn,this),this.parent.on("pointerup",this.onPointOut,this),this.pointerOutReleaseEnable&&this.parent.on("pointerout",this.onPointOut,this),this.parent.on("pointermove",this.onPointerMove,this),this.scene.sys.events.on("preupdate",this.preupdate,this);}},{key:"shutdown",value:function(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this.preupdate,this),this.pointer=void 0,p(h(i.prototype),"shutdown",this).call(this,t));}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(t||(this.isInTouched=!1,this.pointer=void 0),this._enable=t);}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"setPointerOutReleaseEnable",value:function(t){return void 0===t&&(t=!0),this.pointerOutReleaseEnable=t,this}},{key:"isDown",get:function(){return this.pointer&&this.pointer.isDown}},{key:"isUp",get:function(){return !this.isDown}},{key:"dx",get:function(){return this.x-this.preX}},{key:"dy",get:function(){return this.y-this.preY}},{key:"dt",get:function(){return Ns(this.scene)}},{key:"speed",get:function(){return this.x===this.preX&&this.y===this.preY?0:cy(this.preX,this.preY,this.x,this.y)/(.001*this.dt)}},{key:"speedX",get:function(){return this.dx/(.001*this.dt)}},{key:"speedY",get:function(){return this.dy/(.001*this.dt)}},{key:"onPointIn",value:function(t,e,i){this.enable&&t.isDown&&void 0===this.pointer&&(this.pointer=t,this.localX=e,this.localY=i);}},{key:"onPointOut",value:function(t){this.enable&&this.pointer===t&&(this.pointer=void 0);}},{key:"onPointerMove",value:function(t,e,i){this.enable&&t.isDown&&this.pointer===t&&(this.localX=e,this.localY=i);}},{key:"preupdate",value:function(t,e){if(this.enable){var i=this.pointer;this.justMoved=!1,i&&!this.isInTouched?(this.x=i.worldX,this.y=i.worldY,this.preX=i.worldX,this.preY=i.worldY,this.isInTouched=!0,this.holdStartTime=void 0,this.emit("touchstart",i,this.localX,this.localY)):i&&this.isInTouched?this.x===i.x&&this.y===i.y?void 0===this.holdStartTime?this.holdStartTime=t:t-this.holdStartTime>this.holdThreshold&&(this.preX=this.x,this.preY=this.y):(this.preX=this.x,this.preY=this.y,this.x=i.worldX,this.y=i.worldY,this.holdStartTime=void 0,this.justMoved=!0,this.emit("touchmove",i,this.localX,this.localY)):!i&&this.isInTouched&&(this.isInTouched=!1,this.holdStartTime=void 0,this.emit("touchend",i));}}}]),i}(Yi),fy=Phaser.Utils.Objects.GetValue,py=function(){function t(e){n(this,t),this.resetFromJSON(e);}return s(t,[{key:"resetFromJSON",value:function(t){return this.setValue(fy(t,"value",0)),this.setSpeed(fy(t,"speed",0)),this.setAcceleration(fy(t,"acceleration",0)),this}},{key:"reset",value:function(){this.setValue(0),this.setSpeed(0),this.setAcceleration(0);}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"setSpeed",value:function(t){return this.speed=t,this}},{key:"setAcceleration",value:function(t){return this.acceleration=t,this}},{key:"updateSpeed",value:function(t){return 0!==this.acceleration&&(this.speed+=this.acceleration*t,this.speed<0&&(this.speed=0)),this}},{key:"getDeltaValue",value:function(t){return this.updateSpeed(t),this.speed<=0?0:this.speed*t}},{key:"update",value:function(t){return this.updateSpeed(t),this.speed>0&&(this.value+=this.getDeltaValue(t)),this}},{key:"isMoving",get:function(){return this.speed>0}}]),t}(),vy=function(){function t(){n(this,t),this.value,this.dir,this.movement=new py;}return s(t,[{key:"init",value:function(t,e,i,n,r){return this.value=t,this.end=r,this.dir=void 0!==r?tthis.end&&(this.value=this.end):this.valuethis.maxValue}},{key:"overMin",value:function(t){return null!=this.minValue&&t0,Math.abs(e),i);}},{key:"sliding",value:function(t,e){e*=.001;var i=this._slowDown.update(e).value;this.overMax(i)?(this.value=this.maxValue,this._slowDown.stop()):this.overMin(i)?(this.value=this.minValue,this._slowDown.stop()):this.value=i;}},{key:"onPullBack",value:function(){var t=this.value,e=this.outOfMinBound?this.minValue:this.maxValue,i=Math.abs(e-t),n=this.backDeceleration,r=Math.sqrt(2*n*i);this._slowDown.init(t,void 0,r,n,e);}},{key:"pullBack",value:function(t,e){e*=.001,this.value=this._slowDown.update(e).value,this._slowDown.isMoving||this._state.next();}},{key:"stop",value:function(){this._slowDown.stop();}}]),i}(Yi),my={y:0,v:0,vertical:0,x:1,h:1,horizontal:1},by=Phaser.Utils.Objects.GetValue,xy=function(t){a(i,t);var e=d(i);function i(t,r){var s;(n(this,i),(s=e.call(this,t,r)).parent!==s.scene?s.focusMode=by(r,"focus",!0):s.focusMode=!1,s.setSpeed(by(r,"speed",.1)),s.setEnable(by(r,"enable",!0)),s.focusMode)?(t=s.parent).setInteractive(by(r,"inputConfig",void 0)).on("wheel",(function(t,e,i,n,r){this.enable&&this.scroll(i);}),u(s)):s.scene.input.on("wheel",s.onSceneScroll,u(s));return s}return s(i,[{key:"destroy",value:function(){this.focusMode||this.scene.input.off("wheel",this.onSceneScroll,this);}},{key:"onSceneScroll",value:function(t,e,i,n,r,s){this.enable&&this.scroll(n);}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"setSpeed",value:function(t){return this.speed=t,this}},{key:"scroll",value:function(t){t*=this.speed,this.emit("scroll",t,this.parent,this);}}]),i}(Yi),Cy=Phaser.Utils.Objects.GetValue,wy=function(t,e,i,n){var r,s,o,a,h="Y"===(i=i.toUpperCase()),l=2===t.scrollMode,u=t.childrenMap.child,c="slider".concat(i);if(r=l||n.hasOwnProperty(c)?Cy(n,c,void 0):Cy(n,"slider",void 0)){var d,f,p;!0===r&&(r={}),r.orientation=h?1:0,s=function(t,e){void 0===e&&(e={});var i=jt(e);(e={slider:i}).orientation=i.orientation,delete i.orientation,e.background=i.background,delete i.background,e.buttons=i.buttons,delete i.buttons;var n=new hy(t,e);t.add.existing(n);var r=n.childrenMap.slider;return n.addChildrenMap("track",r.childrenMap.track),n.addChildrenMap("indicator",r.childrenMap.indicator),n.addChildrenMap("thumb",r.childrenMap.thumb),n}(t.scene,r);var v=Cy(r,"position",0);"string"==typeof v&&(v=Sy[v]);var g=Cy(n,"space.slider".concat(i),void 0);void 0===g&&void 0===(g=Cy(n,"space.slider",void 0))&&(g=l?0:Cy(n,"space.child",0));var y="number"==typeof g;h?0===v?(d=2,f=1,p=y?{left:g}:g):(d=0,f=1,p=y?{right:g}:g):0===v?(d=1,f=2,p=y?{top:g}:g):(d=1,f=0,p=y?{bottom:g}:g),e.add(s,{column:d,row:f,align:"center",padding:p,expand:!0}),t["hideUnscrollableSlider".concat(i)]=Cy(r,"hideUnscrollableSlider",!1),t["adaptThumb".concat(i,"SizeMode")]=Cy(r,"adaptThumbSize",!1),t["minThumb".concat(i,"Size")]=Cy(r,"minThumbSize",void 0);}else t["hideUnscrollableSlider".concat(i)]=!1,t["adaptThumb".concat(i,"SizeMode")]=!1,t["minThumb".concat(i,"Size")]=void 0;var k="scroller".concat(i);(o=l||n.hasOwnProperty(k)?Cy(n,k,!0):Cy(n,"scroller",!0))&&u&&(!0===o&&(o={}),o.orientation=h?0:1,a=new ky(u,o));var m,b,x,C,w=Cy(n,l?"mouseWheelScroller".concat(i):"mouseWheelScroller",!1);(w&&u&&(m=new xy(u,w)),t.addChildrenMap("slider".concat(i),s),t.addChildrenMap("scroller".concat(i),a),t.addChildrenMap("mouseWheelScroller".concat(i),m),l&&!h||(t.hideUnscrollableSlider=t["hideUnscrollableSlider".concat(i)],t.adaptThumbSizeMode=t["adaptThumb".concat(i,"SizeMode")],t.minThumbSize=t["minThumb".concat(i,"Size")],t.addChildrenMap("slider",s),t.addChildrenMap("scroller",a),t.addChildrenMap("mouseWheelScroller",m)),s)&&(l?(b=h?"t":"s",C="scroll".concat(i)):(b="t",C="scroll"),s.on("valuechange",(function(e){t[b]=e,t.emit(C,t);})));a&&(l?(x="childO".concat(i),C="scroll".concat(i)):(x="childOY",C="scroll"),a.on("valuechange",(function(e){t[x]=e,t.emit(C,t);})));if(m){var S="addChildO".concat(i);m.on("scroll",(function(e){t[S](-e,!0);}));}},Sy={right:0,left:1,bottom:0,top:1},Py=Phaser.Utils.Objects.GetValue,Oy=function(t,e){var i=t.scene,n=[0,1,0],r=[0,1,0],s=Py(e,"width"),o=Py(e,"height");s||(Py(e,"child.expandWidth",!0)||(n[1]=0));o||(Py(e,"child.expandHeight",!0)||(r[1]=0));var a=new Pg(i,{column:3,row:3,columnProportions:n,rowProportions:r});switch(function(t,e,i){var n=Og(i,"child"),r=Og(n,"gameObject",void 0);if(r){var s=Og(i,"space.child",0);t.childMargin={};var o=t.childMargin,a={};if("number"==typeof s)switch(t.scrollMode){case 0:case 1:o.top=0,o.bottom=0,o.left=0,o.right=0;break;default:o.top=s,o.bottom=s,o.left=s,o.right=s;}else switch(t.scrollMode){case 0:o.top=Og(s,"top",0),o.bottom=Og(s,"bottom",0),a.left=Og(s,"left",0),a.right=Og(s,"right",0);break;case 1:o.top=Og(s,"left",0),o.bottom=Og(s,"right",0),a.top=Og(s,"top",0),a.bottom=Og(s,"bottom",0);break;default:o.top=Og(s,"top",0),o.bottom=Og(s,"bottom",0),o.left=Og(s,"left",0),o.right=Og(s,"right",0);}e.add(r,{column:1,row:1,align:Og(n,"align","center"),padding:a,expand:{width:Og(n,"expandWidth",!0),height:Og(n,"expandHeight",!0)}});}t.addChildrenMap("child",r);}(t,a,e),t.scrollMode){case 0:wy(t,a,"y",e);break;case 1:wy(t,a,"x",e);break;default:wy(t,a,"y",e),wy(t,a,"x",e);}return a},Ty=function(t){var e,i,n,r;switch(this.scrollMode){case 0:case 1:e=this.topChildOY,i=this.bottomChildOY,n=this.childrenMap.scroller,r=this.childrenMap.slider;break;default:"Y"===(t=t.toUpperCase())?(e=this.topChildOY,i=this.bottomChildOY):(e=this.leftChildOX,i=this.rightChildOX),n=this.childrenMap["scroller".concat(t)],r=this.childrenMap["slider".concat(t)];}n&&n.setBounds(e,i),r&&r.setEnable(e!==i);},_y=function(t){switch(this.scrollMode){case 0:case 1:(e=this.childrenMap.slider)&&this.hideUnscrollableSlider&&this.setChildVisible(e,this.isOverflow);break;default:t=t.toUpperCase();var e=this.childrenMap["slider".concat(t)],i=this["hideUnscrollableSlider".concat(t)],n=this["isOverflow".concat(t)];e&&i&&this.setChildVisible(e,n);}},Ey=function(t){switch(this.scrollMode){case 0:case 1:if(!this.adaptThumbSizeMode)return;if(!(a=this.childrenMap.slider))return;var e=Math.min(this.childVisibleHeight/this.childHeight,1),i=a.childrenMap.track,n=a.childrenMap.thumb,r=this.minThumbSize;if(0===this.scrollMode){var s=i.displayHeight*e;void 0!==r&&s0&&{height:this.colorComponentsHeight,formatLabel:this.colorComponentsFormatLabelConfig,inputText:this.colorComponentsInputTextConfig,space:this.colorComponentsSpace};var o=new zk(t,{width:n,height:s,background:e,space:this.colorPickerSpace,hPalette:{position:this.colorPickerHPalettePosition},colorComponents:r,value:this.value});return t.add.existing(o),o},Ik=Phaser.Utils.Objects.GetValue,Wk=function(t,e){var i=Ik(e,"expandDirection",void 0);"string"==typeof i&&(i=Fk[i]);var n,r,s,a,h,l,u=(s="alignTargetX",Bv(n=e,r="alignTarget")?ur(n,r):s&&Bv(n,s)?ur(n,s):a),c=Ik(e,"alignTargetY",u),d=Ik(e,"alignOffsetX",0),f=Ik(e,"alignOffsetY",0),p=Ik(e,"alignSide","").includes("right"),v=Ik(e,"bounds"),g=0===i,y=!g&&!(1===i),k=p?1:0,m=g||y?0:1;t.setOrigin(k,m),h=p?u.getTopRight().x:u.getTopLeft().x,l=c.getBottomLeft().y,t.setPosition(h+d,l+f);var b=v;b||(b=Re(t.scene)),y&&t.getBottomLeft().y>b.bottom&&(l=c.getTopLeft().y,t.setOrigin(0,1).setPosition(h+d,l+f));},Fk={down:0,up:1},Yk=Phaser.Utils.Objects.GetValue,Xk=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),null==r.transitIn&&(r.transitIn=function(t,e){pn(t,e,"y","Cubic");}),null==r.transitOut&&(r.transitOut=function(t,e){!function(t,e,i,n,r){void 0===n&&(n="Linear");var s={mode:0};switch(i){case 0:case"x":s.end={x:0};break;case 1:case"y":s.end={y:0};break;default:s.end=0;}s.duration=e,s.ease=n,void 0===r?r=new dn(t,s):r.resetFromJSON(s),r.restart();}(t,e,"y","Linear");}),r.manualClose=!0,r.clickOutsideClose=!0,r.destroy=!0,s=e.call(this,t,r),Wk(t,r),t.isRexSizer&&t.layout();var o=Yk(r,"touchOutsideClose",!1),a=Yk(r,"anyTouchClose",!1);return a&&(o=!1),a?s.once("open",s.anyTouchClose,u(s)):o&&s.once("open",s.touchOutsideClose,u(s)),s.requestOpen(),s}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(this.scene.input.off("pointerup",this.touchCloseCallback,this),p(h(i.prototype),"shutdown",this).call(this,t));}},{key:"touchOutsideClose",value:function(){return this.scene.input.on("pointerup",this.touchCloseCallback,this),this.clickOutsideTest=!0,this}},{key:"anyTouchClose",value:function(){return this.scene.input.once("pointerup",this.touchCloseCallback,this),this}},{key:"touchCloseCallback",value:function(t){this.clickOutsideTest&&zr(this.parent,t.worldX,t.worldY)||this.requestClose();}},{key:"onOpen",value:function(){this.emit("open",this.parent,this),p(h(i.prototype),"onOpen",this).call(this);}},{key:"onClose",value:function(){this.emit("close",this.parent,this),p(h(i.prototype),"onClose",this).call(this);}}]),i}(wr),Gk={openColorPicker:function(){if(!this.colorPicker){var t=Bk.call(this).layout(),e=new Xk(t,{duration:{in:this.colorPickerEaseInDuration,out:this.colorPickerEaseOutDuration},transitIn:this.colorPickerTransitInCallback,transitOut:this.colorPickerTransitOutCallback,expandDirection:this.colorPickerExpandDirection,alignTargetX:this,alignTargetY:this,bounds:this.colorPickerBounds,touchOutsideClose:!0}).on("open",(function(){t.on("valuechange",(function(t){this.setValue(t);}),this);}),this).on("close",(function(){this.colorPicker=void 0,this.dropDownBehavior=void 0;}),this);return this.colorPicker=t,this.dropDownBehavior=e,this.pin(t),this}}};Object.assign(Gk,nk);var Vk=Phaser.Utils.Objects.GetValue,Hk=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),(s=e.call(this,t,r)).type="rexColorInput",r.hasOwnProperty("colorPicker")||(r.colorPicker={background:{color:0}});var o=r.colorPicker,a=!1!==o&&null!==o;if(a){var h;s.setColorPickerSize(Vk(o,"width",160),Vk(o,"height",170));var l=Vk(o,"background");h=l?function(t){return Th(t,l)}:Vk(o,"createBackgroundCallback"),s.setCreateColorPickerBackgroundCallback(h),s.setColorPickerHPalettePosition(Vk(o,"hPalettePosition",0)),s.setColorPickerExpandDirection(Vk(o,"expandDirection")),s.setColorPickerEaseInDuration(Vk(o,"easeIn",200)),s.setColorPickerEaseOutDuration(Vk(o,"easeOut",200)),s.setColorPickerTransitInCallback(Vk(o,"transitIn")),s.setColorPickerTransitOutCallback(Vk(o,"transitOut")),s.setColorPickerBounds(Vk(o,"bounds"));var c=Vk(o,"space");void 0===c&&(c={left:10,right:10,top:10,bottom:10,item:8}),s.setColorPickerSpace(c);}var d=r.colorComponents;if(a&&(!1!==d&&null!==d)){s.setColorComponentsHeight(Vk(d,"height",30)),s.setColorComponentsFormatLabelConfig(Vk(d,"formatLabel"));var f=Vk(d,"inputText");f||(f=Vk(r,"inputText")),s.setColorComponentsInputTextConfig(f);var p=Vk(d,"space");void 0===p&&(p={item:8}),s.setColorComponentsSpace(p);}var v=s.childrenMap.swatch;return v&&a&&s.onClick(v,s.openColorPicker,u(s)),s}return s(i)}(ik);Object.assign(Hk.prototype,Gk);var Nk={name:"ColorInput",accept:function(t){return !!t.hasOwnProperty("view")&&"color"===t.view},build:function(t,e){var i=t.scene;t.type="rexTweaker.ColorInput";var n=e.colorInput;void 0===n&&(n={}),n.hasOwnProperty("inputText")||(n.inputText=e.inputText);var r=function(t,e,i){void 0===i&&(i=!0),i?e=e?ge(e):{}:e||(e={});var n=new Hk(t,e);return t.add.existing(n),n}(i,n);t.add(r,{proportion:1,expand:!0,key:"colorInput"}),r.on("valuechange",(function(e){t.setValue(e);}));},displayValue:function(t,e){t.getElement("colorInput").setValue(e);}},Uk={setBoxFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.boxFillColor!==t||this.boxFillAlpha!==e,this.boxFillColor=t,this.boxFillAlpha=e,this},setUncheckedBoxFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.uncheckedBoxFillColor!==t||this.uncheckedBoxFillAlpha!==e,this.uncheckedBoxFillColor=t,this.uncheckedBoxFillAlpha=e,this},setBoxStrokeStyle:function(t,e,i){return void 0===i&&(i=1),this.dirty=this.dirty||this.boxLineWidth!==t||this.boxStrokeColor!==e||this.boxStrokeAlpha!==i,this.boxLineWidth=t,this.boxStrokeColor=e,this.boxStrokeAlpha=i,this},setUncheckedBoxStrokeStyle:function(t,e,i){return void 0===i&&(i=1),this.dirty=this.dirty||this.uncheckedBoxLineWidth!==t||this.uncheckedBoxStrokeColor!==e||this.uncheckedBoxStrokeAlpha!==i,this.uncheckedBoxLineWidth=t,this.uncheckedBoxStrokeColor=e,this.uncheckedBoxStrokeAlpha=i,this},setCheckerStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.checkerColor!==t||this.checkAlpha!==e,this.checkerColor=t,this.checkAlpha=e,this},setBoxShape:function(t){return void 0===t&&(t=!1),this.isCircleShape===t||(this.isCircleShape=t,this.isSizeChanged=!0,this.dirty=!0),this}},Kk={buildShapes:function(){this.addShape((new Ud).setName("box")).addShape((new Hd).setName("checker"));},updateShapes:function(){var t=this.width/2,e=this.height/2,i=Math.min(t,e),n=2*i,r=t-i,s=e-i,o=this.boxLineWidth,a=Math.max(n/10,2),h=this.getShape("box"),l=this.getShape("checker");if(this.isSizeChanged){var u=n*(1-this.boxSize)/2,c=o/2,d=n*this.boxSize-o;h.setTopLeftPosition(r+c+u,s+c+u).setSize(d,d),this.isCircleShape?h.setRadius(d/2):h.setRadius(0);u=n*(1-this.checkerSize)/2;var f=n*this.checkerSize/4,p=1*f,v=2*f,g=3*f;l.startAt(p,v).lineTo(v,g).lineTo(g,p).offset(r+u,s+u).end();}this.checked?(h.fillStyle(this.boxFillColor,this.boxFillAlpha).lineStyle(o,this.boxStrokeColor,this.boxStrokeAlpha),l.lineStyle(a,this.checkerColor)):(h.fillStyle(this.uncheckedBoxFillColor,this.uncheckedBoxFillAlpha).lineStyle(o,this.uncheckedBoxStrokeColor,this.uncheckedBoxStrokeAlpha),l.lineStyle()),this.checked&&l.setDisplayPathSegment(this.checkerAnimProgress);}},Jk={setCheckerAnimationDuration:function(t){return void 0===t&&(t=0),this.checkerAnimDuration=t,this},playCheckerAnimation:function(){return void 0===this.checkerAnimProgressTask&&(this.checkerAnimProgressTask=new Zn(this,{eventEmitter:null})),this.checkerAnimProgressTask.restart({key:"checkerAnimProgress",from:0,to:1,duration:this.checkerAnimDuration}),this},stopCheckerAnimation:function(){return void 0===this.checkerAnimProgressTask||this.checkerAnimProgressTask.stop(),this}},qk={};Object.assign(qk,Uk,{setBoxSize:function(t){return this.dirty=this.dirty||this.boxSize!==t,this.boxSize=t,this},setCheckerSize:function(t){return this.dirty=this.dirty||this.checkerSize!==t,this.checkerSize=t,this}},Kk,Jk);var Zk=Phaser.Utils.Objects.GetValue,$k=Phaser.Utils.Objects.IsPlainObject,Qk=23730,tm=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var u;n(this,i),$k(r)?(r=Zk(l=r,"x",0),s=Zk(l,"y",0),o=Zk(l,"width",2),a=Zk(l,"height",2),h=Zk(l,"color",Qk)):$k(h)&&(h=Zk(l=h,"color",Qk)),(u=e.call(this,t,r,s,o,a)).type="rexCheckbox",void 0===h&&(h=Qk),u.setBoxShape(Zk(l,"circleBox",!1)),u.setBoxFillStyle(h,Zk(l,"boxFillAlpha",1)),u.setUncheckedBoxFillStyle(Zk(l,"uncheckedColor",null),Zk(l,"uncheckedBoxFillAlpha",1)),u.setBoxStrokeStyle(Zk(l,"boxLineWidth",4),Zk(l,"boxStrokeColor",h),Zk(l,"boxStrokeAlpha",1)),u.setUncheckedBoxStrokeStyle(u.boxLineWidth,Zk(l,"uncheckedBoxStrokeColor",u.boxStrokeColor),Zk(l,"uncheckedBoxStrokeAlpha",u.boxStrokeAlpha)),u.setCheckerStyle(Zk(l,"checkerColor",16777215),Zk(l,"checkerAlpha",1)),u.setBoxSize(Zk(l,"boxSize",1)),u.setCheckerSize(Zk(l,"checkerSize",1)),u.setCheckerAnimationDuration(Zk(l,"animationDuration",150)),u.buildShapes();var c=Zk(l,"checked");return void 0===c&&(c=Zk(l,"value",!1)),u.setValue(c),u}return s(i,[{key:"value",get:function(){return this._value},set:function(t){t=!!t,this._value!==t&&(this.dirty=!0,this._value=t,t?this.playCheckerAnimation():this.stopCheckerAnimation(),this.emit("valuechange",t));}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"toggleValue",value:function(){return this.setValue(!this.value),this}},{key:"checked",get:function(){return this.value},set:function(t){this.value=t;}},{key:"setChecked",value:function(t){return void 0===t&&(t=!0),this.setValue(t),this}},{key:"toggleChecked",value:function(){return this.toggleValue(),this}},{key:"checkerAnimProgress",get:function(){return this._checkerAnimProgress},set:function(t){this._checkerAnimProgress!==t&&(this._checkerAnimProgress=t,this.dirty=!0);}}]),i}(bd);Object.assign(tm.prototype,qk);var em=Phaser.Utils.Objects.GetValue,im=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var c;return n(this,i),(c=e.call(this,t,r,s,o,a,h,l))._click=new is(u(c),em(l,"click")),c._click.on("click",(function(){this.toggleValue();}),u(c)),c.setReadOnly(em(l,"readOnly",!1)),c}return s(i,[{key:"readOnly",get:function(){return !this._click.enable},set:function(t){this._click.enable=!t;}},{key:"setReadOnly",value:function(t){return void 0===t&&(t=!0),this.readOnly=t,this}}]),i}(tm),nm={name:"CheckboxInput",accept:function(t){return t.hasOwnProperty("view")?"boolean"===t.view:"boolean"==typeof t.value},build:function(t,e){var i=t.scene;t.type="rexTweaker.CheckboxInput";var n=e.checkbox,r=function(t,e){var i=new im(t,e);return t.add.existing(i),i}(i,n),s=n.size;void 0!==s&&r.setSize(s,s);var o=void 0!==s?0:1;t.add(r,{proportion:0,expand:!1,fitRatio:o,key:"checkbox"}),r.on("valuechange",(function(e){t.setValue(e);}));},displayValue:function(t,e){t.getElement("checkbox").setValue(e);}},rm={setTrackFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.trackFillColor!==t||this.trackFillAlpha!==e,this.trackFillColor=t,this.trackFillAlpha=e,this},setFalseValueTrackFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.falseValueTrackColor!==t||this.uncheckedTrackFillAlpha!==e,this.falseValueTrackColor=t,this.falseValueTrackFillAlpha=e,this},setThumbStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.thumbColor!==t||this.checkAlpha!==e,this.thumbColor=t,this.thumbAlpha=e,this}},sm={setTrackSize:function(t,e){return this.dirty=this.dirty||this.trackWidth!==t||this.trackHeight!==e,this.trackWidth=t,this.trackHeight=e,this},setTrackRadius:function(t){return this.dirty=this.dirty||this.trackRadius!==t,this.trackRadius=t,this},setThumbSize:function(t,e){return void 0===e&&(e=t),this.dirty=this.dirty||this.thumbWidth!==t||this.thumbHeight!==e,this.thumbWidth=t,this.thumbHeight=e,this},setThumbRadius:function(t){return this.dirty=this.dirty||this.thumbRadius!==t,this.thumbRadius=t,this}},om={setThumbPosition:function(t,e){return void 0===e&&(e=1-t),this.thumbLeftX=t,this.thumbRightX=e,this},setRTL:function(t){return void 0===t&&(t=!0),this.rtl=t,this}},am=function(t,e,i){return (e-t)*i+t},hm=function(t){return t>>16&255},lm=function(t){return t>>8&255},um=function(t){return 255&t},cm=Phaser.Math.Linear,dm={buildShapes:function(){this.addShape((new Ud).setName("track")).addShape((new Ud).setName("thumb"));},updateShapes:function(){var t=this.width,e=this.height,i=this.value?this.toggleAnimProgress:1-this.toggleAnimProgress,n=this.getShape("track");if(this.isSizeChanged){var r=t*this.trackWidth,s=e*this.trackHeight,o=(t-r)/2,a=(e-s)/2,h=e*this.trackRadius;n.setTopLeftPosition(o,a).setSize(r,s).setRadius(h);}var l,u,c,d=(l=this.falseValueTrackColor,u=this.trackFillColor,c=i,(255&am(hm(l),hm(u),c))<<16|(255&am(lm(l),lm(u),c))<<8|255&am(um(l),um(u),c)),f=cm(this.falseValueTrackFillAlpha,this.trackFillAlpha,i);n.fillStyle(d,f);var p=this.getShape("thumb");if(this.isSizeChanged){var v=t*this.thumbWidth,g=e*this.thumbHeight,y=e*this.thumbRadius;p.setSize(v,g).setRadius(y);}var k=cm(this.thumbLeftX,this.thumbRightX,i)*t;this.rtl&&(k=t-k);var m=e/2;p.setCenterPosition(k,m),p.fillStyle(this.thumbColor,this.thumbAlpha);}},fm={setToggleAnimationDuration:function(t){return void 0===t&&(t=0),this.toggleAnimDuration=t,this},playToggleAnimation:function(){return void 0===this.toggleAnimProgressTask&&(this.toggleAnimProgressTask=new Zn(this,{eventEmitter:null})),this.toggleAnimProgressTask.restart({key:"toggleAnimProgress",from:0,to:1,duration:this.toggleAnimDuration}),this},stopToggleAnimation:function(){return void 0===this.toggleAnimProgressTask||this.toggleAnimProgressTask.stop(),this}},pm={};Object.assign(pm,rm,sm,om,dm,fm);var vm=Phaser.Utils.Objects.GetValue,gm=Phaser.Utils.Objects.IsPlainObject,ym=23730,km=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var u;n(this,i),gm(r)?(r=vm(l=r,"x",0),s=vm(l,"y",0),o=vm(l,"width",2),a=vm(l,"height",2),h=vm(l,"color",ym)):gm(h)&&(h=vm(l=h,"color",ym)),(u=e.call(this,t,r,s,o,a)).type="rexToggleSwitch",void 0===h&&(h=ym),u.setTrackFillStyle(h,vm(l,"trackFillAlpha",1)),u.setFalseValueTrackFillStyle(vm(l,"falseValueTrackColor",function(t){var e=.3*hm(t)+.59*lm(t)+.11*um(t);return (255&e)<<16|(255&e)<<8|255&e}(h)),vm(l,"falseValueTrackFillAlpha",1)),u.setThumbStyle(vm(l,"thumbColor",16777215),vm(l,"thumbAlpha",1)),u.setTrackSize(vm(l,"trackWidth",.9),vm(l,"trackHeight",.5)),u.setTrackRadius(vm(l,"trackRadius",.5*u.trackHeight));var c=vm(l,"thumbHeight",void 0),d=vm(l,"thumbWidth",c);return void 0===d&&(d=.9*u.trackHeight),u.setThumbSize(d,c),u.setThumbRadius(vm(l,"thumbRadius",.5*u.thumbHeight)),u.setThumbPosition(vm(l,"thumbLeft",.3),vm(l,"thumbRight",void 0)),u.setRTL(vm(l,"rtl",!1)),u.setToggleAnimationDuration(vm(l,"animationDuration",150)),u.buildShapes(),u.setValue(vm(l,"value",!1),0),u}return s(i,[{key:"value",get:function(){return this._value},set:function(t){t=!!t,this._value!==t&&(this.dirty=!0,this._value=t,this.playToggleAnimation(),this.emit("valuechange",t));}},{key:"setValue",value:function(t,e){void 0===e&&(e=this.toggleAnimDuration);var i=this.toggleAnimDuration;return this.toggleAnimDuration=e,this.value=t,this.toggleAnimDuration=i,this}},{key:"toggleValue",value:function(t){return this.setValue(!this.value,t),this}},{key:"toggleAnimProgress",get:function(){return this._toggleAnimProgress},set:function(t){this._toggleAnimProgress!==t&&(this._toggleAnimProgress=t,this.dirty=!0);}}]),i}(bd);Object.assign(km.prototype,pm);var mm=Phaser.Utils.Objects.GetValue,bm=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var c;return n(this,i),(c=e.call(this,t,r,s,o,a,h,l))._click=new is(u(c),mm(l,"click")),c._click.on("click",(function(){this.toggleValue();}),u(c)),c.setReadOnly(mm(l,"readOnly",!1)),c}return s(i,[{key:"readOnly",get:function(){return !this._click.enable},set:function(t){this._click.enable=!t;}},{key:"setReadOnly",value:function(t){return void 0===t&&(t=!0),this.readOnly=t,this}}]),i}(km),xm={name:"ToggleSwitchInput",accept:function(t){return !!t.hasOwnProperty("view")&&"toggleSwitch"===t.view},build:function(t,e){var i=t.scene;t.type="rexTweaker.ToggleSwitchInput";var n=e.toggleSwitch,r=function(t,e){var i=new bm(t,e);return t.add.existing(i),i}(i,n),s=n.size;void 0!==s&&r.setSize(s,s);var o=void 0!==s?0:1;t.addSpace().add(r,{proportion:0,expand:!1,fitRatio:o,key:"toggleSwitch"}),r.on("valuechange",(function(e){t.setValue(e);}));},displayValue:function(t,e){t.getElement("toggleSwitch").setValue(e);}},Cm={setWrapEnable:function(t){return void 0===t&&(t=!0),this.listWrapEnable=t,this},setCreateButtonCallback:function(t){return this.listCreateButtonCallback=t,this},setCreateListBackgroundCallback:function(t){return this.listCreateBackgroundCallback=t,this},setButtonClickCallback:function(t){return this.listOnButtonClick=t,this},setButtonOverCallback:function(t){return this.listOnButtonOver=t,this},setButtonOutCallback:function(t){return this.listOnButtonOut=t,this},setListExpandDirection:function(t){return "string"==typeof t&&(t=wm[t]),this.listExpandDirection=t,this},setListEaseInDuration:function(t){return void 0===t&&(t=0),this.listEaseInDuration=t,this},setListEaseOutDuration:function(t){return void 0===t&&(t=0),this.listEaseOutDuration=t,this},setListTransitInCallback:function(t){return this.listTransitInCallback=t,this},settListTransitOutCallback:function(t){return this.listTransitOutCallback=t,this},setListBounds:function(t){return this.listBounds=t,this},setListWidth:function(t){return this.listWidth=t,this},setListHeight:function(t){return this.listHeight=t,this},setListSize:function(t,e){return this.setListWidth(t).setListHeight(e),this},setListAlignmentMode:function(t){return this.listAlignMode=t,this},setListAlignmentSide:function(t){return void 0===t&&(t=""),this.listAlignSide=t,this},setListSpace:function(t){return void 0===t&&(t={}),this.listSpace=t,this},setListDraggable:function(t){return void 0===t&&(t=!0),this.listDraggable=t,this}},wm={down:0,up:1},Sm=function(){var t,e=this.scene,i=this.listCreateBackgroundCallback;i&&(t=i.call(this,e),e.add.existing(t));var n=[],r=this.listCreateButtonCallback;if(r)for(var s=this.options,o=0,a=s.length;o1?i-1:0),r=1;r0&&void 0!==t.setTint},useAlphaFadeEffect:function(t){return (void 0===this.fadeMode||1===this.fadeMode)&&this.fadeTime>0&&void 0!==t.setAlpha},useRevealEffect:function(t){return this.fadeMode>=2&&this.fadeMode<=5&&this.fadeTime>0&&(t.preFX||t.postFX)},fadeBob:function(t,e,i,n){var r=t.gameObject;if(this.useTintFadeEffect(r))void 0!==e&&t.setProperty("tintGray",255*e),t.easeProperty("tintGray",Math.floor(255*i),this.fadeTime,"Linear",0,!1,n);else if(this.useAlphaFadeEffect(r))void 0!==e&&t.setProperty("alpha",e),t.easeProperty("alpha",i,this.fadeTime,"Linear",0,!1,n);else if(this.useRevealEffect(r)){var s;switch(rh(r,"reveal"),this.fadeMode){case 2:s="revealUp";break;case 3:s="revealDown";break;case 4:s="revealLeft";break;case 5:s="revealRight";}void 0===e&&(e=0),r[s]=e,t.easeProperty(s,i,this.fadeTime,"Linear",0,!1,n),t.getTweenTask(s).once("complete",(function(){r[s]=null;}));}else n&&n(r);return this}},Vm=Phaser.Events.EventEmitter,Hm=function(t,e,i,n,r,s){return void 0===s?s={}:!0===s&&(s=Nm),"number"!=typeof i&&(i=0,n=0),s.x=r.x+r.width*t+i,s.y=r.y+r.height*e+n,s},Nm={},Um=function(t,e,i,n,r,s,o){if(t.hasOwnProperty("vp"))return t;"function"==typeof i&&(o=i,i=void 0),"function"==typeof r&&(o=r,r=void 0),void 0===i&&(i=.5),void 0===n&&(n=.5),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=Hm),function(t){if(t.events)return t;var e=new Vm,i=t.x;Object.defineProperty(t,"x",{get:function(){return i},set:function(n){i!==n&&(i=n,e.emit("update",t));}});var n=t.y;Object.defineProperty(t,"y",{get:function(){return n},set:function(i){n!==i&&(n=i,e.emit("update",t));}});var r=t.width;Object.defineProperty(t,"width",{get:function(){return r},set:function(i){r!==i&&(r=i,e.emit("update",t));}});var s=t.height;Object.defineProperty(t,"height",{get:function(){return s},set:function(i){s!==i&&(s=i,e.emit("update",t));}}),t.events=e;}(e);var a=e.events;t.vp=e;var h=function(){o(i,n,r,s,e,t);};a.on("update",h),t.once("destroy",(function(){a.off("update",h),t.vp=void 0;})),Object.defineProperty(t,"vpx",{get:function(){return i},set:function(t){i!==t&&(i=t,h());}}),Object.defineProperty(t,"vpy",{get:function(){return n},set:function(t){n!==t&&(n=t,h());}}),Object.defineProperty(t,"vpxOffset",{get:function(){return r},set:function(t){r!==t&&(r=t,h());}}),Object.defineProperty(t,"vpyOffset",{get:function(){return s},set:function(t){s!==t&&(s=t,h());}}),h();},Km=Phaser.Utils.Array.Remove,Jm={has:function(t){return this.bobs.hasOwnProperty(t)},exists:function(t){return this.bobs.hasOwnProperty(t)},get:function(t){return this.bobs[t]},getGO:function(t){var e=this.get(t);return e?e.gameObject:null},addGO:function(t,e){this.remove(t,!0),this.useTintFadeEffect(e)&&function(t,e){if(t.hasOwnProperty("tintR"))return t;void 0===e&&(e=16777215);var i=hm(e),n=lm(e),r=um(e);Object.defineProperty(t,"tint",{get:function(){return e},set:function(s){s=16777215&Math.floor(s),t.setTint&&t.setTint(s),e!==s&&(i=hm(e=s),n=lm(e),r=um(e));}}),Object.defineProperty(t,"tintR",{get:function(){return i},set:function(n){n=255&Math.floor(n),i!==n&&(i=n,t.tint=(255&n)<<16|65535&e);}}),Object.defineProperty(t,"tintG",{get:function(){return n},set:function(i){i=255&Math.floor(i),n!==i&&(n=i,t.tint=(255&i)<<8|16711935&e);}}),Object.defineProperty(t,"tintB",{get:function(){return r},set:function(i){i=255&Math.floor(i),r!==i&&(r=i,t.tint=255&i|16776960&e);}}),Object.defineProperty(t,"tintGray",{get:function(){return Math.floor((i+n+r)/3)},set:function(e){e=255&Math.floor(e),i===e&&n===e&&r===e||(i=e,n=e,r=e,t.tint=(255&e)<<16|(255&e)<<8|255&e);}}),t.tint=e;}(e),this.viewportCoordinateEnable&&Um(e,this.viewport),this.effectPropertiesConfig&&rh(e,this.effectPropertiesConfig),e.once("destroy",(function(){Km(this.removedGOs,e),this.isEmpty&&this.emit("empty");}),this);var i=new this.BobClass(this,e,t);return this.bobs[t]=i,this},add:function(t){for(var e=this.createGameObjectCallback,i=this.createGameObjectScope,n=arguments.length,r=new Array(n>1?n-1:0),s=1;s2?n-2:0),s=2;sh;u--){for(c=0;c0&&this.wrapMode!==qh&&0===this.wrapWidth}},{key:"setStyle",value:function(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("wordWrap")){var n=t.wordWrap;n.hasOwnProperty("width")&&(t.wrap={mode:"word",width:n.width});}if(t&&t.hasOwnProperty("wrap")){var r=t.wrap;if(r.hasOwnProperty("mode")){var s=r.mode;"string"==typeof s&&(r.mode=nl[s]);}else r.hasOwnProperty("width")&&(r.mode=1);}t&&t.rtl&&i&&!t.hasOwnProperty("halign")&&(t.halign="right"),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");var o=this.propertyMap;for(var a in o){var h=o[a],l=h[0],u=i?h[1]:this[a],c=h[2];if("wrapCallback"===a||"wrapCallbackScope"===a)this[a]=el(t,l,u);else {var d=tl(t,l,u);c&&(d=c(d)),this[a]=d;}}var f=el(t,"font",null);this._font=null===f?this.fontStyle+" "+this.fontSize+" "+this.fontFamily:f;var v=el(t,"fill",null);null!==v&&(this.color=Gh(v));var p=el(t,"metrics",!1);return p?this.metrics={ascent:el(p,"ascent",0),descent:el(p,"descent",0),fontSize:el(p,"fontSize",0)}:!e&&this.metrics||(this.metrics=Nh(this)),e?this.parent.updateText():this.parent}},{key:"syncFont",value:function(t,e){e.font=this._font;}},{key:"syncStyle",value:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round";}},{key:"syncShadow",value:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0);}},{key:"update",value:function(t){return t&&(this._font="".concat(this.fontStyle," ").concat(this.fontSize," ").concat(this.fontFamily).trim(),this.metrics=Nh(this)),this.parent.updateText(t)}},{key:"buildFont",value:function(){var t="".concat(this.fontStyle," ").concat(this.fontSize," ").concat(this.fontFamily).trim();return t!==this._font&&(this._font=t),this}},{key:"setFont",value:function(t){return "string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=el(t,"fontFamily","Courier"),this.fontSize=el(t,"fontSize","16px"),this.fontStyle=el(t,"fontStyle","")),this.update(!0)}},{key:"setFontFamily",value:function(t){return this.fontFamily=t,this.update(!0)}},{key:"setFontStyle",value:function(t){return this.fontStyle=t,this.update(!0)}},{key:"setFontSize",value:function(t){return "number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)}},{key:"setTestString",value:function(t){return this.testString=t,this.update(!0)}},{key:"setFixedSize",value:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(this.isWrapFitMode)}},{key:"setResolution",value:function(t){return this.resolution=t,this.update(!1)}},{key:"setLineSpacing",value:function(t){return this.lineSpacing=t,this.update(!1)}},{key:"setXOffset",value:function(t){return this.xOffset=t,this.update(!1)}},{key:"setBackgroundColor",value:function(t,e,i){return void 0===i&&(i=!0),this.backgroundColor=Gh(t,this.parent.canvas,this.parent.context),this.backgroundColor2=Gh(e,this.parent.canvas,this.parent.context),this.backgroundHorizontalGradient=i,this.update(!1)}},{key:"setBackgroundStrokeColor",value:function(t,e){return this.backgroundStrokeColor=Gh(t,this.parent.canvas,this.parent.context),this.backgroundStrokeLineWidth=e,this.update(!1)}},{key:"setBackgroundCornerRadius",value:function(t,e){return this.backgroundCornerRadius=t,this.backgroundCornerIteration=e,this.update(!1)}},{key:"setFill",value:function(t){return this.color=Gh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setColor",value:function(t){return this.color=Gh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setStroke",value:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=Gh(t,this.parent.canvas,this.parent.context),this.strokeThickness=e),this.update(!0)}},{key:"setShadow",value:function(t,e,i,n,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===s&&(s=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=Gh(i,this.parent.canvas,this.parent.context),this.shadowBlur=n,this.shadowStroke=r,this.shadowFill=s,this.update(!1)}},{key:"setShadowOffset",value:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)}},{key:"setShadowColor",value:function(t){return void 0===t&&(t="#000"),this.shadowColor=Gh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setShadowBlur",value:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)}},{key:"setShadowStroke",value:function(t){return this.shadowStroke=t,this.update(!1)}},{key:"setShadowFill",value:function(t){return this.shadowFill=t,this.update(!1)}},{key:"setUnderline",value:function(t,e,i){return void 0===t&&(t="#000"),void 0===e&&(e=0),void 0===i&&(i=0),this.underlineColor=Gh(t,this.parent.canvas,this.parent.context),this.underlineThickness=e,this.underlineOffset=i,this.update(!1)}},{key:"setUnderlineColor",value:function(t){return void 0===t&&(t="#000"),this.underlineColor=Gh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setUnderlineThickness",value:function(t){return void 0===t&&(t=0),this.underlineThickness=t,this.update(!1)}},{key:"setUnderlineOffset",value:function(t){return void 0===t&&(t=0),this.underlineOffset=t,this.update(!1)}},{key:"setStrikethrough",value:function(t,e,i){return void 0===t&&(t="#000"),void 0===e&&(e=0),void 0===i&&(i=0),this.strikethroughColor=Gh(t,this.parent.canvas,this.parent.context),this.strikethroughThickness=e,this.strikethroughOffset=i,this.update(!1)}},{key:"setStrikethroughColor",value:function(t){return void 0===t&&(t="#000"),this.strikethroughColor=Gh(t,this.parent.canvas,this.parent.context),this.update(!1)}},{key:"setStrikethroughThickness",value:function(t){return void 0===t&&(t=0),this.strikethroughThickness=t,this.update(!1)}},{key:"setStrikethroughOffset",value:function(t){return void 0===t&&(t=0),this.strikethroughOffset=t,this.update(!1)}},{key:"setWrapMode",value:function(t){return "string"==typeof t&&(t=nl[t.toLowerCase()]||0),this.wrapMode=t,this.update(!0)}},{key:"setWrapWidth",value:function(t){return this.wrapWidth=t,this.update(!1)}},{key:"setAlign",value:function(t,e){return void 0===t&&(t="left"),void 0===e&&(e="top"),this.halign=t,this.valign=e,this.update(!1)}},{key:"setHAlign",value:function(t){return void 0===t&&(t="left"),this.halign=t,this.update(!1)}},{key:"setVAlign",value:function(t){return void 0===t&&(t="top"),this.valign=t,this.update(!1)}},{key:"setMaxLines",value:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)}},{key:"getTextMetrics",value:function(){var t=this.metrics;return {ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}}},{key:"setTextMetrics",value:function(t,e){return this.metrics.ascent=t.ascent,this.metrics.descent=t.descent,this.metrics.fontSize=t.fontSize,e&&("string"==typeof e?(this.fontFamily=e,this.fontSize="",this.fontStyle=""):(this.fontFamily=el(e,"fontFamily",this.fontFamily),this.fontSize=el(e,"fontSize",this.fontSize),this.fontStyle=el(e,"fontStyle",this.fontStyle))),this.parent.updateText(!0)}},{key:"lineHeight",get:function(){return this.metrics.fontSize+this.strokeThickness+this.lineSpacing}},{key:"toJSON",value:function(){var t={},e=this.propertyMap;for(var i in e)t[i]=this[i];return t.metrics=this.getTextMetrics(),t}},{key:"destroy",value:function(){this.parent=void 0;}}]),t}(),nl={none:qh,word:Zh,char:$h,character:$h},rl=Phaser.Math.DegToRad,sl=function(t){return !t.hasOwnProperty("convex")||t.convex},ol=function(t){return t.x>0&&t.y>0},al=function(t,e,i,n,r,s,o,a,h){if(a&&o>s?o-=360:!a&&o=f?1:n/f,g=r>=v?1:r/v,y=d.cornerRadius;t.save(),t.beginPath(),t.translate(e,i),a=y.tl,ol(a)?(h=a.x*p,l=a.y*g,sl(a)?al(t,h,l,h,l,180,270,!1,o):al(t,0,0,h,l,90,0,!0,o),u=0,c=l):(t.lineTo(0,0),u=0,c=0),a=y.tr,ol(a)?(h=a.x*p,l=a.y*g,sl(a)?al(t,n-h,l,h,l,270,360,!1,o):al(t,n,0,h,l,180,90,!0,o)):t.lineTo(n,0),a=y.br,ol(a)?(h=a.x*p,l=a.y*g,sl(a)?al(t,n-h,r-l,h,l,0,90,!1,o):al(t,n,r,h,l,270,180,!0,o)):t.lineTo(n,r),a=y.bl,ol(a)?(h=a.x*p,l=a.y*g,sl(a)?al(t,h,r-l,h,l,90,180,!1,o):al(t,0,r,h,l,360,270,!0,o)):t.lineTo(0,r),t.lineTo(u,c),t.closePath(),t.restore();}(e,i,n,r,s,o,d),null!=a){var f;if(null!=u)(f=c?e.createLinearGradient(0,0,r,0):e.createLinearGradient(0,0,0,s)).addColorStop(0,a),f.addColorStop(1,u),a=f;e.fillStyle=a,e.fill();}null!=h&&l>0&&(e.strokeStyle=h,e.lineWidth=l,e.stroke());},ll=function(t,e,i,n,r,s,o,a){if(null!=e||null!=i){var h=t.canvas.width,l=t.canvas.height;null==i&&(n=0);var u=n/2;h=Math.max(1,h-n),l=Math.max(1,l-n),hl(t.canvas,t.context,u,u,h,l,r,e,i,n,s,o,a);}},ul={draw:function(t,e,i,n){var r=this.penManager;this.hitAreaManager.clear();var s=this.context;s.save();var o=this.defaultStyle;this.clear(),ll(this,o.backgroundColor,o.backgroundStrokeColor,o.backgroundStrokeLineWidth,o.backgroundCornerRadius,o.backgroundColor2,o.backgroundHorizontalGradient,o.backgroundCornerIteration),t+=this.startXOffset,e+=this.startYOffset;var a,h,l,u,c,d,f=o.halign,v=o.valign,p=o.lineHeight,g=r.lines,y=g.length,k=o.maxLines;k>0&&y>k?(h=k,l="center"===v?Math.floor((y-h)/2):"bottom"===v?y-h:0):(h=y,l=0),u=l+h;var m=this.rtl,b=m?this.parent.width:void 0;d="center"===v?Math.max((n-h*p)/2,0):"bottom"===v?Math.max(n-h*p-2,0):0,d+=e;for(var x=l;x0&&t.width>0){var a=i+o.underlineOffset-o.underlineThickness/2;this.drawLine(e,a,t.width,o.underlineThickness,o.underlineColor,o);}if(t.isTextPen&&this.drawText(e,i,t.text,o),t.isImagePen&&this.drawImage(e,i,t.prop.img,o),o.strikethroughThickness>0&&t.width>0){a=i+o.strikethroughOffset-o.strikethroughThickness/2;this.drawLine(e,a,t.width,o.strikethroughThickness,o.strikethroughColor,o);}if(s.restore(),t.hasAreaMarker&&t.width>0){var h,l=t.prop.area;if(l)h={key:l};else {var u=t.prop.url;h={key:"url:".concat(u),url:u};}this.hitAreaManager.add(e,i-this.startYOffset,t.width,this.defaultStyle.lineHeight,h);}},clear:function(){var t=this.canvas;this.context.clearRect(0,0,t.width,t.height);},drawLine:function(t,e,i,n,r,s){this.autoRound&&(t=Math.round(t),e=Math.round(e));var o=this.context;s.syncShadow(o,s.shadowStroke);var a=o.lineCap;o.lineCap="butt",o.strokeStyle=r,o.lineWidth=n,o.beginPath(),o.moveTo(t,e),o.lineTo(t+i,e),o.stroke(),o.lineCap=a;},drawText:function(t,e,i,n){this.autoRound&&(t=Math.round(t),e=Math.round(e));var r=this.context;n.stroke&&"none"!==n.stroke&&n.strokeThickness>0&&(n.syncShadow(r,n.shadowStroke),r.strokeText(i,t,e)),n.color&&"none"!==n.color&&(n.syncShadow(r,n.shadowFill),r.fillText(i,t,e));},drawImage:function(t,e,i,n){e-=this.startYOffset,this.parent.imageManager.draw(i,this.context,t,e,this.autoRound);}},cl=Phaser.Utils.Objects.GetValue,dl=Uh,fl=Kh,vl=function(){function t(e){n(this,t),this.prop={},this.resetFromJSON(e);}return s(t,[{key:"resetFromJSON",value:function(t){this.text=cl(t,"text",""),this.x=cl(t,"x",0),this.y=cl(t,"y",0),this.width=cl(t,"width",0);var e=cl(t,"prop",null);null===e&&(e={}),this.prop=e,this.newLineMode=cl(t,"newLineMode",0),this.startIndex=cl(t,"startIndex",0);}},{key:"plainText",get:function(){var t=this.text;return this.newLineMode===fl&&(t+="\n"),t}},{key:"wrapText",get:function(){var t=this.text;return this.newLineMode!==dl&&(t+="\n"),t}},{key:"rawTextLength",get:function(){var t=this.text.length;return this.newLineMode===fl&&(t+=1),t}},{key:"endIndex",get:function(){return this.startIndex+this.rawTextLength}},{key:"lastX",get:function(){return this.x+this.width}},{key:"isTextPen",get:function(){return ""!==this.text}},{key:"isImagePen",get:function(){return !!this.prop.img}},{key:"hasAreaMarker",get:function(){return !!this.prop.area||!!this.prop.url}}]),t}(),pl=Phaser.Utils.Objects.GetFastValue,gl=Uh,yl=Jh,kl=function(){function t(e){n(this,t),this.pens=[],this.lines=[],this.maxLinesWidth=void 0,this.pensPool=e.pensPool,this.linesPool=e.linesPool,this.tagToText=pl(e,"tagToText",Ye),this.tagToTextScope=pl(e,"tagToTextScope",void 0);}return s(t,[{key:"destroy",value:function(){this.clear(),this.tagToText=void 0,this.tagToTextScope=void 0;}},{key:"clear",value:function(){for(var t=0,e=this.lines.length;t=this.lines.length)return this.getLineEndIndex(t);var e=this.lines[t];return e&&e[0]?e[0].startIndex:0}},{key:"getLineEndIndex",value:function(t){t>=this.lines.length&&(t=this.lines.length-1);var e,i,n=!1;for(e=t;e>=0&&!(n=null!=(i=this.lines[e])&&i.length>0);e--);return n?i[i.length-1].endIndex:0}},{key:"getLineWidth",value:function(t){var e=this.lines[t];if(!e)return 0;var i=e[e.length-1];return null==i?0:i.lastX}},{key:"getMaxLineWidth",value:function(){if(void 0!==this.maxLinesWidth)return this.maxLinesWidth;for(var t,e=0,i=0,n=this.lines.length;ie&&(e=t);return this.maxLinesWidth=e,e}},{key:"getLineWidths",value:function(){for(var t=[],e=0,i=this.lines.length;e=t&&h<=e||(o=o.substring(t-a,e-a)),this.tagToTextScope?c+=this.tagToText.call(this.tagToTextScope,o,l,u):c+=this.tagToText(o,l,u),u=l,!(h>=e)));d++);return c}},{key:"length",get:function(){return this.lines.length},set:function(t){this.clear();}}]),t}(),ml={},bl=function(){function t(){n(this,t),this.items=[];}return s(t,[{key:"destroy",value:function(){this.clear(),this.items=void 0;}},{key:"pop",value:function(){return this.items.length>0?this.items.pop():null}},{key:"push",value:function(t){return this.items.push(t),this}},{key:"pushMultiple",value:function(t){return this.items.push.apply(this.items,t),t.length=0,this}},{key:"clear",value:function(){return this.items.length=0,this}}]),t}(),xl=Phaser.Geom.Rectangle,Cl=new bl,wl=function(){function t(){n(this,t),this.hitAreas=[];}return s(t,[{key:"destroy",value:function(){this.clear();}},{key:"clear",value:function(){for(var t=0,e=this.hitAreas.length;tr){""!==S?a.push(o.getLine(S,P,Ml)):0===T&&s>0&&a.push(o.getLine("",0,Ml)),a.push.apply(a,y(t(b,i,Dl,r,0,o)));var E=a.pop();S=E.text,P=E.width,o.freeLine(E)," "===S&&(S="",P=0);}else (w=P+x)>l?(a.push(o.getLine(S,P,Ml)),S=b,P=x,l=r):(S+=b,P=w),C&&a.push(o.getLine(S,P,u));}return a},zl=Phaser.Utils.Objects.GetValue,Bl=qh,Il=Uh,Wl=function(){function t(e){n(this,t),this.parent=e.parent,this.scene=this.parent.scene,this.context=zl(e,"context",null),this.canvas=this.context.canvas,this.parser=zl(e,"parser",null),this.defaultStyle=zl(e,"style",null),this.autoRound=!0,this.pensPool=e.pensPool,this.linesPool=e.linesPool,this.wrapTextLinesPool=e.wrapTextLinesPool,this.penManager=this.newPenManager(),this._tmpPenManager=null,this.hitAreaManager=new wl,this.lastHitAreaKey=null,this.urlTagCursorStyle=null;var i=this.context;this.getTextWidth=function(t){return i.measureText(t).width};}return s(t,[{key:"destroy",value:function(){this.parent=void 0,this.scene=void 0,this.context=void 0,this.canvas=void 0,this.parser=void 0,this.defaultStyle=void 0,this.penManager&&(this.penManager.destroy(),this.penManager=void 0),this._tmpPenManager&&(this._tmpPenManager.destroy(),this._tmpPenManager=void 0),this.hitAreaManager&&(this.hitAreaManager.destroy(),this.hitAreaManager=void 0),this.pensPool=void 0,this.linesPool=void 0,this.wrapTextLinesPool=void 0;}},{key:"updatePenManager",value:function(t,e,i,n,r){if(void 0===r&&(r=this.penManager),r.clear(),""===t)return r;var s=this.parent.style;if(s.isWrapFitMode){var o=this.parent.padding;i=s.fixedWidth-o.left-o.right;}for(var a,h,l,u,c,d=this.canvas,f=this.context,v=function(t){return f.measureText(t).width},p=0,g=0,y=s.wrapCallback,k=s.wrapCallbackScope,m=!0,b=this.parser.splitText(t),x=this.wrapTextLinesPool,C=0,w=b.length;C0&&e!==Bl&&i0&&t>e&&(t=e),t}},{key:"linesWidth",get:function(){return Math.ceil(this.penManager.getMaxLineWidth())}},{key:"linesHeight",get:function(){var t=this.desplayLinesCount,e=this.defaultStyle.lineHeight*t;return t>0&&(e-=this.defaultStyle.lineSpacing),e}},{key:"imageManager",get:function(){return this.parent.imageManager}},{key:"rtl",get:function(){return this.parent.style.rtl}},{key:"newPenManager",value:function(){return new kl({pensPool:this.pensPool,linesPool:this.linesPool,tagToText:this.parser.propToTagText,tagToTextScope:this.parser})}},{key:"tmpPenManager",get:function(){return null===this._tmpPenManager&&(this._tmpPenManager=this.newPenManager()),this._tmpPenManager}},{key:"getPlainText",value:function(t,e,i){var n;if(null==t)n=this.penManager.plainText;else {var r=this.parser.splitText(t,1);n="";for(var s=0,o=r.length;s0}},{key:"drawX",get:function(){var t=this.x+this.leftSpace+this.offsetX-this.originX*this.width;return this.parent._textOX*this.scrollFactorX+t}},{key:"drawY",get:function(){var t=this.y+this.offsetY;return this.parent._textOY*this.scrollFactorY+t}},{key:"drawTLX",get:function(){return 0}},{key:"drawTLY",get:function(){return 0}},{key:"drawBLX",get:function(){return 0}},{key:"drawBLY",get:function(){return 0}},{key:"drawTRX",get:function(){return 0}},{key:"drawTRY",get:function(){return 0}},{key:"drawBRX",get:function(){return 0}},{key:"drawBRY",get:function(){return 0}},{key:"drawCenterX",get:function(){return (this.drawTRX+this.drawTLX)/2}},{key:"drawCenterY",get:function(){return (this.drawBLY+this.drawTLY)/2}}]),i}(Xu);Object.assign(hc.prototype,rc);var lc=function(t,e,i){return e.hasOwnProperty(t)?e[t]:i[t]},uc=Phaser.Utils.Objects.GetValue,cc=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,"background")).setScrollFactor(0),s.setColor(uc(r,"color",null),uc(r,"color2",null),uc(r,"horizontalGradient",!0)),s.setStroke(uc(r,"stroke",null),uc(r,"strokeThickness",2)),s.setCornerRadius(uc(r,"cornerRadius",0),uc(r,"cornerIteration",null)),s}return s(i,[{key:"color",get:function(){return this._color},set:function(t){t=Gh(t,this.canvas,this.context),this.setDirty(this._color!=t),this._color=t;}},{key:"color2",get:function(){return this._color2},set:function(t){t=Gh(t,this.canvas,this.context),this.setDirty(this._color2!=t),this._color2=t;}},{key:"horizontalGradient",get:function(){return this._horizontalGradient},set:function(t){this.setDirty(this._horizontalGradient!=t),this._horizontalGradient=t;}},{key:"setColor",value:function(t,e,i){return void 0===i&&(i=!0),this.color=t,this.color2=e,this.horizontalGradient=i,this}},{key:"stroke",get:function(){return this._stroke},set:function(t){t=Gh(t,this.canvas,this.context),this.setDirty(this._stroke!=t),this._stroke=t;}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this.setDirty(this._strokeThickness!=t),this._strokeThickness=t;}},{key:"setStroke",value:function(t,e){return null!=t&&void 0===e&&(e=2),this.stroke=t,this.strokeThickness=e,this}},{key:"cornerRadius",get:function(){return this._cornerRadius},set:function(t){this.setDirty(this._cornerRadius!=t),this._cornerRadius=t;}},{key:"cornerIteration",get:function(){return this._cornerIteration},set:function(t){this.setDirty(this._cornerIteration!=t),this._cornerIteration=t;}},{key:"modifyStyle",value:function(t){return t.hasOwnProperty("color")&&this.setColor(t.color,lc("color2",t,this),lc("horizontalGradient",t,this)),t.hasOwnProperty("stroke")&&this.setStroke(t.stroke,lc("strokeThickness",t,this)),t.hasOwnProperty("cornerRadius")&&this.setCornerRadius(t.cornerRadius,lc("cornerIteration",t,this)),this}},{key:"modifyPorperties",value:function(t){return v(h(i.prototype),"modifyPorperties",this).call(this,t),this.modifyStyle(t),this}},{key:"setCornerRadius",value:function(t,e){return this.cornerRadius=t,this.cornerIteration=e,this}},{key:"renderContent",value:function(){ll(this.parent,this.color,this.stroke,this.strokeThickness,this.cornerRadius,this.color2,this.horizontalGradient,this.cornerIteration);}}]),i}(hc),dc=Phaser.Utils.Objects.GetValue,fc=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,"innerbounds")).setScrollFactor(0),s.setColor(dc(r,"color",null),dc(r,"color2",null),dc(r,"horizontalGradient",!0)),s.setStroke(dc(r,"stroke",null),dc(r,"strokeThickness",2)),s}return s(i,[{key:"color",get:function(){return this._color},set:function(t){t=Gh(t,this.canvas,this.context),this.setDirty(this._color!=t),this._color=t;}},{key:"color2",get:function(){return this._color2},set:function(t){t=Gh(t,this.canvas,this.context),this.setDirty(this._color2!=t),this._color2=t;}},{key:"horizontalGradient",get:function(){return this._horizontalGradient},set:function(t){this.setDirty(this._horizontalGradient!=t),this._horizontalGradient=t;}},{key:"setColor",value:function(t,e,i){return void 0===i&&(i=!0),this.color=t,this.color2=e,this.horizontalGradient=i,this}},{key:"stroke",get:function(){return this._stroke},set:function(t){t=Gh(t,this.canvas,this.context),this.setDirty(this._stroke!=t),this._stroke=t;}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this.setDirty(this._strokeThickness!=t),this._strokeThickness=t;}},{key:"setStroke",value:function(t,e){return null!=t&&void 0===e&&(e=2),this.stroke=t,this.strokeThickness=e,this}},{key:"modifyPorperties",value:function(t){v(h(i.prototype),"modifyPorperties",this).call(this,t),t.hasOwnProperty("color")&&this.setColor(t.color,dc(t,"color2",null),dc(t,"horizontalGradient",!0)),t.hasOwnProperty("stroke")&&this.setStroke(t.stroke,dc(t,"strokeThickness",2));}},{key:"renderContent",value:function(){var t=this.parent.padding,e=t.left,i=t.top,n=this.parent.width-t.left-t.right,r=this.parent.height-t.top-t.bottom,s=this.context;if(null!=this.color){var o,a;if(null!=this.color2)(a=this.horizontalGradient?s.createLinearGradient(0,0,n,0):s.createLinearGradient(0,0,0,r)).addColorStop(0,this.color),a.addColorStop(1,this.color2),o=a;else o=this.color;s.fillStyle=o,s.fillRect(e,i,n,r);}null!=this.stroke&&this.strokeThickness>0&&(s.strokeStyle=this.stroke,s.lineWidth=this.strokeThickness,s.strokeRect(e,i,n,r));}}]),i}(hc),vc=Phaser.Utils.Objects.GetValue,pc=function(){function t(e,i){n(this,t),this.parent=e,this.set(i);}return s(t,[{key:"toJSON",value:function(){return {bold:this.bold,italic:this.italic,fontSize:this.fontSize,fontFamily:this.fontFamily,color:this.color,stroke:this.stroke,strokeThickness:this.strokeThickness,shaodwColor:this.shadowColor,shadowBlur:this.shadowBlur,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,offsetX:this.offsetX,offsetY:this.offsetY,leftSpace:this.leftSpace,rightSpace:this.rightSpace,backgroundHeight:this.backgroundHeight,backgroundBottomY:this.backgroundBottomY,align:this.align}}},{key:"set",value:function(t){return this.setBold(vc(t,"bold",!1)),this.setItalic(vc(t,"italic",!1)),this.setFontSize(vc(t,"fontSize","16px")),this.setFontFamily(vc(t,"fontFamily","Courier")),this.setColor(vc(t,"color","#fff")),this.setStrokeStyle(vc(t,"stroke",null),vc(t,"strokeThickness",0)),this.setShadow(vc(t,"shadowColor",null),vc(t,"shadowOffsetX",0),vc(t,"shadowOffsetY",0),vc(t,"shadowBlur",0)),this.setOffset(vc(t,"offsetX",0),vc(t,"offsetY",0)),this.setSpace(vc(t,"leftSpace",0),vc(t,"rightSpace",0)),this.setAlign(vc(t,"align",void 0)),this.setBackgroundColor(vc(t,"backgroundColor",null)),this.setBackgroundHeight(vc(t,"backgroundHeight",void 0)),this.setBackgroundBottomY(vc(t,"backgroundBottomY",void 0)),this}},{key:"modify",value:function(t){return t.hasOwnProperty("bold")&&this.setBold(t.bold),t.hasOwnProperty("italic")&&this.setItalic(t.italic),t.hasOwnProperty("fontSize")&&this.setFontSize(t.fontSize),t.hasOwnProperty("fontFamily")&&this.setFontFamily(t.fontFamily),t.hasOwnProperty("color")&&this.setColor(t.color),(t.hasOwnProperty("stroke")||t.hasOwnProperty("strokeThickness"))&&this.setStrokeStyle(lc("stroke",t,this),lc("strokeThickness",t,this)),t.hasOwnProperty("shadowColor")&&this.setShadowColor(t.shadowColor),(t.hasOwnProperty("shadowOffsetX")||t.hasOwnProperty("shadowOffsetY"))&&this.setShadowOffset(lc("shadowOffsetX",t,this),lc("shadowOffsetY",t,this)),t.hasOwnProperty("shadowBlur")&&this.setShadowBlur(t.shaodwBlur),t.hasOwnProperty("offsetX")&&this.setOffsetX(t.offsetX),t.hasOwnProperty("offsetY")&&this.setOffsetY(t.offsetY),t.hasOwnProperty("leftSpace")&&this.setLeftSpace(t.leftSpace),t.hasOwnProperty("rightSpace")&&this.setRightSpace(t.rightSpace),t.hasOwnProperty("align")&&this.setAlign(t.align),t.hasOwnProperty("backgroundColor")&&this.setBackgroundColor(t.backgroundColor),t.hasOwnProperty("backgroundHeight")&&this.setBackgroundHeight(t.backgroundHeight),t.hasOwnProperty("backgroundBottomY")&&this.setBackgroundBottomY(t.backgroundBottomY),this}},{key:"setUpdateTextFlag",value:function(){return this.parent&&(this.parent.updateTextFlag=!0),this}},{key:"clone",value:function(){return new t(null,this.toJSON())}},{key:"copyFrom",value:function(t){return this.set(t.toJSON()),this}},{key:"copyTo",value:function(t){return t.set(this.toJSON()),this}},{key:"setBold",value:function(t){return void 0===t&&(t=!0),this.bold=t,this.setUpdateTextFlag(),this}},{key:"setItalic",value:function(t){return void 0===t&&(t=!0),this.italic=t,this.setUpdateTextFlag(),this}},{key:"fontStyle",get:function(){return this.bold&&this.italic?"bold italic":this.bold?"bold":this.italic?"italic":""}},{key:"setFontSize",value:function(t){return "number"==typeof t&&(t="".concat(t,"px")),this.fontSize=t,this.setUpdateTextFlag(),this}},{key:"setFontFamily",value:function(t){return this.fontFamily=t,this.setUpdateTextFlag(),this}},{key:"font",get:function(){return "".concat(this.fontStyle," ").concat(this.fontSize," ").concat(this.fontFamily)}},{key:"setColor",value:function(t){return this.color=Gh(t),this}},{key:"hasFill",get:function(){return null!=this.color}},{key:"setStrokeStyle",value:function(t,e){return this.stroke=Gh(t),void 0!==e&&(this.strokeThickness=e),this}},{key:"setStrokeThickness",value:function(t){return this.strokeThickness=t,this}},{key:"hasStroke",get:function(){return null!=this.stroke&&this.strokeThickness>0}},{key:"setShadowColor",value:function(t){return this.shadowColor=Gh(t),this}},{key:"setShadowOffset",value:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.shadowOffsetX=t,this.shadowOffsetY=e,this}},{key:"setShadowBlur",value:function(t){return void 0===t&&(t=0),this.shaodwBlur=t,this}},{key:"setShadow",value:function(t,e,i,n){return this.setShadowColor(t).setShadowOffset(e,i).setShadowBlur(n),this}},{key:"setBackgroundColor",value:function(t){return this.backgroundColor=Gh(t),this}},{key:"hasBackgroundColor",get:function(){return null!=this.backgroundColor}},{key:"setBackgroundHeight",value:function(t){return this.backgroundHeight=t,this}},{key:"setBackgroundBottomY",value:function(t){return this.backgroundBottomY=t,this}},{key:"setOffsetX",value:function(t){return void 0===t&&(t=0),this.offsetX=t,this}},{key:"setOffsetY",value:function(t){return void 0===t&&(t=0),this.offsetY=t,this}},{key:"setOffset",value:function(t,e){return this.setOffsetX(t).setOffsetY(e),this}},{key:"setLeftSpace",value:function(t){return void 0===t&&(t=0),this.leftSpace=t,this}},{key:"setRightSpace",value:function(t){return void 0===t&&(t=0),this.rightSpace=t,this}},{key:"setSpace",value:function(t,e){return this.setLeftSpace(t).setRightSpace(e),this}},{key:"setAlign",value:function(t){return this.align=t,this}},{key:"syncFont",value:function(t){return t.font=this.font,this}},{key:"syncStyle",value:function(t){t.textBaseline="alphabetic";var e=this.hasFill,i=this.hasStroke;return t.fillStyle=e?this.color:"#000",t.strokeStyle=i?this.stroke:"#000",t.lineWidth=i?this.strokeThickness:0,t.lineCap="round",t.lineJoin="round",this}},{key:"syncShadow",value:function(t){null!=t.shadowColor?(t.shadowColor=this.shadowColor,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowBlur=this.shadowBlur):(t.shadowColor=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0);}},{key:"getTextMetrics",value:function(t,e){return this.syncFont(t).syncStyle(t),t.measureText(e)}}]),t}(),gc=Phaser.Utils.Array.Remove,yc=Phaser.Utils.Array.Remove,kc="text",mc="image",bc="drawer",xc="space",Cc="command",wc=function(t){return t.type===kc&&"\n"===t.text},Sc=function(t){return t.type===kc&&"\f"===t.text},Pc=function(t){return t.type===kc},Oc=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),(o=e.call(this,t,kc)).updateTextFlag=!1,o.style=new pc(u(o),s),o.setText(r),o}return s(i,[{key:"autoRound",get:function(){return this.parent.autoRound}},{key:"offsetX",get:function(){return this.style.offsetX},set:function(t){this.style&&(this.style.offsetX=t);}},{key:"offsetY",get:function(){return this.style.offsetY},set:function(t){this.style&&(this.style.offsetY=t);}},{key:"leftSpace",get:function(){return this.style.leftSpace*this.scaleX},set:function(t){this.style&&(this.style.leftSpace=t),g(h(i.prototype),"leftSpace",t,this,!0);}},{key:"rightSpace",get:function(){return this.style.rightSpace*this.scaleX},set:function(t){this.style&&(this.style.rightSpace=t),g(h(i.prototype),"rightSpace",t,this,!0);}},{key:"align",get:function(){return this.style.align},set:function(t){this.style&&(this.style.align=t);}},{key:"modifyStyle",value:function(t){return this.setDirty(!0),this.style.modify(t),this.updateTextFlag&&this.updateTextSize(),this}},{key:"modifyPorperties",value:function(t){return t?(this.modifyStyle(t),v(h(i.prototype),"modifyPorperties",this).call(this,t),this):this}},{key:"setText",value:function(t){return this.setDirty(this.text!=t),this.text=t,this.updateTextSize(),this}},{key:"updateTextSize",value:function(){var t=this.text;if("\n"===t||"\f"===t||""===t)this.clearTextSize();else {var e,i,n=this.style.getTextMetrics(this.context,this.text);this.textWidth=n.width,"actualBoundingBoxAscent"in n?(e=n.actualBoundingBoxAscent,i=n.actualBoundingBoxDescent):(e=0,i=0),this.textHeight=e+i,this.ascent=e,this.descent=i;}return this.updateTextFlag=!1,this}},{key:"clearTextSize",value:function(){return this.textWidth=0,this.textHeight=0,this.ascent=0,this.descent=0,this}},{key:"copyTextSize",value:function(t){return this.textWidth=t.textWidth,this.textHeight=t.textHeight,this.ascent=t.ascent,this.descent=t.descent,this}},{key:"width",get:function(){return this.textWidth*this.scaleX},set:function(t){this.textWidth>0?this.scaleX=t/this.textWidth:this.scaleX=1;}},{key:"height",get:function(){return this.textHeight*this.scaleY},set:function(t){this.textHeight>0?this.scaleY=t/this.textHeight:this.scaleY=1;}},{key:"willRender",get:function(){return 0!==this.textWidth&&v(h(i.prototype),"willRender",this)}},{key:"renderContent",value:function(){var t=this.context,e=this.style;if(e.hasBackgroundColor){t.fillStyle=e.backgroundColor;var i=this.drawTLX,n=this.drawTRX-i,r=e.backgroundBottomY;null==r&&(r=this.drawBLY);var s=e.backgroundHeight;null==s&&(s=r-this.drawTLY);var o=r-s;t.fillRect(i,o,n,s);}var a=e.hasFill,h=e.hasStroke;(a||h)&&(e.syncFont(t).syncStyle(t),h&&(e.syncShadow(t),t.strokeText(this.text,0,0)),a&&(e.syncShadow(t),t.fillText(this.text,0,0)));}},{key:"drawTLX",get:function(){return -this.leftSpace}},{key:"drawTLY",get:function(){return -this.ascent}},{key:"drawBLX",get:function(){return -this.leftSpace}},{key:"drawBLY",get:function(){return this.descent}},{key:"drawTRX",get:function(){return this.textWidth+this.rightSpace}},{key:"drawTRY",get:function(){return -this.ascent}},{key:"drawBRX",get:function(){return this.textWidth+this.rightSpace}},{key:"drawBRY",get:function(){return this.descent}}]),i}(hc),Tc=function(t,e){var i=this.createCharChildren(t,e);return this.addChild(i),this},_c=function(t){a(i,t);var e=d(i);function i(t,r,s){var o;return n(this,i),(o=e.call(this,t,mc)).setTexture(r,s),o}return s(i,[{key:"frameWidth",get:function(){return this.frameObj?this.frameObj.cutWidth:0}},{key:"frameHeight",get:function(){return this.frameObj?this.frameObj.cutHeight:0}},{key:"offsetY",get:function(){return -this.height},set:function(t){}},{key:"key",get:function(){return this._key},set:function(t){this.setDirty(this._key!=t),this._key=t;}},{key:"frame",get:function(){return this._frame},set:function(t){this.setDirty(this._frame!=t),this._frame=t;}},{key:"setTexture",value:function(t,e){return this.key=t,this.frame=e,this.frameObj=this.scene.sys.textures.getFrame(t,e),this}},{key:"width",get:function(){return this.frameWidth*this.scaleX},set:function(t){this.setDirty(this.width!==t),this.scaleX=t/this.frameWidth;}},{key:"height",get:function(){return this.frameHeight*this.scaleY},set:function(t){this.setDirty(this.height!==t),this.scaleY=t/this.frameHeight;}},{key:"setHeight",value:function(t,e){return void 0===e&&(e=!1),this.height=t,e&&(this.scaleX=this.scaleY),this}},{key:"renderContent",value:function(){var t=this.context,e=this.frameObj,i=this.frameWidth,n=this.frameHeight;t.drawImage(e.source.image,e.cutX,e.cutY,i,n,0,0,i,n);}},{key:"drawTLX",get:function(){return -this.leftSpace}},{key:"drawTLY",get:function(){return 0}},{key:"drawBLX",get:function(){return -this.leftSpace}},{key:"drawBLY",get:function(){return this.frameHeight}},{key:"drawTRX",get:function(){return this.frameWidth+this.rightSpace}},{key:"drawTRY",get:function(){return 0}},{key:"drawBRX",get:function(){return this.frameWidth+this.rightSpace}},{key:"drawBRY",get:function(){return this.frameHeight}}]),i}(hc),Ec=function(t){a(i,t);var e=d(i);function i(t,r,s,o){var a;return n(this,i),(a=e.call(this,t,bc)).setRenderCallback(r),a.setDrawerSize(s,o),a}return s(i,[{key:"setRenderCallback",value:function(t){return t?this.renderContent=t.bind(this):delete this.renderContent,this}},{key:"setDrawerSize",value:function(t,e){return !0===t?(this.toLocalPosition=!1,t=void 0,e=void 0):this.toLocalPosition=!0,void 0===t&&(t=0),void 0===e&&(e=t),this.drawerWidth=t,this.drawerHeight=e,this}},{key:"onFree",value:function(){v(h(i.prototype),"onFree",this).call(this),this.setRenderCallback();}},{key:"width",get:function(){return this.drawerWidth*this.scaleX},set:function(t){this.setDirty(this.width!==t),this.scaleX=this.drawerWidth>0?t/this.drawerWidth:1;}},{key:"height",get:function(){return this.drawerHeight*this.scaleY},set:function(t){this.setDirty(this.height!==t),this.scaleY=this.drawerHeight>0?t/this.drawerHeight:1;}},{key:"offsetY",get:function(){return -this.height},set:function(t){}},{key:"drawTLX",get:function(){return -this.leftSpace}},{key:"drawTLY",get:function(){return 0}},{key:"drawBLX",get:function(){return -this.leftSpace}},{key:"drawBLY",get:function(){return this.drawerHeight}},{key:"drawTRX",get:function(){return this.drawerWidth+this.rightSpace}},{key:"drawTRY",get:function(){return 0}},{key:"drawBRX",get:function(){return this.drawerWidth+this.rightSpace}},{key:"drawBRY",get:function(){return this.drawerHeight}}]),i}(hc),Mc=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,xc)).setSpaceWidth(r),s}return s(i,[{key:"width",get:function(){return this.spaceWidth*this.scaleX},set:function(t){this.spaceWidth>0?this.scaleX=t/this.spaceWidth:this.scaleX=1;}},{key:"setSpaceWidth",value:function(t){return this.spaceWidth=t,this}}]),i}(hc),Rc=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a){var h;return n(this,i),(h=e.call(this,t,Cc)).setName(r).setParameter(o).setCallback(s,a),h}return s(i,[{key:"setName",value:function(t){return this.name=t,this}},{key:"setParameter",value:function(t){return this.param=t,this}},{key:"setCallback",value:function(t,e){return this.callback=t,this.scope=e,this}},{key:"exec",value:function(){return this.scope?this.callback.call(this.scope,this.param,this.name):this.callback(this.param,this.name)}},{key:"onFree",value:function(){v(h(i.prototype),"onFree",this).call(this),this.setName().setCallback().setParameter();}}]),i}(Xu),Lc=function(t){var e={callback:void 0,start:0,isLastPage:!1,maxLines:void 0,padding:void 0,letterSpacing:void 0,hAlign:void 0,vAlign:void 0,children:[],lines:[],maxLineWidth:0,linesHeight:0,lineHeight:void 0,maxLineHeight:0,linesWidth:0,lineWidth:void 0};return Object.assign(e,t)},Dc=function(t,e,i,n){void 0===n&&(n={word:[],width:0}),n.word.length=0;for(var r=t.length,s=e,o=n.word,a=0;s0&&!a){var h=this.fixedHeight-n;if(i>0)s=h/i;else s=(l=zc.call(this)).height,o=l.ascent,i=Math.floor((h-o)/s);}else {var l;s=(l=zc.call(this)).height,o=l.ascent;}}else if(this.fixedHeight>0){if(void 0===(i=Ic(t,"maxLines"))){h=this.fixedHeight-n;i=Math.floor(h/s);}}else i=Ic(t,"maxLines",0);void 0===o&&(o=s);var u=0===i,c=Ic(t,"wrapWidth",void 0);void 0===c&&(c=this.fixedWidth>0?this.fixedWidth-r:1/0);for(var d=Ic(t,"letterSpacing",0),f=Ic(t,"hAlign",0),v=Ic(t,"vAlign",0),p=Ic(t,"charWrap",!1),g=Lc({callback:"runWordWrap",start:e,padding:this.wrapPadding,letterSpacing:d,maxLines:i,hAlign:f,vAlign:v,ascent:o,lineHeight:s,wrapWidth:c,charWrap:p}),y=this.children,k=0,m=y.length;k0&&(_.push({children:E,width:M}),R=Math.max(R,M)),g.start+=T.length,g.isLastPage=!L&&g.start===O,g.maxLineWidth=R,g.linesHeight=_.length*s;var W=this.fixedWidth>0?this.fixedWidth:g.maxLineWidth+r,F=this.fixedHeight>0?this.fixedHeight:g.linesHeight+n;!function(t,e,i){var n,r,s=t.hAlign,o=t.vAlign,a=t.linesHeight;switch(o){case 1:case"center":r=(i-a)/2;break;case 2:case"bottom":r=i-a;break;default:r=0;}for(var h=t.lines,l=0,u=h.length;l0?(o=this.fixedWidth-r)/i:0;else if(this.fixedWidth>0){if(void 0===(i=Yc(t,"maxLines",void 0))){var o=this.fixedWidth-r;i=Math.floor(o/s)+1;}}else i=Yc(t,"maxLines",0);var a=0===i,h=Yc(t,"fixedCharacterHeight",void 0);if(void 0===h){var l=Yc(t,"charPerLine",void 0);if(void 0!==l){var u=this.fixedHeight-n;h=Math.floor(u/l);}}var c=Yc(t,"wrapHeight",void 0);void 0===c&&(c=this.fixedHeight>0?this.fixedHeight-n:1/0);for(var d=Yc(t,"letterSpacing",0),f=Yc(t,"rtl",!0),v=Yc(t,"hAlign",f?2:0),p=Yc(t,"vAlign",0),g=Lc({callback:"runVerticalWrap",start:e,padding:this.wrapPadding,letterSpacing:d,maxLines:i,hAlign:v,vAlign:p,lineWidth:s,fixedCharacterHeight:h,wrapHeight:c,rtl:f}),y=this.children,k=0,m=y.length;k0&&(_.push({children:E,height:M}),R=Math.max(R,M)),g.start+=T.length,g.isLastPage=g.start===O,g.maxLineHeight=R,g.linesWidth=_.length*s;var B=this.fixedWidth>0?this.fixedWidth:g.linesWidth+r,I=this.fixedHeight>0?this.fixedHeight:g.maxLineHeight+n;!function(t,e,i){var n,r,s=t.hAlign,o=t.vAlign,a=t.rtl,h=t.lines,l=t.lineWidth,u=t.linesWidth;switch(s){case 1:case"center":n=(e-u)/2;break;case 2:case"right":n=e-u;break;default:n=0;}a&&(n+=l);for(var c=0,d=h.length;c0?t:this.width,e>0?e:this.height)),this},setPadding:function(t,e){var i=this.padding,n=i.left,r=i.right,s=i.top,o=i.bottom;return Li(i,t,e),this.dirty=this.dirty||n!=i.left||r!=i.right||s!=i.top||o!=i.bottom,this},getPadding:function(t){return Ri(this.padding,t)},modifyTextStyle:function(t){return this.textStyle.modify(t),this},modifyDefaultTextStyle:function(t){return this.defaultTextStyle.modify(t),this},resetTextStyle:function(){return this.textStyle.copyFrom(this.defaultTextStyle),this},setTestString:function(t){return this.testString=t,this},removeChild:function(t){return this.poolManager.free(t),gc(this.children,t),this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},removeChildren:function(){return this.poolManager.freeMultiple(this.children),this.children.length=0,this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},popChild:function(t){return yc(this.children,t),this.lastAppendedChildren.length=0,this.lastOverChild=null,this.dirty=!0,this},clearContent:function(){return this.setText(),this},addChild:function(t,e){var i,n,r,s=Array.isArray(t);void 0===e||e===this.children.length?s?(i=this.children).push.apply(i,y(t)):this.children.push(t):s?(n=this.children).splice.apply(n,[e,0].concat(y(t))):this.children.splice(e,0,t);(this.lastAppendedChildren.length=0,s)?(r=this.lastAppendedChildren).push.apply(r,y(t)):this.lastAppendedChildren.push(t);return this},createCharChild:function(t,e){e&&this.textStyle.modify(e);var i=this.poolManager.allocate(kc);return null===i?i=new Oc(this,t,this.textStyle):i.setParent(this).setActive().modifyStyle(this.textStyle).setText(t),i},createCharChildren:function(t,e){e&&this.textStyle.modify(e);for(var i=[],n=0,r=t.length;ne&&(n=e,r=t);})),r},getCharWorldPosition:function(t,e,i,n){return "number"==typeof t&&(t=this.getCharChild(t,!0)),nc(this,t,e,i,n)},setToMinSize:function(){for(var t=this.children,e=0,i=0,n=0,r=t.length;n=i.length&&(t=i.length);for(var n=0,r=0;r0,o=0,a=e.length;o0;this.dirty=this.dirty||this._radiusTL!==t||this._convexTL!==e,this._convexTL=e,this._radiusTL=Math.abs(t);}},{key:"radiusTR",get:function(){return this._radiusTR},set:function(t){var e=t>0;this.dirty=this.dirty||this._radiusTR!==t||this._convexTR!==e,this._convexTR=e,this._radiusTR=Math.abs(t);}},{key:"radiusBL",get:function(){return this._radiusBL},set:function(t){var e=t>0;this.dirty=this.dirty||this._radiusBL!==t||this._convexBL!==e,this._convexBL=e,this._radiusBL=Math.abs(t);}},{key:"radiusBR",get:function(){return this._radiusBR},set:function(t){var e=t>0;this.dirty=this.dirty||this._radiusBR!==t||this._convexBR!==e,this._convexBR=e,this._radiusBR=Math.abs(t);}},{key:"radius",get:function(){return Math.max(this.radiusTL,this.radiusTR,this.radiusBL,this.radiusBR)},set:function(t){"number"==typeof t?(this.radiusTL=t,this.radiusTR=t,this.radiusBL=t,this.radiusBR=t):(this.radiusTL=$d(t,"tl",0),this.radiusTR=$d(t,"tr",0),this.radiusBL=$d(t,"bl",0),this.radiusBR=$d(t,"br",0));}},{key:"setRadius",value:function(t){return void 0===t&&(t=0),this.radius=t,this}},{key:"iterations",get:function(){return this._iterations},set:function(t){this.dirty=this.dirty||this._iterations!==t,this._iterations=t;}},{key:"setIterations",value:function(t){return this.iterations=t,this}},{key:"updateData",value:function(){var t=this.pathData;t.length=0;var e,n=this.width,r=this.height,s=this.iterations+1;(e=this.radiusTL)>0?this._convexTL?Da(e,e,e,e,180,270,!1,s,t):Da(0,0,e,e,90,0,!0,s,t):Ra(0,0,t);(e=this.radiusTR)>0?this._convexTR?Da(n-e,e,e,e,270,360,!1,s,t):Da(n,0,e,e,180,90,!0,s,t):Ra(n,0,t);(e=this.radiusBR)>0?this._convexBR?Da(n-e,r-e,e,e,0,90,!1,s,t):Da(n,r,e,e,270,180,!0,s,t):Ra(n,r,t);(e=this.radiusBL)>0?this._convexBL?Da(e,r-e,e,e,90,180,!1,s,t):Da(0,r,e,e,360,270,!0,s,t):Ra(0,r,t);return t.push(t[0],t[1]),zd(this.x,this.y,t),v(h(i.prototype),"updateData",this).call(this),this}}]),i}(Md);Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha,Phaser.Math.Wrap;var tf=Phaser.Math.Linear,ef=function(){var t,e,i,n,r,s,o=this.getShape("triangle"),a=this.padding,h=this.width-a.right,l=0+a.left,u=this.height-a.bottom,c=0+a.top,d=(l+h)/2,f=(c+u)/2,v={0:{a:{x:l,y:c},b:{x:h,y:f},c:{x:l,y:u}},1:{a:{x:l,y:c},b:{x:d,y:u},c:{x:h,y:c}},2:{a:{x:h,y:c},b:{x:l,y:f},c:{x:h,y:u}},3:{a:{x:l,y:u},b:{x:d,y:c},c:{x:h,y:u}}};if(void 0===this.previousDirection){var p=v[this.direction],g=p.a,y=p.b,k=p.c;t=g.x,e=g.y,i=y.x,n=y.y,r=k.x,s=k.y;}else {var m=v[this.previousDirection],b=v[this.direction],x=this.easeDirectionProgress;t=tf(m.a.x,b.a.x,x),e=tf(m.a.y,b.a.y,x),i=tf(m.b.x,b.b.x,x),n=tf(m.b.y,b.b.y,x),r=tf(m.c.x,b.c.x,x),s=tf(m.c.y,b.c.y,x);}o.startAt(t,e).lineTo(i,n).lineTo(r,s),this.arrowOnly?o.end():o.close();},nf=(0, Phaser.Math.DegToRad)(120),rf=function(t){t=this.getShape("triangle");var e=this.width/2,i=this.height/2,n=Math.min(e,i)*this.radius,r=this.verticeRotation;t.startAt(e+n*Math.cos(r+nf),i+n*Math.sin(r+nf)).lineTo(e+n*Math.cos(r),i+n*Math.sin(r)).lineTo(e+n*Math.cos(r-nf),i+n*Math.sin(r-nf)),this.arrowOnly?t.end():t.close();},sf={buildShapes:function(){this.addShape((new Zd).setName("triangle"));},updateShapes:function(){var t=this.getShape("triangle");this.arrowOnly?t.fillStyle().lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha):t.fillStyle(this.fillColor,this.fillAlpha).lineStyle(this.lineWidth,this.strokeColor,this.strokeAlpha),0===this.shapeMode?ef.call(this):rf.call(this);}},of={setEaseDuration:function(t){return void 0===t&&(t=0),this.easeDuration=t,this},playEaseDirectionation:function(){return void 0===this.easeDirectionProgressTask&&(this.easeDirectionProgressTask=new nr(this,{eventEmitter:null})),this.easeDirectionProgressTask.restart({key:"easeDirectionProgress",from:0,to:1,duration:this.easeDuration}),this},stopEaseDirection:function(){return void 0===this.easeDirectionProgressTask||this.easeDirectionProgressTask.stop(),this}},af=Phaser.Utils.Objects.GetValue,hf=Phaser.Utils.Objects.IsPlainObject,lf=Phaser.Math.DegToRad,uf=Phaser.Math.RadToDeg,cf=function(t){a(r,t);var e=d(r);function r(t,i,s,o,a,h,l){var u,c,d,f,v,p,g,y,k;if(n(this,r),hf(i)){var m=i;i=m.x,s=m.y,o=m.width,a=m.height,h=m.color,l=m.alpha,c=m.strokeColor,d=m.strokeAlpha,f=m.strokeWidth,v=m.arrowOnly,p=m.direction,g=m.easeDuration,y=m.padding,k=m.radius;}return void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=1),void 0===a&&(a=o),void 0===v&&(v=!1),void 0===p&&(p=0),void 0===g&&(g=0),void 0===y&&(y=0),void 0===k&&(k=void 0),(u=e.call(this,t,i,s,o,a)).type="rexTriangle",u.setFillStyle(h,l),void 0!==c&&void 0===f&&(f=2),u.setStrokeStyle(f,c,d),u.setArrowOnly(v),u.setDirection(p,g),u.setPadding(y),u.setRadius(k),u.buildShapes(),u}return s(r,[{key:"arrowOnly",get:function(){return this._arrowOnly},set:function(t){this.dirty=this.dirty||this._arrowOnly!=t,this._arrowOnly=t;}},{key:"setArrowOnly",value:function(t){return void 0===t&&(t=!0),this.arrowOnly=t,this}},{key:"direction",get:function(){return this._direction},set:function(t){t=ff(t),this._direction!==t&&(this.easeDuration>0&&void 0!==this._direction?this.previousDirection=this._direction:this.previousDirection=void 0,this._direction=t,this.verticeAngle=90*t,this.dirty=!0,void 0!==this.previousDirection?this.playEaseDirectionation():this.stopEaseDirection());}},{key:"setDirection",value:function(t,e){return void 0!==e&&this.setEaseDuration(e),this.direction=t,this}},{key:"toggleDirection",value:function(t){return this.setDirection(this.direction+2,t),this}},{key:"easeDirectionProgress",get:function(){return this._easeDirectionProgress},set:function(t){this._easeDirectionProgress!==t&&(this._easeDirectionProgress=t,this.dirty=!0);}},{key:"setPadding",value:function(t,e,n,r){if("object"===i(t)){var s=t,o=af(s,"x",null);null!==o?(t=o,n=o):(t=af(s,"left",0),n=af(s,"right",t));var a=af(s,"y",null);null!==a?(e=a,r=a):(e=af(s,"top",0),r=af(s,"bottom",e));}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===n&&(n=t),void 0===r&&(r=e);return void 0===this.padding&&(this.padding={}),this.dirty=this.dirty||this.padding.left!=t||this.padding.top!=e||this.padding.right!=n||this.padding.bottom!=r,this.padding.left=t,this.padding.top=e,this.padding.right=n,this.padding.bottom=r,this.setRadius(),this}},{key:"radius",get:function(){return this._radius},set:function(t){this.dirty=this.dirty||this._radius!=t,this._radius=t;}},{key:"setRadius",value:function(t){return this.radius=t,this.shapeMode=null==t?0:1,this}},{key:"verticeRotation",get:function(){return this._verticeRotation},set:function(t){this.dirty=this.dirty||this._verticeRotation!=t,this._verticeRotation=t;}},{key:"setVerticeRotation",value:function(t){return this.verticeRotation=t,this}},{key:"verticeAngle",get:function(){return uf(this.verticeRotation)},set:function(t){this.verticeRotation=lf(t);}},{key:"setVerticeAngle",value:function(t){return this.verticeAngle=t,this}}]),r}(Od),df={right:0,down:1,left:2,up:3},ff=function(t){return "string"==typeof t&&(t=df[t]),t%=4};Object.assign(cf.prototype,sf,of);var vf=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),(s=e.call(this,t,r)).type="rexTweaker.FolderTitle";var o=new cf(t,r.expandedIcon);return t.add.existing(o),s.addSpace().add(o,{proportion:0,expand:!1,padding:1,fitRatio:1}),s.addChildrenMap("expandedIcon",o),s}return s(i,[{key:"setExpandedState",value:function(t){void 0===t&&(t=!0);var e=t?"down":"right";return this.childrenMap.expandedIcon.setDirection(e),this}}]),i}(bd),pf=function(t,e){var i=new bp(t,e);return t.add.existing(i),i},gf=function(t,e,i){return Dh(t,i)},yf=function(t){a(i,t);var e=d(i);function i(t,r){return n(this,i),void 0===r&&(r={}),r.destroy=!1,e.call(this,t,r)}return s(i,[{key:"onOpen",value:function(){this.emit("open",this.parent,this),v(h(i.prototype),"onOpen",this).call(this);}},{key:"onClose",value:function(){this.emit("close",this.parent,this),v(h(i.prototype),"onClose",this).call(this);}}]),i}(Er),kf={expand:function(t){if(!0===this.expanded)return this;void 0===t&&(t=this.transitionDuration),this.expanded=!0;var e=this.childrenMap.title,i=this.childrenMap.child;return this.show(i),(this.reLayoutTarget?this.reLayoutTarget:this.getTopmostSizer()).layout(),e.emit("folder.expand",t,this),i.emit("folder.expand",t,this),this.emit("expand.start",this),this.childTransition.once("open",(function(){this.emit("expand.complete",this);}),this).requestOpen(null,t),this},collapse:function(t){if(!1===this.expanded)return this;void 0===t&&(t=this.transitionDuration),this.expanded=!1;var e=this.childrenMap.title,i=this.childrenMap.child;return e.emit("folder.collapse",t,this),i.emit("folder.collapse",t,this),this.emit("collapse.start",this),this.childTransition.once("close",(function(){this.setChildScale(i,1,1).hide(i),(this.reLayoutTarget?this.reLayoutTarget:this.getTopmostSizer()).layout(),this.emit("collapse.complete",this);}),this).requestClose(null,t),this},toggle:function(t){return this.expanded?this.collapse(t):this.expand(t),this}},mf=function(t,e){On.popUp.call(t,e,this.expandDirection);},bf=function(t,e){On.scaleDown.call(t,e,this.expandDirection);},xf={setTransitionDuration:function(t){return this.transitionDuration=t,this.childTransition.setTransitInTime(t).setTransitOutTime(t),this},setExpandCallback:function(t){return void 0===t&&(t=mf.bind(this)),this.childTransition.setTransitInCallback(t),this},setCollapseCallback:function(t){return void 0===t&&(t=bf.bind(this)),this.childTransition.setTransitOutCallback(t),this}},Cf=Phaser.Utils.Objects.GetValue,wf=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),r.hasOwnProperty("orientation")||(r.orientation=1),(s=e.call(this,t,r)).type="rexFolder",s.expanded=void 0,s.expandDirection=1===s.orientation?"y":"x";var o=r.background,a=r.title,h=r.child;o&&s.addBackground(o);var l=1===s.orientation?"left":"top",c=Cf(r,"align.title",l),d=Cf(r,"expand.title",!0);s.add(a,{proportion:0,align:c,expand:d});var f=Cf(r,"toggleByTarget",void 0),v=Cf(r,"toggleClickConfig");if(void 0===f&&(f=a),f&&us.onClick.call(f,(function(){this.toggle();}),u(s),v),s.childTransition=new yf(h),!Cf(r,"customChildOrigin",!1)){var p=s.rtl?1:0;h.setOrigin(p);}c=Cf(r,"align.child","left");var g=(d=Cf(r,"expand.child",!0))?1:0;s.add(h,{proportion:g,align:c,expand:d}),s.addChildrenMap("title",a),s.addChildrenMap("child",h),s.addChildrenMap("background",o);var y=r.transition;s.setTransitionDuration(Cf(y,"duration",200)),s.setExpandCallback(Cf(y,"expandCallback",void 0)),s.setCollapseCallback(Cf(y,"collapseCallback",void 0)),s.reLayoutTarget=Cf(r,"reLayoutTarget",void 0);var k=r.onExpandStart;k&&s.on("expand.start",k);var m=r.onExpandComplete;m&&s.on("expand.complete",m);var b=r.onCollapseStart;b&&s.on("collapse.start",b);var x=r.onCollapseComplete;return x&&s.on("collapse.complete",x),s}return s(i)}(da);Object.assign(wf.prototype,kf,xf);var Sf=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).type="rexTweaker.Folder",s}return s(i,[{key:"setTitle",value:function(t){return this.childrenMap.title.setTitle(t),this}}]),i}(wf);Object.assign(Sf.prototype,{setBindingTarget:function(t){return this.childrenMap.child.setBindingTarget(t),this}},{getMaxInputRowTitleWidth:function(){return this.childrenMap.child.getMaxInputRowTitleWidth()+this.getInnerPadding("left")},setInputRowTitleWidth:function(t){return t-=this.getInnerPadding("left"),this.childrenMap.child.setInputRowTitleWidth(t),this}});var Pf=Phaser.Utils.Objects.GetValue,Of=Phaser.Utils.Objects.GetValue,Tf=da.prototype.add,_f=da.prototype.addSpace,Ef=function(t){var e=!t.isRexSpace,i=!e||this.buttonsExpand?1:0;if(0===this.sizerChildren.length)if(e){!this.buttonsExpand&&("right"===this.buttonsAlign||"center"===this.buttonsAlign||"bottom"===this.buttonsAlign)&&_f.call(this),Tf.call(this,t,{proportion:i,expand:!0});var n=!this.buttonsExpand&&"center"===this.buttonsAlign;n&&_f.call(this),this.hasTailSpace=n;}else Tf.call(this,t,{proportion:i,expand:!0}),this.hasTailSpace=!1;else if(this.hasTailSpace){var r=this.sizerChildren.length-1;Tf.call(this,t,{index:r,proportion:i,expand:!0});}else Tf.call(this,t,{proportion:i,expand:!0});return e&&this.buttonGroup.add(t),this},Mf={addButton:function(t){if(Kr(t))for(var e=t,i=0,n=e.length;i=0;i--)Df.call(this,e[i],t);return this}},jf=function(t,e,i){if(t){var n=this.setValueCallback,r=this.setValueCallbackScope;n&&(r?n.call(r,t,e,i):n(t,e,i)),this.fireEvent("button.statechange",t,e,i);}},zf=function(t){var e=this;t._selected=void 0,Object.defineProperty(t,"selected",{get:function(){return t._selected},set:function(i){if(t._selected!==i){var n=t._selected;t._selected=i,jf.call(e,t,i,n);}},enumerable:!0,configurable:!0}),t.selected=!1;},Bf={add:function(t){return this.buttons.push(t),t._click||(t._click=new hs(t,this.clickConfig),t._click.on("click",(function(t,e,i,n){this.fireEvent("button.click",e,i,n);}),this).on("enable",(function(t,e){this.fireEvent("button.enable",e);}),this).on("disable",(function(t,e){this.fireEvent("button.disable",e);}),this),t.on("pointerover",(function(e,i,n,r){this.fireEvent("button.over",t,e,r);}),this).on("pointerout",(function(e,i){this.fireEvent("button.out",t,e,i);}),this).on("pointerdown",(function(e,i,n,r){this.fireEvent("button.down",t,e,r);}),this).on("pointerup",(function(e,i){this.fireEvent("button.up",t,e,i);}),this)),this.buttonsType&&(void 0===t.name&&console.error("".concat(this.parent.constructor.name,": Option button miss value")),zf.call(this,t)),this},addMultiple:function(t){for(var e=0,i=t.length;e2?o-2:0),h=2;ha.height/2)){r>(h=Qf(a.left,a.centerY,t,e))&&(r=h,n=s);var h,l=i[s+1];if(!l||l.y!==a.y)r>(h=Qf(a.right,a.centerY,t,e))&&(r=h,n=s+1);}}return n},ev=Phaser.Utils.Objects.IsPlainObject,iv=Phaser.Utils.Objects.GetValue,nv=Phaser.Display.Align.CENTER,rv=function(t,e,i,n){if("\n"===t)return this.addNewLine(),this;var r;(mi.call(this,t),ev(e))&&(e=iv(r=e,"padding",0),i=iv(r,"key",void 0),n=iv(r,"index",void 0));return void 0===e&&(e=0),(r=this.getSizerConfig(t)).align=nv,r.padding=yi(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},sv={add:function(t,e,i){if(Kr(t))for(var n=t,r=0,s=n.length;r=0;e--)this.remove(this.sizerChildren[e],t);return this},clear:function(t){return this.sizerChildren.length=0,ia.call(this,t),this}},hv={getChildrenWidth:function(){return this.rexSizer.hidden?0:this.maxChildWidth+this.space.left+this.space.right},getChildrenHeight:function(){return this.rexSizer.hidden?0:this.widthWrapResult.height+this.space.top+this.space.bottom},getChildrenSizers:function(t){void 0===t&&(t=[]);for(var e,i=this.sizerChildren,n=0,r=i.length;nr&&pv.addNewLine(this);}else for(s=0,o=t.length;s=0;i--)bv.call(this,e[i],t);return this}},Cv=Phaser.Utils.Objects.GetValue,wv=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={});var o=r.space;"number"==typeof o&&(r.space={item:o,line:o}),(s=e.call(this,t,r)).type="rexFixWidthButtons",s.buttonGroup=new Vf({parent:u(s),eventEmitter:Cv(r,"eventEmitter",u(s)),groupName:Cv(r,"groupName",void 0),clickConfig:Cv(r,"click",void 0)}).setButtonsType(r);var a=Cv(r,"background",void 0),h=Cv(r,"buttons",void 0);return s.buttonsAlign=Cv(r,"align",void 0),a&&s.addBackground(a),h&&s.addButtons(h),s.addChildrenMap("background",a),s.addChildrenMap("buttons",s.buttonGroup.buttons),s}return s(i,[{key:"destroy",value:function(t){this.scene&&!this.ignoreDestroy&&(v(h(i.prototype),"destroy",this).call(this,t),this.buttonGroup.destroy(),this.buttonGroup=void 0);}},{key:"buttons",get:function(){return this.buttonGroup.buttons}},{key:"groupName",get:function(){return this.buttonGroup.groupName},set:function(t){this.buttonGroup.groupName=t;}},{key:"eventEmitter",get:function(){return this.buttonGroup.eventEmitter}}]),i}(fv);Object.assign(wv.prototype,yv,xv,Gf,Nf);var Sv=Phaser.Utils.Objects.IsPlainObject,Pv=Phaser.Utils.Objects.GetValue,Ov=Phaser.Display.Align.CENTER,Tv=Phaser.Utils.String.UUID,_v={add:function(t,e,i,n,r,s,o,a,h){(mi.call(this,t),Sv(e))&&(e=Pv(l=e,"key",void 0),i=Pv(l,"align",Ov),a=Pv(l,"offsetX",0),h=Pv(l,"offsetY",0),n=Pv(l,"padding",0),r=Pv(l,"expand",!0),t.isRexSizer||(s=Pv(l,"minWidth",t._minWidth),o=Pv(l,"minHeight",t._minHeighted)));var l,u=void 0!==e;return u||(e=Tv()),"string"==typeof i&&(i=Fe[i]),void 0===i&&(i=Ov),void 0===a&&(a=0),void 0===h&&(h=0),void 0===n&&(n=0),void 0===r&&(r=!0),t.isRexSizer||(void 0===s&&(s=t._minWidth),void 0===o&&(o=t._minHeight)),(l=this.getSizerConfig(t)).align=i,l.alignOffsetX=a,l.alignOffsetY=h,l.padding=yi(n),Sv(r)?(l.expandWidth=Pv(r,"width",!1),l.expandHeight=Pv(r,"height",!1)):(l.expandWidth=r,l.expandHeight=r),t.isRexSizer||(l.expandWidth&&(t.minWidth=void 0===s?mt(t):s),l.expandHeight&&(t.minHeight=void 0===o?bt(t):o)),this.sizerChildren.hasOwnProperty(e)&&this.sizerChildren[e].destroy(),this.sizerChildren[e]=t,u&&this.addChildrenMap(e,t),this}},Ev={remove:function(t,e){var i;if("string"==typeof t){if(i=t,!(t=this.sizerChildren[i]))return this}else {if(this.getParentSizer(t)!==this)return this;i=this.childToKey(t);}return i&&(delete this.sizerChildren[i],this.childrenMap.hasOwnProperty(i)&&delete this.childrenMap[i]),Oi.call(this,t,e),this},removeAll:function(t){for(var e in this.sizerChildren)this.remove(e,t);return this},clear:function(t){for(var e in this.sizerChildren)delete this.sizerChildren[e],this.childrenMap.hasOwnProperty(e)&&delete this.childrenMap[e];return ia.call(this,t),this}},Mv={getChildrenWidth:function(){if(this.rexSizer.hidden)return 0;var t,e,i,n=0,r=this.sizerChildren;for(var s in r)e=(t=r[s]).rexSizer.padding,i=this.getChildWidth(t)+e.left+e.right,n=Math.max(i,n);return n+this.space.left+this.space.right},getChildrenHeight:function(){if(this.rexSizer.hidden)return 0;var t,e,i,n=0,r=this.sizerChildren;for(var s in r)i=(t=r[s]).isRexSizer?Math.max(t.minHeight,t.childrenHeight):void 0!==t.minHeight?t.minHeight:bt(t),i+=(e=t.rexSizer.padding).top+e.bottom,n=Math.max(i,n);return n+this.space.top+this.space.bottom},getExpandedChildWidth:function(t,e){var i;void 0===e&&(e=this.width);var n=t.rexSizer;if(n.expandWidth){var r=e-this.space.left-this.space.right,s=n.padding;i=r-s.left-s.right;}return i},getExpandedChildHeight:function(t,e){var i;void 0===e&&(e=this.height);var n=t.rexSizer;if(n.expandHeight){var r=e-this.space.top-this.space.bottom,s=n.padding;i=r-s.top-s.bottom;}return i},getChildrenSizers:function(t){void 0===t&&(t=[]);var e,i=this.sizerChildren;for(var n in i)(e=i[n]).isRexSizer&&t.push(e);return t},layoutChildren:function(){var t,e,i,n,r,s,o,a,h,l=this.innerLeft,u=this.innerTop,c=this.innerWidth,d=this.innerHeight,f=this.sizerChildren;for(var v in f)(t=f[v]).rexSizer.hidden||(i=(e=t.rexSizer).padding,ns.call(this,t),t.isRexSizer?(t.runLayout(this,this.getExpandedChildWidth(t),this.getExpandedChildHeight(t)),Ho(t,this)):(a=void 0,h=void 0,e.expandWidth&&(a=c-i.left-i.right),e.expandHeight&&(h=d-i.top-i.bottom),Qr(t,a,h)),n=l+i.left,s=c-i.left-i.right,r=u+i.top,o=d-i.top-i.bottom,rs.call(this,t,n,r,s,o,e.align,e.alignOffsetX,e.alignOffsetY));}};Object.assign(Mv,_v,Ev);var Rv=Phaser.Utils.Objects.IsPlainObject,Lv=Phaser.Utils.Objects.GetValue,Dv=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h){var l;return n(this,i),Rv(r)?(r=Lv(h=r,"x",0),s=Lv(h,"y",0),o=Lv(h,"width",void 0),a=Lv(h,"height",void 0)):Rv(o)&&(o=Lv(h=o,"width",void 0),a=Lv(h,"height",void 0)),(l=e.call(this,t,r,s,o,a,h)).type="rexOverlapSizer",l.sizerChildren={},l.addChildrenMap("items",l.sizerChildren),l}return s(i,[{key:"childToKey",value:function(t){if("string"!=typeof t)return function(t,e){if(Array.isArray(t))return t.indexOf(e);for(var i in t)if(t[i]===e)return i;return null}(this.sizerChildren,t);var e=t;return this.sizerChildren.hasOwnPropery(e)?e:null}}]),i}(Vo);Object.assign(Dv.prototype,Mv);var Av=Dv.prototype.add,jv=function(t,e,i,n,r,s,o,a,h){return t.setVisible(!1),Av.call(this,t,e,i,n,r,s,o,a,h),this},zv={add:jv,addPage:jv},Bv=qt.prototype.setChildVisible,Iv={getPage:function(t){return void 0===t?null:this.sizerChildren.hasOwnProperty(t)?this.sizerChildren[t]:null},swapPage:function(t,e){this._previousKey=this._currentKey;var i=this.previousPage;i&&(0===this.swapMode?(Bv.call(this,i,!1),this.emit("pageinvisible",i,this._previousKey,this)):i.destroy()),t&&!this.sizerChildren.hasOwnProperty(t)&&this.emit("createpage",t,this),this._currentKey=t;var n=this.currentPage;return n&&(Bv.call(this,n,!0),this.emit("pagevisible",n,this._currentKey,this),void 0===e&&(e=this.fadeInDuration),e>0&&n.setAlpha(0).fadeIn(e,1)),this},hasPage:function(t){return this.sizerChildren.hasOwnProperty(t)}};Object.assign(Iv,zv);var Wv=Phaser.Utils.Objects.GetValue,Fv=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r)).type="rexPages",s.childrenMap=s.sizerChildren,s._previousKey=void 0,s._currentKey=void 0,s.setSwapMode(Wv(r,"swapMode",0)),s.setFadeInDuration(Wv(r,"fadeIn",0)),s}return s(i,[{key:"setSwapMode",value:function(t){return "string"==typeof t&&(t=Yv[t]),this.swapMode=t,this}},{key:"setFadeInDuration",value:function(t){return this.fadeInDuration=t,this}},{key:"previousKey",get:function(){return this._previousKey}},{key:"currentKey",get:function(){return this._currentKey},set:function(t){this.swapPage(t);}},{key:"currentPage",get:function(){return this.getPage(this.currentKey)}},{key:"previousPage",get:function(){return this.getPage(this.previousKey)}},{key:"keys",get:function(){return Object.keys(this.sizerChildren)}}]),i}(Dv);Object.assign(Fv.prototype,Iv);var Yv={invisible:0,destroy:1},Xv=Phaser.Utils.Objects.IsPlainObject,Gv=Phaser.Utils.Objects.GetValue,Vv=Phaser.Utils.String.UUID,Hv={swapPage:function(t,e){var i,n;null!=(i="number"==typeof t?t:this.getPageIndex(t))&&(void 0!==e&&(n=this.childrenMap.pages.fadeInDuration,this.childrenMap.pages.fadeInDuration=e),this.childrenMap.tabs.emitButtonClick(i),void 0!==n&&(this.childrenMap.pages.fadeInDuration=n));return this},swapFirstPage:function(t){return this.swapPage(0,t),this},swapLastPage:function(t){var e=this.getElement("tabs.buttons").length-1;return this.swapPage(e,t),this}},Nv={removePage:function(t,e){"number"==typeof t&&(t=this.getPageKey(t));var i=this.childrenMap.tabs,n=i.getByName(t),r=this.childrenMap.pages,s=r.getElement(t);return n&&s?(r.removeChildrenMap(t),i.removeButton(n,e),r.remove(s,e),this):this}},Uv={getPageKey:function(t){var e=this.getElement("tabs.buttons");if(!(t>=e.length))return e[t].name},getPageIndex:function(t){for(var e=this.getElement("tabs.buttons"),i=0,n=e.length;i0?0:1,r.setMinWidth(this.itemWidth)),this.add(r,{proportion:s,expand:!0}),i.onValueChange&&o.on("valuechange",i.onValueChange),r.setAutoUpdateEnable(i.autoUpdate),r.setBindingTarget(t,e),i.monitor&&r.startMonitorTarget(),i.key&&this.root.addChildrenMap(i.key,r),this},addButtons:function(t){var e=this.scene;void 0===t&&(t={});var i=t.bindingTarget;delete t.bindingTarget;var n=gp(this.styles,"inputRow")||{},r=pp(e,t,n);return this.add(r,{expand:!0}),i&&r.setBindingTarget(i),t.key&&this.root.addChildrenMap(t.key,r),this},addButton:function(t){return void 0===t&&(t={}),t.buttons=[{label:t.label,callback:t.callback}],delete t.label,delete t.callback,this.addButtons(t),this},addSeparator:function(t){var e=this.scene,i=yp(this.styles,"separator"),n=gf(e,0,i);return this.add(n,{expand:!0}),this},setBindingTarget:function(t){for(var e=this.sizerChildren,i=0,n=e.length;i=r&&h=i&&hi.length&&(t.prevCursorPosition=null),null!==t.prevCursorPosition&&(r=e.getCharChild(t.prevCursorPosition))&&("\n"===r.text&&r.clearTextSize(),e.emit("cursorout",r,t.prevCursorPosition,e)),null!=n&&(r=e.getCharChild(n))&&("\n"===r.text&&r.copyTextSize(e.lastInsertCursor),function(t){var e,i,n=t.parent,r=n.width,s=n.height,o=t.drawX,a=t.drawY,h=o+t.drawTLX,l=o+t.drawTRX,u=a+t.drawTLY,c=a+t.drawBLY;e=h<0?0-h:l>r?r-l:0,i=u<0?0-u:c>s?s-c:0,n._textOX+=e,n._textOY+=i;}(r),e.emit("cursorin",r,n,e)),e.emit("movecursor",n,t.prevCursorPosition,e),t.prevCursorPosition=n;}}(this)):(Bp(this),Ip(this)),this}},{key:"setNumberInput",value:function(){return this.onUpdateCallback=zp,this}},{key:"setSelectAllWhenFocusEnable",value:function(t){return void 0===t&&(t=!0),this.selectAllWhenFocus=t,this}}]),i}(jp),Yp=Phaser.Utils.Objects.GetValue,Xp=["inputType","onOpen","onFocus","onClose","onBlur","onUpdate","enterClose","readOnly","maxLength","minLength","selectAll"],Gp=function(t,e){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return !0;if(-1!==e.indexOf(".")){for(var i=e.split("."),n=t,r=0;rt.length?i:t})),l.value=t.join(c);}else l.value=t.join(i.slice(a,a+l.count));a+=l.count,l.added||(h+=l.count);}}var d=e[o-1];return o>1&&"string"==typeof d.value&&(d.added||d.removed)&&t.equals("",d.value)&&(e[o-2].value+=d.value,e.pop()),e}Up.prototype={diff:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.callback;"function"==typeof i&&(n=i,i={}),this.options=i;var r=this;function s(t){return n?(setTimeout((function(){n(void 0,t);}),0),!0):t}t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t));var o=(e=this.removeEmpty(this.tokenize(e))).length,a=t.length,h=1,l=o+a;i.maxEditLength&&(l=Math.min(l,i.maxEditLength));var u=[{newPos:-1,components:[]}],c=this.extractCommon(u[0],e,t,0);if(u[0].newPos+1>=o&&c+1>=a)return s([{value:this.join(e),count:e.length}]);function d(){for(var i=-1*h;i<=h;i+=2){var n=void 0,l=u[i-1],c=u[i+1],d=(c?c.newPos:0)-i;l&&(u[i-1]=void 0);var f=l&&l.newPos+1=o&&d+1>=a)return s(Kp(r,n.components,e,t,r.useLongestToken));u[i]=n;}else u[i]=void 0;}var p;h++;}if(n)!function t(){setTimeout((function(){if(h>l)return n();d()||t();}),0);}();else for(;h<=l;){var f=d();if(f)return f}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i});},extractCommon:function(t,e,i,n){for(var r=e.length,s=i.length,o=t.newPos,a=o-n,h=0;o+1=0;e--){var i=this.sizerChildren[e];i&&this.remove(i,t);}return this},clear:function(t){return bg(this.sizerChildren,null),ia.call(this,t),this}},Cg={setColumnSpace:function(t){if(this.space.column||(this.space.column=[]),this.space.column.length=this.columnCount-1,"number"==typeof t)bg(this.space.column,t);else for(var e=0,i=this.columnCount-1;e=0;n--){var r=n*this.columnCount+t;this.sizerChildren.splice(r,0,null);}return this.columnProportions.push(e),this.columnWidth.length+=1,this.space.column.splice(t,0,i),this},Og={getChildrenWidth:function(t){if(this.rexSizer.hidden)return 0;void 0===t&&(t=!0);for(var e,i,n,r,s=0,o=this.sizerChildren,a=0;a0){var i=t-this.getChildrenWidth(!1);i>=0&&(this.proportionWidthLength=i/e);}else this.proportionWidthLength=0;}return t},resolveHeight:function(t){t=ji.call(this,t);if(void 0===this.proportionHeightLength){var e=this.totalRowProportions;if(e>0){var i=t-this.getChildrenHeight(!1);i>=0&&(this.proportionHeightLength=i/e);}else this.proportionHeightLength=0;}return t},resolveChildrenWidth:function(t){var e,i,n;for(var r in this.sizerChildren)(e=this.sizerChildren[r])&&e.isRexSizer&&!e.ignoreLayout&&(n=this.getColumnWidth(parseInt(r)%this.columnCount),i=this.getExpandedChildWidth(e,n),i=e.resolveWidth(i),e.resolveChildrenWidth(i));},runWidthWrap:function(t){var e,i,n;for(var r in this.sizerChildren)!(e=this.sizerChildren[r])||e.isRexSizer&&e.ignoreLayout||!e.runWidthWrap||(n=this.getColumnWidth(parseInt(r)%this.columnCount),i=this.getExpandedChildWidth(e,n),e.isRexSizer&&(i=e.resolveWidth(i)),e.runWidthWrap(i));return this},resetGrid:function(t,e,i,n,r){if(void 0===i&&(i=0),void 0===n&&(n=0),this.columnCount=t,this.rowCount=e,this.gridCount=t*e,this.removeAll(),this.sizerChildren.length=t*e,bg(this.sizerChildren,null),this.columnProportions=[],this.columnProportions.length=t,"number"==typeof i)bg(this.columnProportions,i);else for(var s=0;s0&&(e+=t);return e},_g=function(){for(var t,e=0,i=0;i0&&(e+=t);return e},Eg=Phaser.Utils.Objects.IsPlainObject,Mg=Phaser.Utils.Objects.GetValue,Rg=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l,u,c,d){var f;return n(this,i),Eg(r)?(r=Mg(d=r,"x",0),s=Mg(d,"y",0),o=Mg(d,"width",void 0),a=Mg(d,"height",void 0),h=Mg(d,"column",d.col||0),l=Mg(d,"row",0),u=Mg(d,"columnProportions",0),c=Mg(d,"rowProportions",0)):Eg(o)?(o=Mg(d=o,"width",void 0),a=Mg(d,"height",void 0),h=Mg(d,"column",d.col||0),l=Mg(d,"row",0),u=Mg(d,"columnProportions",0),c=Mg(d,"rowProportions",0)):Eg(h)?(h=Mg(d=h,"column",d.col||0),l=Mg(d,"row",0),u=Mg(d,"columnProportions",0),c=Mg(d,"rowProportions",0)):Eg(u)&&(u=Mg(d=u,"columnProportions",0),c=Mg(d,"rowProportions",0)),(f=e.call(this,t,r,s,o,a,d)).type="rexGridSizer",f.sizerChildren=[],f.addChildrenMap("items",f.sizerChildren),f.setCreateCellContainerCallback(Mg(d,"createCellContainerCallback")),f.setIndentLeft(Mg(d,"space.indentLeftOdd",0),Mg(d,"space.indentLeftEven",0)),f.setIndentTop(Mg(d,"space.indentTopOdd",0),Mg(d,"space.indentTopEven",0)),f.resetGrid(h,l,u,c,Mg(d,"space",void 0)),f}return s(i,[{key:"destroy",value:function(t){this.scene&&!this.ignoreDestroy&&(v(h(i.prototype),"destroy",this).call(this,t),this.columnProportions=void 0,this.rowProportions=void 0,this.columnWidth=void 0,this.rowHeight=void 0,this.createCellContainerCallback=void 0);}},{key:"setColumnProportion",value:function(t,e){return t>=this.columnProportions.length||(this.columnProportions[t]=e),this}},{key:"setRowProportion",value:function(t,e){return t>=this.rowProportions.length||(this.rowProportions[t]=e),this}},{key:"totalColumnProportions",get:function(){return void 0===this._totalColumnProportions&&(this._totalColumnProportions=Tg.call(this)),this._totalColumnProportions}},{key:"totalRowProportions",get:function(){return void 0===this._totalRowProportions&&(this._totalRowProportions=_g.call(this)),this._totalRowProportions}},{key:"getChildAt",value:function(t,e){return this.sizerChildren[e*this.columnCount+t]}},{key:"childToGridIndex",value:function(t,e){if(!t)return null;var i=this.sizerChildren.indexOf(t);return -1===i?null:(void 0===e&&(e={}),e.x=i%this.columnCount,e.y=Math.floor(i/this.columnCount),e)}},{key:"getColumnWidth",value:function(t){var e=this.columnProportions[t];return 0===e?this.columnWidth[t]:e*this.proportionWidthLength}},{key:"getRowHeight",value:function(t){var e=this.rowProportions[t];return 0===e?this.rowHeight[t]:e*this.proportionHeightLength}},{key:"setCreateCellContainerCallback",value:function(t){return this.createCellContainerCallback=t,this}}]),i}(Vo);Object.assign(Rg.prototype,Og);var Lg=Phaser.Utils.Objects.GetValue,Dg=Phaser.Math.Linear,Ag=Phaser.Math.Percent,jg={setValue:function(t,e,i){return null==t||(void 0!==e&&(t=Ag(t,e,i)),this.value=t),this},addValue:function(t,e,i){return void 0!==e&&(t=Ag(t,e,i)),this.value+=t,this},getValue:function(t,e){var i=this.value;return void 0!==t&&(i=Dg(t,e,i)),i}},zg=Phaser.Math.Percent,Bg={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=zg(t,e,i)),void 0===this.easeValueTask&&(this.easeValueTask=new nr(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,to:t,duration:this.easeValueDuration,ease:this.easeFunction})),this},easeValueRepeat:function(t,e,i,n){return void 0===i&&(i=-1),void 0===n&&(n=0),void 0===this.easeValueTask&&(this.easeValueTask=new nr(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,from:t,to:e,duration:this.easeValueDuration,ease:this.easeFunction,repeat:i,repeatDelay:n}),this}},Ig=Phaser.Utils.Objects.GetValue,Wg=Phaser.Math.Clamp;var Fg=Phaser.Math.Percent,Yg=function(t,e,i){var n;return t.y===e.y?n=Fg(i.x,t.x,e.x):t.x===e.x&&(n=Fg(i.y,t.y,e.y)),n},Xg=function(t,e,i){var n,r;this.enable&&(Gg.x=e,Gg.y=i,this.reverseAxis?(n=this.getEndPoint(),r=this.getStartPoint()):(n=this.getStartPoint(),r=this.getEndPoint()),this.value=Yg(n,r,Gg));},Gg={},Vg=function(t,e,i){if(this.enable&&t.isDown){var n,r;Hg.x=t.worldX,Hg.y=t.worldY,this.reverseAxis?(n=this.getEndPoint(),r=this.getStartPoint()):(n=this.getStartPoint(),r=this.getEndPoint());var s=Yg(n,r,Hg);this.stopEaseValue(),0===this.easeValueDuration||Math.abs(this.value-s)<.1?this.value=s:this.easeValueTo(s);}},Hg={},Ng=function(t,e){void 0===e&&(e=Ug);var i=this.childrenMap.thumb,n=i.x,r=i.y;return ci(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},Ug={},Kg=Phaser.Display.Align.LEFT_CENTER,Jg=Phaser.Display.Align.TOP_CENTER,qg={},Zg=Phaser.Display.Align.RIGHT_CENTER,$g=Phaser.Display.Align.BOTTOM_CENTER,Qg={},ty=Phaser.Math.Linear,ey={},iy=Phaser.Display.Align.LEFT_CENTER,ny=Phaser.Display.Align.TOP_CENTER,ry=Phaser.Display.Align.RIGHT_CENTER,sy=Phaser.Display.Align.BOTTOM_CENTER,oy=Phaser.Utils.Objects.GetValue,ay=Phaser.Utils.Objects.IsPlainObject,hy=Phaser.Math.Clamp,ly=Phaser.Math.Snap.To,uy=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r)).type="rexSlider",s.bootProgressBase(r),s.reverseAxis=oy(r,"reverseAxis",!1);var o=oy(r,"background",void 0),a=oy(r,"track",void 0),h=oy(r,"indicator",void 0),l=oy(r,"thumb",void 0);o&&(ay(o)&&(o=Dh(t,o)),s.addBackground(o)),a&&(ay(a)&&(a=Dh(t,a)),s.add(a,{proportion:1,expand:!0,minWidth:0===s.orientation?0:void 0,minHeight:1===s.orientation?0:void 0})),h&&(ay(h)&&(h=Dh(t,h)),s.pin(h)),l&&(ay(l)&&(l=Dh(t,l)),s.pin(l));var c=oy(r,"input",0);switch("string"==typeof c&&(c=cy[c]),c){case 0:l&&(l.setInteractive(),s.scene.input.setDraggable(l),l.on("drag",Xg,u(s)).on("dragstart",(function(t){this.eventEmitter.emit("inputstart",t);}),u(s)).on("dragend",(function(t){this.eventEmitter.emit("inputend",t);}),u(s)));break;case 1:s.on("pointerdown",Vg,u(s)).on("pointermove",Vg,u(s)).on("pointerdown",(function(t){this.eventEmitter.emit("inputstart",t);}),u(s)).on("pointerup",(function(t){this.eventEmitter.emit("inputend",t);}),u(s)).on("pointerover",(function(t){t.isDown&&this.eventEmitter.emit("inputstart",t);}),u(s)).on("pointerout",(function(t){t.isDown&&this.eventEmitter.emit("inputend",t);}),u(s)).setInteractive();}return s.addChildrenMap("background",o),s.addChildrenMap("track",a),s.addChildrenMap("indicator",h),s.addChildrenMap("thumb",l),s.setEnable(oy(r,"enable",void 0)),s.setGap(oy(r,"gap",void 0)),s.setValue(oy(r,"value",0),oy(r,"min",void 0),oy(r,"max",void 0)),s}return s(i,[{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"setGap",value:function(t,e,i){return t&&void 0!==e&&(t/=i-e),this.gap=t,this}},{key:"value",get:function(){return this._value},set:function(t){void 0!==this.gap&&(t=ly(t,this.gap));var e=this._value;this._value=hy(t,0,1),e!==this._value&&(this.updateThumb(this._value),this.updateIndicator(this._value),this.eventEmitter.emit("valuechange",this._value,e,this.eventEmitter));}},{key:"postLayout",value:function(t,e,i){return this.updateThumb(),this.updateIndicator(),this}}]),i}(function(t){var e=function(t){a(i,t);var e=d(i);function i(){return n(this,i),e.apply(this,arguments)}return s(i,[{key:"bootProgressBase",value:function(t){this.eventEmitter=Ig(t,"eventEmitter",this);var e=Ig(t,"valuechangeCallback",null);if(null!==e){var i=Ig(t,"valuechangeCallbackScope",void 0);this.eventEmitter.on("valuechange",e,i);}return this.setEaseValuePropName("value").setEaseValueDuration(Ig(t,"easeValue.duration",0)).setEaseValueFunction(Ig(t,"easeValue.ease","Linear")),this}},{key:"value",get:function(){return this._value},set:function(t){t=Wg(t,0,1);var e=this._value,i=e!=t;this.dirty=this.dirty||i,this._value=t,i&&this.eventEmitter.emit("valuechange",this._value,e,this.eventEmitter);}}]),i}(t);return Object.assign(e.prototype,jg,Bg),e}(da)),cy={pan:0,drag:0,click:1,none:-1},dy={getStartPoint:function(t){if(void 0===t&&(t=qg),this.childrenMap.thumb){var e=0===this.orientation?Kg:Jg;Ng.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=Qg),this.childrenMap.thumb){var e=0===this.orientation?Zg:$g;Ng.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=this.childrenMap.thumb;return void 0===n||(void 0===t&&(t=this.value),this.reverseAxis?(e=this.getEndPoint(),i=this.getStartPoint()):(e=this.getStartPoint(),i=this.getEndPoint()),function(t,e,i,n){void 0===n&&(n=ey),n.x=ty(e.x,i.x,t),n.y=ty(e.y,i.y,t);}(t,e,i,n),this.resetChildPositionState(n)),this},updateIndicator:function(t){var e=this.childrenMap.indicator;if(void 0===e)return this;void 0===t&&(t=this.value);var i,n,r,s=this.reverseAxis,o=this.childrenMap.thumb;if(o)if(0===this.orientation){var a=mt(o);if(s){h=o.x-a*o.originX;i=this.right-h;}else {var h;i=(h=o.x-a*o.originX)+a-this.left;}}else {var l=bt(o);if(s){u=o.y-l*o.originY;n=this.bottom-u;}else {var u;n=(u=o.y-l*o.originY)+l-this.top;}}else 0===this.orientation?i=this.width*t:n=this.height*t;Qr(e,i,n),r=s?0===this.orientation?ry:sy:0===this.orientation?iy:ny,ui(e,this,r),this.resetChildPositionState(e);}};Object.assign(uy.prototype,dy);var fy=Phaser.Utils.Objects.GetValue,vy=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),(s=e.call(this,t,r)).type="rexScrollBar";var o,a=fy(r,"background",void 0),h=fy(r,"buttons",void 0),l=fy(h,"top",fy(h,"left",void 0)),c=fy(h,"bottom",fy(h,"right",void 0)),d=fy(r,"slider",void 0);(a&&s.addBackground(a),l)&&(s.add(l),new bs(l).on("intouch",(function(){if(this.enable){var t=o.reverseAxis?this.scrollStep:-this.scrollStep;this.value+=t;}}),u(s)));if(d){var f;if(d.orientation=s.orientation,d.eventEmitter=u(s),d.value=null,0===s.orientation)f=void 0===fy(d,"width",void 0)?1:0;else f=void 0===fy(d,"height",void 0)?1:0;o=new uy(t,d),t.add.existing(o),s.add(o,{proportion:f});}c&&(s.add(c),new bs(c).on("intouch",(function(){if(this.enable){var t=o.reverseAxis?-this.scrollStep:this.scrollStep;this.value+=t;}}),u(s)));var v=[l,c];s.addChildrenMap("background",a),s.addChildrenMap("slider",o),s.addChildrenMap("buttons",v);var p=fy(r,"valuechangeCallback",null);if(null!==p){var g=fy(r,"valuechangeCallbackScope",void 0);s.on("valuechange",p,g);}return s.setEnable(fy(r,"enable",void 0)),s.setValue(fy(r,"value",0)),s.setScrollStep(fy(h,"step",.01)),s}return s(i,[{key:"setScrollStep",value:function(t){return this.scrollStep=t,this}},{key:"enable",get:function(){return !!this.childrenMap.slider&&this.childrenMap.slider.enable},set:function(t){this.childrenMap.slider&&this.childrenMap.slider.setEnable(t);}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"value",get:function(){return this.childrenMap.slider?this.childrenMap.slider.value:0},set:function(t){this.childrenMap.slider&&(this.childrenMap.slider.value=t);}},{key:"setValue",value:function(t,e,i){return this.childrenMap.slider&&this.childrenMap.slider.setValue(t,e,i),this}},{key:"addValue",value:function(t,e,i){return this.childrenMap.slider&&this.childrenMap.slider.addValue(t,e,i),this}},{key:"getValue",value:function(t,e){return this.childrenMap.slider?this.childrenMap.slider.getValue(t,e):0}},{key:"easeValueTo",value:function(t,e,i){return this.childrenMap.slider&&this.childrenMap.slider.easeValueTo(t,e,i),this}},{key:"stopEaseValue",value:function(){return this.childrenMap.slider&&this.childrenMap.slider.stopEaseValue(),this}},{key:"setEaseValueDuration",value:function(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueDuration(t),this}},{key:"setEaseValueFunction",value:function(t){return this.childrenMap.slider&&this.childrenMap.slider.setEaseValueFunction(t),this}}]),i}(da),py=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,r)).parent=t,s.init(),s}return s(i,[{key:"init",value:function(){this.start("IDLE");}},{key:"next_IDLE",value:function(){var t,e=this.parent;return e.dragState.isDown&&(t=0===e.dragThreshold?"DRAG":"DRAGBEGIN"),t}},{key:"update_IDLE",value:function(t,e){this.next();}},{key:"next_DRAGBEGIN",value:function(){var t=this.parent,e=t.dragState;return e.isDown?e.pointer.getDistance()>=t.dragThreshold?"DRAG":"DRAGBEGIN":"IDLE"}},{key:"update_DRAGBEGIN",value:function(t,e){this.next();}},{key:"next_DRAG",value:function(){var t,e=this.parent;return e.dragState.isUp&&(t=e.outOfBounds?"BACK":e.slidingEnable?"SLIDE":"IDLE"),t}},{key:"update_DRAG",value:function(t,e){var i=this.parent;i.dragState.justMoved&&i.dragging(),this.next();}},{key:"enter_DRAG",value:function(){this.parent.onDragStart();}},{key:"exit_DRAG",value:function(){this.parent.onDragEnd();}},{key:"next_SLIDE",value:function(){var t,e=this.parent;return e.dragState.isDown?t="DRAG":e.isSliding||(t="IDLE"),t}},{key:"enter_SLIDE",value:function(){this.parent.onSliding();}},{key:"exit_SLIDE",value:function(){this.parent.stop();}},{key:"update_SLIDE",value:function(t,e){this.parent.sliding(t,e),this.next();}},{key:"next_BACK",value:function(){var t,e=this.parent;return e.dragState.isDown?t="DRAG":e.isPullBack||(t="IDLE"),t}},{key:"enter_BACK",value:function(){this.parent.onPullBack();}},{key:"exit_BACK",value:function(){this.parent.stop();}},{key:"update_BACK",value:function(t,e){this.parent.pullBack(t,e),this.next();}}]),i}(xr),gy=Phaser.Utils.Objects.GetValue,yy=Phaser.Math.Distance.Between,ky=function(t){a(i,t);var e=d(i);function i(t,r){var s;return n(this,i),(s=e.call(this,t,r))._enable=void 0,t.setInteractive(gy(r,"inputConfig",void 0)),s.resetFromJSON(r),s.boot(),s}return s(i,[{key:"resetFromJSON",value:function(t){return this.pointer=void 0,this.isInTouched=!1,this.holdStartTime=void 0,this.x=void 0,this.y=void 0,this.preX=void 0,this.preY=void 0,this.localX=void 0,this.localY=void 0,this.justMoved=!1,this.setEnable(gy(t,"enable",!0)),this.holdThreshold=gy(t,"holdThreshold",50),this.pointerOutReleaseEnable=gy(t,"pointerOutRelease",!0),this}},{key:"boot",value:function(){this.parent.on("pointerdown",this.onPointIn,this),this.parent.on("pointerup",this.onPointOut,this),this.pointerOutReleaseEnable&&this.parent.on("pointerout",this.onPointOut,this),this.parent.on("pointermove",this.onPointerMove,this),this.scene.sys.events.on("preupdate",this.preupdate,this);}},{key:"shutdown",value:function(t){this.isShutdown||(this.scene.sys.events.off("preupdate",this.preupdate,this),this.pointer=void 0,v(h(i.prototype),"shutdown",this).call(this,t));}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(t||(this.isInTouched=!1,this.pointer=void 0),this._enable=t);}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"toggleEnable",value:function(){return this.setEnable(!this.enable),this}},{key:"setPointerOutReleaseEnable",value:function(t){return void 0===t&&(t=!0),this.pointerOutReleaseEnable=t,this}},{key:"isDown",get:function(){return this.pointer&&this.pointer.isDown}},{key:"isUp",get:function(){return !this.isDown}},{key:"dx",get:function(){return this.x-this.preX}},{key:"dy",get:function(){return this.y-this.preY}},{key:"dt",get:function(){return $s(this.scene)}},{key:"speed",get:function(){return this.x===this.preX&&this.y===this.preY?0:yy(this.preX,this.preY,this.x,this.y)/(.001*this.dt)}},{key:"speedX",get:function(){return this.dx/(.001*this.dt)}},{key:"speedY",get:function(){return this.dy/(.001*this.dt)}},{key:"onPointIn",value:function(t,e,i){this.enable&&t.isDown&&void 0===this.pointer&&(this.pointer=t,this.localX=e,this.localY=i);}},{key:"onPointOut",value:function(t){this.enable&&this.pointer===t&&(this.pointer=void 0);}},{key:"onPointerMove",value:function(t,e,i){this.enable&&t.isDown&&this.pointer===t&&(this.localX=e,this.localY=i);}},{key:"preupdate",value:function(t,e){if(this.enable){var i=this.pointer;this.justMoved=!1,i&&!this.isInTouched?(this.x=i.worldX,this.y=i.worldY,this.preX=i.worldX,this.preY=i.worldY,this.isInTouched=!0,this.holdStartTime=void 0,this.emit("touchstart",i,this.localX,this.localY)):i&&this.isInTouched?this.x===i.x&&this.y===i.y?void 0===this.holdStartTime?this.holdStartTime=t:t-this.holdStartTime>this.holdThreshold&&(this.preX=this.x,this.preY=this.y):(this.preX=this.x,this.preY=this.y,this.x=i.worldX,this.y=i.worldY,this.holdStartTime=void 0,this.justMoved=!0,this.emit("touchmove",i,this.localX,this.localY)):!i&&this.isInTouched&&(this.isInTouched=!1,this.holdStartTime=void 0,this.emit("touchend",i));}}}]),i}(Ui),my=Phaser.Utils.Objects.GetValue,by=function(){function t(e){n(this,t),this.resetFromJSON(e);}return s(t,[{key:"resetFromJSON",value:function(t){return this.setValue(my(t,"value",0)),this.setSpeed(my(t,"speed",0)),this.setAcceleration(my(t,"acceleration",0)),this}},{key:"reset",value:function(){this.setValue(0),this.setSpeed(0),this.setAcceleration(0);}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"setSpeed",value:function(t){return this.speed=t,this}},{key:"setAcceleration",value:function(t){return this.acceleration=t,this}},{key:"updateSpeed",value:function(t){return 0!==this.acceleration&&(this.speed+=this.acceleration*t,this.speed<0&&(this.speed=0)),this}},{key:"getDeltaValue",value:function(t){return this.updateSpeed(t),this.speed<=0?0:this.speed*t}},{key:"update",value:function(t){return this.updateSpeed(t),this.speed>0&&(this.value+=this.getDeltaValue(t)),this}},{key:"isMoving",get:function(){return this.speed>0}}]),t}(),xy=function(){function t(){n(this,t),this.value,this.dir,this.movement=new by;}return s(t,[{key:"init",value:function(t,e,i,n,r){return this.value=t,this.end=r,this.dir=void 0!==r?tthis.end&&(this.value=this.end):this.valuethis.maxValue}},{key:"overMin",value:function(t){return null!=this.minValue&&t0,Math.abs(e),i);}},{key:"sliding",value:function(t,e){e*=.001;var i=this._slowDown.update(e).value;this.overMax(i)?(this.value=this.maxValue,this._slowDown.stop()):this.overMin(i)?(this.value=this.minValue,this._slowDown.stop()):this.value=i;}},{key:"onPullBack",value:function(){var t=this.value,e=this.outOfMinBound?this.minValue:this.maxValue,i=Math.abs(e-t),n=this.backDeceleration,r=Math.sqrt(2*n*i);this._slowDown.init(t,void 0,r,n,e);}},{key:"pullBack",value:function(t,e){e*=.001,this.value=this._slowDown.update(e).value,this._slowDown.isMoving||this._state.next();}},{key:"stop",value:function(){this._slowDown.stop();}}]),i}(Ui),Py={y:0,v:0,vertical:0,x:1,h:1,horizontal:1},Oy=Phaser.Utils.Objects.GetValue,Ty=function(t){a(i,t);var e=d(i);function i(t,r){var s;(n(this,i),(s=e.call(this,t,r)).parent!==s.scene?s.focusMode=Oy(r,"focus",!0):s.focusMode=!1,s.setSpeed(Oy(r,"speed",.1)),s.setEnable(Oy(r,"enable",!0)),s.focusMode)?(t=s.parent).setInteractive(Oy(r,"inputConfig",void 0)).on("wheel",(function(t,e,i,n,r){this.enable&&this.scroll(i);}),u(s)):s.scene.input.on("wheel",s.onSceneScroll,u(s));return s}return s(i,[{key:"destroy",value:function(){this.focusMode||this.scene.input.off("wheel",this.onSceneScroll,this);}},{key:"onSceneScroll",value:function(t,e,i,n,r,s){this.enable&&this.scroll(n);}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"setSpeed",value:function(t){return this.speed=t,this}},{key:"scroll",value:function(t){t*=this.speed,this.emit("scroll",t,this.parent,this);}}]),i}(Ui),_y=Phaser.Utils.Objects.GetValue,Ey=function(t,e,i,n){var r,s,o,a,h="Y"===(i=i.toUpperCase()),l=2===t.scrollMode,u=t.childrenMap.child,c="slider".concat(i);if(r=l||n.hasOwnProperty(c)?_y(n,c,void 0):_y(n,"slider",void 0)){var d,f,v;!0===r&&(r={}),r.orientation=h?1:0,s=function(t,e){void 0===e&&(e={});var i=jt(e);(e={slider:i}).orientation=i.orientation,delete i.orientation,e.background=i.background,delete i.background,e.buttons=i.buttons,delete i.buttons;var n=new vy(t,e);t.add.existing(n);var r=n.childrenMap.slider;return n.addChildrenMap("track",r.childrenMap.track),n.addChildrenMap("indicator",r.childrenMap.indicator),n.addChildrenMap("thumb",r.childrenMap.thumb),n}(t.scene,r);var p=_y(r,"position",0);"string"==typeof p&&(p=My[p]);var g=_y(n,"space.slider".concat(i),void 0);void 0===g&&void 0===(g=_y(n,"space.slider",void 0))&&(g=l?0:_y(n,"space.child",0));var y="number"==typeof g;h?0===p?(d=2,f=1,v=y?{left:g}:g):(d=0,f=1,v=y?{right:g}:g):0===p?(d=1,f=2,v=y?{top:g}:g):(d=1,f=0,v=y?{bottom:g}:g),e.add(s,{column:d,row:f,align:"center",padding:v,expand:!0}),t["hideUnscrollableSlider".concat(i)]=_y(r,"hideUnscrollableSlider",!1),t["adaptThumb".concat(i,"SizeMode")]=_y(r,"adaptThumbSize",!1),t["minThumb".concat(i,"Size")]=_y(r,"minThumbSize",void 0);}else t["hideUnscrollableSlider".concat(i)]=!1,t["adaptThumb".concat(i,"SizeMode")]=!1,t["minThumb".concat(i,"Size")]=void 0;var k="scroller".concat(i);(o=l||n.hasOwnProperty(k)?_y(n,k,!0):_y(n,"scroller",!0))&&u&&(!0===o&&(o={}),o.orientation=h?0:1,a=new Sy(u,o));var m,b,x,C,w=_y(n,l?"mouseWheelScroller".concat(i):"mouseWheelScroller",!1);(w&&u&&(m=new Ty(u,w)),t.addChildrenMap("slider".concat(i),s),t.addChildrenMap("scroller".concat(i),a),t.addChildrenMap("mouseWheelScroller".concat(i),m),l&&!h||(t.hideUnscrollableSlider=t["hideUnscrollableSlider".concat(i)],t.adaptThumbSizeMode=t["adaptThumb".concat(i,"SizeMode")],t.minThumbSize=t["minThumb".concat(i,"Size")],t.addChildrenMap("slider",s),t.addChildrenMap("scroller",a),t.addChildrenMap("mouseWheelScroller",m)),s)&&(l?(b=h?"t":"s",C="scroll".concat(i)):(b="t",C="scroll"),s.on("valuechange",(function(e){t[b]=e,t.emit(C,t);})));a&&(l?(x="childO".concat(i),C="scroll".concat(i)):(x="childOY",C="scroll"),a.on("valuechange",(function(e){t[x]=e,t.emit(C,t);})));if(m){var S="addChildO".concat(i);m.on("scroll",(function(e){t[S](-e,!0);}));}},My={right:0,left:1,bottom:0,top:1},Ry=Phaser.Utils.Objects.GetValue,Ly=function(t,e){var i=t.scene,n=[0,1,0],r=[0,1,0],s=Ry(e,"width"),o=Ry(e,"height");s||(Ry(e,"child.expandWidth",!0)||(n[1]=0));o||(Ry(e,"child.expandHeight",!0)||(r[1]=0));var a=new Rg(i,{column:3,row:3,columnProportions:n,rowProportions:r});switch(function(t,e,i){var n=Lg(i,"child"),r=Lg(n,"gameObject",void 0);if(r){var s=Lg(i,"space.child",0);t.childMargin={};var o=t.childMargin,a={};if("number"==typeof s)switch(t.scrollMode){case 0:case 1:o.top=0,o.bottom=0,o.left=0,o.right=0;break;default:o.top=s,o.bottom=s,o.left=s,o.right=s;}else switch(t.scrollMode){case 0:o.top=Lg(s,"top",0),o.bottom=Lg(s,"bottom",0),a.left=Lg(s,"left",0),a.right=Lg(s,"right",0);break;case 1:o.top=Lg(s,"left",0),o.bottom=Lg(s,"right",0),a.top=Lg(s,"top",0),a.bottom=Lg(s,"bottom",0);break;default:o.top=Lg(s,"top",0),o.bottom=Lg(s,"bottom",0),o.left=Lg(s,"left",0),o.right=Lg(s,"right",0);}e.add(r,{column:1,row:1,align:Lg(n,"align","center"),padding:a,expand:{width:Lg(n,"expandWidth",!0),height:Lg(n,"expandHeight",!0)}});}t.addChildrenMap("child",r);}(t,a,e),t.scrollMode){case 0:Ey(t,a,"y",e);break;case 1:Ey(t,a,"x",e);break;default:Ey(t,a,"y",e),Ey(t,a,"x",e);}return a},Dy=function(t){var e,i,n,r;switch(this.scrollMode){case 0:case 1:e=this.topChildOY,i=this.bottomChildOY,n=this.childrenMap.scroller,r=this.childrenMap.slider;break;default:"Y"===(t=t.toUpperCase())?(e=this.topChildOY,i=this.bottomChildOY):(e=this.leftChildOX,i=this.rightChildOX),n=this.childrenMap["scroller".concat(t)],r=this.childrenMap["slider".concat(t)];}n&&n.setBounds(e,i),r&&r.setEnable(e!==i);},Ay=function(t){switch(this.scrollMode){case 0:case 1:(e=this.childrenMap.slider)&&this.hideUnscrollableSlider&&this.setChildVisible(e,this.isOverflow);break;default:t=t.toUpperCase();var e=this.childrenMap["slider".concat(t)],i=this["hideUnscrollableSlider".concat(t)],n=this["isOverflow".concat(t)];e&&i&&this.setChildVisible(e,n);}},jy=function(t){switch(this.scrollMode){case 0:case 1:if(!this.adaptThumbSizeMode)return;if(!(a=this.childrenMap.slider))return;var e=Math.min(this.childVisibleHeight/this.childHeight,1),i=a.childrenMap.track,n=a.childrenMap.thumb,r=this.minThumbSize;if(0===this.scrollMode){var s=i.displayHeight*e;void 0!==r&&s0&&{height:this.colorComponentsHeight,formatLabel:this.colorComponentsFormatLabelConfig,inputText:this.colorComponentsInputTextConfig,space:this.colorComponentsSpace};var o=new Xk(t,{width:n,height:s,background:e,space:this.colorPickerSpace,hPalette:{position:this.colorPickerHPalettePosition},colorComponents:r,value:this.value});return t.add.existing(o),o},Vk=Phaser.Utils.Objects.GetValue,Hk=function(t,e){var i=Vk(e,"expandDirection",void 0);"string"==typeof i&&(i=Nk[i]);var n,r,s,a,h,l,u=(s="alignTargetX",Gp(n=e,r="alignTarget")?gr(n,r):s&&Gp(n,s)?gr(n,s):a),c=Vk(e,"alignTargetY",u),d=Vk(e,"alignOffsetX",0),f=Vk(e,"alignOffsetY",0),v=Vk(e,"alignSide","").includes("right"),p=Vk(e,"bounds"),g=0===i,y=!g&&!(1===i),k=v?1:0,m=g||y?0:1;t.setOrigin(k,m),h=v?u.getTopRight().x:u.getTopLeft().x,l=c.getBottomLeft().y,t.setPosition(h+d,l+f);var b=p;b||(b=Ae(t.scene)),y&&t.getBottomLeft().y>b.bottom&&(l=c.getTopLeft().y,t.setOrigin(0,1).setPosition(h+d,l+f));},Nk={down:0,up:1},Uk=Phaser.Utils.Objects.GetValue,Kk=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),null==r.transitIn&&(r.transitIn=function(t,e){bn(t,e,"y","Cubic");}),null==r.transitOut&&(r.transitOut=function(t,e){!function(t,e,i,n,r){void 0===n&&(n="Linear");var s={mode:0};switch(i){case 0:case"x":s.end={x:0};break;case 1:case"y":s.end={y:0};break;default:s.end=0;}s.duration=e,s.ease=n,void 0===r?r=new kn(t,s):r.resetFromJSON(s),r.restart();}(t,e,"y","Linear");}),r.manualClose=!0,r.clickOutsideClose=!0,r.destroy=!0,s=e.call(this,t,r),Hk(t,r),t.isRexSizer&&t.layout();var o=Uk(r,"touchOutsideClose",!1),a=Uk(r,"anyTouchClose",!1);return a&&(o=!1),a?s.once("open",s.anyTouchClose,u(s)):o&&s.once("open",s.touchOutsideClose,u(s)),s.requestOpen(),s}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(this.scene.input.off("pointerup",this.touchCloseCallback,this),v(h(i.prototype),"shutdown",this).call(this,t));}},{key:"touchOutsideClose",value:function(){return this.scene.input.on("pointerup",this.touchCloseCallback,this),this.clickOutsideTest=!0,this}},{key:"anyTouchClose",value:function(){return this.scene.input.once("pointerup",this.touchCloseCallback,this),this}},{key:"touchCloseCallback",value:function(t){this.clickOutsideTest&&Xr(this.parent,t.worldX,t.worldY)||this.requestClose();}},{key:"onOpen",value:function(){this.emit("open",this.parent,this),v(h(i.prototype),"onOpen",this).call(this);}},{key:"onClose",value:function(){this.emit("close",this.parent,this),v(h(i.prototype),"onClose",this).call(this);}}]),i}(Er),Jk={openColorPicker:function(){if(!this.colorPicker){var t=Gk.call(this).layout(),e=new Kk(t,{duration:{in:this.colorPickerEaseInDuration,out:this.colorPickerEaseOutDuration},transitIn:this.colorPickerTransitInCallback,transitOut:this.colorPickerTransitOutCallback,expandDirection:this.colorPickerExpandDirection,alignTargetX:this,alignTargetY:this,bounds:this.colorPickerBounds,touchOutsideClose:!0}).on("open",(function(){t.on("valuechange",(function(t){this.setValue(t);}),this);}),this).on("close",(function(){this.colorPicker=void 0,this.dropDownBehavior=void 0;}),this);return this.colorPicker=t,this.dropDownBehavior=e,this.pin(t),this}}};Object.assign(Jk,lk);var qk=Phaser.Utils.Objects.GetValue,Zk=function(t){a(i,t);var e=d(i);function i(t,r){var s;n(this,i),void 0===r&&(r={}),(s=e.call(this,t,r)).type="rexColorInput",r.hasOwnProperty("colorPicker")||(r.colorPicker={background:{color:0}});var o=r.colorPicker,a=!1!==o&&null!==o;if(a){var h;s.setColorPickerSize(qk(o,"width",160),qk(o,"height",170));var l=qk(o,"background");h=l?function(t){return Dh(t,l)}:qk(o,"createBackgroundCallback"),s.setCreateColorPickerBackgroundCallback(h),s.setColorPickerHPalettePosition(qk(o,"hPalettePosition",0)),s.setColorPickerExpandDirection(qk(o,"expandDirection")),s.setColorPickerEaseInDuration(qk(o,"easeIn",200)),s.setColorPickerEaseOutDuration(qk(o,"easeOut",200)),s.setColorPickerTransitInCallback(qk(o,"transitIn")),s.setColorPickerTransitOutCallback(qk(o,"transitOut")),s.setColorPickerBounds(qk(o,"bounds"));var c=qk(o,"space");void 0===c&&(c={left:10,right:10,top:10,bottom:10,item:8}),s.setColorPickerSpace(c);}var d=r.colorComponents;if(a&&(!1!==d&&null!==d)){s.setColorComponentsHeight(qk(d,"height",30)),s.setColorComponentsFormatLabelConfig(qk(d,"formatLabel"));var f=qk(d,"inputText");f||(f=qk(r,"inputText")),s.setColorComponentsInputTextConfig(f);var v=qk(d,"space");void 0===v&&(v={item:8}),s.setColorComponentsSpace(v);}var p=s.childrenMap.swatch;return p&&a&&s.onClick(p,s.openColorPicker,u(s)),s}return s(i)}(hk);Object.assign(Zk.prototype,Jk);var $k={name:"ColorInput",accept:function(t){return !!t.hasOwnProperty("view")&&"color"===t.view},build:function(t,e){var i=t.scene;t.type="rexTweaker.ColorInput";var n=e.colorInput;void 0===n&&(n={}),n.hasOwnProperty("inputText")||(n.inputText=e.inputText);var r=function(t,e,i){void 0===i&&(i=!0),i?e=e?ge(e):{}:e||(e={});var n=new Zk(t,e);return t.add.existing(n),n}(i,n);t.add(r,{proportion:1,expand:!0,key:"colorInput"}),r.on("valuechange",(function(e){t.setValue(e);}));},displayValue:function(t,e){t.getElement("colorInput").setValue(e);}},Qk={setBoxFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.boxFillColor!==t||this.boxFillAlpha!==e,this.boxFillColor=t,this.boxFillAlpha=e,this},setUncheckedBoxFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.uncheckedBoxFillColor!==t||this.uncheckedBoxFillAlpha!==e,this.uncheckedBoxFillColor=t,this.uncheckedBoxFillAlpha=e,this},setBoxStrokeStyle:function(t,e,i){return void 0===i&&(i=1),this.dirty=this.dirty||this.boxLineWidth!==t||this.boxStrokeColor!==e||this.boxStrokeAlpha!==i,this.boxLineWidth=t,this.boxStrokeColor=e,this.boxStrokeAlpha=i,this},setUncheckedBoxStrokeStyle:function(t,e,i){return void 0===i&&(i=1),this.dirty=this.dirty||this.uncheckedBoxLineWidth!==t||this.uncheckedBoxStrokeColor!==e||this.uncheckedBoxStrokeAlpha!==i,this.uncheckedBoxLineWidth=t,this.uncheckedBoxStrokeColor=e,this.uncheckedBoxStrokeAlpha=i,this},setCheckerStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.checkerColor!==t||this.checkAlpha!==e,this.checkerColor=t,this.checkAlpha=e,this},setBoxShape:function(t){return void 0===t&&(t=!1),this.isCircleShape===t||(this.isCircleShape=t,this.isSizeChanged=!0,this.dirty=!0),this}},tm={buildShapes:function(){this.addShape((new Qd).setName("box")).addShape((new Zd).setName("checker"));},updateShapes:function(){var t=this.width/2,e=this.height/2,i=Math.min(t,e),n=2*i,r=t-i,s=e-i,o=this.boxLineWidth,a=Math.max(n/10,2),h=this.getShape("box"),l=this.getShape("checker");if(this.isSizeChanged){var u=n*(1-this.boxSize)/2,c=o/2,d=n*this.boxSize-o;h.setTopLeftPosition(r+c+u,s+c+u).setSize(d,d),this.isCircleShape?h.setRadius(d/2):h.setRadius(0);u=n*(1-this.checkerSize)/2;var f=n*this.checkerSize/4,v=1*f,p=2*f,g=3*f;l.startAt(v,p).lineTo(p,g).lineTo(g,v).offset(r+u,s+u).end();}this.checked?(h.fillStyle(this.boxFillColor,this.boxFillAlpha).lineStyle(o,this.boxStrokeColor,this.boxStrokeAlpha),l.lineStyle(a,this.checkerColor)):(h.fillStyle(this.uncheckedBoxFillColor,this.uncheckedBoxFillAlpha).lineStyle(o,this.uncheckedBoxStrokeColor,this.uncheckedBoxStrokeAlpha),l.lineStyle()),this.checked&&l.setDisplayPathSegment(this.checkerAnimProgress);}},em={setCheckerAnimationDuration:function(t){return void 0===t&&(t=0),this.checkerAnimDuration=t,this},playCheckerAnimation:function(){return void 0===this.checkerAnimProgressTask&&(this.checkerAnimProgressTask=new nr(this,{eventEmitter:null})),this.checkerAnimProgressTask.restart({key:"checkerAnimProgress",from:0,to:1,duration:this.checkerAnimDuration}),this},stopCheckerAnimation:function(){return void 0===this.checkerAnimProgressTask||this.checkerAnimProgressTask.stop(),this}},im={};Object.assign(im,Qk,{setBoxSize:function(t){return this.dirty=this.dirty||this.boxSize!==t,this.boxSize=t,this},setCheckerSize:function(t){return this.dirty=this.dirty||this.checkerSize!==t,this.checkerSize=t,this}},tm,em);var nm=Phaser.Utils.Objects.GetValue,rm=Phaser.Utils.Objects.IsPlainObject,sm=23730,om=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var u;n(this,i),rm(r)?(r=nm(l=r,"x",0),s=nm(l,"y",0),o=nm(l,"width",2),a=nm(l,"height",2),h=nm(l,"color",sm)):rm(h)&&(h=nm(l=h,"color",sm)),(u=e.call(this,t,r,s,o,a)).type="rexCheckbox",void 0===h&&(h=sm),u.setBoxShape(nm(l,"circleBox",!1)),u.setBoxFillStyle(h,nm(l,"boxFillAlpha",1)),u.setUncheckedBoxFillStyle(nm(l,"uncheckedColor",null),nm(l,"uncheckedBoxFillAlpha",1)),u.setBoxStrokeStyle(nm(l,"boxLineWidth",4),nm(l,"boxStrokeColor",h),nm(l,"boxStrokeAlpha",1)),u.setUncheckedBoxStrokeStyle(u.boxLineWidth,nm(l,"uncheckedBoxStrokeColor",u.boxStrokeColor),nm(l,"uncheckedBoxStrokeAlpha",u.boxStrokeAlpha)),u.setCheckerStyle(nm(l,"checkerColor",16777215),nm(l,"checkerAlpha",1)),u.setBoxSize(nm(l,"boxSize",1)),u.setCheckerSize(nm(l,"checkerSize",1)),u.setCheckerAnimationDuration(nm(l,"animationDuration",150)),u.buildShapes();var c=nm(l,"checked");return void 0===c&&(c=nm(l,"value",!1)),u.setValue(c),u}return s(i,[{key:"value",get:function(){return this._value},set:function(t){t=!!t,this._value!==t&&(this.dirty=!0,this._value=t,t?this.playCheckerAnimation():this.stopCheckerAnimation(),this.emit("valuechange",t));}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"toggleValue",value:function(){return this.setValue(!this.value),this}},{key:"checked",get:function(){return this.value},set:function(t){this.value=t;}},{key:"setChecked",value:function(t){return void 0===t&&(t=!0),this.setValue(t),this}},{key:"toggleChecked",value:function(){return this.toggleValue(),this}},{key:"checkerAnimProgress",get:function(){return this._checkerAnimProgress},set:function(t){this._checkerAnimProgress!==t&&(this._checkerAnimProgress=t,this.dirty=!0);}}]),i}(Od);Object.assign(om.prototype,im);var am=Phaser.Utils.Objects.GetValue,hm=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var c;return n(this,i),(c=e.call(this,t,r,s,o,a,h,l))._click=new hs(u(c),am(l,"click")),c._click.on("click",(function(){this.toggleValue();}),u(c)),c.setReadOnly(am(l,"readOnly",!1)),c}return s(i,[{key:"readOnly",get:function(){return !this._click.enable},set:function(t){this._click.enable=!t;}},{key:"setReadOnly",value:function(t){return void 0===t&&(t=!0),this.readOnly=t,this}}]),i}(om),lm={name:"CheckboxInput",accept:function(t){return t.hasOwnProperty("view")?"boolean"===t.view:"boolean"==typeof t.value},build:function(t,e){var i=t.scene;t.type="rexTweaker.CheckboxInput";var n=e.checkbox,r=function(t,e){var i=new hm(t,e);return t.add.existing(i),i}(i,n),s=n.size;void 0!==s&&r.setSize(s,s);var o=void 0!==s?0:1;t.add(r,{proportion:0,expand:!1,fitRatio:o,key:"checkbox"}),r.on("valuechange",(function(e){t.setValue(e);}));},displayValue:function(t,e){t.getElement("checkbox").setValue(e);}},um={setTrackFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.trackFillColor!==t||this.trackFillAlpha!==e,this.trackFillColor=t,this.trackFillAlpha=e,this},setFalseValueTrackFillStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.falseValueTrackColor!==t||this.uncheckedTrackFillAlpha!==e,this.falseValueTrackColor=t,this.falseValueTrackFillAlpha=e,this},setThumbStyle:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.thumbColor!==t||this.checkAlpha!==e,this.thumbColor=t,this.thumbAlpha=e,this}},cm={setTrackSize:function(t,e){return this.dirty=this.dirty||this.trackWidth!==t||this.trackHeight!==e,this.trackWidth=t,this.trackHeight=e,this},setTrackRadius:function(t){return this.dirty=this.dirty||this.trackRadius!==t,this.trackRadius=t,this},setThumbSize:function(t,e){return void 0===e&&(e=t),this.dirty=this.dirty||this.thumbWidth!==t||this.thumbHeight!==e,this.thumbWidth=t,this.thumbHeight=e,this},setThumbRadius:function(t){return this.dirty=this.dirty||this.thumbRadius!==t,this.thumbRadius=t,this}},dm={setThumbPosition:function(t,e){return void 0===e&&(e=1-t),this.thumbLeftX=t,this.thumbRightX=e,this},setRTL:function(t){return void 0===t&&(t=!0),this.rtl=t,this}},fm=function(t,e,i){return (e-t)*i+t},vm=function(t){return t>>16&255},pm=function(t){return t>>8&255},gm=function(t){return 255&t},ym=Phaser.Math.Linear,km={buildShapes:function(){this.addShape((new Qd).setName("track")).addShape((new Qd).setName("thumb"));},updateShapes:function(){var t=this.width,e=this.height,i=this.value?this.toggleAnimProgress:1-this.toggleAnimProgress,n=this.getShape("track");if(this.isSizeChanged){var r=t*this.trackWidth,s=e*this.trackHeight,o=(t-r)/2,a=(e-s)/2,h=e*this.trackRadius;n.setTopLeftPosition(o,a).setSize(r,s).setRadius(h);}var l,u,c,d=(l=this.falseValueTrackColor,u=this.trackFillColor,c=i,(255&fm(vm(l),vm(u),c))<<16|(255&fm(pm(l),pm(u),c))<<8|255&fm(gm(l),gm(u),c)),f=ym(this.falseValueTrackFillAlpha,this.trackFillAlpha,i);n.fillStyle(d,f);var v=this.getShape("thumb");if(this.isSizeChanged){var p=t*this.thumbWidth,g=e*this.thumbHeight,y=e*this.thumbRadius;v.setSize(p,g).setRadius(y);}var k=ym(this.thumbLeftX,this.thumbRightX,i)*t;this.rtl&&(k=t-k);var m=e/2;v.setCenterPosition(k,m),v.fillStyle(this.thumbColor,this.thumbAlpha);}},mm={setToggleAnimationDuration:function(t){return void 0===t&&(t=0),this.toggleAnimDuration=t,this},playToggleAnimation:function(){return void 0===this.toggleAnimProgressTask&&(this.toggleAnimProgressTask=new nr(this,{eventEmitter:null})),this.toggleAnimProgressTask.restart({key:"toggleAnimProgress",from:0,to:1,duration:this.toggleAnimDuration}),this},stopToggleAnimation:function(){return void 0===this.toggleAnimProgressTask||this.toggleAnimProgressTask.stop(),this}},bm={};Object.assign(bm,um,cm,dm,km,mm);var xm=Phaser.Utils.Objects.GetValue,Cm=Phaser.Utils.Objects.IsPlainObject,wm=23730,Sm=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var u;n(this,i),Cm(r)?(r=xm(l=r,"x",0),s=xm(l,"y",0),o=xm(l,"width",2),a=xm(l,"height",2),h=xm(l,"color",wm)):Cm(h)&&(h=xm(l=h,"color",wm)),(u=e.call(this,t,r,s,o,a)).type="rexToggleSwitch",void 0===h&&(h=wm),u.setTrackFillStyle(h,xm(l,"trackFillAlpha",1)),u.setFalseValueTrackFillStyle(xm(l,"falseValueTrackColor",function(t){var e=.3*vm(t)+.59*pm(t)+.11*gm(t);return (255&e)<<16|(255&e)<<8|255&e}(h)),xm(l,"falseValueTrackFillAlpha",1)),u.setThumbStyle(xm(l,"thumbColor",16777215),xm(l,"thumbAlpha",1)),u.setTrackSize(xm(l,"trackWidth",.9),xm(l,"trackHeight",.5)),u.setTrackRadius(xm(l,"trackRadius",.5*u.trackHeight));var c=xm(l,"thumbHeight",void 0),d=xm(l,"thumbWidth",c);return void 0===d&&(d=.9*u.trackHeight),u.setThumbSize(d,c),u.setThumbRadius(xm(l,"thumbRadius",.5*u.thumbHeight)),u.setThumbPosition(xm(l,"thumbLeft",.3),xm(l,"thumbRight",void 0)),u.setRTL(xm(l,"rtl",!1)),u.setToggleAnimationDuration(xm(l,"animationDuration",150)),u.buildShapes(),u.setValue(xm(l,"value",!1),0),u}return s(i,[{key:"value",get:function(){return this._value},set:function(t){t=!!t,this._value!==t&&(this.dirty=!0,this._value=t,this.playToggleAnimation(),this.emit("valuechange",t));}},{key:"setValue",value:function(t,e){void 0===e&&(e=this.toggleAnimDuration);var i=this.toggleAnimDuration;return this.toggleAnimDuration=e,this.value=t,this.toggleAnimDuration=i,this}},{key:"toggleValue",value:function(t){return this.setValue(!this.value,t),this}},{key:"toggleAnimProgress",get:function(){return this._toggleAnimProgress},set:function(t){this._toggleAnimProgress!==t&&(this._toggleAnimProgress=t,this.dirty=!0);}}]),i}(Od);Object.assign(Sm.prototype,bm);var Pm=Phaser.Utils.Objects.GetValue,Om=function(t){a(i,t);var e=d(i);function i(t,r,s,o,a,h,l){var c;return n(this,i),(c=e.call(this,t,r,s,o,a,h,l))._click=new hs(u(c),Pm(l,"click")),c._click.on("click",(function(){this.toggleValue();}),u(c)),c.setReadOnly(Pm(l,"readOnly",!1)),c}return s(i,[{key:"readOnly",get:function(){return !this._click.enable},set:function(t){this._click.enable=!t;}},{key:"setReadOnly",value:function(t){return void 0===t&&(t=!0),this.readOnly=t,this}}]),i}(Sm),Tm={name:"ToggleSwitchInput",accept:function(t){return !!t.hasOwnProperty("view")&&"toggleSwitch"===t.view},build:function(t,e){var i=t.scene;t.type="rexTweaker.ToggleSwitchInput";var n=e.toggleSwitch,r=function(t,e){var i=new Om(t,e);return t.add.existing(i),i}(i,n),s=n.size;void 0!==s&&r.setSize(s,s);var o=void 0!==s?0:1;t.addSpace().add(r,{proportion:0,expand:!1,fitRatio:o,key:"toggleSwitch"}),r.on("valuechange",(function(e){t.setValue(e);}));},displayValue:function(t,e){t.getElement("toggleSwitch").setValue(e);}},_m={setWrapEnable:function(t){return void 0===t&&(t=!0),this.listWrapEnable=t,this},setCreateButtonCallback:function(t){return this.listCreateButtonCallback=t,this},setCreateListBackgroundCallback:function(t){return this.listCreateBackgroundCallback=t,this},setButtonClickCallback:function(t){return this.listOnButtonClick=t,this},setButtonOverCallback:function(t){return this.listOnButtonOver=t,this},setButtonOutCallback:function(t){return this.listOnButtonOut=t,this},setListExpandDirection:function(t){return "string"==typeof t&&(t=Em[t]),this.listExpandDirection=t,this},setListEaseInDuration:function(t){return void 0===t&&(t=0),this.listEaseInDuration=t,this},setListEaseOutDuration:function(t){return void 0===t&&(t=0),this.listEaseOutDuration=t,this},setListTransitInCallback:function(t){return this.listTransitInCallback=t,this},settListTransitOutCallback:function(t){return this.listTransitOutCallback=t,this},setListBounds:function(t){return this.listBounds=t,this},setListWidth:function(t){return this.listWidth=t,this},setListHeight:function(t){return this.listHeight=t,this},setListSize:function(t,e){return this.setListWidth(t).setListHeight(e),this},setListAlignmentMode:function(t){return this.listAlignMode=t,this},setListAlignmentSide:function(t){return void 0===t&&(t=""),this.listAlignSide=t,this},setListSpace:function(t){return void 0===t&&(t={}),this.listSpace=t,this},setListDraggable:function(t){return void 0===t&&(t=!0),this.listDraggable=t,this}},Em={down:0,up:1},Mm=function(){var t,e=this.scene,i=this.listCreateBackgroundCallback;i&&(t=i.call(this,e),e.add.existing(t));var n=[],r=this.listCreateButtonCallback;if(r)for(var s=this.options,o=0,a=s.length;o1?i-1:0),r=1;r0&&void 0!==t.setTint},useAlphaFadeEffect:function(t){return (void 0===this.fadeMode||1===this.fadeMode)&&this.fadeTime>0&&void 0!==t.setAlpha},useRevealEffect:function(t){return this.fadeMode>=2&&this.fadeMode<=5&&this.fadeTime>0&&(t.preFX||t.postFX)},fadeBob:function(t,e,i,n){var r=t.gameObject;if(this.useTintFadeEffect(r))void 0!==e&&t.setProperty("tintGray",255*e),t.easeProperty("tintGray",Math.floor(255*i),this.fadeTime,"Linear",0,!1,n);else if(this.useAlphaFadeEffect(r))void 0!==e&&t.setProperty("alpha",e),t.easeProperty("alpha",i,this.fadeTime,"Linear",0,!1,n);else if(this.useRevealEffect(r)){var s;switch(uh(r,"reveal"),this.fadeMode){case 2:s="revealUp";break;case 3:s="revealDown";break;case 4:s="revealLeft";break;case 5:s="revealRight";}void 0===e&&(e=0),r[s]=e,t.easeProperty(s,i,this.fadeTime,"Linear",0,!1,n),t.getTweenTask(s).once("complete",(function(){r[s]=null;}));}else n&&n(r);return this}},qm=Phaser.Events.EventEmitter,Zm=function(t,e,i,n,r,s){return void 0===s?s={}:!0===s&&(s=$m),"number"!=typeof i&&(i=0,n=0),s.x=r.x+r.width*t+i,s.y=r.y+r.height*e+n,s},$m={},Qm=function(t,e,i,n,r,s,o){if(t.hasOwnProperty("vp"))return t;"function"==typeof i&&(o=i,i=void 0),"function"==typeof r&&(o=r,r=void 0),void 0===i&&(i=.5),void 0===n&&(n=.5),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=Zm),function(t){if(t.events)return t;var e=new qm,i=t.x;Object.defineProperty(t,"x",{get:function(){return i},set:function(n){i!==n&&(i=n,e.emit("update",t));}});var n=t.y;Object.defineProperty(t,"y",{get:function(){return n},set:function(i){n!==i&&(n=i,e.emit("update",t));}});var r=t.width;Object.defineProperty(t,"width",{get:function(){return r},set:function(i){r!==i&&(r=i,e.emit("update",t));}});var s=t.height;Object.defineProperty(t,"height",{get:function(){return s},set:function(i){s!==i&&(s=i,e.emit("update",t));}}),t.events=e;}(e);var a=e.events;t.vp=e;var h=function(){o(i,n,r,s,e,t);};a.on("update",h),t.once("destroy",(function(){a.off("update",h),t.vp=void 0;})),Object.defineProperty(t,"vpx",{get:function(){return i},set:function(t){i!==t&&(i=t,h());}}),Object.defineProperty(t,"vpy",{get:function(){return n},set:function(t){n!==t&&(n=t,h());}}),Object.defineProperty(t,"vpxOffset",{get:function(){return r},set:function(t){r!==t&&(r=t,h());}}),Object.defineProperty(t,"vpyOffset",{get:function(){return s},set:function(t){s!==t&&(s=t,h());}}),h();},tb=Phaser.Utils.Array.Remove,eb={has:function(t){return this.bobs.hasOwnProperty(t)},exists:function(t){return this.bobs.hasOwnProperty(t)},get:function(t){return this.bobs[t]},getGO:function(t){var e=this.get(t);return e?e.gameObject:null},addGO:function(t,e){this.remove(t,!0),this.useTintFadeEffect(e)&&function(t,e){if(t.hasOwnProperty("tintR"))return t;void 0===e&&(e=16777215);var i=vm(e),n=pm(e),r=gm(e);Object.defineProperty(t,"tint",{get:function(){return e},set:function(s){s=16777215&Math.floor(s),t.setTint&&t.setTint(s),e!==s&&(i=vm(e=s),n=pm(e),r=gm(e));}}),Object.defineProperty(t,"tintR",{get:function(){return i},set:function(n){n=255&Math.floor(n),i!==n&&(i=n,t.tint=(255&n)<<16|65535&e);}}),Object.defineProperty(t,"tintG",{get:function(){return n},set:function(i){i=255&Math.floor(i),n!==i&&(n=i,t.tint=(255&i)<<8|16711935&e);}}),Object.defineProperty(t,"tintB",{get:function(){return r},set:function(i){i=255&Math.floor(i),r!==i&&(r=i,t.tint=255&i|16776960&e);}}),Object.defineProperty(t,"tintGray",{get:function(){return Math.floor((i+n+r)/3)},set:function(e){e=255&Math.floor(e),i===e&&n===e&&r===e||(i=e,n=e,r=e,t.tint=(255&e)<<16|(255&e)<<8|255&e);}}),t.tint=e;}(e),this.viewportCoordinateEnable&&Qm(e,this.viewport),this.effectPropertiesConfig&&uh(e,this.effectPropertiesConfig),e.once("destroy",(function(){tb(this.removedGOs,e),this.isEmpty&&this.emit("empty");}),this);var i=new this.BobClass(this,e,t);return this.bobs[t]=i,this},add:function(t){for(var e=this.createGameObjectCallback,i=this.createGameObjectScope,n=arguments.length,r=new Array(n>1?n-1:0),s=1;s2?n-2:0),s=2;s0);}},{key:"up",get:function(){return this.upKeyDown}},{key:"down",get:function(){return this.downKeyDown}},{key:"noKey",get:function(){return this.noKeyDown}}]),i}(Me);b.register("mouseWheelToUpDown",(function(t){return new db(this.scene,t)})),Te(window,"RexPlugins.GameObjectShell.MouseWheelToUpDown",db);var fb=function(t){var e=t.layers;Array.isArray(e)||(e=[]),this.backgroundLayerName=e[0]||"background",this.monitorLayerName=e[1]||"monitor",this.uiLayerName=e[2]||"ui";var i=t.layerManager;this.isPrivateLayerManager=!i,this.isPrivateLayerManager&&(i=new ub(this.scene,{layers:[this.backgroundLayerName,this.monitorLayerName,this.uiLayerName]})),this.layerManager=i,this.once("destroy",(function(){if(this.isPrivateLayerManager)this.layerManager.destroy(fromScene);else for(var t=[this.backgroundLayerName,this.monitorLayerName,this.uiLayerName],e=0,i=t.length;e